Commit Graph
104 Commits
Author SHA1 Message Date
Kgothatso NgakoandClaude Opus 5.5 3b2d9bd82f Merge branch 'bennu' into claude/ecstatic-feynman-2c5628
Brings in member guarded wallets and funding a descendant's guarded wallet.

- Schema: bennu's v30 (MemberWallet, MemberWalletSpend) is kept as it is;
  DkgSession.guardianDelay moves to v31, with a 30 -> 31 auto-migration.
- Conflicts: strings and README take both sides; the send form's guardian
  delay line moves into the shared SpendForm; the guarded wallet card keeps
  its Fund and Spend buttons and gains this group's own leaf's delay.
- bennu's uses of ANCESTOR_DELAY become each leaf's own delay:
  GuardedWalletRow.arriving, the funding form's "spend these coins again"
  line, the member wallet screens' reach text (MemberWalletManager.delaysOf)
  and the member certificate's proposal summary.
- Four of bennu's fixtures built a "guarded" wallet with no guardian leaf;
  they now carry the ancestor's, as a verified statement would.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 08:31:51 +02:00
Kgothatso NgakoandClaude Opus 5.5 a8869f533b Merge branch 'bennu' into claude/guarded-wallet-individual-plan-d79fcf
Brings in a group funding a descendant's guarded wallet. Three conflicts:

- GroupSendScreen: funding replaced the address field and named the
  funded wallet in the preview, inside the fields this branch moved
  into SpendForm. SpendForm now takes a destination slot, which a
  funding fills with its card, and the funded wallet's name; the
  preview takes both that name and the member's ownWallet words.
- GroupWalletScreen: the guarded wallet row is funding's card with Fund
  beside Spend, headed by this branch's #name / @name and carrying a
  member's label.
- docs/README.md: both rows.

Funding reads guarded wallets through GuardianManager.guardedWalletsOf,
which this branch widened to members' wallets, so a group can now fund
a member's guarded wallet. Every place funding named a wallet with
`name ?: "a subgroup"` -- the title, the destination card, the preview,
the proposal summary, a signer's refusal -- uses displayName, so it
reads "Fund @alice's guarded wallet". A test funds a member's wallet
end to end through GroupSpend.fundingsOf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 08:15:27 +02:00
Kgothatso NgakoandClaude Opus 5.5 ece52a12fd feat(groups): a group's page lists its members' wallets, and a person's page the groups guarding them (Phase 11)
ChatRoomDetailScreen gets a Members' guarded wallets section of its own
under Subgroups: a row is a person, @name and the wallet's label, and
it opens their profile rather than a room. A request no signer has put
to the group yet says so, and a share-holder can put it to the group
from the row; a member who could ask has the way in beneath.

ProfilePreviewScreen lists the person's wallets the groups this profile
is in guard, one row per guarding group, with Spend where this device
holds a share -- the guardian spend the wallet screen already makes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:58:05 +02:00
Kgothatso NgakoandClaude Opus 5.5 4ea38043ad feat(wallet): the groups guarding a member's wallet list it as @name (Phase 10)
A guarded wallet's subject is now a subgroup or a member.
GuardianManager.verify takes a member wallet certificate beside a
subgroup's statement, checks it on its own and walks the ancestor's
guardian root down a line of descent that ends in the wallet's id. The
group that signed a certificate lists it from its own signed events;
the groups above learn of it from a 30333 notice, and a member in both
rooms can carry it upward from the wallet screen as before.

The guardian spend is unchanged: the guarded tag carries W, the builder,
the check and the signing cache take any id. The wallet screen names a
subgroup's wallet #name and a member's @name -- the live profile name,
since the certificate fixes who the member is, not what they are called.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:53:23 +02:00
Kgothatso NgakoandClaude Opus 5.5 8a3e98e4d6 feat(wallet): a member spends their guarded wallet alone (Phase 9, part 2)
MemberWalletManager.signSpend checks a spend the way a group member
checks a group's -- GroupSpend.check against the account the wallet
rederives to -- signs every input on the key path with the member's
key, asserts correctlySpends, and files it as a MemberWalletSpend.
While member wallets are shut on mainnet a member's own spend there is
held to the same cap as every group spend.

