Skip to content

Commit 43cb033

Browse files
committed
Rename the crate to just "magical"
1 parent ac06e35 commit 43cb033

16 files changed

Lines changed: 63 additions & 63 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "magical-bitcoin-wallet"
2+
name = "magical"
33
version = "0.1.0"
44
edition = "2018"
55
authors = ["Alekos Filini <alekos.filini@gmail.com>", "Riccardo Casatta <riccardo@casatta.it>"]

examples/address_validator.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424

2525
use std::sync::Arc;
2626

27-
use magical_bitcoin_wallet::bitcoin;
28-
use magical_bitcoin_wallet::database::MemoryDatabase;
29-
use magical_bitcoin_wallet::descriptor::HDKeyPaths;
30-
use magical_bitcoin_wallet::wallet::address_validator::{AddressValidator, AddressValidatorError};
31-
use magical_bitcoin_wallet::ScriptType;
32-
use magical_bitcoin_wallet::{OfflineWallet, Wallet};
27+
use magical::bitcoin;
28+
use magical::database::MemoryDatabase;
29+
use magical::descriptor::HDKeyPaths;
30+
use magical::wallet::address_validator::{AddressValidator, AddressValidatorError};
31+
use magical::ScriptType;
32+
use magical::{OfflineWallet, Wallet};
3333

3434
use bitcoin::hashes::hex::FromHex;
3535
use bitcoin::util::bip32::Fingerprint;
@@ -57,7 +57,7 @@ impl AddressValidator for DummyValidator {
5757
}
5858
}
5959

