Trait IBitcoindRpc

Source
pub trait IBitcoindRpc:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn get_tx_block_height<'life0, 'life1, 'async_trait>(
        &'life0 self,
        txid: &'life1 Txid,
    ) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_script_history<'life0, 'life1, 'async_trait>(
        &'life0 self,
        script: &'life1 ScriptBuf,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Transaction>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_txout_proof<'life0, 'async_trait>(
        &'life0 self,
        txid: Txid,
    ) -> Pin<Box<dyn Future<Output = Result<TxOutProof>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn into_dyn(self) -> DynBitcoindRpc
       where Self: Sized { ... }
}
Expand description

Trait that allows interacting with the Bitcoin blockchain

Functions may panic if the bitcoind node is not reachable.

Required Methods§

Source

fn get_tx_block_height<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 Txid, ) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

If a transaction is included in a block, returns the block height.

Source

fn get_script_history<'life0, 'life1, 'async_trait>( &'life0 self, script: &'life1 ScriptBuf, ) -> Pin<Box<dyn Future<Output = Result<Vec<Transaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get script transaction history

Source

fn get_txout_proof<'life0, 'async_trait>( &'life0 self, txid: Txid, ) -> Pin<Box<dyn Future<Output = Result<TxOutProof>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a proof that a tx is included in the bitcoin blockchain

Provided Methods§

Source

fn into_dyn(self) -> DynBitcoindRpc
where Self: Sized,

Implementors§