Trait bdk::database::BatchOperations[][src]

pub trait BatchOperations {
    fn set_script_pubkey(
        &mut self,
        script: &Script,
        keychain: KeychainKind,
        child: u32
    ) -> Result<(), Error>;
fn set_utxo(&mut self, utxo: &LocalUtxo) -> Result<(), Error>;
fn set_raw_tx(&mut self, transaction: &Transaction) -> Result<(), Error>;
fn set_tx(&mut self, transaction: &TransactionDetails) -> Result<(), Error>;
fn set_last_index(
        &mut self,
        keychain: KeychainKind,
        value: u32
    ) -> Result<(), Error>;
fn del_script_pubkey_from_path(
        &mut self,
        keychain: KeychainKind,
        child: u32
    ) -> Result<Option<Script>, Error>;
fn del_path_from_script_pubkey(
        &mut self,
        script: &Script
    ) -> Result<Option<(KeychainKind, u32)>, Error>;
fn del_utxo(
        &mut self,
        outpoint: &OutPoint
    ) -> Result<Option<LocalUtxo>, Error>;
fn del_raw_tx(&mut self, txid: &Txid) -> Result<Option<Transaction>, Error>;
fn del_tx(
        &mut self,
        txid: &Txid,
        include_raw: bool
    ) -> Result<Option<TransactionDetails>, Error>;
fn del_last_index(
        &mut self,
        keychain: KeychainKind
    ) -> Result<Option<u32>, Error>; }
Expand description

Trait for operations that can be batched

This trait defines the list of operations that must be implemented on the Database type and the BatchDatabase::Batch type.

Required methods

Store a script_pubkey along with its keychain and child number.

Store a LocalUtxo

Store a raw transaction

Store the metadata of a transaction

Store the last derivation index for a given keychain.

Delete a script_pubkey given the keychain and its child number.

Delete the data related to a specific script_pubkey, meaning the keychain and the child number.

Delete a LocalUtxo given its [OutPoint]

Delete a raw transaction given its [Txid]

Delete the metadata of a transaction and optionally the raw transaction itself

Delete the last derivation index for a keychain.

Implementations on Foreign Types

Implementors