#back-end #kit #filled

cdk-fake-wallet

CDK fake ln backend

8 releases (5 breaking)

new 0.8.1 Mar 25, 2025
0.8.0 Mar 24, 2025
0.7.1 Feb 13, 2025
0.6.0 Dec 17, 2024
0.3.0 Aug 31, 2024

#45 in #kit

43 downloads per month
Used in 2 crates

MIT license

365KB
8K SLoC

Warning This project is in early development, it does however work with real sats! Always use amounts you don't mind losing.

crates.io Documentation

Cashu Development Kit

CDK is a collection of rust crates for Cashu wallets and mints written in Rust.

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

Project structure

The project is split up into several crates in the crates/ directory:

  • Libraries:
    • cdk: Rust implementation of Cashu protocol.
    • cdk-sqlite: SQLite Storage backend.
    • cdk-redb: Redb Storage backend.
    • cdk-rexie: Rexie Storage backend for browsers.
    • cdk-axum: Axum webserver for mint.
    • cdk-cln: CLN Lightning backend for mint.
    • cdk-lnd: Lnd Lightning backend for mint.
    • cdk-lnbits: LNbits Lightning backend for mint.
    • cdk-fake-wallet: Fake Lightning backend for mint. To be used only for testing, quotes are automatically filled.
    • cdk-mint-rpc: Mint management gRPC server and cli.
  • Binaries:

Development

For a guide to settings up a development environment see DEVELOPMENT.md

Implemented NUTs:

Mandatory

NUT # Description
00 Cryptography and Models
01 Mint public keys
02 Keysets and fees
03 Swapping tokens
04 Minting tokens
05 Melting tokens
06 Mint info

Optional

# Description Status
07 Token state check ✔️
08 Overpaid Lightning fees ✔️
09 Signature restore ✔️
10 Spending conditions ✔️
11 Pay-To-Pubkey (P2PK) ✔️
12 DLEQ proofs ✔️
13 Deterministic secrets ✔️
14 Hashed Timelock Contracts (HTLCs) ✔️
15 Partial multi-path payments (MPP) ✔️
16 Animated QR codes
17 WebSocket subscriptions ✔️
18 Payment Requests ✔️
19 Cached responses ✔️
20 Signature on Mint Quote ✔️

Bindings

Experimental JS bindings can be found in the bindings repository.

License

Code is under the MIT License

Contribution

All contributions are welcome.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.

Please see the development guide.


lib.rs:

CDK Fake LN Backend

Used for testing where quotes are auto filled

Dependencies

~22–38MB
~592K SLoC