60-
fn main() -> Result<(), magical_bitcoin_wallet::Error> {
60+
fn main() -> Result<(), magical::Error> {
6161
let descriptor = "sh(and_v(v:pk(tpubDDpWvmUrPZrhSPmUzCMBHffvC3HyMAPnWDSAQNBTnj1iZeJa7BZQEttFiP4DS4GCcXQHezdXhn86Hj6LHX5EDstXPWrMaSneRWM8yUf6NFd/*),after(630000)))";
6262
let mut wallet: OfflineWallet<_> =
6363
Wallet::new_offline(descriptor, None, Network::Regtest, MemoryDatabase::new())?;

examples/compiler.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
extern crate bitcoin;
2626
extern crate clap;
2727
extern crate log;
28-
extern crate magical_bitcoin_wallet;
28+
extern crate magical;
2929
extern crate miniscript;
3030
extern crate serde_json;
3131

@@ -39,8 +39,8 @@ use bitcoin::Network;
3939
use miniscript::policy::Concrete;
4040
use miniscript::Descriptor;
4141

42-
use magical_bitcoin_wallet::database::memory::MemoryDatabase;
43-
use magical_bitcoin_wallet::{OfflineWallet, ScriptType, Wallet};
42+
use magical::database::memory::MemoryDatabase;
43+
use magical::{OfflineWallet, ScriptType, Wallet};
4444

4545
fn main() {
4646
env_logger::init_from_env(

examples/parse_descriptor.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323
// SOFTWARE.
2424

25-
extern crate magical_bitcoin_wallet;
25+
extern crate magical;
2626
extern crate serde_json;
2727

2828
use std::sync::Arc;
2929

30-
use magical_bitcoin_wallet::bitcoin::util::bip32::ChildNumber;
31-
use magical_bitcoin_wallet::bitcoin::*;
32-
use magical_bitcoin_wallet::descriptor::*;
30+
use magical::bitcoin::util::bip32::ChildNumber;
31+
use magical::bitcoin::*;
32+
use magical::descriptor::*;
3333

3434
fn main() {
3535
let desc = "wsh(or_d(\

examples/repl.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ use log::{debug, error, info, trace, LevelFilter};
3636

3737
use bitcoin::Network;
3838

39-
use magical_bitcoin_wallet::bitcoin;
40-
use magical_bitcoin_wallet::blockchain::compact_filters::*;
41-
use magical_bitcoin_wallet::cli;
42-
use magical_bitcoin_wallet::sled;
43-
use magical_bitcoin_wallet::Wallet;
39+
use magical::bitcoin;
40+
use magical::blockchain::compact_filters::*;
41+
use magical::cli;
42+
use magical::sled;
43+
use magical::Wallet;
4444

4545
fn prepare_home_dir() -> PathBuf {
4646
let mut dir = PathBuf::new();

src/blockchain/compact_filters/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
//! ```no_run
4343
//! # use std::sync::Arc;
4444
//! # use bitcoin::*;
45-
//! # use magical_bitcoin_wallet::*;
46-
//! # use magical_bitcoin_wallet::blockchain::compact_filters::*;
45+
//! # use magical::*;
46+
//! # use magical::blockchain::compact_filters::*;
4747
//! let num_threads = 4;
4848
//!
4949
//! let mempool = Arc::new(Mempool::default());
@@ -55,7 +55,7 @@
5555
//! ))
5656
//! .collect::<Result<_, _>>()?;
5757
//! let blockchain = CompactFiltersBlockchain::new(peers, "./wallet-filters", Some(500_000))?;
58-
//! # Ok::<(), magical_bitcoin_wallet::error::Error>(())
58+
//! # Ok::<(), magical::error::Error>(())
5959
//! ```
6060
6161
use std::collections::HashSet;

src/blockchain/electrum.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
//! ## Example
3232
//!
3333
//! ```no_run
34-
//! # use magical_bitcoin_wallet::blockchain::electrum::ElectrumBlockchain;
34+
//! # use magical::blockchain::electrum::ElectrumBlockchain;
3535
//! let client = electrum_client::Client::new("ssl://electrum.blockstream.info:50002", None)?;
3636
//! let blockchain = ElectrumBlockchain::from(client);
37-
//! # Ok::<(), magical_bitcoin_wallet::Error>(())
37+
//! # Ok::<(), magical::Error>(())
3838
//! ```
3939
4040
use std::collections::HashSet;

src/blockchain/esplora.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
//! ## Example
3131
//!
3232
//! ```no_run
33-
//! # use magical_bitcoin_wallet::blockchain::esplora::EsploraBlockchain;
33+
//! # use magical::blockchain::esplora::EsploraBlockchain;
3434
//! let blockchain = EsploraBlockchain::new("https://blockstream.info/testnet/");
35-
//! # Ok::<(), magical_bitcoin_wallet::Error>(())
35+
//! # Ok::<(), magical::Error>(())
3636
//! ```
3737
3838
use std::collections::{HashMap, HashSet};

src/descriptor/policy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
//!
3232
//! ```
3333
//! # use std::sync::Arc;
34-
//! # use magical_bitcoin_wallet::descriptor::*;
34+
//! # use magical::descriptor::*;
3535
//! let desc = "wsh(and_v(v:pk(cV3oCth6zxZ1UVsHLnGothsWNsaoxRhC6aeNi5VbSdFpwUkgkEci),or_d(pk(cVMTy7uebJgvFaSBwcgvwk8qn8xSLc97dKow4MBetjrrahZoimm2),older(12960))))";
3636
//!
3737
//! let (extended_desc, key_map) = ExtendedDescriptor::parse_secret(desc)?;
@@ -40,7 +40,7 @@
4040
//! let signers = Arc::new(key_map.into());
4141
//! let policy = extended_desc.extract_policy(signers)?;
4242
//! println!("policy: {}", serde_json::to_string(&policy)?);
43-
//! # Ok::<(), magical_bitcoin_wallet::Error>(())
43+
//! # Ok::<(), magical::Error>(())
4444
//! ```
4545
4646
use std::cmp::max;

src/wallet/address_validator.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
//! ```
4343
//! # use std::sync::Arc;
4444
//! # use bitcoin::*;
45-
//! # use magical_bitcoin_wallet::address_validator::*;
46-
//! # use magical_bitcoin_wallet::database::*;
47-
//! # use magical_bitcoin_wallet::*;
45+
//! # use magical::address_validator::*;
46+
//! # use magical::database::*;
47+
//! # use magical::*;
4848
//! struct PrintAddressAndContinue;
4949
//!
5050
//! impl AddressValidator for PrintAddressAndContinue {
@@ -71,7 +71,7 @@
7171
//!
7272
//! let address = wallet.get_new_address()?;
7373
//! println!("Address: {}", address);
74-
//! # Ok::<(), magical_bitcoin_wallet::Error>(())
74+
//! # Ok::<(), magical::Error>(())
7575
//! ```
7676
7777
use std::fmt;

0 commit comments

Comments
 (0)