Skip to content

Commit fc82aba

Browse files
committed
docs: make readme trezor testing entrypoint
List Android and iOS Trezor emulator checks directly in README so Bitkit app PR testing starts there. Add root AGENTS.md guidance to keep actionable test workflows in README.
1 parent 341d557 commit fc82aba

3 files changed

Lines changed: 43 additions & 5 deletions

File tree

AGENTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Agent Notes
2+
3+
## Bitkit App Testing Docs
4+
5+
- Treat `README.md` as the entry point for testing Bitkit app PRs and merged features.
6+
- When adding or changing test workflows, keep the actionable setup and check steps in `README.md`, not only in supporting docs.
7+
- Supporting docs such as `docs/trezor-emulator.md` may contain deeper internals and troubleshooting, but README must remain enough to run the test flow.

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Changed
11+
- Expand README Trezor testing guidance with separate Bitkit Android and Bitkit iOS checklists
1112
- Show ready-to-copy settle and cancel commands in `holdinvoice` output
1213
- Simplify LND funding step in README to a single command instead of clipboard-based two-step flow
1314

@@ -16,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1617
- Preserve LNURL-pay invoice millisatoshi precision by creating invoices with LND `value_msat` instead of truncating callback amounts to sats
1718

1819
### Added
20+
- Root `AGENTS.md` reminder to keep README as the Bitkit app testing entry point
1921
- Trezor User Env Docker service and `scripts/trezor-emulator` helper for quickly smoke-testing Bitkit app Trezor PRs
2022
- Trezor emulator PR-check documentation in `docs/trezor-emulator.md`
2123
- Support `amount_msat` query param in `/generate/bolt11` endpoint for sub-sat precision invoices

README.md

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,30 +167,59 @@ docker compose logs -f bitcoind
167167

168168
#### Trezor Hardware PRs
169169

170-
Use the bundled Trezor User Env helper when checking Bitkit app PRs that need the official Trezor emulator:
170+
Use this section as the entry point when checking Bitkit app PRs or merged features that need the official Trezor emulator. Start by preparing the deterministic Trezor User Env:
171171

172172
```bash
173173
./scripts/trezor-emulator start
174174
```
175175

176176
The macOS Trezor User Env service is included in the default `docker compose up -d` stack. The helper starts or reuses that service, then resets Bridge and the emulator into the deterministic review state. Linux users can start the host-network service with `docker compose --profile trezor-linux up -d trezor-user-env-linux`.
177177

178-
For Bitkit Android on a physical phone:
178+
The helper starts the official Trezor User Env without its regtest stack, launches Bridge, wipes a deterministic T2T1 emulator, and sets it up with the `all all ...` seed and `Bitkit Test Trezor` label. It uses `scripts/trezor-controller.py` inside the container to talk to the User Env websocket controller.
179+
180+
##### Bitkit Android
181+
182+
For a physical phone, reverse the Bridge port and install the dev build with Bridge enabled:
179183

180184
```bash
181185
./scripts/trezor-emulator adb
182186
TREZOR_BRIDGE=true TREZOR_BRIDGE_URL=http://127.0.0.1:21325 ./gradlew installDevDebug
183187
```
184188

185-
For Bitkit Android on an emulator:
189+
For an Android emulator, install with the emulator host Bridge URL:
186190

187191
```bash
188192
TREZOR_BRIDGE=true TREZOR_BRIDGE_URL=http://10.0.2.2:21325 ./gradlew installDevDebug
189193
```
190194

191-
For Bitkit iOS, run the relevant Trezor branch from Xcode and open `Settings -> Advanced -> Trezor Hardware Wallet`.
195+
Open the dashboard at `Settings -> Advanced -> Dev Settings -> Trezor`, then check:
196+
197+
- Scan shows the Bridge emulator device
198+
- Connect succeeds and device features are shown
199+
- Get address succeeds
200+
- Get public key succeeds
201+
- Sign and verify message succeed
202+
- Send or compose reaches the expected funded or no-funds state
203+
- Disconnect, reconnect, and forget-device cleanup behave correctly
204+
205+
##### Bitkit iOS
206+
207+
Run the relevant Trezor branch from Xcode. The User Env dashboard and Bridge are available on the host at:
208+
209+
- User Env dashboard: `http://localhost:9002`
210+
- Trezor Bridge: `http://localhost:21325`
211+
212+
Open the dashboard at `Settings -> Advanced -> Trezor Hardware Wallet`, then check:
213+
214+
- Scan shows the Bridge emulator device
215+
- Connect succeeds and device features are shown
216+
- Get address succeeds
217+
- Get public key succeeds
218+
- Sign and verify message succeed
219+
- Send or compose reaches the expected funded or no-funds state
220+
- Disconnect, reconnect, and forget-device cleanup behave correctly
192221

193-
The helper starts the official Trezor User Env without its regtest stack, launches Bridge, wipes a deterministic T2T1 emulator, and sets it up with the `all all ...` seed and `Bitkit Test Trezor` label. It uses `scripts/trezor-controller.py` inside the container to talk to the User Env websocket controller. See [docs/trezor-emulator.md](docs/trezor-emulator.md) for the smoke checklist, helper internals, and troubleshooting commands.
222+
See [docs/trezor-emulator.md](docs/trezor-emulator.md) for helper internals, environment overrides, and troubleshooting commands.
194223

195224
#### Bech32 LNURL Pay
196225

0 commit comments

Comments
 (0)