diff --git a/src/lib.rs b/src/lib.rs index bba141c..baf44ac 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,15 +1,5 @@ use bitcoin::address::{NetworkChecked, NetworkUnchecked}; use bitcoin::consensus::{deserialize, serialize}; -use bitcoin::Address as BitcoinAddress; -use bitcoin::Amount as BitcoinAmount; -use bitcoin::FeeRate as BitcoinFeeRate; -use bitcoin::OutPoint as BitcoinOutPoint; -use bitcoin::ScriptBuf as BitcoinScriptBuf; -use bitcoin::Sequence; -use bitcoin::Transaction as BitcoinTransaction; -use bitcoin::TxIn as BitcoinTxIn; -use bitcoin::TxOut as BitcoinTxOut; -pub use bitcoin::Txid as BitcoinTxid; pub use bitcoin::BlockHash; pub use bitcoin::Txid; @@ -29,20 +19,21 @@ mod macros; pub mod error; #[derive(Debug, PartialEq, Eq, uniffi::Object)] -pub struct Address(BitcoinAddress); +pub struct Address(bitcoin::Address); #[uniffi::export] impl Address { #[uniffi::constructor] pub fn new(address: String, network: Network) -> Result { - let parsed_address = BitcoinAddress::from_str(&address).map_err(AddressParseError::from)?; + let parsed_address = + bitcoin::Address::from_str(&address).map_err(AddressParseError::from)?; let network_checked_address = parsed_address.require_network(network.into())?; Ok(Address(network_checked_address)) } #[uniffi::constructor] pub fn from_script(script: Arc