Commit Graph
1004 Commits
Author SHA1 Message Date
Kgothatso NgakoandClaude Opus 5.5 52ca030c8b feat(subgroup): the child's quorum holds its certificate to the policy it joined under (Phase 5)
SubgroupManager.refuseKeyState: a child signer refuses a key state whose
birth certificate decides a wallet policy other than the one its own
ceremony announced at the join gate -- undecided included. A ceremony
from an older build announced none and holds the certificate to nothing.
proposeSubgroupKeyState refuses the same thing before asking.

GroupKeyStateManager.parentageOf drops a state whose certificate's policy
does not read or contradicts its guardian keys, so a corrupt policy never
reads as undecided.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:02:49 +02:00
Kgothatso NgakoandClaude Opus 5.5 44a15e9bc2 feat(subgroup): the certificate carries the wallet policy, and every parent signer checks it (Phase 4)
proposeBirthCertificate reads the policy off the child's ceremony: guarded
carries the grant and `guarded`, unguarded carries no keys and
`unguarded`, and an older ceremony with none is certified as it always
was -- or as guarded under a guarded parent. An unguarded ceremony under
a guarded parent is refused with the remedy, start again.

refuseGrant becomes refuseCertificate. Every parent signer refuses a
certificate whose policy does not read or contradicts its keys, and a
guarded group's signers refuse anything but a guarded one, undecided
included -- D4, read off the signer's own key state. ProposedEvent says the
decision in both directions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:00:59 +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 NgakoandClaude Opus 5.5 58751692c6 feat(dkg): a subgroup's ceremony carries the wallet policy its coordinator chose (Phase 2)
proposeRitual takes a walletPolicy and puts it on the proposal as a
["wallet", ...] tag, beside the parent and subject; acceptProposal files it
on DkgSession.walletPolicy. A proposal whose policy does not read, or that
carries one with no parent, is dropped, and proposeRitual refuses a policy
on a ceremony with no parent before anything else.

Schema 28 -> 29: the nullable DkgSession.walletPolicy, an auto-migration
like the other nullable additions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 21:53:41 +02:00
Kgothatso NgakoandClaude Opus 5.5 f19001cd61 feat(subgroup): a birth certificate can carry its child's wallet policy (Phase 1)
SubgroupWalletPolicy and WalletPolicyTag, ["wallet", "guarded"|"unguarded"],
and SubgroupBirthCertificateEvent.parseWalletPolicy. A certificate with no
tag reads Undecided; one whose tag does not read, or contradicts the
guardian keys beside it, reads null rather than undecided. certifies is
unchanged. Nothing writes the tag yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 21:50:57 +02:00
Kgothatso NgakoandClaude Opus 5.5 67fe01dd5b fix(groups): a grandchild's wallet reaches every guardian in one share
Sharing a guarded statement wrote one notice per guardian room, each hashed
from the same sharer, second, kind, tags and content -- so every notice had
the same id, and the last room's upsert took the row. A grandchild told its
parent and grandparent at once reached only the grandparent.

Each notice now names its room in an `h` tag, which gives it an id of its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 20:51:38 +02:00
Kgothatso NgakoandClaude Opus 5.5 bab4b67fca feat(lightning): the rollout gates, and who has not answered (Phase 15)
The gates are in code and stay closed. `GroupLightningRollout.ENABLED` is
false because its own condition, a regtest end-to-end run, has not been
met; mainnet is refused by `allows` whatever a screen offers.

The ceremony screen names every participant who has not answered the
proposal, with a word that their build may not know the new kinds: a
member on an old build is a co-signer who never answers, and the group
is smaller for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 19:12:54 +02:00
Kgothatso NgakoandClaude Opus 5.5 6140aef33a feat(lightning): the group re-keys its Lightning wallet when members change (Phase 14)
Iceberg cannot reshare, so a member who leaves keeps a share of the key
and the node's seed until the group opens a new wallet without them.

- A ceremony is now over the onchain key's holders who are still in the
  room (D1, narrowed), and a statement verifies when every participant
  holds the onchain key, so the wallets before and after a removal both
  stand.
