From be5e5d237116483138e446a473a47f2a5ef9b8b1 Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Thu, 6 Feb 2025 13:12:16 +0000 Subject: [PATCH 1/3] chore: prepare v0.7.0 --- CHANGELOG.md | 10 ++++++++-- crates/cashu/Cargo.toml | 6 +++++- crates/cdk-axum/Cargo.toml | 4 ++-- crates/cdk-cli/Cargo.toml | 8 ++++---- crates/cdk-cln/Cargo.toml | 4 ++-- crates/cdk-common/Cargo.toml | 4 ++-- crates/cdk-fake-wallet/Cargo.toml | 4 ++-- crates/cdk-integration-tests/Cargo.toml | 2 +- crates/cdk-lnbits/Cargo.toml | 4 ++-- crates/cdk-lnd/Cargo.toml | 4 ++-- crates/cdk-mint-rpc/Cargo.toml | 4 ++-- crates/cdk-mintd/Cargo.toml | 24 ++++++++++++------------ crates/cdk-phoenixd/Cargo.toml | 4 ++-- crates/cdk-redb/Cargo.toml | 4 ++-- crates/cdk-rexie/Cargo.toml | 4 ++-- crates/cdk-sqlite/Cargo.toml | 4 ++-- crates/cdk-strike/Cargo.toml | 4 ++-- crates/cdk/Cargo.toml | 4 ++-- misc/justfile.custom.just | 13 +++++++++++++ 19 files changed, 69 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index febc2383..91218738 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,24 +23,30 @@ #[Unrelased] +#[v0.7.0] ### Changed +* Moved db traits to `cdk-common` ([crodas]). +* Moved other commin types to `cdk-common` ([crodas]). +* `Wallet::mint` returns the minted `Proofs` and not just the amount ([dacidcaseria]). ### Added * `Token::to_raw_bytes` serializes generic token to raw bytes ([lollerfirst]). * `Token::try_from` for `Vec` constructs a generic token from raw bytes ([lollerfirst]). * `TokenV4::to_raw_bytes()` serializes a TokenV4 to raw bytes following the spec ([lollerfirst]). * `Wallet::receive_raw` which receives raw binary tokens ([lollerfirst]). +* cdk-mint-rpc: Mint management gRPC client and server ([thesimpekid]). +* cdk-common: cdk specific types and traits ([crodas]). +* cashu: Core types and functions defined in NUTs ([crodas]). ### Fixed * Multimint unit check when wallet receiving token ([thesimplekid]). * Mint start up with most recent keyset after a rotation ([thesimplekid]). -### Removed #[cdk:v0.6.1,cdk-mintd:v0.6.2] ### Fixed cdk: Missing check on mint that outputs equals the quote amount ([thesimplekid]). -cdk: Reset mint quote status if in state that cannot continue ([thesimeokid]). +cdk: Reset mint quote status if in state that cannot continue ([thesimplekid]). #[0.6.1] ### Added diff --git a/crates/cashu/Cargo.toml b/crates/cashu/Cargo.toml index 96f02e7d..13bbe135 100644 --- a/crates/cashu/Cargo.toml +++ b/crates/cashu/Cargo.toml @@ -1,9 +1,13 @@ [package] name = "cashu" -version = "0.6.0" +version = "0.7.0" edition = "2021" +authors = ["CDK Developers"] description = "Cashu shared types and crypto utilities, used as the foundation for the CDK and their crates" +homepage = "https://github.com/cashubtc/cdk" +repository = "https://github.com/cashubtc/cdk.git" rust-version = "1.63.0" # MSRV +license = "MIT" [features] default = ["mint", "wallet"] diff --git a/crates/cdk-axum/Cargo.toml b/crates/cdk-axum/Cargo.toml index bd3ea769..516ed527 100644 --- a/crates/cdk-axum/Cargo.toml +++ b/crates/cdk-axum/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-axum" -version = "0.6.0" +version = "0.7.0" edition = "2021" license = "MIT" homepage = "https://github.com/cashubtc/cdk" @@ -12,7 +12,7 @@ description = "Cashu CDK axum webserver" anyhow = "1" async-trait = "0.1.83" axum = { version = "0.6.20", features = ["ws"] } -cdk = { path = "../cdk", version = "0.6.0", default-features = false, features = [ +cdk = { path = "../cdk", version = "0.7.0", default-features = false, features = [ "mint", ] } tokio = { version = "1", default-features = false, features = ["io-util"] } diff --git a/crates/cdk-cli/Cargo.toml b/crates/cdk-cli/Cargo.toml index 82f0907d..f34212e2 100644 --- a/crates/cdk-cli/Cargo.toml +++ b/crates/cdk-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-cli" -version = "0.6.0" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] description = "Cashu cli wallet built on CDK" @@ -14,9 +14,9 @@ rust-version = "1.63.0" # MSRV [dependencies] anyhow = "1" bip39 = "2.0" -cdk = { path = "../cdk", version = "0.6.0", default-features = false, features = ["wallet"]} -cdk-redb = { path = "../cdk-redb", version = "0.6.0", default-features = false, features = ["wallet"] } -cdk-sqlite = { path = "../cdk-sqlite", version = "0.6.0", default-features = false, features = ["wallet"] } +cdk = { path = "../cdk", version = "0.7.0", default-features = false, features = ["wallet"]} +cdk-redb = { path = "../cdk-redb", version = "0.7.0", default-features = false, features = ["wallet"] } +cdk-sqlite = { path = "../cdk-sqlite", version = "0.7.0", default-features = false, features = ["wallet"] } clap = { version = "~4.0.32", features = ["derive"] } serde = { version = "1", default-features = false, features = ["derive"] } serde_json = "1" diff --git a/crates/cdk-cln/Cargo.toml b/crates/cdk-cln/Cargo.toml index 534ac0f0..76b0d75f 100644 --- a/crates/cdk-cln/Cargo.toml +++ b/crates/cdk-cln/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-cln" -version = "0.6.0" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] license = "MIT" @@ -12,7 +12,7 @@ description = "CDK ln backend for cln" [dependencies] async-trait = "0.1" bitcoin = { version = "0.32.2", default-features = false } -cdk = { path = "../cdk", version = "0.6.0", default-features = false, features = ["mint"] } +cdk = { path = "../cdk", version = "0.7.0", default-features = false, features = ["mint"] } cln-rpc = "0.3.0" futures = { version = "0.3.28", default-features = false } tokio = { version = "1", default-features = false } diff --git a/crates/cdk-common/Cargo.toml b/crates/cdk-common/Cargo.toml index 27f57852..ece6cf58 100644 --- a/crates/cdk-common/Cargo.toml +++ b/crates/cdk-common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-common" -version = "0.6.1" +version = "0.7.0" edition = "2021" description = "CDK common types and traits" rust-version = "1.63.0" # MSRV @@ -20,7 +20,7 @@ bitcoin = { version = "0.32.2", features = [ "rand", "rand-std", ] } -cashu = { path = "../cashu", default-features = false, version = "0.6.0" } +cashu = { path = "../cashu", default-features = false, version = "0.7.0" } cbor-diag = "0.1.12" ciborium = { version = "0.2.2", default-features = false, features = ["std"] } serde = { version = "1", features = ["derive"] } diff --git a/crates/cdk-fake-wallet/Cargo.toml b/crates/cdk-fake-wallet/Cargo.toml index 2d667943..823dd524 100644 --- a/crates/cdk-fake-wallet/Cargo.toml +++ b/crates/cdk-fake-wallet/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-fake-wallet" -version = "0.6.0" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] license = "MIT" @@ -12,7 +12,7 @@ description = "CDK fake ln backend" [dependencies] async-trait = "0.1.74" bitcoin = { version = "0.32.2", default-features = false } -cdk = { path = "../cdk", version = "0.6.0", default-features = false, features = ["mint"] } +cdk = { path = "../cdk", version = "0.7.0", default-features = false, features = ["mint"] } futures = { version = "0.3.28", default-features = false } tokio = { version = "1", default-features = false } tokio-util = { version = "0.7.11", default-features = false } diff --git a/crates/cdk-integration-tests/Cargo.toml b/crates/cdk-integration-tests/Cargo.toml index ef439905..0f482812 100644 --- a/crates/cdk-integration-tests/Cargo.toml +++ b/crates/cdk-integration-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-integration-tests" -version = "0.6.0" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] description = "Core Cashu Development Kit library implementing the Cashu protocol" diff --git a/crates/cdk-lnbits/Cargo.toml b/crates/cdk-lnbits/Cargo.toml index fb9d0f79..817d3029 100644 --- a/crates/cdk-lnbits/Cargo.toml +++ b/crates/cdk-lnbits/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-lnbits" -version = "0.6.0" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] license = "MIT" @@ -14,7 +14,7 @@ async-trait = "0.1" anyhow = "1" axum = "0.6.20" bitcoin = { version = "0.32.2", default-features = false } -cdk = { path = "../cdk", version = "0.6.0", default-features = false, features = ["mint"] } +cdk = { path = "../cdk", version = "0.7.0", default-features = false, features = ["mint"] } futures = { version = "0.3.28", default-features = false } tokio = { version = "1", default-features = false } tokio-util = { version = "0.7.11", default-features = false } diff --git a/crates/cdk-lnd/Cargo.toml b/crates/cdk-lnd/Cargo.toml index a33253ed..969e6225 100644 --- a/crates/cdk-lnd/Cargo.toml +++ b/crates/cdk-lnd/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-lnd" -version = "0.6.0" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] license = "MIT" @@ -11,7 +11,7 @@ description = "CDK ln backend for lnd" [dependencies] async-trait = "0.1" anyhow = "1" -cdk = { path = "../cdk", version= "0.6.0", default-features = false, features = ["mint"] } +cdk = { path = "../cdk", version= "0.7.0", default-features = false, features = ["mint"] } fedimint-tonic-lnd = "0.2.0" futures = { version = "0.3.28", default-features = false } tokio = { version = "1", default-features = false } diff --git a/crates/cdk-mint-rpc/Cargo.toml b/crates/cdk-mint-rpc/Cargo.toml index f4fbe29b..18e87caf 100644 --- a/crates/cdk-mint-rpc/Cargo.toml +++ b/crates/cdk-mint-rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-mint-rpc" -version = "0.6.0" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] description = "CDK mintd mint managment RPC client and server" @@ -15,7 +15,7 @@ path = "src/bin/mint_rpc_cli.rs" [dependencies] anyhow = "1" -cdk = { path = "../cdk", version = "0.6.0", default-features = false, features = [ +cdk = { path = "../cdk", version = "0.7.0", default-features = false, features = [ "mint", ] } clap = { version = "~4.0.32", features = ["derive"] } diff --git a/crates/cdk-mintd/Cargo.toml b/crates/cdk-mintd/Cargo.toml index aac504e6..ede9a749 100644 --- a/crates/cdk-mintd/Cargo.toml +++ b/crates/cdk-mintd/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-mintd" -version = "0.6.2" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] license = "MIT" @@ -17,23 +17,23 @@ management-rpc = ["cdk-mint-rpc"] [dependencies] anyhow = "1" axum = "0.6.20" -cdk = { path = "../cdk", version = "0.6.1", default-features = false, features = [ +cdk = { path = "../cdk", version = "0.7.0", default-features = false, features = [ "mint", ] } -cdk-redb = { path = "../cdk-redb", version = "0.6.0", default-features = false, features = [ +cdk-redb = { path = "../cdk-redb", version = "0.7.0", default-features = false, features = [ "mint", ] } -cdk-sqlite = { path = "../cdk-sqlite", version = "0.6.0", default-features = false, features = [ +cdk-sqlite = { path = "../cdk-sqlite", version = "0.7.0", default-features = false, features = [ "mint", ] } -cdk-cln = { path = "../cdk-cln", version = "0.6.0", default-features = false } -cdk-lnbits = { path = "../cdk-lnbits", version = "0.6.0", default-features = false } -cdk-phoenixd = { path = "../cdk-phoenixd", version = "0.6.0", default-features = false } -cdk-lnd = { path = "../cdk-lnd", version = "0.6.0", default-features = false } -cdk-fake-wallet = { path = "../cdk-fake-wallet", version = "0.6.0", default-features = false } -cdk-strike = { path = "../cdk-strike", version = "0.6.0" } -cdk-axum = { path = "../cdk-axum", version = "0.6.0", default-features = false } -cdk-mint-rpc = { path = "../cdk-mint-rpc", version = "0.6.0", default-features = false, optional = true } +cdk-cln = { path = "../cdk-cln", version = "0.7.0", default-features = false } +cdk-lnbits = { path = "../cdk-lnbits", version = "0.7.0", default-features = false } +cdk-phoenixd = { path = "../cdk-phoenixd", version = "0.7.0", default-features = false } +cdk-lnd = { path = "../cdk-lnd", version = "0.7.0", default-features = false } +cdk-fake-wallet = { path = "../cdk-fake-wallet", version = "0.7.0", default-features = false } +cdk-strike = { path = "../cdk-strike", version = "0.7.0" } +cdk-axum = { path = "../cdk-axum", version = "0.7.0", default-features = false } +cdk-mint-rpc = { path = "../cdk-mint-rpc", version = "0.7.0", default-features = false, optional = true } config = { version = "0.13.3", features = ["toml"] } clap = { version = "~4.0.32", features = ["derive"] } tokio = { version = "1", default-features = false } diff --git a/crates/cdk-phoenixd/Cargo.toml b/crates/cdk-phoenixd/Cargo.toml index 30b64095..bd1542ab 100644 --- a/crates/cdk-phoenixd/Cargo.toml +++ b/crates/cdk-phoenixd/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-phoenixd" -version = "0.6.0" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] license = "MIT" @@ -14,7 +14,7 @@ async-trait = "0.1" anyhow = "1" axum = "0.6.20" bitcoin = { version = "0.32.2", default-features = false } -cdk = { path = "../cdk", version = "0.6.0", default-features = false, features = ["mint"] } +cdk = { path = "../cdk", version = "0.7.0", default-features = false, features = ["mint"] } futures = { version = "0.3.28", default-features = false } tokio = { version = "1", default-features = false } tokio-util = { version = "0.7.11", default-features = false } diff --git a/crates/cdk-redb/Cargo.toml b/crates/cdk-redb/Cargo.toml index 06ed9a82..9b6062df 100644 --- a/crates/cdk-redb/Cargo.toml +++ b/crates/cdk-redb/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-redb" -version = "0.6.0" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] description = "Redb storage backend for CDK" @@ -17,7 +17,7 @@ wallet = [] [dependencies] async-trait = "0.1" -cdk-common = { path = "../cdk-common", version = "0.6.0" } +cdk-common = { path = "../cdk-common", version = "0.7.0" } redb = "2.1.0" thiserror = "1" tracing = { version = "0.1", default-features = false, features = [ diff --git a/crates/cdk-rexie/Cargo.toml b/crates/cdk-rexie/Cargo.toml index 34500968..88938c67 100644 --- a/crates/cdk-rexie/Cargo.toml +++ b/crates/cdk-rexie/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-rexie" -version = "0.6.0" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] description = "Indexdb storage backend for CDK in the browser" @@ -16,7 +16,7 @@ wallet = ["cdk/wallet"] [dependencies] rexie = "0.6.0" -cdk = { path = "../cdk", version = "0.6.0", default-features = false } +cdk = { path = "../cdk", version = "0.7.0", default-features = false } async-trait = "0.1.74" tokio = { version = "1", default-features = false } serde = { version = "1", default-features = false, features = ["derive"] } diff --git a/crates/cdk-sqlite/Cargo.toml b/crates/cdk-sqlite/Cargo.toml index df0523d3..8feb7f2c 100644 --- a/crates/cdk-sqlite/Cargo.toml +++ b/crates/cdk-sqlite/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-sqlite" -version = "0.6.0" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] description = "SQLite storage backend for CDK" @@ -17,7 +17,7 @@ wallet = [] [dependencies] async-trait = "0.1" -cdk-common = { path = "../cdk-common", version = "0.6.0" } +cdk-common = { path = "../cdk-common", version = "0.7.0" } bitcoin = { version = "0.32.2", default-features = false } sqlx = { version = "0.6.3", default-features = false, features = [ "runtime-tokio-rustls", diff --git a/crates/cdk-strike/Cargo.toml b/crates/cdk-strike/Cargo.toml index 81a8575c..f86d6e53 100644 --- a/crates/cdk-strike/Cargo.toml +++ b/crates/cdk-strike/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-strike" -version = "0.6.0" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] license = "MIT" @@ -14,7 +14,7 @@ async-trait = "0.1" anyhow = "1" axum = "0.6.20" bitcoin = { version = "0.32.2", default-features = false } -cdk = { path = "../cdk", version = "0.6.0", default-features = false, features = ["mint"] } +cdk = { path = "../cdk", version = "0.7.0", default-features = false, features = ["mint"] } futures = { version = "0.3.28", default-features = false } tokio = { version = "1", default-features = false } tokio-util = { version = "0.7.11", default-features = false } diff --git a/crates/cdk/Cargo.toml b/crates/cdk/Cargo.toml index d72162c9..25e31500 100644 --- a/crates/cdk/Cargo.toml +++ b/crates/cdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk" -version = "0.6.1" +version = "0.7.0" edition = "2021" authors = ["CDK Developers"] description = "Core Cashu Development Kit library implementing the Cashu protocol" @@ -21,7 +21,7 @@ http_subscription = [] [dependencies] -cdk-common = { path = "../cdk-common", version = "0.6.1" } +cdk-common = { path = "../cdk-common", version = "0.7.0" } cbor-diag = "0.1.12" async-trait = "0.1" anyhow = { version = "1.0.43", features = ["backtrace"] } diff --git a/misc/justfile.custom.just b/misc/justfile.custom.just index f8f35f31..34ffb7ad 100644 --- a/misc/justfile.custom.just +++ b/misc/justfile.custom.just @@ -29,6 +29,12 @@ clippy-each: #!/usr/bin/env bash set -euo pipefail buildargs=( + "-p cashu --no-default-features" + "-p cashu --no-default-features --features wallet" + "-p cashu --no-default-features --features mint" + "-p cdk-common --no-default-features" + "-p cdk-common --no-default-features --features wallet" + "-p cdk-common --no-default-features --features mint" "-p cdk-integration-tests" "-p cdk" "-p cdk --no-default-features" @@ -44,6 +50,7 @@ clippy-each: "-p cdk-fake-wallet" "-p cdk-strike" "-p cdk-lnd" + "-p cdk-mint-rpc" "--bin cdk-cli" "--bin cdk-mintd" ) @@ -60,11 +67,14 @@ release m="": set -euo pipefail args=( + "-p cashu" + "-p cdk-common" "-p cdk" "-p cdk-redb" "-p cdk-sqlite" "-p cdk-rexie" "-p cdk-axum" + "-p cdk-mint-rpc" "-p cdk-cln" "-p cdk-lnd" "-p cdk-strike" @@ -86,6 +96,8 @@ check-docs: #!/usr/bin/env bash set -euo pipefail args=( + "-p cashu" + "-p cdk-common" "-p cdk" "-p cdk-redb" "-p cdk-sqlite" @@ -97,6 +109,7 @@ check-docs: "-p cdk-phoenixd" "-p cdk-lnbits" "-p cdk-fake-wallet" + "-p cdk-mint-rpc" "-p cdk-cli" "-p cdk-mintd" ) From d0a6975b40a4cddd8a09e4363e52dd5ae9bf4398 Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Thu, 6 Feb 2025 13:38:52 +0000 Subject: [PATCH 2/3] chore: add license to cdk-commion --- crates/cdk-common/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/cdk-common/Cargo.toml b/crates/cdk-common/Cargo.toml index ece6cf58..5f70199b 100644 --- a/crates/cdk-common/Cargo.toml +++ b/crates/cdk-common/Cargo.toml @@ -2,8 +2,12 @@ name = "cdk-common" version = "0.7.0" edition = "2021" +authors = ["CDK Developers"] description = "CDK common types and traits" +homepage = "https://github.com/cashubtc/cdk" +repository = "https://github.com/cashubtc/cdk.git" rust-version = "1.63.0" # MSRV +license = "MIT" [features] default = ["mint", "wallet"] From 0be37aa9e2a442163db57f19a80583716c89395a Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Thu, 6 Feb 2025 13:51:02 +0000 Subject: [PATCH 3/3] chore: cdk-cli rand feature --- crates/cdk-cli/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cdk-cli/Cargo.toml b/crates/cdk-cli/Cargo.toml index f34212e2..2b3f2e4e 100644 --- a/crates/cdk-cli/Cargo.toml +++ b/crates/cdk-cli/Cargo.toml @@ -13,7 +13,7 @@ rust-version = "1.63.0" # MSRV [dependencies] anyhow = "1" -bip39 = "2.0" +bip39 = { version = "2.0", features = ["rand"] } cdk = { path = "../cdk", version = "0.7.0", default-features = false, features = ["wallet"]} cdk-redb = { path = "../cdk-redb", version = "0.7.0", default-features = false, features = ["wallet"] } cdk-sqlite = { path = "../cdk-sqlite", version = "0.7.0", default-features = false, features = ["wallet"] }