@ -1,8 +1,8 @@
use crate ::{
bitcoin ::{
timelocks ::BlockHeight , Address , Amount , BroadcastSignedTransaction , BuildTxLockPsb t,
Get BlockHeight, GetNetwork , Get RawTransaction, SignTxLock , Transaction ,
TransactionBlockHeight, TxLock , WaitForTransactionFinality, WatchForRawTransaction ,
timelocks ::BlockHeight , Address , Amount , BroadcastSignedTransaction , GetBlockHeigh t,
Get RawTransaction, SignTxLock , Transaction , TransactionBlockHeight , TxLock ,
WaitForTransactionFinality, WatchForRawTransaction ,
} ,
execution_params ::ExecutionParams ,
} ;
@ -110,11 +110,8 @@ impl Wallet {
self . inner . lock ( ) . await . sync ( noop_progress ( ) , None ) ? ;
Ok ( ( ) )
}
}
#[ async_trait ]
impl BuildTxLockPsbt for Wallet {
async fn build_tx_lock_psbt (
pub async fn build_tx_lock_psbt (
& self ,
output_address : Address ,
output_amount : Amount ,
@ -129,6 +126,10 @@ impl BuildTxLockPsbt for Wallet {
tracing ::debug ! ( "tx lock built" ) ;
Ok ( psbt )
}
pub async fn get_network ( & self ) -> bitcoin ::Network {
self . inner . lock ( ) . await . network ( )
}
}
#[ async_trait ]
@ -283,13 +284,6 @@ impl WaitForTransactionFinality for Wallet {
}
}
#[ async_trait ]
impl GetNetwork for Wallet {
async fn get_network ( & self ) -> bitcoin ::Network {
self . inner . lock ( ) . await . network ( )
}
}
fn tx_status_url ( txid : Txid , base_url : & Url ) -> Result < Url > {
let url = base_url . join ( & format! ( "tx/{}/status" , txid ) ) ? ;
Ok ( url )