Trait QueryLedgerState

Source
pub trait QueryLedgerState {
    // Required methods
    async fn get_tip(&self) -> Result<OgmiosTip, OgmiosClientError>;
    async fn era_summaries(&self) -> Result<Vec<EraSummary>, OgmiosClientError>;
    async fn query_utxos(
        &self,
        addresses: &[String],
    ) -> Result<Vec<OgmiosUtxo>, OgmiosClientError>;
    async fn query_protocol_parameters(
        &self,
    ) -> Result<ProtocolParametersResponse, OgmiosClientError>;
}
Expand description

Trait that defines the methods for querying the Cardano ledger state.

Required Methods§

Source

async fn get_tip(&self) -> Result<OgmiosTip, OgmiosClientError>

Returns the slot number of the most recent block in the blockchain.

Source

async fn era_summaries(&self) -> Result<Vec<EraSummary>, OgmiosClientError>

Returns a list of era summaries.

Source

async fn query_utxos( &self, addresses: &[String], ) -> Result<Vec<OgmiosUtxo>, OgmiosClientError>

Parameters:

  • addresses: bech32 address to query
Source

async fn query_protocol_parameters( &self, ) -> Result<ProtocolParametersResponse, OgmiosClientError>

Returns the current protocol parameters.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§