MemberSendScreen is the group's SpendForm with a button that signs and
sends; the line above it says there is no quorum after this. There is
no session for GroupTransactionWatcher to follow, so the wallet screen
follows the member's spends while it is open, sending again any
Electrum has not heard of, and lists them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:49:59 +02:00
Kgothatso NgakoandClaude Opus 5.5 70d896a38d refactor(wallet): the send form is one composable a member's spend can share (Phase 9, part 1)
GroupSendScreen's fields and preview move, unchanged, into SpendForm,
which emits into the caller's column so the group's form lays out as it
did. The button stays the caller's: a group asks its quorum, a member
will sign alone. An ownWallet flag changes the words -- "your coins",
"this wallet" -- and nothing else, so the two forms cannot drift.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:46:14 +02:00
Kgothatso NgakoandClaude Opus 5.5 b58a757a44 feat(subgroup): the picker chooses the parent's own guardian delay, and the join gate says it (Phase 5)
Under the guarded row, SelectSubgroupAdminsScreen offers the delay for
this group's own leaf: presets for an hour, two (the default), a day, a
week, a month, six months and the longest, and a custom field in blocks
whose supporting text says what it works out to, or why it cannot be
used. The view model keeps what was typed rather than clamping it,
refusal() refuses a delay outside 6..65,535 for a guarded subgroup, a
retry restores it, and confirm passes it to proposeRitual. The guarded
row and the join gate stop quoting 12.

Lands with Phase 6, which puts the chosen delay into the certificate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:44:52 +02:00
Kgothatso NgakoandClaude Opus 5.5 eb4d627840 feat(wallet): a member's guarded wallets on their profile, and each one's screen (Phase 8)
The profile lists every guarded wallet of its own this device knows
about, named for the group that guards it: the ones whose key is here,
and the ones a group this device is in has certified for this npub,
which includes wallets made on another device and shown watch-only.
Each row says where the asking has got to -- asked, signing, not
signed, open -- or the balance.

MemberWalletScreen offers addresses only once a group has certified
the wallet. Before then the member can ask again or discard the key,
which is safe exactly then; after, it shows the balance, the address,
the coins and every coin a guardian took, read off the chain. Export
key, behind a confirmation, shows both descriptors with the private
key in them.

wipeData has no callers and deletes nothing yet, so there is no wipe to
guard; a note on it says what a caller must do once it does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:44:30 +02:00
Kgothatso NgakoandClaude Opus 5.5 467965b81a feat(wallet): Fund beside Spend on every guarded wallet, in a card that keeps the name (Phase 5)
Each guarded wallet on an ancestor's wallet screen becomes an outlined card:
the name (now up to two lines) and what is within reach, then Fund and Spend
in a flow row under them rather than in the list item's trailing slot, each
naming its wallet to a screen reader. Fund is offered only where the room has
a wallet of its own and can sign and watch. The supporting line adds what is
arriving -- coins not yet past the leaf's lock -- so a funding does not look
lost for two hours. The send form's destination card names the wallet once,
under "To", instead of repeating the title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:42:21 +02:00
Kgothatso NgakoandClaude Opus 5.5 fbfe9075f2 feat(wallet): every screen says each guardian's own delay (Phase 7)
Before a parent can choose a delay, the screens stop saying "12":

- the child's wallet screen, opened or not, lists each guardian nearest
  first with its own delay -- "#Council: after 144 blocks, about 1 day" --
  named by the room this device holds for it;
- an ancestor's Guarded wallets list says, per wallet, the delay that
  wallet gives this group, and GuardedWalletRow.withinReach counts coins
  past that delay rather than the default (GuardedWallet.delay);
- the send screen tells a guardian that only coins past its leaf's lock
  can be spent;
- the subgroup rows and a subgroup's parent row say "Guarded wallet,
  after <delay>", off the certificate.

The strings that quoted one number are reworded without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:42:15 +02:00
Kgothatso NgakoandClaude Opus 5.5 0bc076a894 feat(wallet): a member asks a group to guard a wallet only they can spend from (Phase 6)
MemberWalletManager.request makes a random key, works out the group's
leaf and every inherited one, builds both descriptors, stores the key,
and only then puts the signed request into the group's room. It checks
the request the way every signer will before it goes, and a member who
holds a share of the group's key puts it to the group in the same step.

NewMemberWalletScreen is a consent screen first: who can take the
member's coins and after how long, who will see them, and that the
group is the recovery path -- then an optional label and one button.
Every refusal is named, and a member who does not know the group's key
can ask for it from there. Its entrances arrive with the profile's
guarded wallets (Phase 8) and the group's page (Phase 11).

