diff --git a/Cargo.toml b/Cargo.toml index 0074bab0..3a743d02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ keywords = ["bitcoin", "e-cash", "cashu"] [workspace.dependencies] async-trait = "0.1.74" +bip39 = "2.0" cdk = { path = "./crates/cdk", default-features = false } cdk-rexie = { path = "./crates/cdk-rexie", default-features = false } cdk-sqlite = { path = "./crates/cdk-sqlite", default-features = false } diff --git a/crates/cdk-cli/Cargo.toml b/crates/cdk-cli/Cargo.toml index 50e45b80..4765442c 100644 --- a/crates/cdk-cli/Cargo.toml +++ b/crates/cdk-cli/Cargo.toml @@ -12,6 +12,7 @@ license.workspace = true [dependencies] anyhow = "1.0.75" +bip39.workspace = true cdk = { workspace = true, default-features = false, features = ["wallet", "nostr"] } cdk-redb = { workspace = true, default-features = false, features = ["wallet", "nostr"] } cdk-sqlite = { workspace = true, default-features = false, features = ["wallet", "nostr"] } diff --git a/crates/cdk-cli/src/main.rs b/crates/cdk-cli/src/main.rs index 6d214660..703e2bfc 100644 --- a/crates/cdk-cli/src/main.rs +++ b/crates/cdk-cli/src/main.rs @@ -3,9 +3,10 @@ use std::str::FromStr; use std::sync::Arc; use anyhow::{bail, Result}; +use bip39::Mnemonic; +use cdk::cdk_database; use cdk::cdk_database::WalletDatabase; use cdk::wallet::Wallet; -use cdk::{cdk_database, Mnemonic}; use cdk_redb::RedbWalletDatabase; use cdk_sqlite::WalletSQLiteDatabase; use clap::{Parser, Subcommand}; diff --git a/crates/cdk/Cargo.toml b/crates/cdk/Cargo.toml index 441bc8b9..ae580593 100644 --- a/crates/cdk/Cargo.toml +++ b/crates/cdk/Cargo.toml @@ -19,7 +19,6 @@ nostr = ["dep:nostr-sdk"] [dependencies] async-trait.workspace = true base64 = "0.22" # bitcoin uses v0.13 (optional dep) -bip39 = "2.0" http = "1.0" bitcoin = { workspace = true, features = [ "serde", @@ -71,3 +70,4 @@ required-features = ["wallet"] [dev-dependencies] rand = "0.8.5" +bip39.workspace = true diff --git a/crates/cdk/src/lib.rs b/crates/cdk/src/lib.rs index 64dcca14..d17dfd3d 100644 --- a/crates/cdk/src/lib.rs +++ b/crates/cdk/src/lib.rs @@ -1,7 +1,5 @@ extern crate core; -#[cfg(any(feature = "mint", feature = "wallet"))] -pub use bip39::Mnemonic; pub use bitcoin::hashes::sha256::Hash as Sha256; pub use bitcoin::secp256k1; pub use lightning_invoice::{self, Bolt11Invoice}; @@ -20,6 +18,11 @@ pub mod util; #[cfg(feature = "wallet")] pub mod wallet; +#[cfg(feature = "mint")] +pub use mint::Mint; +#[cfg(feature = "wallet")] +pub use wallet::Wallet; + pub use self::amount::Amount; pub use self::url::UncheckedUrl; pub use self::util::SECP256K1;