This release makes swap previews safe to persist and replay, adds a per-call requestTimeout, and tightens input checks across P2PK, HTLC and payment requests. No API was removed since rc.12, but a few behaviour changes are worth checking before you upgrade.
Upgrading from rc.12: read these even if you never touch a v3 keyset
-
If you persist swap previews for NUT-19 replay, sign them first with
wallet.signSwapPreview(preview)and store the signed copy. An unsigned preview still completes, but a P2PK or v3 input signs again on replay, so the request misses the mint’s cache and gets 11001. When that happens, wallet.restoreSwapPreview(preview) gets the proofs back from the preview with NUT-09. -
Normal sends now swap locked P2PK and HTLC inputs even when the amounts match exactly, so a send can now pay a swap fee where it didn’t before.
-
Offline sends keep each proof’s DLEQ so the receiver can verify offline, which makes tokens bigger. Pass { removeDleq: true } to getEncodedToken if size matters, eg for a QR code.
-
Some input that rc.12 accepted now throws: a P2PK secret with no pubkey in data, an integer tag (eg locktime, n_sigs) with no value, a proof secret that isn’t well-formed UTF-16, and malformed locks passed to isPaymentRequestSatisfied.
-
Mint methods and completeMelt take a per-call requestTimeout, so a Lightning melt can run past a short global timeout. The melt builders’ run() doesn’t forward it, so use prepare() then completeMelt.
v3 keysets
Nutroot is still a draft and v3 keysets are served only by demo mints, so nothing here affects funds on a public mint. A v3 witness signs one transaction, so prepareSwapToSend and prepareMelt now drop any witness already on their inputs. Payment request checks now match nutroot payments to the requested receiver key and pick the proof family by keyset, and a preimage is only attached to the hashlock it opens.
What's Changed
- chore(docker): update CDK_IMAGE to cashubtc/mintd:0.18.3 by @robwoodgate in #1360
- chore(deps): bump the dev-tooling group with 3 updates by @dependabot[bot] in #1359
- chore(deps): bump vite from 8.3.4 to 8.3.5 in the vitest group by @dependabot[bot] in #1358
- fix(events): route error callbacks through safeCallback by @robwoodgate in #1362
- fix(events): contain remaining consumer callbacks by @robwoodgate in #1365
- fix(events): contain onDrop and onProgress callbacks by @robwoodgate in #1367
- test: use non-expiring invoices in integration tests by @robwoodgate in #1371
- chore(docker): update NUT_IMAGE to cashubtc/nutshell:0.22.1 by @robwoodgate in #1370
- test: use non-expiring invoices in v3 integration tests by @robwoodgate in #1372
- chore(docker): pin the BLS mint seed image by @robwoodgate in #1373
- fix: keep request paths and full quote ids out of log context by @robwoodgate in #1374
- chore(deps): bump the dev-tooling group with 4 updates by @dependabot[bot] in #1376
- fix(wallet): drop quote ids and proofs from log context by @robwoodgate in #1377
- fix(events): contain group subscription setup failures by @robwoodgate in #1380
- fix(payment-request): drop an incomplete DLEQ in decodePayload by @robwoodgate in #1382
- feat(mint): add a per-call requestTimeout by @robwoodgate in #1384
- fix(wallet): keep the DLEQ on offline sends by @robwoodgate in #1383
- feat(wallet): restore a swap from its preview by @robwoodgate in #1388
- feat(wallet): sign swap previews before persisting by @robwoodgate in #1385
- fix(mint): log the response shape, not the body, on malformed responses by @robwoodgate in #1389
- fix(crypto): require a pubkey in P2PK data by @robwoodgate in #1393
- fix(wallet): match nutroot payments to the requested receiver key by @robwoodgate in #1392
- fix(wallet): reject malformed locks when checking a payment request by @robwoodgate in #1395
- fix(wallet): pick the proof family by keyset when checking a payment request by @robwoodgate in #1397
- fix(wallet): align proof validation by @KvngMikey in #1391
- fix(nutroot): only attach a preimage to the hashlock it opens by @robwoodgate in #1398
- fix(auth): apply the https discovery rule to device verification links by @robwoodgate in #1400
- fix: keyset handling by @KvngMikey in #1399
- fix(wallet): swap locked legacy inputs before sending by @KvngMikey in #1403
- test(nutroot): refresh the v3 vectors by @robwoodgate in #1406
- ci: pin GitHub Actions to commit SHAs by @robwoodgate in #1405
- ci: let Dependabot update the v4-dev action pins by @robwoodgate in #1408
- fix(crypto): require values for integer tags by @KvngMikey in #1413
- test(nutroot): each token vector carries its own signature by @robwoodgate in #1412
- chore(deps): bump vitest from 5.0.5 to 5.1.0 in the vitest group by @dependabot[bot] in #1409
- chore(deps): bump the dev-tooling group with 5 updates by @dependabot[bot] in #1411
- chore(deps): bump korthout/backport-action from 4.7.0 to 4.7.1 in the github-actions group by @dependabot[bot] in #1410
- fix(crypto): normalize HTLC hash comparison by @KvngMikey in #1415
- chore(main): release 5.0.0-rc.13 by @robwoodgate in #1364
Full Changelog: v5.0.0-rc.12...v5.0.0-rc.13