No description
  • Rust 97.2%
  • Shell 1%
  • Nix 0.7%
  • Just 0.4%
  • Python 0.4%
Find a file
tsk 87c2bf976f
Some checks failed
Nutshell integration / Nutshell Mint Integration Tests (push) Has been cancelled
Nutshell integration / Nutshell Wallet Integration Tests (push) Has been cancelled
CI / Cargo fmt, Nix fmt, typos (push) Has been cancelled
CI / Discover CI groups (push) Has been cancelled
CI / Warm MSRV Nix cache (fuzz-b) (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 / Integration fake wallet tests (push) Has been cancelled
CI / Integration fake wallet tests-1 (push) Has been cancelled
CI / Integration fake mint auth tests (push) Has been cancelled
CI / Documentation checks (push) Has been cancelled
CI / Dart binding tests (push) Has been cancelled
CI / Kotlin binding tests (push) Has been cancelled
CI / Swift binding tests (push) Has been cancelled
CI / CI status (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-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 / FFI Python tests (push) Has been cancelled
CI / Code Coverage (push) Has been cancelled
CI / Go binding tests (push) Has been cancelled
CI / Integration regtest LN tests (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
feat(wallet): recover mint quote signing keys from seed
Add fetch_mint_quote_with_key_search to the SDK, WalletTrait, and FFI to
recover a known quote's NUT-20 signing key after restoring from seed. It
fetches the quote and searches seed-derived keys at counters
0..key_search_limit for the mint's reported pubkey. Plain
fetch_mint_quote never searches.

On a match, store the key and advance the NUT-20 counter past the
recovered index. Existing keys are preserved and NpubCash quotes are
skipped. If no key matches, the quote is still stored without a key so
the search can be retried with a larger limit. Add
derive_quote_locking_keys to derive a range of keys from one shared
parent.

Fetch quotes for CLI mint --quote-id with --key-search-limit (default
1,000) so a restored wallet can claim unissued funds, and propagate
minting failures. Add the restore-mint-quote example and document that
recovery requires a known quote ID and the original seed.

Cover recovery followed by signed minting, search limits, retries, key
preservation, counter advancement, plain fetches not searching, NpubCash
quotes being skipped, and CLI argument parsing.

BREAKING CHANGE: Wallet trait implementors must implement
fetch_mint_quote_with_key_search.
2026-10-13 11:36:23 +00:00
.agents/skills/cdk-code-review docs: refresh review guidance and share the review skill 2026-10-01 07:50:54 +00:00
.cargo test(cashu): resolve payment request mutation survivors 2026-07-24 10:37:24 +00:00
.claude docs: refresh review guidance and share the review skill 2026-10-01 07:50:54 +00:00
.github test: serialize auth tests and capture token failure diagnostics 2026-10-07 09:33:35 +00:00
.helix feat: mint management rpc server and client cli 2025-02-06 12:05:13 +00:00
bindings fix(ffi): ship an iOS dylib for the Dart bindings 2026-10-06 01:03:04 -03:00
crates feat(wallet): recover mint quote signing keys from seed 2026-10-13 11:36:23 +00:00
docs fix(mintd): verify historical Nutshell keysets during import 2026-10-08 18:41:26 +00:00
fuzz build(nostr): update nostr-sdk to 0.45.2 2026-09-08 21:55:02 +00:00
meetings Update 2026-10-07-agenda.md 2026-10-07 21:58:53 +00:00
misc test: serialize auth tests and capture token failure diagnostics 2026-10-07 09:33:35 +00:00
nix chore: cache Go binding generation with Nix 2026-06-06 07:39:55 +01:00
tor tor service default config (#1449) 2026-03-16 18:52:20 +00:00
.backportrc.json feat: backport bot (#1215) 2025-10-27 18:59:46 -04:00
.cargo-mutants.toml test(cashu): cover UR progress and shared P2BK slot limits 2026-09-28 11:21:12 +00:00
.envrc improve: nix flakebox fmt 2023-10-22 18:36:52 +01:00
.gitignore feat(mintd): consolidate configuration in the database 2026-08-11 22:42:22 +00:00
.typos.toml fix: enforce PostgreSQL TLS and fail closed on RPC overrides 2026-09-15 20:52:35 +00:00
AGENTS.md docs: refresh review guidance and share the review skill 2026-10-01 07:50:54 +00:00
buf.yaml chore: add buf proto compatibility checks 2026-09-28 15:17:12 +00:00
Cargo.lock chore(deps): update jsonwebtoken to 10.x 2026-10-08 08:19:53 +00:00
Cargo.lock.msrv chore(deps): update jsonwebtoken to 10.x 2026-10-08 08:19:53 +00:00
Cargo.toml chore(deps): update jsonwebtoken to 10.x 2026-10-08 08:19:53 +00:00
CHANGELOG.md chore: update changelog for 0.18.0 2026-09-01 10:46:26 +00:00
clippy.toml fix: suppress axum clippy warnings 2026-07-26 13:44:09 +00:00
CODE_STYLE.md chore: update CODE_STYLE 2024-04-10 20:49:35 +01:00
codecov.yml feat: add code cov (#1778) 2026-03-27 12:54:12 +00:00
DEVELOPMENT.md Build the FFI bindings from the workspace, not the binding repos 2026-10-06 00:13:34 -03:00
docker-compose.ldk-node.yaml fix(mintd)!: require explicit mint initialization mode 2026-08-31 08:50:54 +00:00
docker-compose.postgres.yaml fix(mintd)!: require explicit mint initialization mode 2026-08-31 08:50:54 +00:00
docker-compose.redis-cluster.yaml feat(cdk-axum): support redis-cluster for caching 2026-05-21 17:35:48 +02:00
docker-compose.tor.yaml fix(mintd)!: require explicit mint initialization mode 2026-08-31 08:50:54 +00:00
docker-compose.yaml fix(mintd)!: require explicit mint initialization mode 2026-08-31 08:50:54 +00:00
Dockerfile feat(docker): add LDK Node mint service with dedicated Docker setup (#1108) 2025-09-23 14:23:06 +01:00
Dockerfile.arm feat(docker): add LDK Node mint service with dedicated Docker setup (#1108) 2025-09-23 14:23:06 +01:00
Dockerfile.ldk-node feat(docker): add LDK Node mint service with dedicated Docker setup (#1108) 2025-09-23 14:23:06 +01:00
Dockerfile.ldk-node.arm feat(docker): add LDK Node mint service with dedicated Docker setup (#1108) 2025-09-23 14:23:06 +01:00
Dockerfile.static feat: docker builds using static builds (#1685) 2026-02-27 10:59:53 +00:00
flake.lock chore: update rust 1.99.0 2026-10-06 12:22:38 +00:00
flake.nix chore: update rust 1.99.0 2026-10-06 12:22:38 +00:00
justfile Build the FFI bindings from the workspace, not the binding repos 2026-10-06 00:13:34 -03:00
LICENSE-APACHE chore: add apache license 2026-08-02 21:47:27 +00:00
LICENSE-MIT chore: add apache license 2026-08-02 21:47:27 +00:00
LICENSE.md chore: add apache license 2026-08-02 21:47:27 +00:00
README.md chore: bump 0.18.0 2026-09-02 07:29:28 +00:00
REGTEST_GUIDE.md ci: cdk cache 2026-08-10 14:13:29 +00:00
rust-toolchain.toml chore: update rust 1.99.0 2026-10-06 12:22:38 +00:00
rustfmt.toml feat: nostr mint backup (#1459) 2026-01-11 12:09:48 +00:00
SECURITY.md docs: add responsible disclosure guidance for agents 2026-09-28 15:20:41 +00:00

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 License

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:

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.