- A room can have several wallets on a network. The highest-numbered is
  current, and a new statement takes the next number, under a key no
  wallet uses yet.
- The wallet screen names who has left and offers the new key or the new
  wallet. It lists earlier wallets with their balance, one decision to
  close every channel they still have, their sweeps, and a way to run
  their node when nobody does.
- `GroupLightningNodes` runs one node per wallet a device operates.
- Removing a member who holds a share says what the removal leaves.

A five-device test removes a member, refuses the leaver's own ceremony,
re-keys over the four who remain, opens wallet 1 beside wallet 0 with an
operator each, and closes wallet 0's channels in one session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 19:09:13 +02:00
Kgothatso NgakoandClaude Opus 5.5 b770b07472 feat(lightning): the group sweeps closed channels into its onchain wallet (Phase 13, part 2)
The operator's snapshot now lists what closing channels pay to the
group's basepoints, found by the fork's `GroupHeldOutputs`. Any member
proposes a sweep from the wallet screen. A sweep is a FROST session of its
own subject, `SWEEP`: every input is a taproot script-path spend, signed
under the leaf key each member derives from its own basepoints, and every
output must be a receive address of the onchain wallet. `GroupSweep.check`
refuses anything else.

A signed sweep is a `GroupTransaction` row like a spend, so the watcher
sends it, again every ten minutes until the network accepts it once the
delay is over. The approval screen, the proposal list and the onchain
wallet's history say what a sweep is.

A four-device test sweeps a to_remote and a to_local output built with
lightning-kmp's own scripts, and the interpreter accepts the result.
Splicing out is not built; the plan's doc says why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:53:43 +02:00
Kgothatso NgakoandClaude Opus 5.5 cb6934b806 feat(lightning): the group closes and force-closes its channels (Phase 13, part 1)
Two new authorisation actions on kind 30346, `close` and `force-close`,
each naming one channel and open for three days. The operator's node acts
on each once: a mutual close to the onchain wallet's first address, or
publishing our own commitment. Any member proposes one from the channel's
menu on the wallet screen.

Co-signers sign our own commitment only under a force-close
authorisation, only after rebuilding it, and never one more than a step
behind the counterparty commitment they last signed: anything older is
revoked. A four-device test force-closes with a signature that spends the
funding output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:40:32 +02:00
Kgothatso NgakoandClaude Opus 5.5 d69344fe1b feat(lightning): the group pays from its Lightning wallet (Phase 12)
A member proposes a payment from the new send screen: an invoice, the
amount when it names none, and a fee limit. The group signs it as an
authorisation (kind 30346, `pay`) like any decision; the summary leads
with the amount and the most the fee can be.

Every co-signer reads the signed authorisations as budgets, so the
operator can only make payments the group signed for. An expired one
closes to new HTLCs but still settles what is in flight. The operator's
node pays each authorised payment once.

The co-signers now also hold what the group offers at once under the
statement's in-flight cap, which nothing checked while nothing could be
offered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:32:21 +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 b4fbae748d feat(lightning): members receive into the group's Lightning wallet (Phase 11)
A member asks for an invoice (kind 30347) from the new receive screen; the
operator's running node finds each request no invoice answers yet, makes
one with lightning-kmp's `createInvoice`, and sends it to the room (kind
30348). Every member files an invoice only from the operator, and only if
it pays the node the group's statement names, so the screen never shows
an invoice that pays somebody else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:20:18 +02:00
Kgothatso NgakoandClaude Opus 5.5 33a1ef0ed2 feat(lightning): the operator reports the group's wallet to the room (Phase 10)
The running node sends a snapshot (kind 30345) as it starts, whenever its
channels or payments change, and every five minutes otherwise: the channels,
the payments it has seen, and the round-one label assignments, so whoever
operates next signs under the verification nonces this operator published.

A member believes a snapshot only from the operator the group elected for
the term it names, about the node the statement names. It files the newest
(schema 30) and keeps every payment, and the wallet screen shows balance,
channels and payments, each channel checked against what this device last
co-signed for it.