GroupWalletRollout.MEMBER_WALLETS_ON_MAINNET is shut: the entrances are
offered on test networks only, since the member's own spend is the
first single-signer path the app has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:38:30 +02:00
Kgothatso NgakoandClaude Opus 5.5 2dd1caafdd feat(wallet): a number of blocks said in time, roughly (Phase 3)
text/BlockDuration.approximate: within 5% of exactly one hour, day, month
or year, that unit singular; otherwise the largest unit that comes to at
least 2, rounded -- 216 blocks is about 36 hours, 65,535 about 15 months.
delayText says it beside the block count, "144 blocks, about 1 day", and
the block count alone on regtest.

The catalogue's first plurals, so nothing reads "about 1 hours";
StringCatalogueJvmTest asserts they resolve. Nothing shows a delay yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:36:18 +02:00
Kgothatso NgakoandClaude Opus 5.5 7848559547 feat(wallet): the send form funds a descendant's guarded wallet (Phase 4)
GroupSendRoute.fundChatRoomId opens the form in fund mode: the address field
gives way to a fixed destination card naming the wallet, the address
fundingAddress chose and its index, and that the group can spend the coins
again after the leaf's lock. The form follows the descendant's chain state and
the room's open fundings, so a paid or held address moves on while it is open.
A route naming both a source and a destination is not opened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:34:33 +02:00
Kgothatso Ngako 60cb3fa7ae Merge remote-tracking branch 'origin/bennu' into claude/parent-group-wallet-control-5a1540
# Conflicts:
#	composeApp/src/commonMain/kotlin/com/machankura/bennu/compose/database/repository/DatabaseChatRepository.kt
#	composeApp/src/commonMain/kotlin/com/machankura/bennu/compose/repository/ChatRepository.kt
#	composeApp/src/commonMain/kotlin/com/machankura/bennu/compose/ui/view/model/ChatRoomDetailViewModel.kt
#	composeApp/src/commonMain/kotlin/com/machankura/bennu/compose/ui/view/state/ChatRoomDetailUIState.kt
#	composeApp/src/commonTest/kotlin/com/machankura/bennu/compose/text/ProposedEventTest.kt
2026-10-24 06:13:32 +02:00
Kgothatso NgakoandClaude Opus 5.5 47df6f51f7 feat(wallet): a subgroup's wallet screen offers only what its parent decided (Phase 6)
GroupWalletViewModel reads the room's own wallet policy through
ChatRepository.walletPolicyOf: a parent that decided guarded leaves the
guarded wallet alone, one that decided unguarded the plain one alone, and
an undecided subgroup or a root group keep what they had. openWallet will
not build a plain statement under a guarded policy, and OpenWalletAction
shows one button with a line saying the decision was the parent's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:04:43 +02:00
Kgothatso NgakoandClaude Opus 5.5 6599b5b116 feat(subgroup): the picker chooses the subgroup's wallet policy, and the join gate says it (Phase 3)
SelectSubgroupAdminsScreen gains a wallet section under the quorum
stepper: guarded (the default) or unguarded, carried to proposeRitual.
Under a guarded parent the unguarded row is shown disabled with its
reason, setWalletPolicy will not move off guarded, a retry is pulled back
to guarded, and refusal() refuses it -- D4. A parent whose guardian keys
do not read cannot make a guarded subgroup, which is now refused before a
ceremony rather than after.

SubgroupManager.walletPolicyOf is the one reader of a group's own policy,
reached through ChatRepository with guardiansOf. DkgJoinApprovalScreen
tells an admin what the subgroup's wallet will be before they join.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 21:58:10 +02:00
Kgothatso Ngako da0841fd5e Merge branch 'claude/remove-nostr-relays-posts-fc5580' into bennu 2026-10-23 18:28:30 +02:00
Kgothatso Ngako 79f2ec3d4d Merge branch 'bennu' into claude/remove-nostr-relays-posts-fc5580
# Conflicts:
#	composeApp/src/commonMain/kotlin/com/machankura/bennu/compose/database/model/ChatMessage.kt
#	composeApp/src/commonMain/kotlin/com/machankura/bennu/compose/database/repository/DatabaseChatRepository.kt
#	composeApp/src/commonMain/kotlin/com/machankura/bennu/compose/nostr/wallet/GroupWallet.kt
#	composeApp/src/commonMain/kotlin/com/machankura/bennu/compose/repository/ChatRepository.kt
2026-10-23 18:28:25 +02:00
Kgothatso NgakoandClaude Opus 5.5 7093adc0ee feat(wallet): a group's onchain wallet is named for its group
The wallet screen's title and the row on the group's detail screen read
"<group name> onchain wallet" instead of "Group onchain wallet". A room
with no subject, and the wallet screen before its room has loaded, keep
the generic name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:26:44 +02:00
Kgothatso NgakoandClaude Opus 5.5 b21f4c4d2c refactor(groups): remove the group's nostr profile, relays and posts
The group's detail screen loses its "Nostr profile", "Relays" and "Posts"
rows, and the six screens behind them go with them: the profile, its
editor, the relay lists, their editor, the posts and the composer. So do
the readers they stood on (GroupNostrProfile, GroupRelayList, GroupPost),
their ChatRepository methods, and 97 strings.

