2020-08-31 11:26:36 +02:00
|
|
|
// Magical Bitcoin Library
|
|
|
|
// Written in 2020 by
|
|
|
|
// Alekos Filini <alekos.filini@gmail.com>
|
|
|
|
//
|
|
|
|
// Copyright (c) 2020 Magical Bitcoin
|
|
|
|
//
|
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
// of this software and associated documentation files (the "Software"), to deal
|
|
|
|
// in the Software without restriction, including without limitation the rights
|
|
|
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
// copies of the Software, and to permit persons to whom the Software is
|
|
|
|
// furnished to do so, subject to the following conditions:
|
|
|
|
//
|
|
|
|
// The above copyright notice and this permission notice shall be included in all
|
|
|
|
// copies or substantial portions of the Software.
|
|
|
|
//
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
// SOFTWARE.
|
|
|
|
|
|
|
|
// only enables the `doc_cfg` feature when
|
|
|
|
// the `docsrs` configuration attribute is defined
|
2020-08-31 10:49:44 +02:00
|
|
|
#![cfg_attr(docsrs, feature(doc_cfg))]
|
2020-08-31 11:26:36 +02:00
|
|
|
|
2020-01-27 22:02:55 +01:00
|
|
|
pub extern crate bitcoin;
|
|
|
|
extern crate log;
|
|
|
|
pub extern crate miniscript;
|
|
|
|
extern crate serde;
|
2020-02-05 11:59:02 +01:00
|
|
|
#[macro_use]
|
2020-01-27 22:02:55 +01:00
|
|
|
extern crate serde_json;
|
|
|
|
|
2020-08-10 11:41:19 +02:00
|
|
|
#[cfg(any(target_arch = "wasm32", feature = "async-interface"))]
|
2020-07-20 15:51:57 +02:00
|
|
|
#[macro_use]
|
|
|
|
extern crate async_trait;
|
|
|
|
#[macro_use]
|
|
|
|
extern crate magical_macros;
|
|
|
|
|
2020-08-25 16:07:26 +02:00
|
|
|
#[cfg(any(test, feature = "compact_filters"))]
|
2020-02-06 12:17:28 +01:00
|
|
|
#[macro_use]
|
|
|
|
extern crate lazy_static;
|
|
|
|
|
2020-05-07 15:14:05 +02:00
|
|
|
#[cfg(feature = "electrum")]
|
2020-02-07 23:22:28 +01:00
|
|
|
pub extern crate electrum_client;
|
2020-05-07 15:14:05 +02:00
|
|
|
|
|
|
|
#[cfg(feature = "esplora")]
|
|
|
|
pub extern crate reqwest;
|
|
|
|
|
|
|
|
#[cfg(feature = "key-value-db")]
|
2020-02-07 23:22:28 +01:00
|
|
|
pub extern crate sled;
|
2020-02-05 11:59:02 +01:00
|
|
|
|
2020-05-08 23:30:45 +02:00
|
|
|
#[cfg(feature = "cli-utils")]
|
|
|
|
pub mod cli;
|
|
|
|
|
2020-08-10 10:49:34 +02:00
|
|
|
#[cfg(test)]
|
|
|
|
#[macro_use]
|
|
|
|
extern crate testutils;
|
|
|
|
#[cfg(test)]
|
|
|
|
#[macro_use]
|
|
|
|
extern crate testutils_macros;
|
|
|
|
#[cfg(test)]
|
|
|
|
#[macro_use]
|
|
|
|
extern crate serial_test;
|
|
|
|
|
2020-02-04 11:05:54 +01:00
|
|
|
#[macro_use]
|
2020-01-27 22:02:55 +01:00
|
|
|
pub mod error;
|
2020-05-03 16:15:11 +02:00
|
|
|
pub mod blockchain;
|
2020-02-05 11:59:02 +01:00
|
|
|
pub mod database;
|
2020-02-04 11:05:54 +01:00
|
|
|
pub mod descriptor;
|
2020-08-31 10:49:44 +02:00
|
|
|
pub(crate) mod psbt;
|
|
|
|
pub(crate) mod types;
|
2020-02-07 23:22:28 +01:00
|
|
|
pub mod wallet;
|
|
|
|
|
2020-08-31 10:49:44 +02:00
|
|
|
pub use error::Error;
|
|
|
|
pub use types::*;
|
|
|
|
pub use wallet::address_validator;
|
|
|
|
pub use wallet::signer;
|
2020-08-07 11:23:01 +02:00
|
|
|
pub use wallet::tx_builder::TxBuilder;
|
|
|
|
pub use wallet::{OfflineWallet, Wallet};
|