0.15.0
Summary
Version 0.15.0 introduces Wallet Sagas, a major architectural improvement that brings the saga pattern to all wallet operations for robust error recovery and crash resilience. This release also adds async wallet operations support and NUT-26 (Payment Request Bech32m Encoding) for compatibility with BIP-321 and BIP-353 human-readable addresses.
Key highlights include:
- Wallet Sagas: All wallet operations (mint, melt, send, receive, swap) now use the saga pattern with type-state safety and automatic compensation actions
- Melt Flow Redesign: New two-phase prepare/confirm pattern for melts with
PreparedMelt, similar toPreparedSend - Async Wallet Operations: Non-blocking melt operations via
preferfield - returns immediately with aPendingMeltfuture that can be awaited immediately OR dropped to complete via WebSocket notifications or background recovery - NUT-26: Payment Request Bech32m Encoding support (CREQ-B format) - provides better QR code compatibility and enables integration with BIP-321/BIP-353 human-readable addresses
- Breaking Change: MultiMintWallet has been removed - use
WalletRepositoryinstead - Authentication (NUT-21/NUT-22) is now always enabled - the
authfeature flag has been removed - Keyset V2 is now the default for new keysets
Added
- cdk: Wallet saga pattern for all wallet operations (mint, melt, send, receive, swap) with type-state pattern and compensation actions ([thesimplekid]).
- cdk:
Wallet::recover_incomplete_sagas()method to recover from interrupted operations and prevent proofs from being stuck in reserved states ([thesimplekid]). - cdk:
Wallet::prepare_melt()andWallet::prepare_melt_proofs()to createPreparedMeltfor two-phase melt operations ([thesimplekid]). - cdk:
PreparedMeltwithconfirm(),confirm_with_options(),confirm_prefer_async(), andcancel()methods for controlled melt execution ([thesimplekid]). - cdk:
MeltConfirmOptionsto configure melt behavior (e.g.,skip_swap) ([thesimplekid]). - cdk:
MeltOutcomeenum withPaid(immediate completion) orPendingvariants -Pendingreturns aPendingMeltthat can be awaited immediately OR dropped to complete via WebSocket notifications orWallet::finalize_pending_melts()([thesimplekid]). - cdk:
PendingMeltstruct that implementsIntoFuturefor awaiting async melt completion ([thesimplekid]). - cdk:
Wallet::finalize_pending_melts()to recover and complete pending melt operations after crash ([thesimplekid]). - cdk: Async wallet operations support using
preferfield in request body ([thesimplekid]). - cdk: NUT-26 Payment Request Bech32m Encoding support (CREQ-B format as an alternative to NUT-18's CREQ-A) ([thesimplekid]).
- cdk:
WalletRepositoryas a simpler replacement for MultiMintWallet - manages Wallet instances by mint URL and currency unit with direct access to Wallet methods ([asmo]). - cdk:
WalletRepositoryBuilderfor constructing WalletRepository with configurable proxy, Tor, and database settings ([asmo]). - cdk:
WalletConfigfor per-wallet customization of connectors, target proof counts, and metadata cache TTL ([asmo]). - cdk:
TokenDatastruct for extracting mint URL, proofs, and metadata from parsed tokens ([asmo]). - cdk: Keyset V2 configuration with
use_keyset_v2setting - defaults to V2 for new keysets while preserving existing keyset versions ([thesimplekid]). - cdk: Input and output limits for swap, melt, and other transactions to prevent DoS attacks ([thesimplekid]).
- cdk: Glob pattern support for NUT-21/22 route validation ([thesimplekid]).
- cdk:
Wallet::fetch_mint_quote()method to retrieve mint quote by ID ([asmo]). - cdk-ldk-node: BIP39 mnemonic seed configuration ([asmo]).
- cdk-ldk-node: Configurable announcement addresses ([asmo]).
- cdk-ldk-node: Configurable logging settings ([asmo]).
Changed
- cdk: BREAKING - Removed
MultiMintWalletand all its methods - useWalletRepositoryinstead for managing multiple wallets ([asmo]). - cdk: BREAKING - Removed
authfeature flag - authentication code (NUT-21/NUT-22) is now always compiled ([crodas]). - cdk: Melt operations now use the saga pattern with type-state safety and automatic compensation on failure ([thesimplekid]).
- cdk:
PreparedMelt,PreparedSend, and other prepared structs marked with#[must_use]to prevent accidental drops ([thesimplekid]). - cashu: Default features are now off ([thesimplekid]).
- cdk-common: Abstracted HTTP client behind
cdk_common::HttpClient([crodas]).
Fixed
- cdk: Fee conversion in payment backend ([thesimplekid]).
- cdk: Mint publishes quote back to unpaid state on failure ([thesimplekid]).
- cdk: Add error code for input and output limits ([thesimplekid]).
- cdk-sqlite: Correct SQLite connection pool size check ([crodas]).
Removed
- cdk: MultiMintWallet and all associated methods ([asmo]).
- cdk:
authfeature flag and all conditional compilation paths ([crodas]).