Commit Graph
198 Commits
Author SHA1 Message Date
Kgothatso NgakoandClaude Opus 5.5 2a7fc7a08a docs: a plan to fork Bennu as Giza under mobi.giza
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:28:11 +02:00
Kgothatso NgakoandClaude Opus 5.5 4f1b4a4384 feat(lightning): buying inbound liquidity is on, on mainnet
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>
2026-11-01 13:09:42 +02:00
Kgothatso NgakoandClaude Opus 5.5 67351eeaa5 docs: group Lightning liquidity is built, but for the LSP's own splices, and off (liquidity, Phase 10)
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>
2026-11-01 12:47:24 +02:00
Kgothatso NgakoandClaude Opus 5.5 94015fd3f8 test(lightning): the group buys liquidity on regtest, end to end (liquidity, Phase 8)
GroupLightningRegtestJvmTest now buys inbound liquidity between receiving and paying: a member prices
200,000 sats from the operator's snapshot, the group authorises it, the operator's node splices, and
every co-signer checks the first commitment on the new output and the shared input before the group
signs. The channel grows from 100,000 to 299,779 sats for 2,521 sats, what the member's device
estimated; a 50,000-sat payment then arrives without an on-the-fly splice; and the run's payment,
mutual close and sweep follow on the spliced channel. No device refuses, and the room gets one line
for the liquidity added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:47:07 +02:00
Kgothatso NgakoandClaude Opus 5.5 db7d12b606 feat(lightning): a member asks the group to add inbound liquidity (liquidity, Phase 7)
GroupLightningLiquidityScreen asks as Phoenix asks its owner: Phoenix's amounts on a discrete slider,
less those the LSP does not sell and those past the channel cap; the miner fee, service fee, its year
and the total, priced on this device from the operator's report with lightning-kmp's own arithmetic
(LiquidityPrice, which matches what eclair charged on regtest to the sat); Phoenix's warning at a
quarter of the amount and its stop at the balance; a fee cap with room above the estimate; and a
review sheet with Phoenix's acknowledgement. Then a proposal, and the signing session it opens.

The wallet screen gains Add liquidity on its balance card, or the reason it is not there, a purchase's
state on its channel row, and Inbound liquidity added in its payment list (a nullable liquiditySat on
the payment row, in schema 35). The room gets a line when a purchase locks or fails.

All of it is behind GroupLightningRollout.LIQUIDITY_ENABLED, off until the regtest run passes; the
operator's node buys nothing while it is off. m3Audit meets every budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:45:01 +02:00
Kgothatso NgakoandClaude Opus 5.5 be90715dd3 feat(lightning): the operator's node buys the liquidity the group authorised (liquidity, Phase 6)
GroupLightningNode.buyAuthorised runs with the node's other actions, on the watch of kind 30363: for
each open buy-liquidity it has not taken on, it finds the LSP's rate for the amount, estimates at the
node's own feerate, and splices only if the estimate is within the authorisation's cap, buying at the
feerate the estimate raised to, as Phoenix does. Once per authorisation; not while the channel has a
splice that has not locked, which eclair would refuse; a failure is reported and not retried.

The snapshot now carries the LSP's rates and the node's feerate, for a member to price a purchase from,
each purchase's state (waiting, pending, locked, failed with its reason), how many funding outputs each
channel has live, and the purchase as a `liquidity` payment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:33:50 +02:00
Kgothatso NgakoandClaude Opus 5.5 b481c14cf9 feat(lightning): every co-signer checks a liquidity purchase before the group signs it (liquidity, Phase 5)
A co-signer keeps a ledger per funding output now (schema 35: IcebergChannelLedger keyed by output,
with its index, the parent it spent and the purchase that let it). A commitment on an output it has
no ledger for is the first commitment on a splice's new one: it must follow the newest output by one
index, rebuild from its context, and open from the parent's ledger at the same number with the same
HTLCs, the group's balance lower by no more than an open buy-liquidity authorisation's fee cap
(CoSignerPolicy.openSplice). The shared input is then held to that authorisation: it spends the pinned
output, makes one new output of the group's key with the LSP's under the cap, buys the amount the
group named, is paid from the channel balance alone, costs what the first commitment took to the
msat and no more than the cap, and the LSP puts in what it is paid for. An authorisation is bound to
the parent of the first splice it let, so however many attempts there are, one confirms.

