Trait tx_bakery::chain_query::ChainQuery
source · 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§
sourcefn get_network(&self) -> Network
fn get_network(&self) -> Network
Query the network id (not identical to network magic)
fn query_system_start( &self ) -> impl Future<Output = Result<DateTime<Utc>, ChainQueryError>>
fn query_era_summaries( &self ) -> impl Future<Output = Result<Vec<EraSummary>, ChainQueryError>>
sourcefn query_protocol_params(
&self
) -> impl Future<Output = Result<ProtocolParameters, ChainQueryError>>
fn query_protocol_params( &self ) -> impl Future<Output = Result<ProtocolParameters, ChainQueryError>>
Query protocol parameters
fn query_tip(&self) -> impl Future<Output = Result<ChainTip, ChainQueryError>>
sourcefn query_utxos_by_addr(
&self,
address: &Address
) -> impl Future<Output = Result<BTreeMap<TransactionInput, FullTransactionOutput>, ChainQueryError>>
fn query_utxos_by_addr( &self, address: &Address ) -> impl Future<Output = Result<BTreeMap<TransactionInput, FullTransactionOutput>, ChainQueryError>>
Query UTxOs at an address
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.