Skip to main content

WalletExt

Trait WalletExt 

Source
pub trait WalletExt: BorrowMut<Wallet> {
    // Provided methods
    fn peek_next_address(&self) -> AddressInfo { ... }
    fn unconfirmed_txids(&self) -> impl Iterator<Item = Txid> { ... }
    fn unconfirmed_txs(&self) -> impl Iterator<Item = Arc<Transaction>> { ... }
    fn trusted_balance(&self, min_confs: u32) -> TrustedBalance { ... }
    fn untrusted_utxos(&self, min_confs: u32) -> Vec<OutPoint> { ... }
    fn is_fully_owned_tx(&self, txid: Txid) -> bool { ... }
    fn set_checkpoint(&mut self, height: u32, hash: BlockHash) { ... }
    fn mark_output_keys_unused(&mut self, tx: &Transaction) { ... }
    fn make_signed_p2a_cpfp(
        &mut self,
        tx: &Transaction,
        fees: MakeCpfpFees,
    ) -> Result<Transaction, CpfpInternalError> { ... }
}
Expand description

An extension trait for Wallet.

Provided Methods§

Source

fn peek_next_address(&self) -> AddressInfo

Peek into the next address.

Source

fn unconfirmed_txids(&self) -> impl Iterator<Item = Txid>

Returns an iterator for each unconfirmed transaction in the wallet.

Source

fn unconfirmed_txs(&self) -> impl Iterator<Item = Arc<Transaction>>

Returns an iterator for each unconfirmed transaction in the wallet, useful for syncing with bitcoin core.

Source

fn trusted_balance(&self, min_confs: u32) -> TrustedBalance

Compute the wallet balance using our recursive trust model.

Source

fn untrusted_utxos(&self, min_confs: u32) -> Vec<OutPoint>

Return all UTXOs that are untrusted.

Source

fn is_fully_owned_tx(&self, txid: Txid) -> bool

Check if a transaction is fully owned by the wallet (all inputs spend wallet-owned outputs).

Source

fn set_checkpoint(&mut self, height: u32, hash: BlockHash)

Insert a checkpoint into the wallet.

It’s advised to use this only when recovering a wallet with a birthday.

Source

fn mark_output_keys_unused(&mut self, tx: &Transaction)

Mark the keys used in the outputs of this tx as unused

Used to replaced removed cancel_tx function as per suggestion: https://github.com/bitcoindevkit/bdk_wallet/pull/393

Source

fn make_signed_p2a_cpfp( &mut self, tx: &Transaction, fees: MakeCpfpFees, ) -> Result<Transaction, CpfpInternalError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl WalletExt for Wallet

Implementors§