Repository navigation
Conversation
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks
26 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #2105
Source: team, #2105
Warning
Do not publish the Wear app until #2152 ships. The watch runs the same Spark wallet as the phone, and Spark real-time sync is off (
realTimeSyncServerUrl = null), so two live instances share no state. Mainnet is also gated off in this build (Env.IS_MAINNET_ENABLED = false), and the phone's Watch row is hidden on mainnet (Env.isWatchLinkEnabled).Stacked on #2193 (
feat/wear-pending-payments). This is part 1 of 3 of phone–watch pairing: the pairing ceremony, setting a watch up from the phone (the phone sends the wallet), and a live settings push. Part 2 shares invoice hashes, QuickPay counts and send records; part 3 adds watch management from the phone.Description
:wearlink, a plain JVM module shared by both apps with the pairing protocol, so both sides run the same code:KeyAgreement, HKDF from BouncyCastle (bcprov-jdk18on1.86) bound to the whole handshake transcript, and AES-GCM with counters against replay and reflection. No custom primitives.MessageClient(never the Data Layer's stored items), and is stored through the watch'sKeystoreSeedStore. Three unfinished tries lock transfers for 10 minutes.PhoneStateSinktakes both the push and the VSS backup import: the newer one holds, and the watch stays read-only on VSS. This leaves room for a later VSS-based sync to feed the same store.screenshot-blocked.xmljourney from feat: add wear os app foundation #2177 is retired, because it needs a release build, which is ARM-only and can't run on the emulator; it is now manual test 8 injourneys/wear/README.md› Manual tests on a physical watch.docs/wear.md› Pairing), journeys and manual tests for physical devices.Out of Scope
wear/app: shared invoice hashes, QuickPay counts and send records between paired devices — pairing part 2.wear/app: watch management from the phone (limits, payment handoff, install prompt), and turning watch QuickPay off until the phone enables it — pairing part 3.wear/app: one paired watch per phone; pairing again replaces the earlier one.wear: if the watch's clock is more than 5 minutes behind the phone's, an older backup can briefly undo a newer push (documented indocs/wear.md› Push against import).wear/app: if the watch dies between writing its wipe marker and acknowledging, it finishes the wipe at the next start but the phone keeps showing "erase waiting" until Stop Waiting; it never shows an erase that didn't happen.wear/app: Bluetooth "nearby" is not used; the Data Layer carries everything.Design
N/A — no design available. #2105 is a prototype with no Figma; the phone sheet reuses the existing sheet host,
SheetTopBarand illustrations.Preview
Phone
Bitkit_Phone_API36(Android 16) and watchWear_Large_Round_API37(Wear OS 7) paired over the debug socket, app commita371e56f0. At that commit the watch's Pair screen still blocked screenshots in debug builds, so the recording shows it black; the code was read from the layout dump and matched the phone's in every run. The Pair screen below was captured later on a debug build with the screenshot change (96aecac1fplus #2195's follow-upfeat/wear-shared-guardsatd961f2853, same Pair screen).Recordings:
pair-receive-wallet-pin.mp4
pair-receive-wallet-pin.mp4
pair-erase-from-phone.mp4
QA Notes
Setup
Bitkit_Phone_API36andWear_Large_Round_API37running together, dev debug builds of this branch on each, paired over the debug socket:journeys/wear/README.md› Phone and watch over the debug socket (adb forwardplus thewearlink-socketfile on each app; both apps logUsing the debug socket link transport). No Google account is needed.1111, biometrics off. Watch: no wallet, or the phone's wallet, as each journey says.journeys/wear/README.md› On a physical watch; test 3a and 9 need release-signed builds.Journeys
watch-no-watch-connected.xml— the phone sheet with no watch says so and starts nothingpair-receive-wallet-no-pin.xml— a phone without a PIN refuses to send the walletpair-receive-wallet-pin.xml— the same code on both, Back on the PIN pad returns to the code, the wallet arrives only after the PINpair-receive-wallet.xml— a watch without a wallet is set up from the phonepair-settings-push.xml— a currency change on the phone reaches the watchpair-unpair-from-phone.xml— unpair from the phone; the watch keeps its walletpair-same-wallet.xml— a watch with the same wallet pairs by proof, with no PIN and nothing sentpair-different-wallet.xml— a watch with another wallet is refused on both sidespair-cancel-on-watch.xml— swiping the watch's Pair screen away cancels on bothpair-retry-after-cancel.xml— cancel and Pair again at once on the phone pairs without a 90 s waitpair-unpair-from-watch.xml— the watch's "Unpair phone?" dialog, swipe cancels, Unpair ends it on bothpair-erase-from-phone.xml— erase from the phone removes the watch's walletremove-wallet-cancel.xml,remove-wallet.xml— one "Remove" edge button, swipe cancelsreceive-paid.xml,receive-paid-ambient.xml— the paid ✓ is status only; "New invoice" makes a new one and hides in ambientRetired:
screenshot-blocked.xml(from #2177) — debug builds no longer block screenshots; replaced by a manual test on a release build.Manual Tests
Details and sub-cases are in
journeys/wear/README.md› Manual tests for pairing.wearlink-socketfileAutomated Checks
PairingTest.kt— the ceremony on both sides: nothing sent before both confirm, attestation and status-list refusals, PIN required, replay of earlier messages, a full relay ends with differing codes, lockout, cancel at each stepAttestationVerifierTest.kt,AttestationStatusListTest.kt— chain, roots, challenge, key purpose and origin, a forged record under a genuine key, revoked, suspended and unknown entries, size capLinkCryptoTest.kt,LinkChannelTest.kt,LinkEndpointsTest.kt,PairingThrottleTest.kt— encryption, counters, replay and reflection, unpair, erase with redelivery after a crash, settings pushLinkSourcesTest.kt,WatchLinkSourcesTest.kt— the phrase never goes through the Data Layer's stored items or the logsWatchLinkRepoTest.kt,WatchSheetViewModelTest.kt— the phone's flow: cancel in each step, retry, PIN asked only when the wallet is sent, refresh while no watch, reopen during a transferPhoneLinkRepoTest.kt,PairViewModelTest.kt,SettingsPhoneStateSinkTest.kt— the watch's flow: storing the phrase, a kept retry, erase at start after a crash, push against VSS importWipeWalletUseCaseTest.kt,WalletRepoTest.kt,SettingsSyncRepoTest.kt,PhoneSettingsParserTest.kt,SettingsViewModelTest.kt,ReceiveQrContentTest.kt,LaunchRequestTest.kt— wipe only unpairs, erase by the phone, the import through the sink, the unpair failure line, the "New invoice" buttonEvidence
a371e56f0(after the screenshot change:just compileandjust testonc3be448c9,just linton96aecac1f, which only rewraps a comment):just compile,just test(with:wear:testDevDebugUnitTest --rerun),just lintall passed.just depswas run for the new dependencies andgradle/verification-metadata.xmlis committed.:wear:minifyDevReleaseWithR8passed with BouncyCastle and the wearable library.Bitkit_Phone_API36(Android 16) andWear_Large_Round_API37(Wear OS 7) ata371e56f0over the debug socket; the code matched on both devices in every run. J13 coveredremove-wallet-cancel.xmlonly.Gaps
remove-wallet.xmlwere not run (J14 needs the local./sparkstack build to receive a payment).restore__error_insecurein 8 locales) had no native review.Models used
claude-opus-5-5(reasoning:medium)claude-fable-5-2(reasoning:medium),claude-opus-5-5(reasoning:medium)claude-fable-5-2(reasoning:medium),claude-opus-5-5(reasoning:medium)claude-sonnet-5-5(reasoning:medium)🤖 Generated with Claude Code