Trait sc_rpc_spec_v2::chain_head::api::ChainHeadApiClient
source · pub trait ChainHeadApiClient<Hash>: SubscriptionClientTwhere
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,{
// Provided methods
fn chain_head_unstable_header<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash
) -> Pin<Box<dyn Future<Output = RpcResult<Option<String>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn chain_head_unstable_genesis_hash<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn chain_head_unstable_unpin<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn chain_head_unstable_follow<'life0, 'async_trait>(
&'life0 self,
runtime_updates: bool
) -> Pin<Box<dyn Future<Output = Result<Subscription<FollowEvent<Hash>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn chain_head_unstable_body<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash,
network_config: Option<NetworkConfig>
) -> Pin<Box<dyn Future<Output = Result<Subscription<ChainHeadEvent<String>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn chain_head_unstable_storage<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash,
key: String,
child_key: Option<String>,
network_config: Option<NetworkConfig>
) -> Pin<Box<dyn Future<Output = Result<Subscription<ChainHeadEvent<String>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn chain_head_unstable_call<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash,
function: String,
call_parameters: String,
network_config: Option<NetworkConfig>
) -> Pin<Box<dyn Future<Output = Result<Subscription<ChainHeadEvent<String>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Client implementation for the ChainHeadApi
RPC API.
Provided Methods§
sourcefn chain_head_unstable_header<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash
) -> Pin<Box<dyn Future<Output = RpcResult<Option<String>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn chain_head_unstable_header<'life0, 'async_trait>( &'life0 self, follow_subscription: String, hash: Hash ) -> Pin<Box<dyn Future<Output = RpcResult<Option<String>>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Retrieves the header of a pinned block.
This method should be seen as a complement to chainHead_unstable_follow
,
allowing the JSON-RPC client to retrieve more information about a block
that has been reported.
Use archive_unstable_header
if instead you want to retrieve the header of an arbitrary
block.
Unstable
This method is unstable and subject to change in the future.
sourcefn chain_head_unstable_genesis_hash<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn chain_head_unstable_genesis_hash<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
sourcefn chain_head_unstable_unpin<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn chain_head_unstable_unpin<'life0, 'async_trait>( &'life0 self, follow_subscription: String, hash: Hash ) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Unpin a block reported by the follow
method.
Ongoing operations that require the provided block will continue normally.
Unstable
This method is unstable and subject to change in the future.
sourcefn chain_head_unstable_follow<'life0, 'async_trait>(
&'life0 self,
runtime_updates: bool
) -> Pin<Box<dyn Future<Output = Result<Subscription<FollowEvent<Hash>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn chain_head_unstable_follow<'life0, 'async_trait>( &'life0 self, runtime_updates: bool ) -> Pin<Box<dyn Future<Output = Result<Subscription<FollowEvent<Hash>>, Error>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Track the state of the head of the chain: the finalized, non-finalized, and best blocks.
Unstable
This method is unstable and subject to change in the future.
sourcefn chain_head_unstable_body<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash,
network_config: Option<NetworkConfig>
) -> Pin<Box<dyn Future<Output = Result<Subscription<ChainHeadEvent<String>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn chain_head_unstable_body<'life0, 'async_trait>( &'life0 self, follow_subscription: String, hash: Hash, network_config: Option<NetworkConfig> ) -> Pin<Box<dyn Future<Output = Result<Subscription<ChainHeadEvent<String>>, Error>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Retrieves the body (list of transactions) of a pinned block.
This method should be seen as a complement to chainHead_unstable_follow
,
allowing the JSON-RPC client to retrieve more information about a block
that has been reported.
Use archive_unstable_body
if instead you want to retrieve the body of an arbitrary block.
Unstable
This method is unstable and subject to change in the future.
sourcefn chain_head_unstable_storage<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash,
key: String,
child_key: Option<String>,
network_config: Option<NetworkConfig>
) -> Pin<Box<dyn Future<Output = Result<Subscription<ChainHeadEvent<String>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn chain_head_unstable_storage<'life0, 'async_trait>( &'life0 self, follow_subscription: String, hash: Hash, key: String, child_key: Option<String>, network_config: Option<NetworkConfig> ) -> Pin<Box<dyn Future<Output = Result<Subscription<ChainHeadEvent<String>>, Error>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Return a storage entry at a specific block’s state.
Unstable
This method is unstable and subject to change in the future.
sourcefn chain_head_unstable_call<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash,
function: String,
call_parameters: String,
network_config: Option<NetworkConfig>
) -> Pin<Box<dyn Future<Output = Result<Subscription<ChainHeadEvent<String>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn chain_head_unstable_call<'life0, 'async_trait>( &'life0 self, follow_subscription: String, hash: Hash, function: String, call_parameters: String, network_config: Option<NetworkConfig> ) -> Pin<Box<dyn Future<Output = Result<Subscription<ChainHeadEvent<String>>, Error>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Call into the Runtime API at a specified block’s state.
Unstable
This method is unstable and subject to change in the future.