While two outputs are live a payment settles on both at one commitment number; each ledger records
what its last commitment consumed, and a sibling spends only the difference. Before this the second
commitment was refused as under its floor.

GroupLightningSpliceCoSigningJvmTest, seven four-device tests on regtest and mainnet: a purchase the
group signs and the script interpreter accepts, payments over both live outputs, and each refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:30:10 +02:00
Kgothatso NgakoandClaude Opus 5.5 28f2d5a72a feat(lightning): the group decides to buy inbound liquidity (liquidity, Phase 4)
A fourth action for kind 30363, `buy-liquidity`: one channel, an amount of inbound, a cap on the fee
(our share of the splice's mining fee and the purchase's own together), an expiry, and an id so two
purchases for one channel are two events. An older build reads it as no authorisation at all, and
refuses the splice that follows.

GroupLightningAuthorisations gains liquidityPurchases, prepareBuyLiquidity -- which refuses a purchase
of nothing, or one past the mainnet channel cap, with a LiquidityProblem of its own -- and
proposeBuyLiquidity. The proposal reads "Add 500,000 sats of inbound liquidity", with the fee cap and
the LSP's year, and the room gets a line once the group signs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:14:55 +02:00
Kgothatso NgakoandClaude Opus 5.5 89504df765 feat(lightning): the co-signing wire carries a splice (liquidity, Phase 3)
A splice's shared input now reaches every co-signer with what it is: CoSigningWire.Context type
`splice`, with the parent funding output, the new one by index, the counterparty's new key, both
contributions, the liquidity purchase and the feerate. A commitment's context names its funding index,
and a request carries every other output the transaction spends.

messageOf computes the taproot sighash at the input that spends the funding output, over every spent
output, and is null when the request leaves one out; check 3 lets a splice spend the funding output
once beside the counterparty's inputs, and refuses a request with no hash to compute. A splice is
still refused, now by name, until the co-signer checks one (Phase 5). The context's spec is optional,
since a splice has none, and every check that reads one refuses a context without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:14:55 +02:00
Kgothatso NgakoandClaude Opus 5.5 5bc3f126da test(lightning): a node that keeps its funding key buys liquidity from eclair (liquidity, Phase 0)
LiquidityPurchaseRegtestJvmTest runs on the regtest network: a stock lightning-kmp node whose channel
keys serve index 0's funding key at every index, as a group's node will, buys 200,000 sats of
inbound three times on one channel, each with its signatures delayed longer, then receives a payment
the channel had no room for before.

What it found, recorded in the plan: eclair v0.14.4 accepts a splice whose funding key from us does
not change, and rotates its own; a purchase needs exactly two group signatures, and eclair allows the
whole splice one minute from quiescence (channel.quiescence-timeout), so both have to fit in it
together; the estimate is our mining share plus the purchase's own fees; and a splice does not raise
the channel's in-flight maximum, which this LSP fixes at the capacity the channel opened with.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:13:27 +02:00
Kgothatso NgakoandClaude Opus 5.5 815d8c3e72 docs: requesting inbound liquidity for the group Lightning wallet, planned
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 11:19:51 +02:00
Kgothatso NgakoandClaude Opus 5.5 84984ca887 feat(lightning): the key ceremony asks once, and ends itself when it stalls
Joining is now the only approval. Every check in the other two rounds --
a contribution against its commitment, everyone's transcript hash, the
public shares making one key -- is the device's, so after joining it sends
its contributions and confirms by itself. Asking a person to tap through
them only let a member who joined and never came back hold the ceremony
open for everybody.

A ceremony that has not finished 24 hours after its proposal is abandoned
by the first participant's device to notice, checked each minute beside
the group nodes, naming who had not taken their part. The deadline runs
from the proposal's own timestamp, so every device agrees on it, and a
proposal read after its deadline is not filed. Any participant can also
abandon a ceremony from its screen. Before this a ceremony nobody finished
blocked the room for good, since a room runs one at a time.

