This release brings Cashu-TS into line with the latest NUT spec, by allowing expired mint quotes to be minted. It also makes the internal keyset snapshot (cache) self-repair if a mint rotates keysets during wallet lifetime.
Consumers who persist the caches can subscribe to a new keychainUpdated event to be notified when the cache snapshot has updated. Consumers who wish to fully manage keyset caches themselves can instantiate Wallet with the new strictCachedKeysets option enabled. Cashu-TS will then strictly use the provided cache and throw if required keyset data is unavailable.
The library now ships with two new errors: StaleKeysetError and UnknownKeysetError .
What's Changed
- fix(wallet): allow minting paid expired quotes (v4 backport) by @Egge21M in #970
- chore(docker): update CDK_IMAGE to cashubtc/mintd:0.17.4 [backport v4-dev] by @robwoodgate in #981
- chore(docker): update CDK_IMAGE to cashubtc/mintd:0.17.5 [backport v4-dev] by @robwoodgate in #983
- chore(lint): ban double assertions through unknown/any in src [backport v4-dev] by @robwoodgate in #984
- feat(wallet): size request batches from the mint's advertised cap [backport v4-dev] by @robwoodgate in #980
- feat(wallet): follow keyset rotations and check melt inputs against the snapshot [backport v4-dev] by @robwoodgate in #979
- chore(v4-dev): release 4.9.0 by @robwoodgate in #977
Full Changelog: v4.8.0...v4.9.0