This release speeds up wallet restore by optimising legacy BIP-32 derivation - benchmarks showed roughly 2x speedup for the new cached batch path versus repeated BIP32 derivation of previous implementation.
It also tightens spec compliance and hardens the wallet against real-world mint quirks: BOLT12 quotes, NUT-12 DLEQ verification, and nullable wire fields now behave correctly across mint implementations.
Slow Lightning payments can now be fire-and-forget: wallets can save the in-flight payment, restart or hand off to another process, and still reclaim their change once the payment settles thanks to new OutputData serializers and wallet.createMeltChangeProofs method.
New developer ergonomics include a CTSError base class for cleaner error handling and a maxSpendableAfterFees primitive that makes "send max" flows trivial to build.
Note
The fix in #655 is technically a breaking type change to BOLT12 MintQuoteBolt12Response.amount in a very limited set of edge cases, so please check your app if it supports BOLT12. The PR description contains the one line fix if you are affected.
What's Changed
- fix(mint): treat null amount on BOLT12 mint quote as no-amount by @robwoodgate in #649
- fix(wallet): treat expiry: 0 as no-expiry in validateMintQuote by @robwoodgate in #648
- docs(examples): add README and align bolt12 example with Makefile port by @robwoodgate in #650
- refactor(mint): cast wire values as AmountLike, not Amount, in normalizers by @robwoodgate in #652
- feat(wallet): add maxSpendableAfterFees method by @robwoodgate in #654
- fix(mint): coerce omitted payment_preimage and witness to null by @robwoodgate in #653
- feat(nut12): deterministic DLEQ nonce derivation by @robwoodgate in #638
- fix(wallet): verify DLEQ on received proofs even without requireDleq (NUT-12) by @robwoodgate in #656
- feat(types): align nullable wire fields with spec (T | null) by @robwoodgate in #655
- feat(errors): add CTSError base class by @robwoodgate in #657
- refactor: optimize deterministic derivation by @robwoodgate in #658
- feat(wallet): improve async melt change handling by @robwoodgate in #659
- chore(main): release 4.3.0 by @robwoodgate in #651
Full Changelog: v4.2.1...v4.3.0