KeySetInfos type alias and KeySetInfosMethods trait for filtering keysets (thesimplekid).start() and stop() methods for graceful background service control (thesimplekid).get_keyset_keys to fetch_keyset_keys to indicate network operation (thesimplekid).get_active_mint_keyset to fetch_active_keyset for consistency (thesimplekid).get_active_mint_keysets to refresh_keysets with improved keyset refresh logic (thesimplekid).load_mint_keysets method to be the primary method for getting keysets for token operations (thesimplekid).Version 0.11.0 brings significant architectural changes to enhance database reliability and performance. The major changes include:
Database Engine Change: Replaced sqlx with rusqlite as the SQLite database driver and removed support for redb. This change provides better performance and reliability for database operations.
Transaction Management: Introduced robust database transaction support that encapsulates all database changes. The new Transaction trait implements a rollback operation on Drop unless explicitly committed, ensuring data integrity.
Race Condition Prevention: Added READ-and-lock operations to securely read and lock records from the database for exclusive access, preventing race conditions in concurrent operations.
If you are currently running a mint with redb, you must migrate to SQLite before upgrading to v0.11. Follow these steps:
cdk-signatory is optional for wallet PR (thesimplekid).create_time, paid_time to mint and melt quotes PR (thesimplekid).cdk commit from cashu PR (thesimplekid).MintKeySetInfo PR (davidcaseria).UPDATE OR REPLACE (crodas).MintQuote and MeltQuote from cashu to cdk-common (thesimplekid).tos_url to MintInfo (nodlAndHodl).MintBuilder (thesimplekid).AmountStr (crodas).get_nostr_last_checked from WalletDatabase (thesimplekid).add_nostr_last_checked from WalletDatabase (thesimplekid).Id is hex (thesimplekid).call_typed for cln rpc calls (daywalker90).cdk-common (crodas).cdk-common (crodas).Wallet::mint returns the minted Proofs and not just the amount (davidcaseria).Token::to_raw_bytes serializes generic token to raw bytes (lollerfirst).Token::try_from for Vec<u8> constructs a generic token from raw bytes (lollerfirst).TokenV4::to_raw_bytes() serializes a TokenV4 to raw bytes following the spec (lollerfirst).Wallet::receive_raw which receives raw binary tokens (lollerfirst).NUT19 Settings in NUT06 info (thesimplekid).NUT17 Websocket support for wallet (crodas).mint use unit from cli args (thesimplekid).restore create wallet if it does not exist (thesimplekid).bitcoin to 0.32.2 (prusnak).lightning-invoice to 0.32.2 (prusnak).lightning to 0.0.124 (prusnak).PaymentMethod as a non_exhaustive enum (thesimplekid).CurrencyUnit as a non_exhaustive enum (thesimplekid).cdk::Mint and not with axum (thesimplekid).MintUrl directly in wallet client (ok300).Wallet::get_proofs to Wallet::get_unspent_proofs (ok300).Id to u32 changed from TryFrom to From (vnprc).MintQuoteBolt11Request (lollerfirst).mint_quote (lollerfirst).amount and fee_paid to Melted (davidcaseria).from_proofs on Melted (davidcaseria).PaymentResponse (thesimplekid).Wallet::get_proofs_with (ok300).MintMeltSettings since it is no longer used (lollerfirst).PaymentMethod::Custom (thesimplekid).MeltBolt11Response (thesimplekid).fn send returns Token so the user can use the struct of convert it to a v3 or v4 string (thesimplekid).MultiMintWallet (thesimplekid).pending and spent proofs by ys or secrets instead of a single proofs (thesimplekid).add_blind_signature to add_blind_signatures (thesimplekid).add_active_keyset to set_active_keyset (thesimplekid).get_proofs to return Vec<ProofInfo> instead of Option<Vec<ProofInfo>> (thesimplekid).get_blinded_signatures to get_blind_signatures (thesimplekid).get_blinded_signatures_for_keyset to get_blind_signatures_for_keyset (thesimplekid).total_redeame to total_redeemed (vnprc).MintKeySet::generate_from_xpriv and MintKeySet::generate_from_seed methods to accept max_order, currency_unit, and derivation_path parameters directly (vnprc).CreateInvoiceResponse added expiry time to better support backends where it cannot be set (thesimplekid).Amount type instead of u64 (thesimplekid).CreateInvoice requires unit argument (thesimplekid).get_balances returns a BTreeMap instead of HashMap (thesimplekid).Copy on SigFlag (thesimplekid).fn send_proofs that marks proofs as reserved and creates token (thesimplekid).fn melt_proofs that uses specific proofs for melt instead of selecting (thesimplekid).add_proofs, get_proofs_by_ys, get_proofs_states, and update_proofs_states (thesimplekid).get_blinded_signatures_for_keyset to get all blind signatures for a keyset_id (thesimplekid).total_issued and total_redeamed (thesimplekid).get_proofs_by_keyset_id (thesimplekid).mint_icon_url (cjbeery24).MintUrl that sanitizes mint url by removing trailing / (cjbeery24).update_proofs that both adds new ProofInfos to the db and deletes (davidcaseria).set_pending_proofs, reserve_proofs, and set_unspent_proofs (davidcaseria).SIG_ALL is not allowed in melt (thesimplekid).swap verify correct number of sigs on outputs when SigAll (thesimplekid).SplitTarget on melt (thesimplekid).get_spent_proofs, get_spent_proofs_by_ys,get_pending_proofs, get_pending_proofs_by_ys, and remove_pending_proofs (thesimplekid).UncheckedUrl in favor of MintUrl (cjbeery24).set_proof_state, remove_proofs and add_proofs (davidcaseria).This release introduces TokenV4, which uses CBOR encoding as the default token format. It also includes fee support for both wallet and mint operations.
When sending, the sender can choose to include the necessary fee to ensure that the receiver can redeem the full sent amount. If this is not done, the receiver will be responsible for the fee.
Additionally, this release introduces a Mint binary cdk-mintd that uses the cdk-axum crate as a web server to create a full Cashu mint. When paired with a Lightning backend, currently implemented as Core Lightning, it is included in this release as cdk-cln.
wallet:receive will not claim proofs from a mint other than the wallet's mint (thesimplekid).Token is changed from a struct to enum of either TokenV4 or Tokenv3 (thesimplekid).MintProofs to TokenV3Token (thesimplekid).send send_kind and include_fees for control of how to handle fees in a send (thesimplekid).create_swap include_fees for control of if fees to redeem the send proofs are included in send amount (thesimplekid).wallet::receive_proof functions to claim specific proofs instead of encoded token (thesimplekid).send to print v3 token, default is v4 (thesimplekid).MintLightning trait (thesimplekid).MintInfo and NUTs builder (thesimplekid).PreMintSecret added Keyset id (thesimplekid).MintInfo (thesimplekid).wallet::total_pending_balance does not include reserved proofs (thesimplekid).