From: Vihiga Tyonum Date: Mon, 3 Feb 2025 12:08:27 +0000 (+0100) Subject: refactor: update imports from bdk to bdk_wallet X-Git-Tag: v1.0.0~7^2~20 X-Git-Url: http://internal-gitweb-vhost/?a=commitdiff_plain;h=91f5918d71095041574f83375ff7d5740025ca29;p=bdk-cli refactor: update imports from bdk to bdk_wallet - update imports from bdk to bdk_wallet - fix compilation warnings [Ticket: X] --- diff --git a/build.rs b/build.rs index 3a5bf28..74f1f14 100644 --- a/build.rs +++ b/build.rs @@ -7,7 +7,7 @@ fn main() { env::var_os("CARGO_FEATURE_COMPACT_FILTERS").map(|_| "compact_filters".to_string()); let rpc = env::var_os("CARGO_FEATURE_RPC").map(|_| "rpc".to_string()); - let blockchain_features: Vec = vec![electrum, esplora, compact_filters, rpc] + let blockchain_features: Vec = [electrum, esplora, compact_filters, rpc] .iter() .filter_map(|f| f.to_owned()) .collect(); @@ -20,7 +20,7 @@ fn main() { env::var_os("CARGO_FEATURE_KEY_VALUE_DB").map(|_| "key-value-db".to_string()); let sqlite_db = env::var_os("CARGO_FEATURE_SQLITE_DB").map(|_| "sqlite-db".to_string()); - let database_features: Vec = vec![key_value_db, sqlite_db] + let database_features: Vec = [key_value_db, sqlite_db] .iter() .filter_map(|f| f.to_owned()) .collect(); diff --git a/src/main.rs b/src/main.rs index ced420f..18708c0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,8 +23,9 @@ use log::{debug, error, warn}; use crate::commands::CliOpts; use crate::handlers::*; -use bdk::{bitcoin, Error}; +use bdk::Error; use bdk_macros::{maybe_async, maybe_await}; +use bdk_wallet::bitcoin; use clap::Parser; #[cfg(any(feature = "repl", target_arch = "wasm32"))] diff --git a/src/nodes.rs b/src/nodes.rs index c075334..b9b7921 100644 --- a/src/nodes.rs +++ b/src/nodes.rs @@ -17,7 +17,7 @@ #[cfg(feature = "regtest-node")] use { crate::commands::NodeSubCommand, - bdk::{ + bdk_wallet::{ bitcoin::{Address, Amount}, Error, }, diff --git a/src/wasm.rs b/src/wasm.rs index 5e69ffc..9b44ce9 100644 --- a/src/wasm.rs +++ b/src/wasm.rs @@ -2,13 +2,13 @@ use crate::commands::*; use crate::handlers::*; use crate::nodes::Nodes; use crate::utils::*; -use bdk::*; +use bdk_wallet::*; use bitcoin::*; -use bdk::blockchain::AnyBlockchain; -use bdk::database::AnyDatabase; -use bdk::miniscript::{MiniscriptKey, Translator}; +use bdk_wallet::blockchain::AnyBlockchain; +use bdk_wallet::database::AnyDatabase; +use bdk_wallet::miniscript::{MiniscriptKey, Translator}; use clap::Parser; use js_sys::Promise; use regex::Regex; @@ -22,9 +22,9 @@ use wasm_bindgen::prelude::*; use wasm_bindgen_futures::future_to_promise; #[cfg(feature = "compiler")] -use bdk::keys::{GeneratableDefaultOptions, GeneratedKey}; +use bdk_wallet::keys::{GeneratableDefaultOptions, GeneratedKey}; #[cfg(feature = "compiler")] -use bdk::miniscript::{self, policy::Concrete, Descriptor, TranslatePk}; +use bdk_wallet::miniscript::{self, policy::Concrete, Descriptor, TranslatePk}; #[cfg(feature = "compiler")] use serde::Deserialize;