Two things go that were not named, because nothing else reaches them.
BroadcastGroupSignedEventScreen was only opened from those three screens,
so the app no longer sends a group-signed event to a relay, and
EventPublishTransport goes with it. "Propose event" accepted only a
profile, a post or a relay list, so it would refuse every paste;
ProposeGroupEventScreen and GroupEventProposal are removed, and with them
the detail screen's canEditNostrProfile gate. What is left of that block
is the wallet row, shown in Marmot rooms only.

The transcript keeps what it already holds. The three message types stay
as private legacy names in GROUP_IDENTITY_TYPES, as the curated-lists
types did, so rows already written stay system lines. A profile or relay
list arriving in a room now applies to nothing, so a signing session an
older build opened for one ends without a raw-JSON bubble. A kind:1 falls
through to "unsupported", which is what it was before posts existed.
ProposedEvent no longer describes the three kinds.

GroupSignedWorkRowsJvmTest now covers the wallet row and the absence of
the removed rows. The chronicle tests still use a profile, a relay list
and a post as their kinds; they compare GroupSignedEvent rows, which are
unchanged, so only ChronicleTestKinds' account of why is corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:56:58 +02:00
Kgothatso Ngako 61c6f0b68e Merge remote-tracking branch 'origin/bennu' into claude/taproot-group-hierarchy-spending-7a37ac
# Conflicts:
#	composeApp/schemas/com.machankura.bennu.compose.database.BennuDatabase/27.json
#	composeApp/src/commonMain/kotlin/com/machankura/bennu/compose/database/BennuDatabase.kt
#	composeApp/src/commonMain/kotlin/com/machankura/bennu/compose/database/model/ChatMessage.kt
2026-10-23 17:41:56 +02:00
Kgothatso NgakoandClaude Opus 5.5 68a86b4d77 refactor: remove the unreachable nip30303 document screens (Phase 7, part 1)
Nothing navigated to the artifact, chapter, dialect or translation screens:
ArtifactDetailRoute, AddArtifactRoute and AddDialectRoute were never built,
and the other six were only reached from inside those screens. Removed with
their view models, UI states, routes, nav host entries, the repository behind
them, TranslationScaffold, DetailRow, and the 65 strings only they used. The
group details screen loses the document repository it stored and never read.

The string catalogue test now checks its escapes on a string that stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:42:15 +02:00
Kgothatso NgakoandClaude Opus 5.5 726adfc02c feat(dkg): a participant can abandon a key ceremony, and only a participant (Phase 5)
There was no way to end a ceremony: ChillDKG has no "no" short of it, and
the approval screens pointed at an abandon action on the ritual screen that
did not exist. ChillDkgRitualManager.abandon now ends a running ceremony this
device is in, filing and broadcasting the same FAILURE a fault sends, and the
ceremony screen offers it behind a confirmation.