The invoice wire and its table land here too, because they share the
schema bump; Phase 11 puts them to use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:13:04 +02:00
Kgothatso NgakoandClaude Opus 5.5 0449293963 fix(marmot): a direct message's envelope is opened, not taken for a signing decline
FrostSigningEvents.DECLINE and MarmotDirectMessage.ENVELOPE_KIND are both
30330. Recognising protocol kinds first (ceremony-creation Phase 6) returned
before the direct-message branch, so every direct message in a
current-profile room was dropped unopened. A 30330 that holds a gift wrap is
an envelope; only one that does not is a decline.

ProtocolKindDispatchJvmTest now opens an envelope through
fromGroupEventResult, which no test did before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:13:02 +02:00
Kgothatso Ngako 79470dab1a Merge branch 'claude/taproot-group-hierarchy-spending-7a37ac' into bennu 2026-10-23 18:07:20 +02:00
Kgothatso NgakoandClaude Opus 5.5 7746f3d17f feat(wallet): offer guarded wallets on mainnet
GroupWalletRollout.GUARDIANS_ON_MAINNET is on, lifted by decision ahead of
the signet run its condition named. The mixed-version risk stays open and
is said so in the gate and the guardians note; guardian spends on mainnet
are held to MAINNET_CAP like every other spend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:06:19 +02:00
Kgothatso NgakoandClaude Opus 5.5 af4304aaae fix(dkg): a parent's second subgroup is not shown its first one's signing sessions
A subgroup's ceremony runs in its parent's room, so that room holds a
certificate and a key-state signing session for every subgroup made under
it. The ceremony screen took the newest of each kind regardless of which
subgroup it was for, so a parent's second subgroup opened on the first
one's finished certificate, with "Ask the parent group to certify"
already disabled.

Each session is now matched on what its event names: the certificate on
the subgroup's threshold key, the key state on the ceremony. The newest
match still wins, so a failed request can be asked for again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:59:34 +02:00
Kgothatso NgakoandClaude Opus 5.5 dd0d4b003d feat(lightning): run the group's node on the operator's device (Phase 8)
GroupLightningNode builds a lightning-kmp Peer from the wallet's seed,
with the group's funding signer, basepoints and closing address
(GroupNodeKeyManager), on Phoenix's SQLite databases under names of its
own. It starts only on the elected operator's device, once that device
has heard from the room recently, and stops itself when a later term
begins, telling the room where its channels were. GroupLightningNodes
keeps one running per wallet this identity operates, behind the
rollout gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:59:10 +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 NgakoandClaude Opus 5.5 930ae341e8 feat(lightning): every member co-signs for the group's node (Phase 9)
GroupLightningCoSigner runs on every Iceberg participant. It publishes
round one ahead of time for a pool of labels, and checks each of the
operator's signing requests: the current operator in the current term,
a pool label it never answered, contributions from the members they
name, the funding output, and the transaction rebuilt with lightning-
kmp's own builder from the context the request carries. CoSignerPolicy
holds the group's claim on the channel against a floor that only
authorised payments lower. A member echoes the hash it would sign and
signs once n - t + 1 members echoed the same one. GroupIcebergTransport
is the operator's side: it assigns pool labels, sends requests and
collects shares. Schema 29 holds the pool, the ledgers and the echoes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:48:46 +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 900fe6be28 feat(lightning): open a group Lightning wallet and elect its operator (Phases 6-7)
The wallet statement (30338) binds the onchain wallet it closes to, the
Iceberg key and its holders, the node its seed produces, the LSP and a
policy, and every member checks it against what they can recompute. The
proposer sends the node seed to each participant encrypted to them, and
a device files it only after deriving the node id itself (schema 28).
The operator statement (30339) carries a term that only goes up; the
newest term wins, a tie goes to the lower event id, and only the
operator can step down. Both stay inside the group. A Lightning wallet
screen walks a room from no onchain wallet to an elected operator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:27:31 +02:00
Kgothatso NgakoandClaude Opus 5.5 99a2185463 feat(lightning): the group makes its Lightning wallet key (Phase 5)
IcebergRitualManager runs the Iceberg DKG in the group's Marmot room over
the people who hold the onchain wallet's key, behind the same three
approval gates the ChillDKG ceremony has. Contributions travel NIP-44
encrypted to the members who will hold them. Schema 27 adds the session
and message tables; a screen and transcript lines show who has done what.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:15:24 +02:00
Kgothatso NgakoandClaude Opus 5.5 4023e9c08b fix(dkg): the creation screen's title before it knows the room's name (Phase 9)
Found on the emulators: refusing a Marmot room left the app bar reading
"Shared key for " and nothing. It reads "Shared key" until the room is
loaded. The plan now records what was checked on the three emulators that
found the bug, and what was not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:12:37 +02:00
Kgothatso NgakoandClaude Opus 5.5 2d57f9b4c9 refactor(db): drop the nip30303 document tables (Phase 8)
Schema 26 -> 27. MIGRATION_26_27 deletes the chat lines the removed document
arms wrote and the unsupported bubbles a subgroup's ceremony left in its
parent's chat -- found by the kind of the inner event behind them, so an
unknown payload's bubble stays -- then drops the twelve document tables,
children before parents, and MarmotInnerEvent.payloadEventId. Manual,
because it deletes rows. GroupSignedEvent keeps whatever the group signed,
and the chronicle keeps its column and its lines.

