Explorar el Código

Rename cdk-common to cashu, as suggested by @thesimplekid

Cesar Rodas hace 3 meses
padre
commit
94a4c87daf
Se han modificado 70 ficheros con 121 adiciones y 121 borrados
  1. 29 29
      Cargo.lock
  2. 3 3
      crates/cashu/Cargo.toml
  3. 0 0
      crates/cashu/src/amount.rs
  4. 0 0
      crates/cashu/src/common.rs
  5. 0 0
      crates/cashu/src/database.rs
  6. 0 0
      crates/cashu/src/dhke.rs
  7. 0 0
      crates/cashu/src/error.rs
  8. 1 1
      crates/cashu/src/lib.rs
  9. 0 0
      crates/cashu/src/lightning.rs
  10. 0 0
      crates/cashu/src/mint.rs
  11. 0 0
      crates/cashu/src/mint_url.rs
  12. 0 0
      crates/cashu/src/nuts/mod.rs
  13. 0 0
      crates/cashu/src/nuts/nut00/mod.rs
  14. 0 0
      crates/cashu/src/nuts/nut00/token.rs
  15. 0 0
      crates/cashu/src/nuts/nut01/mod.rs
  16. 0 0
      crates/cashu/src/nuts/nut01/public_key.rs
  17. 0 0
      crates/cashu/src/nuts/nut01/secret_key.rs
  18. 0 0
      crates/cashu/src/nuts/nut02.rs
  19. 0 0
      crates/cashu/src/nuts/nut03.rs
  20. 0 0
      crates/cashu/src/nuts/nut04.rs
  21. 0 0
      crates/cashu/src/nuts/nut05.rs
  22. 0 0
      crates/cashu/src/nuts/nut06.rs
  23. 0 0
      crates/cashu/src/nuts/nut07.rs
  24. 0 0
      crates/cashu/src/nuts/nut08.rs
  25. 0 0
      crates/cashu/src/nuts/nut09.rs
  26. 0 0
      crates/cashu/src/nuts/nut10.rs
  27. 0 0
      crates/cashu/src/nuts/nut11/mod.rs
  28. 0 0
      crates/cashu/src/nuts/nut11/serde_p2pk_witness.rs
  29. 0 0
      crates/cashu/src/nuts/nut12.rs
  30. 0 0
      crates/cashu/src/nuts/nut13.rs
  31. 0 0
      crates/cashu/src/nuts/nut14/mod.rs
  32. 0 0
      crates/cashu/src/nuts/nut14/serde_htlc_witness.rs
  33. 0 0
      crates/cashu/src/nuts/nut15.rs
  34. 0 0
      crates/cashu/src/nuts/nut17/mod.rs
  35. 0 0
      crates/cashu/src/nuts/nut17/ws.rs
  36. 0 0
      crates/cashu/src/nuts/nut18.rs
  37. 0 0
      crates/cashu/src/nuts/nut19.rs
  38. 0 0
      crates/cashu/src/nuts/nut20.rs
  39. 0 0
      crates/cashu/src/pub_sub/index.rs
  40. 0 0
      crates/cashu/src/pub_sub/mod.rs
  41. 0 0
      crates/cashu/src/secret.rs
  42. 0 0
      crates/cashu/src/signatory.rs
  43. 0 0
      crates/cashu/src/util/hex.rs
  44. 0 0
      crates/cashu/src/util/mod.rs
  45. 0 0
      crates/cashu/src/wallet.rs
  46. 1 1
      crates/cdk-redb/Cargo.toml
  47. 7 7
      crates/cdk-redb/src/error.rs
  48. 2 2
      crates/cdk-redb/src/migrations.rs
  49. 3 3
      crates/cdk-redb/src/mint/migrations.rs
  50. 6 6
      crates/cdk-redb/src/mint/mod.rs
  51. 1 1
      crates/cdk-redb/src/wallet/migrations.rs
  52. 6 6
      crates/cdk-redb/src/wallet/mod.rs
  53. 1 1
      crates/cdk-sqlite/Cargo.toml
  54. 9 9
      crates/cdk-sqlite/src/mint/error.rs
  55. 8 8
      crates/cdk-sqlite/src/mint/mod.rs
  56. 9 9
      crates/cdk-sqlite/src/wallet/error.rs
  57. 7 7
      crates/cdk-sqlite/src/wallet/mod.rs
  58. 2 2
      crates/cdk/Cargo.toml
  59. 3 3
      crates/cdk/src/cdk_database/mint_memory.rs
  60. 1 1
      crates/cdk/src/cdk_database/mod.rs
  61. 1 1
      crates/cdk/src/cdk_database/wallet_memory.rs
  62. 1 1
      crates/cdk/src/lib.rs
  63. 1 1
      crates/cdk/src/mint/builder.rs
  64. 1 1
      crates/cdk/src/mint/melt.rs
  65. 5 5
      crates/cdk/src/mint/mod.rs
  66. 3 3
      crates/cdk/src/mint/subscription/manager.rs
  67. 4 4
      crates/cdk/src/mint/subscription/on_subscription.rs
  68. 3 3
      crates/cdk/src/pub_sub/mod.rs
  69. 2 2
      crates/cdk/src/wallet/mod.rs
  70. 1 1
      crates/cdk/src/wallet/multi_mint_wallet.rs

