pub trait Wallet {
// Required methods
fn get_new_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Address, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_new_change_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Address, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_utxos_for_amount<'life0, 'async_trait>(
&'life0 self,
amount: Amount,
fee_rate: u64,
lock_utxos: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Utxo>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sign_psbt_input<'life0, 'life1, 'async_trait>(
&'life0 self,
psbt: &'life1 mut Psbt,
input_index: usize,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn import_address(&self, address: &Address) -> Result<(), Error>;
fn unreserve_utxos(&self, outpoints: &[OutPoint]) -> Result<(), Error>;
}
Expand description
Wallet trait to provide functionalities related to generating, storing and managing bitcoin addresses and UTXOs.
Required Methods§
Sourcefn get_new_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Address, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_new_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Address, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns a new (unused) address.
Sourcefn get_new_change_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Address, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_new_change_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Address, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns a new (unused) change address.
Sourcefn get_utxos_for_amount<'life0, 'async_trait>(
&'life0 self,
amount: Amount,
fee_rate: u64,
lock_utxos: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Utxo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_utxos_for_amount<'life0, 'async_trait>(
&'life0 self,
amount: Amount,
fee_rate: u64,
lock_utxos: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Utxo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a set of UTXOs to fund the given amount.