Rename the library to bdk
This commit is contained in:
committed by
Steve Myers
parent
efdd11762c
commit
d7ee38cc52
@@ -24,12 +24,12 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use magical::bitcoin;
|
||||
use magical::database::MemoryDatabase;
|
||||
use magical::descriptor::HDKeyPaths;
|
||||
use magical::wallet::address_validator::{AddressValidator, AddressValidatorError};
|
||||
use magical::ScriptType;
|
||||
use magical::{OfflineWallet, Wallet};
|
||||
use bdk::bitcoin;
|
||||
use bdk::database::MemoryDatabase;
|
||||
use bdk::descriptor::HDKeyPaths;
|
||||
use bdk::wallet::address_validator::{AddressValidator, AddressValidatorError};
|
||||
use bdk::ScriptType;
|
||||
use bdk::{OfflineWallet, Wallet};
|
||||
|
||||
use bitcoin::hashes::hex::FromHex;
|
||||
use bitcoin::util::bip32::Fingerprint;
|
||||
@@ -57,7 +57,7 @@ impl AddressValidator for DummyValidator {
|
||||
}
|
||||
}
|
||||
|
||||
fn main() -> Result<(), magical::Error> {
|
||||
fn main() -> Result<(), bdk::Error> {
|
||||
let descriptor = "sh(and_v(v:pk(tpubDDpWvmUrPZrhSPmUzCMBHffvC3HyMAPnWDSAQNBTnj1iZeJa7BZQEttFiP4DS4GCcXQHezdXhn86Hj6LHX5EDstXPWrMaSneRWM8yUf6NFd/*),after(630000)))";
|
||||
let mut wallet: OfflineWallet<_> =
|
||||
Wallet::new_offline(descriptor, None, Network::Regtest, MemoryDatabase::new())?;
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
extern crate bdk;
|
||||
extern crate bitcoin;
|
||||
extern crate clap;
|
||||
extern crate log;
|
||||
extern crate magical;
|
||||
extern crate miniscript;
|
||||
extern crate serde_json;
|
||||
|
||||
@@ -39,8 +39,8 @@ use bitcoin::Network;
|
||||
use miniscript::policy::Concrete;
|
||||
use miniscript::Descriptor;
|
||||
|
||||
use magical::database::memory::MemoryDatabase;
|
||||
use magical::{OfflineWallet, ScriptType, Wallet};
|
||||
use bdk::database::memory::MemoryDatabase;
|
||||
use bdk::{OfflineWallet, ScriptType, Wallet};
|
||||
|
||||
fn main() {
|
||||
env_logger::init_from_env(
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
extern crate magical;
|
||||
extern crate bdk;
|
||||
extern crate serde_json;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use magical::bitcoin::util::bip32::ChildNumber;
|
||||
use magical::bitcoin::*;
|
||||
use magical::descriptor::*;
|
||||
use bdk::bitcoin::util::bip32::ChildNumber;
|
||||
use bdk::bitcoin::*;
|
||||
use bdk::descriptor::*;
|
||||
|
||||
fn main() {
|
||||
let desc = "wsh(or_d(\
|
||||
|
||||
@@ -36,17 +36,17 @@ use log::{debug, error, info, trace, LevelFilter};
|
||||
|
||||
use bitcoin::Network;
|
||||
|
||||
use magical::bitcoin;
|
||||
use magical::blockchain::ElectrumBlockchain;
|
||||
use magical::cli;
|
||||
use magical::electrum_client::Client;
|
||||
use magical::sled;
|
||||
use magical::Wallet;
|
||||
use bdk::bitcoin;
|
||||
use bdk::blockchain::ElectrumBlockchain;
|
||||
use bdk::cli;
|
||||
use bdk::electrum_client::Client;
|
||||
use bdk::sled;
|
||||
use bdk::Wallet;
|
||||
|
||||
fn prepare_home_dir() -> PathBuf {
|
||||
let mut dir = PathBuf::new();
|
||||
dir.push(&dirs::home_dir().unwrap());
|
||||
dir.push(".magical-bitcoin");
|
||||
dir.push(".bdk-bitcoin");
|
||||
|
||||
if !dir.exists() {
|
||||
info!("Creating home directory {}", dir.as_path().display());
|
||||
|
||||
Reference in New Issue
Block a user