+ 29 - 29
Cargo.lock

@@ -683,6 +683,32 @@ dependencies = [
 ]
 
 [[package]]
+name = "cashu"
+version = "0.6.0"
+dependencies = [
+ "anyhow",
+ "async-trait",
+ "bip39",
+ "bitcoin 0.32.5",
+ "cbor-diag",
+ "ciborium",
+ "futures",
+ "instant",
+ "lightning-invoice",
+ "once_cell",
+ "rand",
+ "reqwest",
+ "serde",
+ "serde_json",
+ "serde_with",
+ "thiserror 2.0.9",
+ "tracing",
+ "url",
+ "utoipa",
+ "uuid",
+]
+
+[[package]]
 name = "cast"
 version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -737,8 +763,8 @@ dependencies = [
  "bech32 0.9.1",
  "bip39",
  "bitcoin 0.32.5",
+ "cashu",
  "cbor-diag",
- "cdk-common",
  "ciborium",
  "criterion",
  "futures",
@@ -821,32 +847,6 @@ dependencies = [
 ]
 
 [[package]]
-name = "cdk-common"
-version = "0.6.0"
-dependencies = [
- "anyhow",
- "async-trait",
- "bip39",
- "bitcoin 0.32.5",
- "cbor-diag",
- "ciborium",
- "futures",
- "instant",
- "lightning-invoice",
- "once_cell",
- "rand",
- "reqwest",
- "serde",
- "serde_json",
- "serde_with",
- "thiserror 2.0.9",
- "tracing",
- "url",
- "utoipa",
- "uuid",
-]
-
-[[package]]
 name = "cdk-fake-wallet"
 version = "0.6.0"
 dependencies = [
@@ -985,7 +985,7 @@ name = "cdk-redb"
 version = "0.6.0"
 dependencies = [
  "async-trait",
- "cdk-common",
+ "cashu",
  "lightning-invoice",
  "redb",
  "serde",
@@ -1016,7 +1016,7 @@ version = "0.6.0"
 dependencies = [
  "async-trait",
  "bitcoin 0.32.5",
- "cdk-common",
+ "cashu",
  "lightning-invoice",
  "serde_json",
  "sqlx",

+ 3 - 3
crates/cdk-common/Cargo.toml → crates/cashu/Cargo.toml

@@ -1,9 +1,9 @@
 [package]
-name = "cdk-common"
+name = "cashu"
 version = "0.6.0"
 edition = "2021"
-description = "CDK shared types and crypto utilities"
-rust-version = "1.63.0"                               # MSRV
+description = "Cashu shared types and crypto utilities, used as the foundation for the CDK and their crates"
+rust-version = "1.63.0"                                                                                      # MSRV
 
 [features]
 swagger = ["dep:utoipa"]

+ 0 - 0
crates/cdk-common/src/amount.rs → crates/cashu/src/amount.rs


+ 0 - 0
crates/cdk-common/src/common.rs → crates/cashu/src/common.rs


+ 0 - 0
crates/cdk-common/src/database.rs → crates/cashu/src/database.rs


+ 0 - 0
crates/cdk-common/src/dhke.rs → crates/cashu/src/dhke.rs


+ 0 - 0
crates/cdk-common/src/error.rs → crates/cashu/src/error.rs


+ 1 - 1
crates/cdk-common/src/lib.rs → crates/cashu/src/lib.rs

@@ -1,4 +1,4 @@
-//! CDK shared types and functions.
+//! Cashu shared types and functions.
 //!
 //! This crate is the base foundation to build things that can interact with the CDK (Cashu
 //! Development Kit) and their internal crates.

+ 0 - 0
crates/cdk-common/src/lightning.rs → crates/cashu/src/lightning.rs


+ 0 - 0
crates/cdk-common/src/mint.rs → crates/cashu/src/mint.rs


+ 0 - 0
crates/cdk-common/src/mint_url.rs → crates/cashu/src/mint_url.rs


+ 0 - 0
crates/cdk-common/src/nuts/mod.rs → crates/cashu/src/nuts/mod.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut00/mod.rs → crates/cashu/src/nuts/nut00/mod.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut00/token.rs → crates/cashu/src/nuts/nut00/token.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut01/mod.rs → crates/cashu/src/nuts/nut01/mod.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut01/public_key.rs → crates/cashu/src/nuts/nut01/public_key.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut01/secret_key.rs → crates/cashu/src/nuts/nut01/secret_key.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut02.rs → crates/cashu/src/nuts/nut02.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut03.rs → crates/cashu/src/nuts/nut03.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut04.rs → crates/cashu/src/nuts/nut04.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut05.rs → crates/cashu/src/nuts/nut05.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut06.rs → crates/cashu/src/nuts/nut06.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut07.rs → crates/cashu/src/nuts/nut07.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut08.rs → crates/cashu/src/nuts/nut08.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut09.rs → crates/cashu/src/nuts/nut09.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut10.rs → crates/cashu/src/nuts/nut10.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut11/mod.rs → crates/cashu/src/nuts/nut11/mod.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut11/serde_p2pk_witness.rs → crates/cashu/src/nuts/nut11/serde_p2pk_witness.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut12.rs → crates/cashu/src/nuts/nut12.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut13.rs → crates/cashu/src/nuts/nut13.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut14/mod.rs → crates/cashu/src/nuts/nut14/mod.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut14/serde_htlc_witness.rs → crates/cashu/src/nuts/nut14/serde_htlc_witness.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut15.rs → crates/cashu/src/nuts/nut15.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut17/mod.rs → crates/cashu/src/nuts/nut17/mod.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut17/ws.rs → crates/cashu/src/nuts/nut17/ws.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut18.rs → crates/cashu/src/nuts/nut18.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut19.rs → crates/cashu/src/nuts/nut19.rs


+ 0 - 0
crates/cdk-common/src/nuts/nut20.rs → crates/cashu/src/nuts/nut20.rs


+ 0 - 0
crates/cdk-common/src/pub_sub/index.rs → crates/cashu/src/pub_sub/index.rs


+ 0 - 0
crates/cdk-common/src/pub_sub/mod.rs → crates/cashu/src/pub_sub/mod.rs


+ 0 - 0
crates/cdk-common/src/secret.rs → crates/cashu/src/secret.rs


+ 0 - 0
crates/cdk-common/src/signatory.rs → crates/cashu/src/signatory.rs


+ 0 - 0
crates/cdk-common/src/util/hex.rs → crates/cashu/src/util/hex.rs


+ 0 - 0
crates/cdk-common/src/util/mod.rs → crates/cashu/src/util/mod.rs


+ 0 - 0
crates/cdk-common/src/wallet.rs → crates/cashu/src/wallet.rs


+ 1 - 1
crates/cdk-redb/Cargo.toml

@@ -17,7 +17,7 @@ wallet = []
 
 [dependencies]
 async-trait = "0.1"
-cdk-common = { path = "../cdk-common", version = "0.6.0", default-features = false }
+cashu = { path = "../cashu", version = "0.6.0", default-features = false }
 redb = "2.1.0"
 thiserror = "1"
 tracing = { version = "0.1", default-features = false, features = [

+ 7 - 7
crates/cdk-redb/src/error.rs

@@ -33,22 +33,22 @@ pub enum Error {
     ParseInt(#[from] ParseIntError),
     /// CDK Database Error
     #[error(transparent)]
-    CDKDatabase(#[from] cdk_common::database::Error),
+    CDKDatabase(#[from] cashu::database::Error),
     /// CDK Mint Url Error
     #[error(transparent)]
-    CDKMintUrl(#[from] cdk_common::mint_url::Error),
+    CDKMintUrl(#[from] cashu::mint_url::Error),
     /// CDK Error
     #[error(transparent)]
-    CDK(#[from] cdk_common::error::Error),
+    CDK(#[from] cashu::error::Error),
     /// NUT00 Error
     #[error(transparent)]
-    CDKNUT00(#[from] cdk_common::nuts::nut00::Error),
+    CDKNUT00(#[from] cashu::nuts::nut00::Error),
     /// NUT02 Error
     #[error(transparent)]
-    CDKNUT02(#[from] cdk_common::nuts::nut02::Error),
+    CDKNUT02(#[from] cashu::nuts::nut02::Error),
     /// DHKE Error
     #[error(transparent)]
-    DHKE(#[from] cdk_common::dhke::Error),
+    DHKE(#[from] cashu::dhke::Error),
     /// Unknown Mint Info
     #[error("Unknown mint info")]
     UnknownMintInfo,
@@ -60,7 +60,7 @@ pub enum Error {
     UnknownDatabaseVersion,
 }
 
-impl From<Error> for cdk_common::database::Error {
+impl From<Error> for cashu::database::Error {
     fn from(e: Error) -> Self {
         Self::Database(Box::new(e))
     }

+ 2 - 2
crates/cdk-redb/src/migrations.rs

@@ -1,8 +1,8 @@
 use std::collections::HashMap;
 use std::sync::Arc;
 
-use cdk_common::mint_url::MintUrl;
-use cdk_common::{Amount, CurrencyUnit, MeltQuoteState, MintQuoteState};
+use cashu::mint_url::MintUrl;
+use cashu::{Amount, CurrencyUnit, MeltQuoteState, MintQuoteState};
 use redb::{Database, ReadableTable, TableDefinition};
 use serde::{Deserialize, Serialize};
 

+ 3 - 3
crates/cdk-redb/src/mint/migrations.rs

@@ -3,9 +3,9 @@ use std::collections::HashMap;
 use std::str::FromStr;
 use std::sync::Arc;
 
-use cdk_common::mint::MintQuote;
-use cdk_common::mint_url::MintUrl;
-use cdk_common::{Amount, CurrencyUnit, MintQuoteState, Proof, State};
+use cashu::mint::MintQuote;
+use cashu::mint_url::MintUrl;
+use cashu::{Amount, CurrencyUnit, MintQuoteState, Proof, State};
 use lightning_invoice::Bolt11Invoice;
 use redb::{
     Database, MultimapTableDefinition, ReadableMultimapTable, ReadableTable, TableDefinition,

+ 6 - 6
crates/cdk-redb/src/mint/mod.rs

@@ -7,12 +7,12 @@ use std::str::FromStr;
 use std::sync::Arc;
 
 use async_trait::async_trait;
-use cdk_common::common::LnKey;
-use cdk_common::database::{self, MintDatabase};
-use cdk_common::dhke::hash_to_curve;
-use cdk_common::mint::{self, MintKeySetInfo, MintQuote};
-use cdk_common::nut00::ProofsMethods;
-use cdk_common::{
+use cashu::common::LnKey;
+use cashu::database::{self, MintDatabase};
+use cashu::dhke::hash_to_curve;
+use cashu::mint::{self, MintKeySetInfo, MintQuote};
+use cashu::nut00::ProofsMethods;
+use cashu::{
     BlindSignature, CurrencyUnit, Id, MeltBolt11Request, MeltQuoteState, MintQuoteState, Proof,
     Proofs, PublicKey, State,
 };

+ 1 - 1
crates/cdk-redb/src/wallet/migrations.rs

@@ -3,7 +3,7 @@ use std::ops::Deref;
 use std::str::FromStr;
 use std::sync::Arc;
 
-use cdk_common::mint_url::MintUrl;
+use cashu::mint_url::MintUrl;
 use redb::{
     Database, MultimapTableDefinition, ReadableMultimapTable, ReadableTable, TableDefinition,
 };

+ 6 - 6
crates/cdk-redb/src/wallet/mod.rs

@@ -7,12 +7,12 @@ use std::str::FromStr;
 use std::sync::Arc;
 
 use async_trait::async_trait;
-use cdk_common::common::ProofInfo;
-use cdk_common::database::WalletDatabase;
-use cdk_common::mint_url::MintUrl;
-use cdk_common::util::unix_time;
-use cdk_common::wallet::{self, MintQuote};
-use cdk_common::{
+use cashu::common::ProofInfo;
+use cashu::database::WalletDatabase;
+use cashu::mint_url::MintUrl;
+use cashu::util::unix_time;
+use cashu::wallet::{self, MintQuote};
+use cashu::{
     database, CurrencyUnit, Id, KeySetInfo, Keys, MintInfo, PublicKey, SpendingConditions, State,
 };
 use redb::{Database, MultimapTableDefinition, ReadableTable, TableDefinition};

+ 1 - 1
crates/cdk-sqlite/Cargo.toml

@@ -17,7 +17,7 @@ wallet = []
 
 [dependencies]
 async-trait = "0.1"
-cdk-common = { path = "../cdk-common", version = "0.6.0", default-features = false }
+cashu = { path = "../cashu", version = "0.6.0", default-features = false }
 bitcoin = { version = "0.32.2", default-features = false }
 sqlx = { version = "0.6.3", default-features = false, features = [
     "runtime-tokio-rustls",

+ 9 - 9
crates/cdk-sqlite/src/mint/error.rs

@@ -10,31 +10,31 @@ pub enum Error {
     SQLX(#[from] sqlx::Error),
     /// NUT00 Error
     #[error(transparent)]
-    CDKNUT00(#[from] cdk_common::nuts::nut00::Error),
+    CDKNUT00(#[from] cashu::nuts::nut00::Error),
     /// NUT01 Error
     #[error(transparent)]
-    CDKNUT01(#[from] cdk_common::nuts::nut01::Error),
+    CDKNUT01(#[from] cashu::nuts::nut01::Error),
     /// NUT02 Error
     #[error(transparent)]
-    CDKNUT02(#[from] cdk_common::nuts::nut02::Error),
+    CDKNUT02(#[from] cashu::nuts::nut02::Error),
     /// NUT04 Error
     #[error(transparent)]
-    CDKNUT04(#[from] cdk_common::nuts::nut04::Error),
+    CDKNUT04(#[from] cashu::nuts::nut04::Error),
     /// NUT05 Error
     #[error(transparent)]
-    CDKNUT05(#[from] cdk_common::nuts::nut05::Error),
+    CDKNUT05(#[from] cashu::nuts::nut05::Error),
     /// NUT07 Error
     #[error(transparent)]
-    CDKNUT07(#[from] cdk_common::nuts::nut07::Error),
+    CDKNUT07(#[from] cashu::nuts::nut07::Error),
     /// Secret Error
     #[error(transparent)]
-    CDKSECRET(#[from] cdk_common::secret::Error),
+    CDKSECRET(#[from] cashu::secret::Error),
     /// BIP32 Error
     #[error(transparent)]
     BIP32(#[from] bitcoin::bip32::Error),
     /// Mint Url Error
     #[error(transparent)]
-    MintUrl(#[from] cdk_common::mint_url::Error),
+    MintUrl(#[from] cashu::mint_url::Error),
     /// Could Not Initialize Database
     #[error("Could not initialize database")]
     CouldNotInitialize,
@@ -46,7 +46,7 @@ pub enum Error {
     Serde(#[from] serde_json::Error),
 }
 
-impl From<Error> for cdk_common::database::Error {
+impl From<Error> for cashu::database::Error {
     fn from(e: Error) -> Self {
         Self::Database(Box::new(e))
     }

+ 8 - 8
crates/cdk-sqlite/src/mint/mod.rs

@@ -7,14 +7,14 @@ use std::time::Duration;
 
 use async_trait::async_trait;
 use bitcoin::bip32::DerivationPath;
-use cdk_common::common::LnKey;
-use cdk_common::database::{self, MintDatabase};
-use cdk_common::mint::{self, MintKeySetInfo, MintQuote};
-use cdk_common::mint_url::MintUrl;
-use cdk_common::nut00::ProofsMethods;
-use cdk_common::nut05::QuoteState;
-use cdk_common::secret::Secret;
-use cdk_common::{
+use cashu::common::LnKey;
+use cashu::database::{self, MintDatabase};
+use cashu::mint::{self, MintKeySetInfo, MintQuote};
+use cashu::mint_url::MintUrl;
+use cashu::nut00::ProofsMethods;
+use cashu::nut05::QuoteState;
+use cashu::secret::Secret;
+use cashu::{
     Amount, BlindSignature, BlindSignatureDleq, CurrencyUnit, Id, MeltBolt11Request,
     MeltQuoteState, MintQuoteState, PaymentMethod, Proof, Proofs, PublicKey, SecretKey, State,
 };

+ 9 - 9
crates/cdk-sqlite/src/wallet/error.rs

@@ -13,28 +13,28 @@ pub enum Error {
     Serde(#[from] serde_json::Error),
     /// NUT00 Error
     #[error(transparent)]
-    CDKNUT00(#[from] cdk_common::nuts::nut00::Error),
+    CDKNUT00(#[from] cashu::nuts::nut00::Error),
     /// NUT01 Error
     #[error(transparent)]
-    CDKNUT01(#[from] cdk_common::nuts::nut01::Error),
+    CDKNUT01(#[from] cashu::nuts::nut01::Error),
     /// NUT02 Error
     #[error(transparent)]
-    CDKNUT02(#[from] cdk_common::nuts::nut02::Error),
+    CDKNUT02(#[from] cashu::nuts::nut02::Error),
     /// NUT04 Error
     #[error(transparent)]
-    CDKNUT04(#[from] cdk_common::nuts::nut04::Error),
+    CDKNUT04(#[from] cashu::nuts::nut04::Error),
     /// NUT05 Error
     #[error(transparent)]
-    CDKNUT05(#[from] cdk_common::nuts::nut05::Error),
+    CDKNUT05(#[from] cashu::nuts::nut05::Error),
     /// NUT07 Error
     #[error(transparent)]
-    CDKNUT07(#[from] cdk_common::nuts::nut07::Error),
+    CDKNUT07(#[from] cashu::nuts::nut07::Error),
     /// Secret Error
     #[error(transparent)]
-    CDKSECRET(#[from] cdk_common::secret::Error),
+    CDKSECRET(#[from] cashu::secret::Error),
     /// Mint Url
     #[error(transparent)]
-    MintUrl(#[from] cdk_common::mint_url::Error),
+    MintUrl(#[from] cashu::mint_url::Error),
     /// BIP32 Error
     #[error(transparent)]
     BIP32(#[from] bitcoin::bip32::Error),
@@ -46,7 +46,7 @@ pub enum Error {
     InvalidDbPath,
 }
 
-impl From<Error> for cdk_common::database::Error {
+impl From<Error> for cashu::database::Error {
     fn from(e: Error) -> Self {
         Self::Database(Box::new(e))
     }

+ 7 - 7
crates/cdk-sqlite/src/wallet/mod.rs

@@ -5,13 +5,13 @@ use std::path::Path;
 use std::str::FromStr;
 
 use async_trait::async_trait;
-use cdk_common::common::ProofInfo;
-use cdk_common::database::WalletDatabase;
-use cdk_common::mint_url::MintUrl;
-use cdk_common::nuts::{MeltQuoteState, MintQuoteState};
-use cdk_common::secret::Secret;
-use cdk_common::wallet::{self, MintQuote};
-use cdk_common::{
+use cashu::common::ProofInfo;
+use cashu::database::WalletDatabase;
+use cashu::mint_url::MintUrl;
+use cashu::nuts::{MeltQuoteState, MintQuoteState};
+use cashu::secret::Secret;
+use cashu::wallet::{self, MintQuote};
+use cashu::{
     database, Amount, CurrencyUnit, Id, KeySetInfo, Keys, MintInfo, Proof, PublicKey, SecretKey,
     SpendingConditions, State,
 };

+ 2 - 2
crates/cdk/Cargo.toml

@@ -14,14 +14,14 @@ license = "MIT"
 default = ["mint", "wallet"]
 mint = ["dep:futures"]
 # We do not commit to a MSRV with swagger enabled
-swagger = ["mint", "dep:utoipa", "cdk-common/swagger"]
+swagger = ["mint", "dep:utoipa", "cashu/swagger"]
 wallet = ["dep:reqwest"]
 bench = []
 http_subscription = []
 
 
 [dependencies]
-cdk-common = { path = "../cdk-common", version = "0.6.0", default-features = false }
+cashu = { path = "../cashu", version = "0.6.0", default-features = false }
 cbor-diag = "0.1.12"
 arc-swap = "1.7.1"
 async-trait = "0.1"

+ 3 - 3
crates/cdk/src/cdk_database/mint_memory.rs

@@ -4,9 +4,9 @@ use std::collections::HashMap;
 use std::sync::Arc;
 
 use async_trait::async_trait;
-use cdk_common::database::{Error, MintDatabase};
-use cdk_common::mint::MintKeySetInfo;
-use cdk_common::nut00::ProofsMethods;
+use cashu::database::{Error, MintDatabase};
+use cashu::mint::MintKeySetInfo;
+use cashu::nut00::ProofsMethods;
 use tokio::sync::{Mutex, RwLock};
 use uuid::Uuid;
 

+ 1 - 1
crates/cdk/src/cdk_database/mod.rs

@@ -6,6 +6,6 @@ pub mod mint_memory;
 pub mod wallet_memory;
 
 /// re-export types
-pub use cdk_common::database::{Error, MintDatabase, WalletDatabase};
+pub use cashu::database::{Error, MintDatabase, WalletDatabase};
 #[cfg(feature = "wallet")]
 pub use wallet_memory::WalletMemoryDatabase;

+ 1 - 1
crates/cdk/src/cdk_database/wallet_memory.rs

@@ -4,7 +4,7 @@ use std::collections::{HashMap, HashSet};
 use std::sync::Arc;
 
 use async_trait::async_trait;
-use cdk_common::database::{Error, WalletDatabase};
+use cashu::database::{Error, WalletDatabase};
 use tokio::sync::RwLock;
 
 use crate::mint_url::MintUrl;

+ 1 - 1
crates/cdk/src/lib.rs

@@ -15,7 +15,7 @@ pub mod pub_sub;
 
 /// Re-export amount type
 #[doc(hidden)]
-pub use cdk_common::{
+pub use cashu::{
     amount, common as types, dhke,
     error::{self, Error},
     lightning as cdk_lightning, lightning_invoice, mint_url, nuts, secret, util, Amount,

+ 1 - 1
crates/cdk/src/mint/builder.rs

@@ -4,7 +4,7 @@ use std::collections::HashMap;
 use std::sync::Arc;
 
 use anyhow::anyhow;
-use cdk_common::database::{self, MintDatabase};
+use cashu::database::{self, MintDatabase};
 
 use super::nut17::SupportedMethods;
 use super::nut19::{self, CachedEndpoint};

+ 1 - 1
crates/cdk/src/mint/melt.rs

@@ -2,7 +2,7 @@ use std::collections::HashSet;
 use std::str::FromStr;
 
 use anyhow::bail;
-use cdk_common::nut00::ProofsMethods;
+use cashu::nut00::ProofsMethods;
 use lightning_invoice::Bolt11Invoice;
 use tracing::instrument;
 use uuid::Uuid;

+ 5 - 5
crates/cdk/src/mint/mod.rs

@@ -6,9 +6,9 @@ use std::sync::Arc;
 
 use bitcoin::bip32::{ChildNumber, DerivationPath, Xpriv};
 use bitcoin::secp256k1::{self, Secp256k1};
-use cdk_common::common::{LnKey, QuoteTTL};
-use cdk_common::database::{self, MintDatabase};
-use cdk_common::mint::MintKeySetInfo;
+use cashu::common::{LnKey, QuoteTTL};
+use cashu::database::{self, MintDatabase};
+use cashu::mint::MintKeySetInfo;
 use config::SwappableConfig;
 use futures::StreamExt;
 use serde::{Deserialize, Serialize};
@@ -39,7 +39,7 @@ pub mod subscription;
 mod swap;
 
 pub use builder::{MintBuilder, MintMeltLimits};
-pub use cdk_common::mint::{MeltQuote, MintQuote};
+pub use cashu::mint::{MeltQuote, MintQuote};
 
 /// Cashu Mint
 #[derive(Clone)]
@@ -566,7 +566,7 @@ mod tests {
     use std::collections::HashSet;
 
     use bitcoin::Network;
-    use cdk_common::common::{LnKey, QuoteTTL};
+    use cashu::common::{LnKey, QuoteTTL};
     use secp256k1::Secp256k1;
     use uuid::Uuid;
 

+ 3 - 3
crates/cdk/src/mint/subscription/manager.rs

@@ -2,9 +2,9 @@
 use std::ops::Deref;
 use std::sync::Arc;
 
-use cdk_common::database::{self, MintDatabase};
-use cdk_common::nut17::Notification;
-use cdk_common::NotificationPayload;
+use cashu::database::{self, MintDatabase};
+use cashu::nut17::Notification;
+use cashu::NotificationPayload;
 use uuid::Uuid;
 
 use super::OnSubscription;

+ 4 - 4
crates/cdk/src/mint/subscription/on_subscription.rs

@@ -3,10 +3,10 @@
 //! This module contains the code that is triggered when a new subscription is created.
 use std::sync::Arc;
 
-use cdk_common::database::{self, MintDatabase};
-use cdk_common::nut17::Notification;
-use cdk_common::pub_sub::OnNewSubscription;
-use cdk_common::NotificationPayload;
+use cashu::database::{self, MintDatabase};
+use cashu::nut17::Notification;
+use cashu::pub_sub::OnNewSubscription;
+use cashu::NotificationPayload;
 use uuid::Uuid;
 
 use crate::nuts::{MeltQuoteBolt11Response, MintQuoteBolt11Response, ProofState, PublicKey};

+ 3 - 3
crates/cdk/src/pub_sub/mod.rs

@@ -15,9 +15,9 @@ use std::ops::{Deref, DerefMut};
 use std::sync::atomic::{self, AtomicUsize};
 use std::sync::Arc;
 
-pub use cdk_common::pub_sub::index::{Index, Indexable, SubscriptionGlobalId};
-use cdk_common::pub_sub::OnNewSubscription;
-pub use cdk_common::pub_sub::SubId;
+pub use cashu::pub_sub::index::{Index, Indexable, SubscriptionGlobalId};
+use cashu::pub_sub::OnNewSubscription;
+pub use cashu::pub_sub::SubId;
 use tokio::sync::{mpsc, RwLock};
 use tokio::task::JoinHandle;
 

+ 2 - 2
crates/cdk/src/wallet/mod.rs

@@ -6,7 +6,7 @@ use std::sync::Arc;
 
 use bitcoin::bip32::Xpriv;
 use bitcoin::Network;
-use cdk_common::database::{self, WalletDatabase};
+use cashu::database::{self, WalletDatabase};
 use client::MintConnector;
 use getrandom::getrandom;
 pub use multi_mint_wallet::MultiMintWallet;
@@ -41,7 +41,7 @@ pub mod subscription;
 mod swap;
 pub mod util;
 
-pub use cdk_common::wallet as types;
+pub use cashu::wallet as types;
 
 use crate::nuts::nut00::ProofsMethods;
 

+ 1 - 1
crates/cdk/src/wallet/multi_mint_wallet.rs

@@ -7,7 +7,7 @@ use std::collections::{BTreeMap, HashMap};
 use std::str::FromStr;
 use std::sync::Arc;
 
-use cdk_common::wallet::WalletKey;
+use cashu::wallet::WalletKey;
 use tokio::sync::Mutex;
 use tracing::instrument;