diff --git a/docs/README.md b/docs/README.md index 27a5a25f..c53baeff 100644 --- a/docs/README.md +++ b/docs/README.md @@ -42,6 +42,10 @@ jvm-target note is unrelated to all of them: it is a build and packaging story. The subgroups note is a phased plan that has been built; it assumes both shared-key notes and reads as the ceremony's second half — what a group does once it has a key, and what it can say about a group that does not yet. +The group-wallet-addresses note is a phased plan that has been built, and is the +group-chain-wallet note's Phase 5 taken one screen further: read that note's +Phases 4 and 5 first, and its own table of where the build chose differently +before the code. The Material Design note is a phased plan that has not been built, and is the only one about what the app looks like rather than what it does; read the jvm-target note first if you want to know why its adaptive-layout phase exists. diff --git a/docs/group-chain-wallet.md b/docs/group-chain-wallet.md index 62bd0c68..56572581 100644 --- a/docs/group-chain-wallet.md +++ b/docs/group-chain-wallet.md @@ -497,7 +497,9 @@ script hashes it does not know. **Gap limit.** Phoenix's final wallet watches one address; the swap-in wallet's default `lookAhead` is 3. A group hands addresses out from several devices, so two members can show the same next address and the gap is mostly bounded by deposits -nobody made. Start at 10 for receive and 3 for change — each is one Electrum +nobody made. (The address list in +[group-wallet-addresses.md](./group-wallet-addresses.md) is what lets them hand +out different ones.) Start at 10 for receive and 3 for change — each is one Electrum subscription per group, and a member in twenty groups pays for all of them. `derivationOf` searches only addresses the wallets have generated, which is the bound on how far Phase 7's checks will look. diff --git a/docs/group-wallet-addresses.md b/docs/group-wallet-addresses.md index 69f398ec..44f4e207 100644 --- a/docs/group-wallet-addresses.md +++ b/docs/group-wallet-addresses.md @@ -9,9 +9,28 @@ Read [group-chain-wallet.md](./group-chain-wallet.md) first, Phases 4 and 5 in particular: this list is a view over the same `ElectrumMiniWallet` state that picks the receive address, and it adds nothing to what the wallet watches. -**Not built.** Written against the code as it stood at `707e1465`, with the -`lightning-kmp-app` submodule at `e0d2b82`. `GroupWalletState.receiveAddresses` -will be the entry point, and `GroupWalletAddressesScreen` the screen it feeds. +**Built**, phases 1-5, one commit per phase. Written against the code as it stood +at `707e1465`, with the `lightning-kmp-app` submodule at `e0d2b82`. +`GroupWalletState.receiveAddresses` and `changeAddresses` are the entry points, +and `GroupWalletAddressesScreen` is the screen they feed. The phases are kept as +written; where the build chose differently the table below says so. + +| what the plan said | what it turned out to be | +|---|---| +| the explainer ends *share one of the next two* | *share one of the ones after it*, so the sentence does not have to change if `ADDRESSES_AHEAD` does | +| `FakeElectrum` gains a `spend` and a history | and moves out of `GroupOnchainWalletJvmTest` into a file of its own, `FakeElectrum.kt`, so the view model's tests can drive a chain too | +| rows keyed by index | keyed by branch and index: Phase 4's change section starts at index 0 too, and a `LazyColumn` with two rows under one key throws | +| `receiveAddresses` is one function over the receive branch | one private `listed(branch, state, current)` behind both it and Phase 4's `changeAddresses`; a branch with no current index lists only its used addresses | +| an unused row is clickable | and says what a click does: `onClickLabel` is *Show as a QR code*, so a screen reader announces it rather than an unlabelled action | +| the sheet is the `BottomSheetDialog` widget | the `ModalBottomSheet` wrapper that `BottomSheetDialog.kt` declares, as `ChatRoomDetailScreen` calls it | +| the sheet closes when its address's status is anything other than current or next | when it is `USED`, which is the same thing: those are the three there are | +| one view-model test for the sheet | two, the second that a payment to *another* address leaves the sheet open: paying the current address can turn the shown one from next into current, and that is not a reason to close it | +| the copy button's description is *Copy address %1$s* with the index | it is, and a receive row and a change row with the same index therefore share it. The section heading between them is what tells them apart to a screen reader | + +A real wallet has not been looked at through this screen yet. Every phase was +checked with `:composeApp:jvmTest`, `:composeApp:compileDebugKotlinAndroid` and +`m3-audit.sh --check`, and the list's rules are tested against the fake chain, +but no device has drawn it over an Electrum server. The headline: **the list is indices `0` through `max(current + 2, highest used)`, newest first, read straight off the receive mini-wallet's `WalletState`. Nothing