The group screen's Lightning row test now covers both sides of the row
waiting for an onchain wallet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 10:11:57 +02:00
Kgothatso Ngako 1f9c9ef131 docs: the group Lightning wallet's review findings, as seven phased plans
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.
2026-10-27 09:21:36 +02:00
Kgothatso NgakoandClaude Opus 5.5 c4d8561cb0 fix(lightning): the wallet's payment list says a close is a close, and a sent amount without its fee
The same two misreadings the regtest run found in the room's lines, on the
wallet screen: a channel's close, which lightning-kmp files as an outgoing
payment with no payment hash, was listed as sent, and a sent amount
included its fee. Both now read through GroupLightningReports.isChannelClose
and recipientMsat, which the room's lines use too. A close is listed as one,
or as closing until it confirms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 09:06:02 +02:00
Kgothatso NgakoandClaude Opus 5.5 94385d2f4a fix(lightning): a channel's close is not a payment sent, and a sent amount leaves out its fee
Found by the regtest run, now that it checks the transcript. lightning-kmp
files a channel's close as an outgoing payment with no payment hash, which
wrote "sent" beside each closed line, and an outgoing payment's amount
includes its fee, so 20,000 sats with an 84-sat fee read as 20,084 sent.
GroupLightningRegtestJvmTest now asserts every device's lines: one per
channel opened and closed, one per payment, and no raw JSON, refusal or
alarm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 09:01:18 +02:00
Kgothatso NgakoandClaude Opus 5.5 ca2a5b790d docs: the group Lightning wallet in the chat is built, and the notes it touched say so (Phase 7)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 00:21:43 +02:00
Kgothatso NgakoandClaude Opus 5.5 e328720071 docs: the group Lightning wallet in the chat, planned
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>
2026-10-26 23:55:54 +02:00
Kgothatso NgakoandClaude Opus 5.5 515ddea2be feat(lightning): the group node acts as requests arrive, and the mainnet run is recorded
On the first mainnet run, most of the wait for an invoice (six seconds) and for an authorised
payment to leave (five) was the node's ten-second poll. The node now watches the room's
invoice requests (30364) and authorisations (30363, which carry channel actions too), and acts
the moment either changes. The poll stays, for expiries and snapshots. Answering, paying and
closing each take one lock, so a wakeup, the poll and a direct call never act twice on the
same request: payAuthorised checks hasPaid, which suspends, before it marks a payment in hand.

Advances lightning-kmp-app to the commit that keeps payment preimages out of a release build's
Logcat.

The plan doc records the run with ACINQ's mainnet LSP: an on-the-fly 25,000-sat taproot
channel, 8,558 sats received, and a 21-sat payment sent. Every co-signer approved every
commitment. The doc also notes that a payment larger than the channel's 16,442 sats of
inbound would need the splice the co-signers still refuse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:47:32 +02:00
Kgothatso NgakoandClaude Opus 5.5 309a486de9 fix(lightning): set the group node up as Phoenix sets up its own
ACINQ's mainnet LSP hung up on the group's node seven milliseconds after init, every time. The
node required simple taproot channels (bit 564). The LSP's init lists neither 564 nor 565, and
BOLT 9 obliges a peer to hang up on a required feature it does not offer. Phoenix leaves the
feature optional and stays connected. Nothing is lost by matching it: lightning-kmp asks for the
taproot channel type in every channel it opens, and the co-signers rebuild every funding output
and commitment as taproot.

The node now takes Phoenix's setup wherever the group's terms allow:
- lightning-kmp's default features and peer storage
- connect and handshake timeouts that grow with each attempt, tripled over Tor
- the LSP's onion address while the identity has Tor on, and no clearnet dial over Tor
- the 50% relative cap on liquidity fees

The absolute fee cap stays the statement's, and the redial backoff stays: Phoenix's resets at
every handshake, which against an LSP that hangs up after init would redial every 0.1 s.

On the operator's emulator, the group's connection to ACINQ now holds. The regtest run still
opens a simple_taproot_channel and passes. Whether ACINQ opens a taproot channel to the group's
node is still unknown until one is opened on mainnet. The plan doc says so, and Phase 0's
instruction to require the feature is corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:03:27 +02:00
Kgothatso NgakoandClaude Opus 5.5 3e4de464fe feat(lightning): the group node redials the LSP, and says why it was dropped
lightning-kmp never reconnects by itself. The identity's own node has Phoenix's connection
daemon for that; the group's node connected once, so a single drop left it offline for the
rest of the term.

It now redials after every drop, waiting two seconds and doubling up to five minutes. A
connection that ends within a minute counts as a failure, so an LSP that hangs up on our
features isn't redialled every two seconds. Each drop is logged with its reason. When the
LSP's init doesn't offer a feature we require, the log names it. The node waits up to a
second for that init, because the socket can read as closed before the init's event arrives.

