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§
Sourceasync fn get_tip(&self) -> Result<OgmiosTip, OgmiosClientError>
async fn get_tip(&self) -> Result<OgmiosTip, OgmiosClientError>
Returns the slot number of the most recent block in the blockchain.
Sourceasync fn era_summaries(&self) -> Result<Vec<EraSummary>, OgmiosClientError>
async fn era_summaries(&self) -> Result<Vec<EraSummary>, OgmiosClientError>
Returns a list of era summaries.
Sourceasync fn query_utxos(
&self,
addresses: &[String],
) -> Result<Vec<OgmiosUtxo>, OgmiosClientError>
async fn query_utxos( &self, addresses: &[String], ) -> Result<Vec<OgmiosUtxo>, OgmiosClientError>
Parameters:
addresses
: bech32 address to query
Sourceasync fn query_protocol_parameters(
&self,
) -> Result<ProtocolParametersResponse, OgmiosClientError>
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.