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

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

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

pub fn set_script_pubkey(
    &mut self,
    script: &Script,
    keychain: KeychainKind,
    child: u32
) -> Result<(), Error>
[src]

Store a script_pubkey along with its keychain and child number.

pub fn set_utxo(&mut self, utxo: &UTXO) -> Result<(), Error>[src]

Store a UTXO

pub fn set_raw_tx(&mut self, transaction: &Transaction) -> Result<(), Error>[src]

Store a raw transaction

pub fn set_tx(&mut self, transaction: &TransactionDetails) -> Result<(), Error>[src]

Store the metadata of a transaction

pub fn set_last_index(
    &mut self,
    keychain: KeychainKind,
    value: u32
) -> Result<(), Error>
[src]

Store the last derivation index for a given keychain.

pub fn del_script_pubkey_from_path(
    &mut self,
    keychain: KeychainKind,
    child: u32
) -> Result<Option<Script>, Error>
[src]

Delete a script_pubkey given the keychain and its child number.

pub fn del_path_from_script_pubkey(
    &mut self,
    script: &Script
) -> Result<Option<(KeychainKind, u32)>, Error>
[src]

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

pub fn del_utxo(&mut self, outpoint: &OutPoint) -> Result<Option<UTXO>, Error>[src]

Delete a UTXO given its [OutPoint]

pub fn del_raw_tx(&mut self, txid: &Txid) -> Result<Option<Transaction>, Error>[src]

Delete a raw transaction given its [Txid]

pub fn del_tx(
    &mut self,
    txid: &Txid,
    include_raw: bool
) -> Result<Option<TransactionDetails>, Error>
[src]

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

pub fn del_last_index(
    &mut self,
    keychain: KeychainKind
) -> Result<Option<u32>, Error>
[src]

Delete the last derivation index for a keychain.

Loading content...

Implementations on Foreign Types

impl BatchOperations for Tree[src]

impl BatchOperations for Batch[src]

Loading content...

Implementors

impl BatchOperations for AnyBatch[src]

impl BatchOperations for AnyDatabase[src]

impl BatchOperations for MemoryDatabase[src]

Loading content...