The nip30303 events and tags, the Mantra entities and DAOs, the repository
interface and the Markdown helper go with the tables, and so do the tests
that only exercised them. The key-state test signs posts where it signed
dialects. The migration test builds v26 from the exported schema and checks
the result against v27's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:04:00 +02:00
Kgothatso NgakoandClaude Opus 5.5 76f1df4e58 refactor: stop handling nip30303 documents, and keep the member chronicle quiet (Phase 7, part 2)
The inbound path no longer opens document submissions or applies document
kinds, and ProposedEvent no longer describes them. Nothing could send one:
the screens that did were removed in part 1.

The member chronicle carried nothing but document kinds. It is kept, and
what it may carry is now a ChronicleKinds value -- empty in the app, so a
device asks for no chronicle, sends none, and applies nothing from a page an
older build sends. The row-rebuild fallback and translation supersession go
with the documents. The chronicle's tests exercise the machinery with a kind
set of their own; the round trip through document rows is deleted with the
rows, as are the document-only apply test and the tests of translation
supersession.

Tests that used a dialect as an arbitrary signed payload now use a post.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:59:03 +02:00
Kgothatso NgakoandClaude Opus 5.5 3ebe01e1c1 feat(wallet): a group wallet on a second network (Phase 4)
GroupChainClients gives each network its own Electrum connection: the
node's client for the node's network, and one made on first use for any
other. The wallets and the transaction watcher take their client from
it, the wallet routes carry their chain, and a second wallet row for the
Lightning wallet's test network sits behind GroupLightningRollout, which
is off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:58:04 +02:00
Kgothatso NgakoandClaude Opus 5.5 ee40309e77 feat(lightning): a closing channel pays the group, not the node (Phase 3)
The fork's channel keys can take a group's payment and delayed-payment
basepoints, the node skips the claims it holds no key for, and
GroupHeldOutputs says where those outputs are and how to spend them. In
the app, GroupLightningDerivation derives the basepoints from the
group's threshold key, and a FROST quorum spends both kinds of output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:51:49 +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 02afa1eaec fix(marmot): ceremony and signing messages are recognised before anything sharing their kind (Phase 6)
A subgroup's ceremony runs in its parent's Marmot room, where its kinds
30310-30312 are also nip30303 document kinds. Round 1 (30312) was read as a
document submission first, failed to parse, and reached every other admin's
chat as an unsupported bubble of raw hex; the proposal and host keys reached
the translation arms before the ceremony's own. fromGroupEventResult now
stores a protocol message and returns before any document handling, and
applyInnerEvent checks the protocol arms first.

The comments that called the overlap safe are corrected, and the
"No app logic to handle" line every application message logged at info is
now a debug line that does not read like a failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:40:12 +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 66887767b8 feat(dkg): the ceremony screen shows a ceremony and never starts one (Phase 4)
DkgRitualRoute and the three approval routes now require the ceremony's id,
and the screen loses its start button, its quorum stepper and its fallback to
the room's newest ceremony. A transcript line naming no ceremony opens
nothing. The title is the ceremony's name rather than the room's, so a
subgroup's ceremony is not called after its parent.