record() now ignores a FAILURE from anyone outside the ceremony. In a
parent's room every member can read a subgroup's proposal, so any of them
could otherwise end it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:35:56 +02:00
Kgothatso NgakoandClaude Opus 5.5 cc01f4aab9 feat(dkg): one screen that starts a group's own key ceremony (Phase 3)
CreateSharedKeyScreen takes the quorum and a single button, and nothing
else. It refuses a Marmot room and a group of one with a reason, hands over
to a ceremony the group already has rather than offering a second, and
replaces itself with the ceremony once it is opened so back never returns to
an offer. The group details' Shared key button and the card shown when a
robust group was created without its ceremony both lead here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:27:15 +02:00
Kgothatso NgakoandClaude Opus 5.5 29328b4c5f fix(wallet): settle a spend whose coins another room's transaction took
A guarded wallet's coins have a spender outside the room: a guardian can
take a coin the child's open spend wants, and the child can move one a
guardian's wants. Neither winner is a row in the loser's room, so the loser
sat signed and rebroadcast forever. The watcher now asks the chain, for a
signed spend Electrum has not heard of, which transaction took each coin;
once that one confirms, recordReplaced marks the spend replaced and settles
every other spend of the coin, as recordConfirmed does for the room's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:12:48 +02:00
Kgothatso NgakoandClaude Opus 5.5 00df58c1f3 feat(wallet): an ancestor's quorum spends a descendant's coins through its leaf (Phase 7)
GroupSpend checks a spend as a guardian would sign it: every input under
the descendant's account, locked by the leaf's 12 blocks, signed over the
script-path sighash as the key the ancestor's walk reaches, and witnessed
with the leaf and its control block. The builder waits out the lock and
weighs the leaf; the signing manager proposes, accepts, signs and completes
it, and every signer reads the descendant's wallet from its own copy of the
statement. A guarded wallet row on the ancestor's wallet screen opens the
send form for it. Schema v27 adds GroupTransaction.guardedChatRoomId.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:37:21 +02:00
Kgothatso NgakoandClaude Opus 5.5 e7a1ad260f feat(wallet): a guarded wallet is told to the groups above, and they watch it (Phase 6)
A member in both rooms carries a descendant's signed guarded statement into
an ancestor's MLS room as a 30333 notice, and can pass one on a generation
further. Every ancestor device believes it only when its own guardian root
reaches the key the statement names for it. The wallet screen lists the
guarded wallets below the group with what is within its reach, and the
statements this device can still carry up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:26:19 +02:00
Kgothatso NgakoandClaude Opus 5.5 cbe5330cac feat(wallet): a subgroup opens a guarded wallet, and spends from it as before (Phase 5)
A room whose certificate grants guardian keys is offered a guarded wallet,
with a plain one beside it, on test networks; mainnet waits behind
GroupWalletRollout.GUARDIANS_ON_MAINNET. A spend's account is the one the
statement opened, so its own spends sign the guarded addresses' key path,
and wallets are watched per descriptor rather than per xpub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:17:24 +02:00
Kgothatso Ngako 409be6db28 Merge remote-tracking branch 'origin/bennu' into claude/satoshi-amount-group-wallet-a12572
# Conflicts:
#	composeApp/src/commonMain/kotlin/com/machankura/bennu/compose/wallet/GroupOnchainWallet.kt
#	composeApp/src/jvmTest/kotlin/com/machankura/bennu/compose/wallet/GroupOnchainWalletJvmTest.kt
#	docs/README.md
2026-10-23 12:51:52 +02:00
Kgothatso NgakoandClaude Opus 5.5 affb90be41 Merge branch 'claude/receive-address-rotation-4731b9' into bennu
The group wallet's address list: every paid receive address, the
current one and the two after it, any unused one handed out as a QR
code, and the used change addresses -- docs/group-wallet-addresses.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:34:28 +02:00
Kgothatso NgakoandClaude Opus 5.5 9a319e1ef1 feat(wallet): the amount field says what can be spent and what is wrong (Phase 4)
The amount field shows its unit, how many sats are confirmed and free to
spend, and on mainnet the cap; a problem with the amount -- not whole,
too large, more than the group has, too small, over the cap -- is said on
the field in its error state instead of under the form. The send-everything
row is one 48dp toggleable target, and turning it off again finds the
amount typed. The wording of every reason is one function shared by the
field and the preview.

GroupSendScreenJvmTest types into the form on regtest and mainnet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:31:00 +02:00
Kgothatso NgakoandClaude Opus 5.5 8e7782261f feat(wallet): send an amount from the group's wallet on every network (Phase 2)
SEND_AN_AMOUNT kept every network on send-all until a release had shipped
with no mislabelled change, which no release could do while the gate was
closed. It is removed: the send screen always offers the switch and the
amount, and on mainnet the existing 100,000 sat cap bounds what a change
bug could put at risk. Phase 3's end-to-end test is what stands in for
the release the gate was waiting for.

The view model test no longer branches on the constant, and a mainnet
test holds an amount to the cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:26:10 +02:00
Kgothatso NgakoandClaude Opus 5.5 eb1f126adf feat(wallet): hand out any unused address as a QR code (Phase 3)
Tapping the current or a next address on the list opens it in a sheet
-- the receive card's QR code, selectable text and copy, titled with the
index so a member can say which one they gave. A used address has copy
and nothing else: copying is for checking, a QR code is for being paid.

