github cashubtc/cdk v0.15.0-rc.0

pre-release7 hours ago

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 to PreparedSend
  • Async Wallet Operations: Non-blocking melt operations via prefer field - returns immediately with a PendingMelt future 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 WalletRepository instead
  • Authentication (NUT-21/NUT-22) is now always enabled - the auth feature 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() and Wallet::prepare_melt_proofs() to create PreparedMelt for two-phase melt operations ([thesimplekid]).
  • cdk: PreparedMelt with confirm(), confirm_with_options(), confirm_prefer_async(), and cancel() methods for controlled melt execution ([thesimplekid]).
  • cdk: MeltConfirmOptions to configure melt behavior (e.g., skip_swap) ([thesimplekid]).
  • cdk: MeltOutcome enum with Paid (immediate completion) or Pending variants - Pending returns a PendingMelt that can be awaited immediately OR dropped to complete via WebSocket notifications or Wallet::finalize_pending_melts() ([thesimplekid]).
  • cdk: PendingMelt struct that implements IntoFuture for 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 prefer field 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: WalletRepository as a simpler replacement for MultiMintWallet - manages Wallet instances by mint URL and currency unit with direct access to Wallet methods ([asmo]).
  • cdk: WalletRepositoryBuilder for constructing WalletRepository with configurable proxy, Tor, and database settings ([asmo]).
  • cdk: WalletConfig for per-wallet customization of connectors, target proof counts, and metadata cache TTL ([asmo]).
  • cdk: TokenData struct for extracting mint URL, proofs, and metadata from parsed tokens ([asmo]).
  • cdk: Keyset V2 configuration with use_keyset_v2 setting - 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 MultiMintWallet and all its methods - use WalletRepository instead for managing multiple wallets ([asmo]).
  • cdk: BREAKING - Removed auth feature 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: auth feature flag and all conditional compilation paths ([crodas]).

Don't miss a new cdk release

NewReleases is sending notifications on new releases.