Try again on a failed ceremony goes back to the screen that starts that kind:
the creation screen for a group's own key, or the subgroup picker filled in
from the ceremony that failed. Retrying a failed subgroup used to open a
whole-room ceremony in the parent's room.

A test counts the screens that open a ceremony, so a fourth is a decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:34:02 +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 a1e87d92e5 feat(lightning): a distributed key generation for Iceberg (Phase 1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:23:15 +02:00
Kgothatso NgakoandClaude Opus 5.5 69095ba4a8 fix(dkg): the ceremony screen keeps hold of its ceremony (Phase 2)
Three ways the shared-key screen could lose the ceremony it was showing, and
so offer to start one:

- initiate() ran again whenever the screen came back into view, resetting
  the state to no ceremony and stacking another set of watchers. It now runs
  once per view model.
- five coroutines each read the state, changed one field and wrote it back,
  one of them across a suspending query, so an old copy could overwrite a
  newer one. The state is now built by one flow and written in one place.
- an approval closed its screen as the button was pressed, cancelling the
  view model's scope and with it a publish still in flight. The screen now
  closes once the approval has gone out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:22:46 +02:00
Kgothatso NgakoandClaude Opus 5.5 cd385ec82d feat(lightning): reserve the group Lightning wallet's kinds (Phase 0)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:19:43 +02:00
Kgothatso NgakoandClaude Opus 5.5 e259634513 fix(dkg): a Marmot room hosts its subgroups' ceremonies and never one of its own (Phase 1)
proposeRitual now refuses a ceremony with no parent in a Marmot room, and
acceptProposal drops one arriving there. A Marmot room's id is derived from
the key it already has, so a key of its own is one it could never use -- and
the shared-key screen offering to start one in a parent's room is how a
second, whole-room ceremony opened beside a subgroup's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:19:28 +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 2b44ebcbbc feat(wallet): a subgroup's transcript names the guardian that spent from it (Phase 8)
Whenever a guarded wallet's coins change, the wallet screen reads every used
address's history off Electrum, recognises a guardian's leaf in the witness
that spent a coin, and writes one transcript line per transaction saying
which group above took how much -- the child's only notice, since nobody in
its room signed it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:40:43 +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 634f51f915 fix(wallet): read a PSBT's key fingerprint as unsigned
bitcoin-kmp reads a taproot derivation's fingerprint back from a serialised
PSBT as a signed int, so for any account whose fingerprint has its top bit
set -- half of them -- every member but the proposer refused every spend as
not the wallet's own. Compare the fingerprint as an unsigned 32-bit value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:34:30 +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 NgakoandClaude Opus 5.5 606b4bb12f feat(wallet): a guarded wallet statement, and the account it opens (Phase 4)
An account knows its guardians and puts a leaf per guardian in every
address, internal key unchanged. The statement names them and carries the
certificate that granted them, and verifies only when the certificate
certifies this room and grants exactly those keys. A guarded statement
outranks a plain one for its account, and its first guardians stand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:15:37 +02:00
Kgothatso NgakoandClaude Opus 5.5 e32419f0d8 feat(subgroup): a birth certificate carries the parent's guardian keys (Phase 3)
The parent grants the child its own guardian key and every key its own
certificate carries, one step further each, as guardian tags. Every parent
signer recomputes the grant and drops a certificate proposal carrying any
other keys before it is shown; one carrying none still signs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:10:30 +02:00
Kgothatso NgakoandClaude Opus 5.5 d414cd104b feat(wallet): guardian keys a parent grants a subgroup, and the leaves they sit in (Phase 1)
GuardianDerivation: a group's guardian root, the child index, the grant a
certificate carries, the 12-block leaf, the caterpillar tree, the descriptor
fragment and the cache an ancestor signs a leaf with. Pinned vectors checked
against an independent implementation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:04:58 +02:00
Kgothatso Ngako e3839da53e Update icon 2026-10-23 14:02:33 +02:00