BitcoinDatasource

Trait BitcoinDatasource 

Source
pub trait BitcoinDatasource: Send + Sync {
    // Required method
    fn get_transactions<'life0, 'life1, 'async_trait>(
        &'life0 self,
        txids: &'life1 [Hash],
    ) -> Pin<Box<dyn Future<Output = IndexerResult<HashMap<Hash, Transaction>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Optional provider interface for fetching Bitcoin transactions by txid.

If supplied to the pipeline, this will be used to enrich transaction updates with the corresponding serialized Bitcoin transaction bytes when available.

Required Methods§

Source

fn get_transactions<'life0, 'life1, 'async_trait>( &'life0 self, txids: &'life1 [Hash], ) -> Pin<Box<dyn Future<Output = IndexerResult<HashMap<Hash, Transaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Batch fetch Bitcoin transactions by their txids (big-endian hash). Implementations should attempt to fetch all in one request if possible.

Implementors§