pub trait ChainQuery {
    // Required methods
    fn get_network(&self) -> Network;
    fn query_system_start(
        &self
    ) -> impl Future<Output = Result<DateTime<Utc>, ChainQueryError>>;
    fn query_era_summaries(
        &self
    ) -> impl Future<Output = Result<Vec<EraSummary>, ChainQueryError>>;
    fn query_protocol_params(
        &self
    ) -> impl Future<Output = Result<ProtocolParameters, ChainQueryError>>;
    fn query_tip(
        &self
    ) -> impl Future<Output = Result<ChainTip, ChainQueryError>>;
    fn query_utxos_by_addr(
        &self,
        address: &Address
    ) -> impl Future<Output = Result<BTreeMap<TransactionInput, FullTransactionOutput>, ChainQueryError>>;
    fn query_utxos_by_ref(
        &self,
        references: Vec<&TransactionInput>
    ) -> impl Future<Output = Result<BTreeMap<TransactionInput, FullTransactionOutput>, ChainQueryError>>;
}
Expand description

A chain query client responsible for all read actions from the blockchain (no write)

Required Methods§

source

fn get_network(&self) -> Network

Query the network id (not identical to network magic)

source

fn query_system_start( &self ) -> impl Future<Output = Result<DateTime<Utc>, ChainQueryError>>

source

fn query_era_summaries( &self ) -> impl Future<Output = Result<Vec<EraSummary>, ChainQueryError>>

source

fn query_protocol_params( &self ) -> impl Future<Output = Result<ProtocolParameters, ChainQueryError>>

Query protocol parameters

source

fn query_tip(&self) -> impl Future<Output = Result<ChainTip, ChainQueryError>>

source

fn query_utxos_by_addr( &self, address: &Address ) -> impl Future<Output = Result<BTreeMap<TransactionInput, FullTransactionOutput>, ChainQueryError>>

Query UTxOs at an address

source

fn query_utxos_by_ref( &self, references: Vec<&TransactionInput> ) -> impl Future<Output = Result<BTreeMap<TransactionInput, FullTransactionOutput>, ChainQueryError>>

Object Safety§

This trait is not object safe.

Implementors§