Files
cdk/crates/cdk-redb
thesimplekid 3c4fce5c45 feat: add keyset u32 mapping migration (#926)
* feat: add keyset u32 mapping migration and duplicate handling

- Add new database migration (version 3) to include u32 representation for keysets
- Implement migration for both redb and SQL databases
- Add duplicate detection and handling for keyset entries
- Create unique index constraint for keyset_u32 column in SQL
- Update keyset storage to include u32 identifiers
- Handle backwards compatibility for existing databases

* chore: clippy

* refactor(cashu): simplify keyset ID verification logic

- Consolidate match expression into a single expression
- Use direct comparison with ensure_cdk macro
- Improve readability of keyset ID validation

* refactor(cdk): rename `fetch_keyset_keys` to `load_keyset_keys` for clarity

- Renamed `fetch_keyset_keys` to `load_keyset_keys` across multiple modules to better reflect its behavior of loading keys from local storage or fetching from mint when missing.
- Added debug logging to indicate when keys are being fetched from the mint.
- Simplified key loading logic in `update_mint_keysets` by removing redundant existence checks.

* chore: remove unused vec
2025-07-31 10:04:38 -04:00
..
2025-06-21 10:32:26 +01:00
2025-06-21 10:32:26 +01:00

CDK Redb

crates.io Documentation MIT licensed

ALPHA This library is in early development, the API will change and should be used with caution.

Redb storage backend implementation for the Cashu Development Kit (CDK) wallet.

Features

This crate provides a Redb-based storage implementation for wallet functionality, including:

  • Wallet storage
  • Proof tracking
  • Transaction history

Installation

Add this to your Cargo.toml:

[dependencies]
cdk-redb = "*"

License

This project is licensed under the MIT License.