Skip to content

Wallet UX for on-chain (Ark) boards + Proof-of-Reserves card#539

Closed
mvuk wants to merge 5 commits into
cashubtc:mainfrom
mvuk:onchain-board-and-por-ui
Closed

Wallet UX for on-chain (Ark) boards + Proof-of-Reserves card#539
mvuk wants to merge 5 commits into
cashubtc:mainfrom
mvuk:onchain-board-and-por-ui

Conversation

@mvuk

@mvuk mvuk commented Jun 18, 2026

Copy link
Copy Markdown

Wallet UX for on-chain (Ark) boards + Proof-of-Reserves card

Experimental / discussion-first (opened as draft). This targets a mint with an
on-chain mint/melt method backed by Bark (Ark). Pairs with cashubtc/cdk#2128.

What's included

  • Proof-of-Reserves card in mint details: attested reserve, freshness (independent
    via mempool.space), "verify independently" — renders "unknown" rather than a
    confident "0 sat"/self-reported freshness when reserve total or an independent tip is
    missing. PoR is framed as a lower bound.
  • On-chain melt: a Max (deduct-fee) button; surface the fee up-front; don't
    eagerly compute fee_paid for async on-chain melts (which would overstate the fee).
  • On-chain mint/board UX: show "Confirming…" for amountless pending receives instead
    of a misleading "+0"; default 6 confirmations for boards (maturation depth).
  • Concurrency robustness: poll on-chain quotes without the global mutex (the
    background checker was contending → "Please try again." timeouts); lock only for the
    mint, with a re-check to avoid double-minting; steal a stale global mutex lock after 30s.

Notes

  • Commits are DCO Signed-off-by.
  • No behaviour change for lightning-only mints; the on-chain paths are gated on the mint
    advertising an on-chain method.

🤖 Generated with Claude Code

Nordic Operator and others added 5 commits June 18, 2026 15:54
Signed-off-by: Matthew Vuk <matthew@second.tech>
…shness, verify-independently)

NOTE: integration fixes pending — switch freshness tip from Mutinynet to mainnet esplora; replace placeholder public verifier repo URL with local-only verify instructions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Matthew Vuk <matthew@second.tech>
…erify (no public repo link)

Signed-off-by: Matthew Vuk <matthew@second.tech>
Signed-off-by: Matthew Vuk <matthew@second.tech>
…melts

- checkOnchainAndMint: poll the quote WITHOUT the global mutex (the background
  checker polls every pending on-chain quote; contending on the single global
  lock made operations time out as "Please try again."). Take the lock only for
  the actual mint, and re-check under it to avoid double-minting.
- ui store: steal a stale global mutex lock after 30s so a stuck lock self-heals.
- confirmations: default 6 for mint (board maturation), keep 1 for melt (mint's
  own tx settles fast); prefer exact-unit method, fall back to any onchain method.
- PoR card: render "unknown" instead of a confident "0 sat"/self-reported
  freshness when reserve total or an independent chain tip is missing.
- history: show "Confirming…" for amountless pending receives instead of "+0".
- pay dialog: surface the fee up-front; don't eagerly compute fee_paid for async
  on-chain melts (would overstate the fee from a still-pending quote).
- create-invoice: drop the broken on-chain "reusable address" path (Create
  Address always mints a new one, so it showed two QRs for one deposit).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Matthew Vuk <matthew@second.tech>
@mvuk mvuk force-pushed the onchain-board-and-por-ui branch from 3ff3083 to eed8a30 Compare June 18, 2026 12:54
@mvuk

mvuk commented Jun 18, 2026

Copy link
Copy Markdown
Author

Superseded by #540 — recreated from a clean branch to drop force-push history. Closing this one.

@mvuk mvuk closed this Jun 18, 2026
@mvuk mvuk deleted the onchain-board-and-por-ui branch June 18, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant