mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-19 21:55:03 +01:00
* Drop the in-memory database Fixes #607 This PR drops the implementation of in-memory database traits. They are useful for testing purposes since the tests should test our codebase and assume the database works as expected (although a follow-up PR should write a sanity test suite for all database trait implementors). As complexity is worth with database requirements to simplify complexity and add more robustness, for instance, with the following plans to add support for transactions or buffered writes, it would become more complex and time-consuming to support a correct database trait. This PR drops the implementation and replaces it with a SQLite memory instance * Remove OnceCell<Mint> Without this change, a single Mint is shared for all tests, and the first tests to run and shutdown makes the other databases (not-reachable, as dropping the tokio engine would also drop the database instance). There is no real reason, other than perhaps performance. The mint should perhaps run in their own tokio engine and share channels as API interfaces, or a new instance should be created in each tests * Fixed bug with foreign keys [1] https://gist.github.com/crodas/bad00997c63bd5ac58db3c5bd90747ed * Show more debug on failure * Remove old code * Remove old references to WalletMemoryDatabase
Cashu Development Kit SQLite Storage Backend
ALPHA This library is in early development, the api will change and should be used with caution.
cdk-sqlite is the sqlite storage backend for cdk.
Crate Feature Flags
The following crate feature flags are available:
| Feature | Default | Description |
|---|---|---|
wallet |
Yes | Enable cashu wallet features |
mint |
Yes | Enable cashu mint wallet features |
Implemented NUTs:
See https://github.com/cashubtc/cdk/blob/main/README.md
Minimum Supported Rust Version (MSRV)
The cdk library should always compile with any combination of features on Rust 1.63.0.
To build and test with the MSRV you will need to pin the below dependency versions:
cargo update -p half --precise 2.2.1
cargo update -p home --precise 0.5.5
cargo update -p tokio --precise 1.38.1
cargo update -p serde_with --precise 3.1.0
cargo update -p reqwest --precise 0.12.4
License
This project is distributed under the MIT software license - see the LICENSE file for details.