pub trait TempoConsensusApiClient: SubscriptionClientT {
// Provided methods
fn get_finalization(
&self,
query: Query,
) -> impl Future<Output = Result<CertifiedBlock, Error>> + Send { ... }
fn get_latest(
&self,
) -> impl Future<Output = Result<ConsensusState, Error>> + Send { ... }
fn get_identity_transition_proof(
&self,
from_epoch: Option<u64>,
full: Option<bool>,
) -> impl Future<Output = Result<IdentityTransitionResponse, Error>> + Send { ... }
fn subscribe_events(
&self,
) -> impl Future<Output = Result<Subscription<Event>, Error>> + Send { ... }
}Expand description
Client implementation for the TempoConsensusApi RPC API.
Provided Methods§
Sourcefn get_finalization(
&self,
query: Query,
) -> impl Future<Output = Result<CertifiedBlock, Error>> + Send
fn get_finalization( &self, query: Query, ) -> impl Future<Output = Result<CertifiedBlock, Error>> + Send
Get finalization by height query.
Use "latest" to get the most recent finalization, or {"height": N} for a specific height.
Sourcefn get_latest(
&self,
) -> impl Future<Output = Result<ConsensusState, Error>> + Send
fn get_latest( &self, ) -> impl Future<Output = Result<ConsensusState, Error>> + Send
Get the current consensus state snapshot.
Returns the latest finalized block and the latest notarized block (if not yet finalized).
Sourcefn get_identity_transition_proof(
&self,
from_epoch: Option<u64>,
full: Option<bool>,
) -> impl Future<Output = Result<IdentityTransitionResponse, Error>> + Send
fn get_identity_transition_proof( &self, from_epoch: Option<u64>, full: Option<bool>, ) -> impl Future<Output = Result<IdentityTransitionResponse, Error>> + Send
Get identity transition proofs (full DKG events).
Each proof contains the block header with the new DKG outcome, and a BLS certificate from the OLD network identity that signs the block.
from_epoch: Optional epoch to start searching from (defaults to latest finalized)full = false(default): Returns only the most recent transitionfull = true: Returns all transitions from the starting epoch back to genesis
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".