- Rust 97.1%
- Shell 1%
- Nix 0.7%
- Just 0.5%
- Python 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
Some checks failed
CI / Cargo fmt, Nix fmt, typos (push) Has been cancelled
CI / Discover CI groups (push) Has been cancelled
Nutshell integration / Nutshell Mint Integration Tests (push) Has been cancelled
Nutshell integration / Nutshell Wallet Integration Tests (push) Has been cancelled
CI / Fuzz targets compile and smoke test (push) Has been cancelled
CI / Warm Nix cache (fuzz-a) (push) Has been cancelled
CI / Warm Nix cache (fuzz-b) (push) Has been cancelled
CI / Warm MSRV Nix cache (fuzz-a) (push) Has been cancelled
CI / Warm MSRV Nix cache (fuzz-b) (push) Has been cancelled
CI / Quick Check (workspace clippy) (push) Has been cancelled
CI / Examples (push) Has been cancelled
CI / Build integration test binaries (push) Has been cancelled
CI / PostgreSQL Tests (push) Has been cancelled
CI / Supabase Tests (push) Has been cancelled
CI / Redis Cache Tests (push) Has been cancelled
CI / Integration regtest LN tests (push) Has been cancelled
CI / Integration regtest LN tests-1 (push) Has been cancelled
CI / Integration regtest Onchain tests (push) Has been cancelled
CI / Integration regtest Onchain tests-1 (push) Has been cancelled
CI / Integration fake mint tests (push) Has been cancelled
CI / Integration fake mint tests-1 (push) Has been cancelled
CI / Integration fake wallet tests (push) Has been cancelled
CI / Integration fake wallet tests-1 (push) Has been cancelled
CI / Integration fake wallet tests-2 (push) Has been cancelled
CI / Payment processor tests (push) Has been cancelled
CI / Payment processor tests-1 (push) Has been cancelled
CI / Payment processor tests-2 (push) Has been cancelled
CI / Integration fake mint auth tests (push) Has been cancelled
CI / Documentation checks (push) Has been cancelled
CI / FFI Python tests (push) Has been cancelled
CI / Code Coverage (push) Has been cancelled
CI / Dart binding tests (push) Has been cancelled
CI / Kotlin binding tests (push) Has been cancelled
CI / Go binding tests (push) Has been cancelled
CI / Swift binding tests (push) Has been cancelled
CI / CI status (push) Has been cancelled
Persist ignored outpoints to suppress repeated debug logs across scans and restarts. Warn on database errors and continue scanning payments. |
||
| .agents/skills/cdk-code-review | ||
| .cargo | ||
| .claude | ||
| .github | ||
| .helix | ||
| bindings | ||
| crates | ||
| docs | ||
| fuzz | ||
| meetings | ||
| misc | ||
| nix | ||
| tor | ||
| .backportrc.json | ||
| .cargo-mutants.toml | ||
| .envrc | ||
| .gitignore | ||
| .typos.toml | ||
| AGENTS.md | ||
| buf.yaml | ||
| Cargo.lock | ||
| Cargo.lock.msrv | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| clippy.toml | ||
| CODE_STYLE.md | ||
| codecov.yml | ||
| DEVELOPMENT.md | ||
| docker-compose.ldk-node.yaml | ||
| docker-compose.postgres.yaml | ||
| docker-compose.redis-cluster.yaml | ||
| docker-compose.tor.yaml | ||
| docker-compose.yaml | ||
| Dockerfile | ||
| Dockerfile.arm | ||
| Dockerfile.ldk-node | ||
| Dockerfile.ldk-node.arm | ||
| Dockerfile.static | ||
| flake.lock | ||
| flake.nix | ||
| justfile | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||
| LICENSE.md | ||
| README.md | ||
| REGTEST_GUIDE.md | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
| SECURITY.md | ||
Warning
This project is in early development, it does however work with real sats! Always use amounts you don't mind losing.
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.
Quick Start
CDK uses Nix flakes to manage development environments. We provide a lean default shell for standard development and a full-stack shell for integration testing.
# Enter the lean development shell (Rust + PostgreSQL)
nix develop
# OR enter the full regtest environment (Bitcoind + Lightning Nodes)
nix develop .#regtest
For more details on available environments, see the Development Guide.
Project structure
The project is split up into several crates in the crates/ directory:
- Libraries:
- cashu: Core Cashu protocol implementation.
- cdk: Rust implementation of Cashu protocol.
- cdk-http-client: HTTP client abstraction for wallet-to-mint communication.
- cdk-sqlite: SQLite Storage backend.
- cdk-postgres: PostgreSQL Storage backend.
- cdk-redb: Redb Storage backend.
- cdk-supabase: Supabase Storage backend.
- cdk-axum: Axum webserver for mint.
- cdk-cln: CLN Lightning backend for mint.
- cdk-lnd: Lnd Lightning backend for mint.
- cdk-ldk-node: LDK Node Lightning backend for mint.
- cdk-bdk: Onchain Bitcoin backend using BDK.
- cdk-fake-wallet: Fake payment backend for mint. To be used only for testing, quotes are automatically filled.
- cdk-common: Common utilities and shared code.
- cdk-sql-common: Common SQL utilities for storage backends.
- cdk-signatory: Signing utilities and cryptographic operations.
- cdk-payment-processor: Payment processing functionality; LNbits integrations should use an external payment processor.
- cdk-prometheus: Prometheus metrics integration.
- cdk-nostr: Nostr integration — keys, NIP-44 encryption, NIP-17 inbox listener, NIP-47 wallet service, npub.cash SDK.
- cdk-ffi: Foreign Function Interface bindings for other languages.
- cdk-integration-tests: Integration test suite.
- cdk-mint-rpc: Mint management gRPC server and cli.
- Binaries:
- cdk-cli: Cashu wallet CLI.
- cdk-mintd: Cashu Mint Binary.
- cdk-mint-cli: Cashu Mint management gRPC client cli.
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 | ✔️ |
| 21 | Clear Authentication | ✔️ |
| 22 | Blind Authentication | ✔️ |
| 23 | Payment Method: BOLT11 | ✔️ |
| 25 | Payment Method: BOLT12 | ✔️ |
| 26 | Payment Request Bech32m Encoding | ✔️ |
| 27 | Nostr Mint Backup | ✔️ |
| 28 | Pay to Blinded Key (P2BK) | ✔️ |
| 29 | Batch Mint Tokens | ✔️ |
| 30 | Payment Method: onchain | ✔️ |
License
Code is licensed under either the Apache License 2.0 or the MIT License, at your option. See LICENSE.md for details.
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.