docs(lnurlcash): update the minting contract and test harness description

This commit is contained in:
2026-09-05 15:21:55 +02:00
parent b2b5974dae
commit 5d6e092ae4
+8 -12
View File
@@ -6,14 +6,11 @@ lnurlcash-kit directly.
## FUND-CRITICAL INVARIANTS (non-negotiable) ## FUND-CRITICAL INVARIANTS (non-negotiable)
- Rotate on every receive, and immediately after claiming a fresh mint - Rotate every externally received bearer. Minted notes are different:
from an UNNAMED mint (one that keys the note by the payment preimage). current LUD-25 requires `commentAllowed >= 64`, so the wallet durably
A NAMED mint (LUD-25 `comment`/`mintToHash`, required by lnurl-mint stages its chosen secret before requesting the invoice and claims at
≥ 0.4) credits the note to a wallet-chosen secret whose hash bound the that secret without rotating. `mintToHash` is only an additive receipt
quote; that secret never rode an invoice, so the claim needs no rotate. extension, never a capability fallback.
The claim poll itself is the placement proof: a mint that took the hash
but credited the preimage is caught there and rescued through the
quote's verify URL when one is served.
- A note's declared amount is a claim; the service's `maxWithdrawable` is - A note's declared amount is a claim; the service's `maxWithdrawable` is
authoritative. authoritative.
- A melt's "OK" only means the payment is in flight — the verify URL (or - A melt's "OK" only means the payment is in flight — the verify URL (or
@@ -68,7 +65,6 @@ test-utils.ts # mock mint harness used by *.test.ts
## TESTS ## TESTS
`npx vitest run` — node environment, `*.test.ts` next to the modules. `npx vitest run` — node environment, `*.test.ts` next to the modules.
Adversarial mock mint from lnurlcash-conformance via `ops.testHarness.ts` The adversarial mock mint from lnurlcash-conformance is wrapped by
(`conformance-mockmint.d.ts` augments its stale published declarations `ops.testHarness.ts`; its default contract is mandatory comment-bound
with the comment-naming flags). The mock's `commentAllowed` option models minting.
the named-mint generation; default options model the old one.