Files
cdk/crates/cdk-sql-common
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-07-29 11:31:23 -03:00
2025-07-29 11:31:29 -03:00
2025-07-29 11:31:28 -03:00
2025-07-29 11:31:23 -03:00

CDK SQL Base

This is a private crate offering a common framework to interact with SQL databases.

This crate uses standard SQL, a generic migration framework a traits to implement blocking or non-blocking clients.

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

Features

The following crate feature flags are available:

Feature Default Description
wallet Yes Enable cashu wallet features
mint Yes Enable cashu mint wallet features
auth Yes Enable cashu mint auth features

License

This project is licensed under the MIT License.