The sheet closes itself, with "Address N was just paid", when Electrum
reports a payment to the address it is showing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:23:05 +02:00
Kgothatso NgakoandClaude Opus 5.5 5c77853cfa feat(wallet): change goes to an address the group can find (Phase 3)
Two open spends with change both paid to the first unused change
address, since a spend waiting for signatures has not used it yet.
Change indices are now reserved like coins: reservedChangeIndices reads
the claims of every open spend, and the builder takes the lowest watched,
unused, unheld index. It chooses among generated addresses only, so
change never lands outside the window; CHANGE_LOOKAHEAD rises to 10 and
past it a spend with change returns TooManyOpen.

The change branch not having answered is FindingChange rather than
NothingToSpend, and change too small to send back is reported as
Built.absorbed and said in the preview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:22:32 +02:00
Kgothatso NgakoandClaude Opus 5.5 5b06c84401 feat(wallet): a screen listing the group wallet's addresses (Phase 2)
GroupWalletAddressesScreen, pushed from an "All addresses" button in the
wallet screen's receive card: index, address, and what each has been
used for, newest first, with the current address on the secondary
container and a copy button on every row. Its view model reads the
wallet GroupOnchainWallets already holds, so the list costs no
subscriptions and agrees with the wallet screen about which address is
current.

FakeElectrum moves out of GroupOnchainWalletJvmTest so the view model's
test can drive a chain too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:19:47 +02:00
Kgothatso NgakoandClaude Opus 5.5 bc348419bc feat(wallet): read an amount as whole sats, or say why not (Phase 1)
The gated amount field read its text by dropping every non-digit, so
21000.5 became 210,005 sats and 0.0005 became 5. parseSats accepts
thousands grouping and refuses decimals, grouping that groups nothing,
non-ASCII digits and more sats than exist; the preview reports which.
The field shows plain digits grouped and keeps what was typed.

Also plans the rest in docs/group-send-an-amount.md: send-an-amount
opens on every network at once, held on mainnet by the existing cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:15:17 +02:00
Kgothatso NgakoandClaude Opus 5.5 96055da584 feat(wallet): call it the group onchain wallet
The wallet screen's title, the room's detail row, the button that opens
one and the proposal summary a member agrees to all said "group wallet".
They now say "group onchain wallet", which is what it holds, and agrees
with GroupOnchainWallet in the code. Sentence case, as every string is.
Resource keys are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 11:51:36 +02:00
Kgothatso NgakoandClaude Opus 5.5 cd7aa36cd0 Merge remote-tracking branch 'origin/bennu' into claude/group-chain-wallet-plan-93f0e1
Every conflict was the curated-lists removal on bennu meeting a wallet
line added beside it: the removal is taken and the wallet lines kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 10:04:53 +02:00
Kgothatso NgakoandClaude Opus 5.5 f83fe35a45 feat(wallet): ship behind the rollout gates (Phase 10)
GroupWalletRollout holds the three gates, each with what lifts it. The
flag is on, its condition met. Send-an-amount is off, so the form sends
everything confirmed to one address and says so. A spend proposed from
this device on mainnet may send at most 100,000 sats; test networks
have no cap. The gates are on the composer and nothing else: a device
behind them still accepts, shows and signs what another member
proposes, through every check GroupSpend makes.

The plan is marked built, with its table of where the build chose
differently. Full JVM suite: 1474 tests, none failing; the Android
target compiles; every M3 budget is met.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 08:52:16 +02:00
Kgothatso NgakoandClaude Opus 5.5 0db1fe8fc8 feat(wallet): the group's spends on its wallet screen (Phase 9, part 2)
Every spend the room proposed, newest first, for every member whether
or not they have a node: what it sends and where it has got to --
waiting for signatures, abandoned, signed, sent (reported back by
Electrum, not merely broadcast), confirmed, or replaced by a later
spend. A signed spend Electrum has not reported can be sent again; a
signed, unconfirmed one can be bumped to twice its feerate, a new
session over the same coins that whichever confirms settles. Each row
opens its signing session.