Run against ACINQ's mainnet LSP on an emulator, every drop reads: "Connection closed: the
LSP does not offer simple_taproot_channels, which this node requires". The plan doc now
records that against Phase 0's first step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:37:54 +02:00
Kgothatso NgakoandClaude Opus 5.5 cf8ae0200e feat(lightning): the group Lightning wallet on mainnet only
The Lightning wallet now opens on the node's own network, mainnet,
where the group's onchain wallet already is, so the separate testnet3
onchain wallet and its row on the group's screen are gone.
GroupLightningRollout.allows takes mainnet and regtest, nothing else.

This lifts the plan's mainnet gate by decision, ahead of its condition:
an outside review of the Iceberg scheme and the DKG, and a month on
testnet3. The LSP's signing deadline was never measured either.
Meanwhile:

- Every co-signer refuses to sign for a mainnet channel over
  MAINNET_CHANNEL_CAP, 1,000,000 sats, so a bigger one never opens; none
  grows, since splices are refused.
- The opening screen says the scheme is unreviewed and names the cap.

Running the co-signing suite on mainnet (now a second test class) found a
bug that would have stopped everything there: every key manager was built
with a testnet swap-in tpub, which lightning-kmp rejects on mainnet. That
covers every co-signer and the operator's node. Mainnet now takes the
mainnet LSP's published xpub; nothing derives from it.

The full JVM suite (1,578 tests) and the regtest run pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 21:45:57 +02:00
Kgothatso NgakoandClaude Opus 5.5 5ff9380b03 feat(lightning): turn the group Lightning wallet on, on testnet3 (Phase 15)
GroupLightningRollout.ENABLED is now true. A Marmot group's screen offers
the Lightning wallet and the testnet3 onchain wallet it closes to, and
devices run the group nodes they are elected to. NIP-17 rooms still get
neither: they have no key to sign with. Mainnet is still refused by
GroupLightningRollout.allows, whatever a screen offers.

It was turned on before Phase 0's testnet3 measurement of how long the
LSP waits for a signature, so the 60-second signing deadline is a guess
until the first groups run there. The plan doc says so.

