- rootProject.name is Giza. Res is pinned, so no import moves.
- Regtest: GIZA_REGTEST, GIZA_SPLICE_DELAYS and the gizaRegtest task input;
node aliases giza-lsp and giza-payer.
- README describes Giza and says what it shares with Bennu: one network, one
derivation, and a recovery phrase that must not run in both apps at once.
The clone URL is the planned giza-kmp repository, which does not exist yet.
- docs/README.md is titled Giza docs and says how to read the documents
written while the app was Bennu.
- CLAUDE.md gains the rule: name the app Giza, never name Bennu outside a
comment, and never rename a mantra/ or bennu/ derivation tag.
- docs/scripts/brand-audit.sh --check, run by check (brandAudit) and by the CI
budgets job, fails on Bennu anywhere in composeApp, iosApp, testing or the
gradle scripts except in a comment or a "bennu/ tag. It catches the strings
a merge from Bennu brings in, which giza-rename.sh cannot word.
- The plan gains the twelve bennu/ tags, missed when it was written.
jvmTest: 1643 run, 0 failed, 2 skipped. compileDebugKotlinAndroid, m3Audit and
brandAudit pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GroupLightningRollout.LIQUIDITY_ENABLED is true, by decision, ahead of the plan's own Phase 0 check
on mainnet: ACINQ's LSP has not yet been seen to accept a splice whose funding key from us does not
change, so the first purchase there is that check. If it refuses, the splice aborts before anything is
signed into it and the purchase is reported failed. A purchase is bounded meanwhile by the mainnet
channel cap, the fee cap the group signs, and every co-signer's checks. The wallet screen now shows Add
liquidity, and the operator's node buys what the group authorises.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plan's build table now says each phase's state. Phase 9, a splice the LSP starts to deliver a
payment, is left to the group as the plan left it. GroupLightningRollout.LIQUIDITY_ENABLED stays
off: the regtest run passed, but the mainnet half of Phase 0 -- ACINQ's LSP accepting a splice whose
funding key from us does not change, and its rates -- needs a purchase with real money. The group
Lightning wallet note's check 8 points here, as do the docs index and the regtest README.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The review asked whether the wallet's operator can spend lightning funds
without t-1 other share holders. The core claim holds; the seven exceptions
each get a phased plan under docs/lightning/, with an index giving the
severity table and the build order.
Every Lightning kind but the three the group signs reaches the transcript's
unsupported arm and leaves a raw-JSON bubble, and the Iceberg ceremony never
got the standing notice above the composer. Seven phases to put both right.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in an Electrum client for a profile with no node: IdentityElectrum
gives an nsec or npub profile a StandaloneElectrum of its own, so every
profile can watch the chain.
For the group Lightning wallet:
- GroupChainClients now sits on IdentityElectrum's client for the node's
network, so group wallets and the watcher work on profiles with no node
too.
- Each other network (testnet3, for the Lightning wallet) now gets a
StandaloneElectrum instead of this branch's own connection loop. The
old loop picked a server with ElectrumServers and connected directly,
ignoring the profile's Tor setting, so a profile with Tor on would have
reached a testnet3 server in the clear. The new one uses onion servers
while Tor is on. A test covers it.
- The group's Lightning node takes its context and logger from the app,
not the identity's Phoenix business, so a profile with no node that
holds a share can be elected and run it.
- The member wallet's follow() keeps its network parameter.
The full JVM suite (1,568 tests) and the regtest run pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the guarded member wallets, guarded subgroup wallets, ceremony
creation, and the removal of the group's nostr profile, relays and posts.
Two clashes needed more than a textual resolution:
- Event kinds. The guarded-wallet family took 30333-30337, the numbers
the Lightning family used for its ceremony. Nothing conflicted
textually and nothing would have failed, since each side reads the
other's events by kind. The Lightning family moves to a fresh run,
30350-30366, which costs nothing: rumor kinds that never shipped.
GroupLightningEventsTest now knows the guarded-wallet kinds and asserts
the family starts past every kind the app uses.
- Schema versions. bennu used 27-31. This branch's four versions were
never on an installed database, so they become one migration, 31 to 32,
adding the 13 Lightning tables.
Also:
- bennu's new member-wallet calls (broadcast, confirmationsOf,
guardianSpends, the fee suggestion) now take the network, because this
branch made Electrum clients per network.
- bennu's watcher conflict check uses the transaction's own network.
- NEVER_BROADCAST is gone with the broadcast screen, and so is the test
that checked the Lightning statements against it.
The full JVM suite (1,554 tests) and the regtest run pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in guarded-wallet forwarding (docs/guarded-wallet-forwarding.md),
which made telling the groups above automatic and touched the same
sharing code in GuardianManager.
Resolved by keeping both: its upwardOf, elected sender and catch-up,
and this branch's naming and certificate tag. Its automatic forward now
carries the guardian's birth certificate too (guardianCertificateFor),
and D5's re-tell rule moved into its told(), replacing alreadyTold. Its
wallet-level named() is dropped in favour of this branch's, which also
fills the guardian and branch names.
GuardedWalletForwardJvmTest's "the button offers only what goes up"
now shares with the certificate, as every share from this build does;
without it the wallet is rightly offered once more.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
member-wallet-guarding-group.md is marked built, with a table of where
the build chose differently from the plan. The member-guarded-wallets
note's Phases 10 and 11 and the guardians note's How an ancestor finds
the coins point to it, and the README's reading order places it.
Still to do by hand: the signet run with three emulators.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plan is marked built, with a table of the nine places the build
chose differently -- the forwarder's own line written by share so the
button writes it too, a notice carried on by any device that believes
it whether or not it holds the room's key, one explanatory line under
the fallback section rather than one per row, and the signet run still
to make. The guardians and member-guarded-wallets notes say forwarding
no longer waits on a tap, and the README that it has been built.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An ancestor's guarded-wallet list shows @alice with nothing saying which
group in the lineage signed her wallet's certificate, so two wallets
under different branches read the same. The plan names the direct
guardian (the certificate's signer, guardians[0]) by its founding name,
carries that group's birth certificate on the forwarding notice so a
device outside it can name it, and gathers a person's wallets under one
header on the group's wallet screen and one row per wallet on their
profile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A group above can use its leaf in a guarded wallet only once told, and
today that is the Share button on the lower group's wallet screen. The
plan has every device that files a guarded wallet it believes tell the
groups above it is in -- one elected sender at once, the rest in a
catch-up when a group's chat or wallet screen opens -- and keeps the
button as the fallback for a notice lost on the wire.
It fixes two bugs in the button on the way: it tells guardian groups
below the current one, and a guarding group's own member certificate
never counts as told.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
member-wallet-delay.md is marked built, with a table of where the build
chose differently -- most of all that a request carrying no policy still
reads, so wallets guarded before policies keep verifying. The member
wallets note's "full control" stops saying 12, and its D3 adds that only
an open group takes a request; the guardian-delay note's member-wallet row
and the README follow.
The three-emulator run is still to do by hand.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The member-wallet policy (30337) becomes the group's opt-in: no policy
means the group does not guard members' wallets (D8), so every new member
wallet's delay is one its group chose. A newer policy with ["closed"]
instead of a delay stops new wallets (D9); it never releases one already
guarded, whose addresses carry the group's leaf. Opening again is a newer
open policy.
The signer table, the picker's refusals (POLICY_UNKNOWN, NOT_OFFERED,
CLOSED), the request, the screen -- now MemberWalletPolicyScreen, with
Stop guarding new wallets -- and the emulator run follow. Phases 4, 5 and
6 now ship together, since 4 and 5 close every group until 6 opens it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The group's quorum signs a standing policy in its own room -- a new kind,
30337, ["guardian_delay", <blocks>] -- rather than a birth certificate
tag: the certificate is the parent's statement, frozen at birth, and a
root group has none. A member's request is built under the newest policy
and carries it whole, so late members (through the key notice) and
signers who missed it judge it alike; signers refuse a stale or missing
one. A wallet already guarded keeps its delay. Seven phases, not built.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
The plan is marked built, with a table of the thirteen places the build
chose differently -- the key notice carrying the key rather than the
signed key state, the request travelling whole inside an inner event,
Put to the group living on the group's page, the wallet screen
following a member's spends while open, and the signet run still to
make before the mainnet gate lifts. The guardians and subgroups notes
point here, and the README says it has been built.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
guardian-delay.md is marked built, with a table of where the build chose
differently. group-wallet-guardians.md's "Why 12, and why for everybody"
becomes "Why a delay, and who sets it": each parent chooses its own leaf's
delay from 6 to 65,535 blocks, inherited ones keep theirs, and a long
delay is a backstop rather than an override. The policy note's picker
section and the README follow.
The three-emulator run is still to do by hand.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
testing/regtest/README.md now covers the prerequisites and ports, where
the run's output and eclair's log end up, and a troubleshooting table. The
docs index and CLAUDE.md's "Checking your work" link to it.
The test checks the network before it starts. If a service isn't
listening, or `regtest.sh up` didn't finish, it fails at once, names what
is missing and says how to start it. Before, that was a bare connection
error or a three-minute timeout.
BENNU_REGTEST is now an input of the test task. Before, a skipped run left
jvmTest up to date, and asking for the regtest run afterwards replayed the
skip without running anything.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A parent picks its own leaf's delay when it makes a guarded subgroup, from
6 blocks to 65,535 (BIP68's block-based ceiling, about 15 months); an
inherited ancestor keeps the delay it chose. The delay rides the ceremony
proposal, is signed into the certificate's guardian tag and checked by
both quorums, and every screen that quotes "12" says each leaf's own
delay as blocks with an approximate duration. Eight phases, not built.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The member's device makes a random key, works out every ancestor leaf
and both descriptors, and only then asks the group. The group's quorum
signs a member wallet certificate of its own kind (30334) rather than a
birth certificate, since every reader of 30329 assumes a room. Ancestors
list the wallet as @name, and the group's page opens the member's profile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
subgroup-wallet-policy.md is marked built, with a table of where the
build chose differently. group-wallet-guardians.md's "why it is still the
child's choice" becomes "whose choice it is": the parent decides, the
chain still does not enforce it, and an older certificate still leaves it
to the child. subgroups.md gains the wallet tag and the policy as the
second value the coordinator picks for other people.
The three-emulator run is still to do by hand.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The coordinator picks guarded or unguarded on the subgroup picker, the
parent's quorum signs the choice into the birth certificate, and the
child's admins agree to it by joining and again when they sign the key
state. Every honest client then offers, signs, derives and watches only
the wallet the certificate allows. An unguarded certificate carries no
guardian keys, and a guarded group can only make guarded subgroups.
Not built: Phase 0's decisions and nine phases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shared-key-ceremony.md says where a ceremony starts and how one ends early;
subgroups.md points its Phase 10 here; member-chronicle.md says the chronicle
is built and carries nothing; the batch-signing, skipped-keys and Material
notes mark their document examples as removed; the plan records the ten
places the build chose differently.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Joining a subgroup's ceremony could open a second, whole-room ceremony in the
parent's Marmot room: the shared-key screen showed a ceremony, asked for
approvals and offered to start one from the same button slot. The plan
separates starting from showing, guards proposeRitual, and removes the
unreachable nip30303 document code whose kinds collide with the ceremony's,
keeping the member chronicle as an empty, quiet shell.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The guardians note records what was built against the plan, what is left to
do by hand before the mainnet gate lifts, and the conflicting-spend gap. The
subgroups and wallet notes each change the one sentence the plan said they
would.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The parent signs a guardian key for the child into its birth certificate,
beside its own ancestors' keys derived one step further, and the child's
guarded wallet puts each in a 12-block leaf.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The audit and the JVM suite ran after every phase. The two-device regtest
walkthrough has not been done; the note lists each of its steps beside
the automated test that comes closest and what that test cannot show.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Marks the plan built, with a table of the nine places the build chose
differently, and points the group-chain-wallet note's gap-limit
paragraph and the docs index at it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Modelled on Phoenix's swap-in addresses screen: every paid receive
address, the current one, and the two after it, read off the receive
mini-wallet's state with nothing stored and nothing new subscribed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Modelled on Phoenix's final wallet, phased. The path is BIP86's
unhardened tail under a public account step over the ChillDKG key, so
the group can export a standard tr() descriptor; each input is a batch
item with its own tweak cache, and a member checks seven things before
signing a spend. Shares are used as they are at rest, for now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`broadcast` now says whether it queued anything, and `publishOwn` records the
local copy only when it did. The copy is what stops `advance` from publishing
that message again, so writing one for a message that never went out is a
message the group waits on forever -- the exact opposite of the trade the
queue-then-record order exists to make. The comment on `publishOwn` had that
trade written down in one direction only.
Reachable only through the id-collision guard added with the resend, which
refuses after four tries rather than overwriting a sent row. Four consecutive
seconds of the same message is not something a person with a button can do, but
"unreachable" and "safe when reached" are different claims.
Also brings the docs up to what was built: the resend note is in the index, the
skipped-keys note points at it as the recovery for the failure it describes --
a new message is encrypted at a generation the receiver has not passed, which is
the whole mechanism -- and the plan records the two things landing it turned up,
plus `ask_again` being reused from the catalogue rather than duplicated.
1279 tests, no failures. m3Audit: all budgets met.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
docs/marmot-v2.md, Phase 9. The phase has no code in it; it is the rollout,
and the rollout is a flip and a retirement that wait on the people this
app's users invite. What the phase owes the document is the repo's
convention for a plan that has been built: the status paragraph, the table
of where the implementation chose differently, the thing found on the way
that belongs to nobody's phase, and the commit the account was written
against. All four are here now, and the phases themselves are kept as
written, because they are the reasoning and the code reads better against
the argument it came from than against a summary of itself.
The table has twenty-two rows, and the first is the one to read before any
of the code: the plan said the library's engine replaces the app's pipeline,
and the build made a room's profile pick its pipeline instead -- legacy
rooms keep the app's path, comparator and cache included, and retire with
the profile; current-profile rooms go through `MarmotEngine`. The library's
processor has no carve-out for the bare gift wrap a legacy direct message is
carried in, so under it every one of those would have stopped decrypting,
and the legacy pipeline is frozen anyway. Most of the other rows follow from
that one: one store rather than four, no message-id column, the rotation
manager constructed and unused, the engine hanging off the database rather
than an identity's scope. The rest record the smaller turns -- the envelope's
kind, the chronicle cap measured escaped, the KeyPackage not last-resort, the
admin refused before a leave is attempted, captions from the participants
diff rather than a snapshot column, no rename, the two non-chat kinds only,
the four Phase 8 scenarios spread over four tests -- and the three
follow-ups that closed lines the phases' own commits had missed: the
outbound hold while a pass is open, the rejected commit discarded, and the
1210/1009 bubbles.
The thing found on the way is quartz 1.15.2's: its convergence rebuilds a
candidate branch by replaying its commits against the retained parent, and
a member cannot replay a commit it authored, so a fork this device is half
of is scored with its own branch stale and two committers swap branches
rather than agree. Every device that only observed still agrees, which is
the case the app depends on and the first fork test holds; the second pins
the swap and says what to do the day it fails. The paragraph says the
practical exposure is small and why, and that the Phase 5 follow-up on
withdrawing a losing branch's rows waits on the same fix.
Phase 9's own section gains "Where it stands": everything ships built and
unflipped -- `DEFAULT_FOR_NEW_ROOMS` is legacy, both slots are published, no
room is on the current profile unless a caller asked by name -- so the first
of the three one-way doors is behind us and the other two wait on the flip.
The README's row and reading-order paragraph now say the plan has been
built and point at the table's first and last rows.
One code change, a comment: the plan's Phase 5 asked that the two library
gaps the rewrite does not close -- the retained-epoch decrypt without sender
verification, and the skipped keys that do not survive `saveState` -- be
said where the new code is, rather than let the rewrite look like it closed
them. `MarmotEngine`'s class doc now says both.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
quartz 1.15.2 implements the restructured Marmot spec, and bumping the version
gives this app almost none of it: the pipeline that reads, forks, publishes and
persists group state is the app's own, driving MlsGroup directly with Room as
the store, while everything v2 lives in the library's managers behind four store
interfaces the app has never implemented. This note is what would have to change,
in the order it can safely change.
Nine rules reach the app, tabled against what it does today: unsigned six-member
payloads, component-based group state with per-leaf identity proofs, a random
routing id, dedup by the Marmot message id, convergence in place of the
created_at-then-event-id rule, publish-before-apply, SelfRemove and derived
captions, NIP-65 KeyPackage relays, no encoding tag. Two constraints shape the
phases: adopt the library's engine rather than re-implement it (convergence is
two thousand lines whose only value is agreeing with every other implementation),
and split the room's derived id -- the group's FROST key, per the derivation
note -- from the routing address v2 says must never be derived.
Nine phases, ordered so that the ones that reach other clients come before the
ones that make the app's own forks settle the way theirs do. Two findings from
the research shaped them: the build already in the field reads a canonical
payload because Event.fromJsonOrNull defaults a missing sig, so the payload
switch needs no gating; and the app picks a peer's KeyPackage by newest
created_at, so the two-slot transition has to stamp the legacy package later or
old builds break on a framed one.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two strings that already existed, a room rule that follows the old code's
intent rather than its branch, a retry that never takes an open chat back to
checking, the flag the ordering cases asked for, and the test harness the other
view models use.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The "Direct message via npub" option goes straight from a pasted string to an
MLS room. The plan puts a screen between them, keyed by public key because that
is all the dialog has, and keeps the room's creation where it is: four decisions
-- where the preview lives, what "found" means when a row can be a placeholder,
that the button hands over rather than creates, and that it waits for the key
package so the twenty-second dead end is answered before the press -- and four
commit-sized phases with the tests for each.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Phases 1–8 are implemented, in order, one commit each; Phase 9 is the
rollout and stays as written. The plan's phases are kept as the reasoning,
and the table at the top says where the build chose differently: the
repair reads before it writes and hands the listing its result; one
WalletAttached outcome with two ways in; the node stop and the relay scope
injected for their tests; the default save that cannot crash; a
ProfilesViewModel over flows; a NewProfileWriter and a route flag where the
plan expected the create screen's existing writer to serve; the colliding
id on the outcome rather than on the enum; the DAO's own requests left
unowned because they fetch public kinds; the inbox reopened by re-indexing
each wrap in its own transaction rather than by lifting the unseal branch
out; and the round trip's A made through the create view model with a
never-started PhoenixBusiness for the switch to stop.
Three things found on the way and in no phase are recorded beside the
table: the library's unsynchronised global-preferences cache, reached by
two threads at once for the first time, now behind JvmGlobalPrefs on the
jvm target; the same cache's consequence for tests that construct the
sovereign view model; and the gift wrap seal's link to its wrap, a foreign
key that existed and was never written until the inbox sweep asked the
question it answers.
The README's row and reading order say the note is built, and name
switchToIdentity where they named switchToWallet.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The switch already exists as a state transition -- switchToWallet,
resetToSelector, a null identity sent to startup with popUpTo(0), every
collector a child of collectLatest -- and is reachable from nowhere: Landing
shows only when the device holds no identity, so a second can never be
added, and the profile tab's "change account" is a pending route. This plan
builds the two entrances and fixes what the transition gets wrong.
Before either, it changes one rule the two sign-in plans share. A seed's
nostr key is not written to the credentials file; it is derived from the
words at listing and from the running node at activation, and the writers
keep one key out of two files. That puts the wallet where the profile should
be: the list is a merge of two files with opposite ideas of what a row is,
and the node has to run for a profile to know its own key. Phase 1 makes a
profile a credential and a seed a wallet attached to one -- the credential
written when the seed is, repaired into the file for every seed already on
the device, merge inverted to list credentials and attach seeds by pubkey,
the identity's key read from the credential with the node's as a
cross-check, and a second refusal on forget for a key a seed derives. The
node still starts for a profile with a wallet attached, for the channel
watcher rather than for the key; making it lazy is now one branch and is
named as its own decision.
The other decision is that a switch is a restart of the signed-in graph,
not a swap under it: every route carries the key it was pushed for. That
settles the switcher as a pushed screen behind one tap, the previous node
stopped, the last-used profile as the one that opens on launch, and a
profile added from inside switched to.
Nine phases: the credential; the switch, with the relay observer that never
cancelled its predecessor and the node that kept running; the startup
precedence, which put "show me the list" above "open this one" and never
saved a default; the switcher, showing the nostr profile rather than
"Default name" and labelling a row with a wallet attached; the add rows,
where a profile created from inside is a bare key and not a second wallet,
and "end this" -- which wipes every profile's database -- goes; an owner on
the two fetch queues and an inbox sweep on activation, because a gift wrap
fetched under the other profile's key is stored and never opened again; the
exits; a round trip; rollout, with the one downgrade that lists a seed's
profile twice.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>