Full JVM suite: 1473 tests, none failing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 08:48:19 +02:00
Kgothatso NgakoandClaude Opus 5.5 b1d5963b53 feat(wallet): a form to propose a spend from the group's wallet (Phase 8, part 2)
GroupSendRoute and GroupSendScreen, behind a Send button on the wallet
screen for a member who holds a share and has a node to see the coins
with. Address, amount or send everything, and a feerate prefilled from
Electrum's six-block estimate. The preview is GroupSpendBuilder over the
same inputs the proposal is built from -- what leaves, the fee, what
comes back as change, or why it cannot be built -- and proposing moves
onto the signing session, replacing the form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 08:38:19 +02:00
Kgothatso NgakoandClaude Opus 5.5 6d066e19c0 feat(wallet): build a spend and show it for approval (Phase 8, part 1)
GroupSpendBuilder: send-all, as Phoenix's final wallet does, and an
amount paid largest coin first with change to the next change address,
or to fees when it would be dust. Confirmed coins only, never one an
open spend already holds; the fee is exact before signing because every
witness is 64 bytes. Every built spend passes GroupSpend.check.

The signing screen draws a spend where it draws events: every output
with its address and amount, change labelled, the fee and feerate, and
the coins spent -- read from FrostSigningManager.checkedSpend, the
stored PSBT checked again, and unsignable when this device cannot check
it. The proposal list and the chat notice say "Spend from the group's
wallet". FrostSigningRepository gains proposeSpend, checkedSpend and
reservedOutPoints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 08:33:36 +02:00
Kgothatso NgakoandClaude Opus 5.5 24d06d2eee feat(wallet): a screen to open a group's wallet and receive into it (Phase 5)
GroupWalletRoute and GroupWalletScreen, reached from a Group wallet row
on the group's screen. A group that has not opened a wallet gets an
empty state with, for a member who can sign, what opening one asks of
everybody -- including that shares are unencrypted at rest -- and the
button that proposes the statement. An open wallet shows the balance,
confirmed and on the way said apart, the next receive address as a
BIP21 QR code, selectable text and a copy button, the coins, and an
export of the two watch-only descriptors with what they give away.

The wallets are watched on the identity's own Electrum client and made
per PhoenixBusiness in BennuNavHost; a profile with no node sees the
wallet and is told it cannot watch the chain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 08:11:47 +02:00
Kgothatso NgakoandClaude Opus 5.5 56a942c610 Remove the curated-lists feature
Bennu no longer speaks curare.to's list protocol. The schemas, templates,
entries and the suggestion queue go, with their six screens, routes, view
models, strings and tests, and the hooks into the group screen, the paste
proposal, proposal summaries, broadcast relay seeding, the chat repository
and the transcript.

The two transcript message types stay as private legacy names so rows
already stored still render as system lines rather than chat bubbles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:45:45 +02:00
Kgothatso NgakoandClaude Opus 5.5 b75d4b427f Rebrand Curare to Bennu under com.machankura.bennu
Move the packages to com.machankura.bennu.{compose,android,desktop}, the
Android applicationId to com.machankura.bennu.android and the iOS bundle
id to com.machankura.bennu.ios. The root project, launcher label, iOS
product, desktop window, user-facing strings, client tags and the
Curare* classes all say Bennu now.

Left alone on purpose: the mantra/ derivation tags, the `curated` desktop
data directory, the mantra.press relay and the curare.to references.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 13:53:45 +02:00
Kgothatso NgakoandClaude Opus 5 72cfb561c4 feat(proposals): ask again about everything the filter is showing
The bulk control I argued against, built -- and the objection turned out to be
solvable rather than fatal, so it is worth recording what happened to it.

Half of it was already handled. Two resends in the same second do not collide
on the outbound row id: `broadcast` hashes that id over the session's own tags
and steps a second forward when it finds a collision rather than overwriting.
Different sessions were never at risk.

The other half was real. A resend publishes two messages, and `resend` keeps to
two deliberately because "publishing in bursts is what the skipped-keys bug
feeds on"; three proposals at once is six, in the same second that "two events
published in the same second race, and exactly one survives" was written about.
So the sessions are spaced rather than the budget quietly raised --
`resendAll` waits `RESEND_SPACING` between them, one second, which is the
resolution the protocol works in because `created_at` is stored to the second.

The pacing lives in the manager and not in the loop that wanted it, because
everything that justifies it does: MLS generations, relay ordering, outbound
ids. A caller that launched `resend` per session would put every burst into one
second, and the call site is the wrong place to know why that matters. There is
a test against the real manager that three sessions take longer than two
spacings and claim three different seconds.

What it acts on is `visible`, not the room: a bulk control reaching rows the
reader cannot see is its one unforgivable move. A cooling-down row is left out
of the count rather than included and skipped, because the count is what the
button says out loud and offering three while able to send two is a lie told
before the tap. Offered from two up: one is what the row's own button is for.

