This release is aimed at wallet developer experience.
-
findCashuPayloadlocates a token or payment request inside arbitrary text (chat messages, clipboard blobs, bitcoin: URI parameters, wallet URLs), so wallets can drop their hand-rolled prefix tables and regexes. -
New serializeSwapPreview / deserializeSwapPreview helpers, plus the docs to go with them, make swaps crash-safe in the way melts already were. LockBuilder and asLocked arrive as forward-compatible names for the P2PK lock surface, so code migrated now keeps compiling across the v5 upgrade.
Three fixes are worth mentioning: Base64 and CBOR decoding now give the same verdict on Node and in browsers: well-formed input decodes, malformed input throws CTSError on every platform. Global request options no longer clobber per-call values for library options such as requestTimeout, while RequestInit fields keep global-wins and headers merge. And proof selection no longer returns an empty send on a fee-charging mint when the wallet plainly holds the funds.
MintInfo also exposes the remaining NUT-06 fields: urls, time and tos_url, along with an accessor for icon_url.
What's Changed
- chore(docker): update CDK_IMAGE_RC to cashubtc/mintd:0.18.0-rc.0 by @robwoodgate in #985
- fix(transport): split request option precedence by option class by @robwoodgate in #968
- feat(wallet): add swap preview serialize helpers and persistence docs by @robwoodgate in #972
- fix(utils): make base64 and CBOR payload decoding consistent across platforms by @robwoodgate in #986
- feat(utils): findCashuPayload to locate tokens and payment requests in text by @KvngMikey in #967
- test(integration): accept nutshell's post-#1008 p2pk witness error by @KvngMikey in #993
- chore(docker): update CDK_IMAGE_RC to cashubtc/mintd:0.18.0-rc.1 by @robwoodgate in #994
- feat(wallet): add LockBuilder and asLocked as forward-compatible names by @robwoodgate in #995
- test: pin the NUT-13 V2 secret derivation vectors by @robwoodgate in #998
- chore(docker): update CDK_IMAGE to cashubtc/mintd:0.17.6 by @robwoodgate in #1000
- fix(wallet): keep large proofs in the close-match selection pool by @robwoodgate in #1001
- feat(model): expose NUT-06 urls, time and tos_url on MintInfo by @robwoodgate in #1003
- chore(main): release 5.0.0-rc.8 by @robwoodgate in #987
Full Changelog: v5.0.0-rc.7...v5.0.0-rc.8