Trait PreparePsbt

Source
pub trait PreparePsbt {
    // Required methods
    fn prepare_tx(
        &mut self,
        destinations: &[(Address, Amount)],
        fee_rate: FeeRate,
    ) -> Result<Psbt>;
    fn prepare_drain_tx(
        &mut self,
        destination: Address,
        fee_rate: FeeRate,
    ) -> Result<Psbt>;
}
Expand description

Ability to construct funded PSBTs for specific destinations or to drain the wallet.

These methods are used to build transactions for boarding, exits, and fee bumping.

Required Methods§

Source

fn prepare_tx( &mut self, destinations: &[(Address, Amount)], fee_rate: FeeRate, ) -> Result<Psbt>

Prepare a Transaction which will send to the given destinations.

Source

fn prepare_drain_tx( &mut self, destination: Address, fee_rate: FeeRate, ) -> Result<Psbt>

Prepare a Transaction for sending all wallet funds to the given destination.

Implementors§

Source§

impl<W: DerefMut<Target = Wallet>> PreparePsbt for W