Every covered row goes quiet for the whole run rather than for its own turn --
a paced run means a row whose turn has not come is still about to publish, and
a row button offering to send it meanwhile would send it twice. A session
already in flight on its own is left out of the run for the same reason.

It is offered on any filter showing two it can act on, not only "being signed".
That filter is where it earns its place -- three rows stalled for one reason --
but the rule is about what is on screen, not about which chip put it there.

1419 jvm tests pass, the Android target compiles, all audit budgets met.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-08 16:04:13 -05:00
Kgothatso Ngako 1f82d66f57 Merge branch 'curated' into claude/proposal-state-filters-8cc06c 2026-10-08 14:56:24 -05:00
Kgothatso NgakoandClaude Opus 5 7c6e9b0a84 feat(proposals): say how far a proposal has got, not just what it is waiting for
A row said "waiting for 2 of 3 members to take part" on the day a proposal was
made and on the day before it completed. That is the rule, not the progress.
Now it says "1 of 3 members have offered to sign", and on the next stage "2 of
3 signatures are in" -- the fractions that actually move.

Nothing is counted once it has ended, which is both endings and not only the
happy one. A signed session has nothing left to gather; an abandoned one has
counts frozen where they stopped, and "2 of 3" beside a failure invites the
reader to wait for a third that is never coming. The failure reason is what
that row has to say.

The denominators are the ones the protocol gates on. `orderedNonces` returns
nothing until `threshold` nonces have arrived and then takes the first
`threshold` of them, so the threshold is both what is needed and what is used --
the room's size is a bigger number nothing waits for. Once the signer set
exists it is the set being waited on, which is the same count from the other
side.

The numerator is the part that had to be got right. A nonce or a partial
signature is recorded with no check on who sent it, unlike a refusal, and
`orderedNonces` drops the ones from members holding no share when it
aggregates. So the tally joins `DkgParticipantMessage` on HOST_KEY and counts
members rather than rows: a count including strangers would have a row read
ahead of the coordinator, saying the group has what it needs while the session
sits still. That is the one direction a progress figure must never be wrong in,
and there is a DAO test for it. A count that still runs ahead -- a nonce
landing before this device runs `advance` -- is clamped, because a fraction
over one reads as a bug rather than as a session about to move.

The counts travel as their own `GROUP BY` flow, combined with the sessions in
the view model. They change far more often than the rows do, and carrying the
messages themselves would carry every nonce payload the room has ever exchanged
to a screen that only wants to count them.

The progress is its own line rather than a clause, so a reader scanning for the
one that is nearly there does not have to read a sentence to find out. That
left `statusOf` saying only who the reader is in the proposal, and since this
adds user-facing text its remaining literals moved to the catalogue with it --
nine strings that had been raw in the screen since before the catalogue rule.

1367 jvm tests pass, the Android target compiles, all audit budgets met.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-08 14:53:59 -05:00
Kgothatso Ngako f0cbb2785b Merge branch 'curated' into claude/partial-signature-collection-d44dab 2026-10-08 14:38:13 -05:00
Kgothatso NgakoandClaude Opus 5 1e59fd2334 fix(frost): a knock past the nonces is for the signers, not the quiet
A resend had one idea of who it was for at every stage -- the share
holders it had heard nothing at all from -- and that is a question only
the first stage can answer. A session reaches
COLLECTING_PARTIAL_SIGNATURES because enough members offered a nonce, so
every member who could be holding it up has been heard from: the set came
back holding the members who were never chosen and owe nothing, while the
chosen signer whose partial signature went missing was named nowhere.
Once the unchosen had answered or refused the set was empty, and the
control gave up before it reached the branch written for the stall it was
meant to repair.

So the set asks what the stage can answer. Of the signers the coordinator
chose, who has yet to send a partial signature -- which is the half of a
resend only they can carry out, since a partial signature is read by
nobody but the coordinator and no other device can repeat it. COMPLETE
keeps the old reading, and correctly: the signature is the coordinator's
own and nobody answers it.

The screen now asks the manager who is owed rather than deriving it from
the rows beside the button, the way it already asks about approvals: the
same reading decides whether a resend publishes anything, and two copies
of a rule that changes with the stage is a screen offering a knock the
manager would refuse. The transcript line and the notice say what the
members named are short of, since past the nonces they have answered once
already.

The test that looked like it covered this passed because it wrote the
stage into the row with no nonce on file anywhere -- a state the protocol
cannot produce, and exactly the state that hid the bug. It now reaches
the stage by offering a real nonce.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-08 14:32:09 -05:00