The wallet-row test now finds the onchain row by its title and status,
since the testnet3 row is also "Not opened yet". A new test checks that
the Lightning rows open the Lightning wallet and the testnet3 wallet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 21:25:37 +02:00
Kgothatso NgakoandClaude Opus 5.5 0939bd4c55 Merge branch 'bennu' into claude/lightning-wallet-iceberg-f20da1
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>
2026-10-24 21:28:17 +02:00
Kgothatso NgakoandClaude Opus 5.5 cb277d3269 Merge branch 'bennu' into claude/lightning-wallet-iceberg-f20da1
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>
2026-10-24 13:23:33 +02:00
Kgothatso NgakoandClaude Opus 5.5 31404c675f docs: an Electrum client for a profile with no node is built, and the notes it touched say so (Phase 4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 13:17:25 +02:00
Kgothatso NgakoandClaude Opus 5.5 dc36607eaa docs: a profile with no node gets an Electrum client of its own, planned
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 13:01:30 +02:00
Kgothatso NgakoandClaude Opus 5.5 ceffda81f6 Merge remote-tracking branch 'origin/bennu' into claude/wallet-guardian-group-display-4e7e78
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>
2026-10-24 12:18:38 +02:00
Kgothatso NgakoandClaude Opus 5.5 e15855faad docs: the direct guardian of a member's wallet is built, and the notes it touched say so (Phase 7)
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>
2026-10-24 12:10:14 +02:00
Kgothatso NgakoandClaude Opus 5.5 0f10ad16c6 docs: forwarding guarded wallets upward is built, and the notes it touched say so (forwarding, Phase 7)
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>
2026-10-24 11:49:42 +02:00
Kgothatso NgakoandClaude Opus 5.5 eaaa352d57 docs: plan naming the group that directly guards each member wallet
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>
2026-10-24 11:41:12 +02:00
Kgothatso NgakoandClaude Opus 5.5 60c54c8825 docs: plan forwarding guarded wallets upward without a tap
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>
2026-10-24 11:36:30 +02:00
Kgothatso NgakoandClaude Opus 5.5 52b17bbc36 docs: the member-wallet policy is built, and the notes it touched say so (Phase 7)
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>
2026-10-24 10:50:33 +02:00
Kgothatso NgakoandClaude Opus 5.5 29c4c5e0d4 docs: a group opts in to guarding members' wallets, and can close again
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>
2026-10-24 10:24:29 +02:00
Kgothatso NgakoandClaude Opus 5.5 1f67ed9726 docs: plan the group setting the delay on its members' guarded wallets
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>
2026-10-24 09:59:23 +02:00
Kgothatso Ngako 05bd6ed6a8 Merge branch 'refs/heads/bennu' into claude/ecstatic-feynman-2c5628 2026-10-24 09:09:17 +02:00
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 0b8ae8150c feat(wallet): offer member guarded wallets on mainnet
GroupWalletRollout.MEMBER_WALLETS_ON_MAINNET is on, lifted by decision
ahead of the signet run that was to lift it, as GUARDIANS_ON_MAINNET
was. A member's own spend on mainnet stays held to MAINNET_CAP, like
every group and guardian spend: memberCapFor no longer lifts with the
gate, since the run that would have justified lifting both has not
been made. The note says the gate is open, what it still leaves open,
and where the cap lifts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 08:29:58 +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 d2e5fa082d docs: member guarded wallets are built, and the notes they touched say so (Phase 12)
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>
2026-10-24 08:00:46 +02:00
Kgothatso NgakoandClaude Opus 5.5 e3e79393f0 docs: the guardian delay is built, and the notes it touched say so (Phase 8)
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>
2026-10-24 07:49:19 +02:00
Kgothatso NgakoandClaude Opus 5.5 b5f0709c3f docs: funding a guarded wallet is built, and the notes it touched say so (Phase 6)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:42:59 +02:00
Kgothatso NgakoandClaude Opus 5.5 414b160d3f docs(regtest): how to run the regtest wallet test, and what its failures mean
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>
2026-10-24 07:41:37 +02:00
Kgothatso NgakoandClaude Opus 5.5 4a556e7ec4 docs: D1 of the guardian-delay plan is decided
A parent sets only its own leaf's delay; an inherited ancestor keeps the
delay it chose, all the way down a guarded subtree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:27:15 +02:00
Kgothatso NgakoandClaude Opus 5.5 afc443b0ee docs: plan a parent choosing its subgroups' guardian delay, and saying it in time
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>
2026-10-24 07:17:15 +02:00
Kgothatso NgakoandClaude Opus 5.5 620cd438a8 docs: plan a guarded wallet a group keeps for one member
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>
2026-10-24 07:09:44 +02:00
Kgothatso NgakoandClaude Opus 5.5 4c6cc9d1a0 docs: plan a group funding a descendant's guarded wallet
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 06:53:38 +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 d8d8d038f9 test(lightning): the group's wallet end to end on regtest, and what it found
`testing/regtest/` builds bitcoind, electrs, an eclair v0.14.4 LSP set up as
a Phoenix LSP, and a payer. `GroupLightningRegtestJvmTest` (run with
BENNU_REGTEST=1) drives four devices through it with a real lightning-kmp
node: open, receive on a channel opened on the fly, pay through the LSP's
trampoline, close mutually, then force-close a second channel and sweep its
delayed output with a FROST script-path spend. It passes from a fresh
network in about thirty seconds.

The run found four bugs in the operator's node, fixed here:

- It learned the chain's height only at the next block, and until then
  could answer no invoice request and take no payment. It now asks as it
  starts.
- It turned down every on-the-fly channel, because lightning-kmp's default
  liquidity policy caps fees at 2,000 sats and the statement's signed
  `maxLiquidityFeeSat` never reached it. The node's policy is now the
  statement's.
- A channel could ask for round one before the pool held it. The node now
  waits for a minimum pool before connecting, and otherwise refuses and
  retries.
- A force close waited forever for feerates, which lightning-kmp fetches
  only once. The node now refreshes them, and takes a flat rate on regtest.

Public eclair cannot route a Bolt11 payment to a wallet by its peer-id
route hint, so the run pays the group's Bolt12 offer. The offer is now part
of the wallet: every snapshot carries it, every member keeps it only if
its own copy of the seed derives it, and the receive screen shows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:30:25 +02:00
Kgothatso NgakoandClaude Opus 5.5 e9fae262c8 docs: the subgroup wallet policy is built, and the notes it touched say so (Phase 9)
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>
2026-10-23 22:11:00 +02:00
Kgothatso NgakoandClaude Opus 5.5 fed7e67c3d docs: plan the parent deciding a subgroup's wallet policy at birth
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>
2026-10-23 21:48:32 +02:00