Trait sc_rpc_spec_v2::chain_head::api::ChainHeadApiClient
source · pub trait ChainHeadApiClient<Hash>: SubscriptionClientT{
// Provided methods
fn chain_head_unstable_body<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash
) -> Pin<Box<dyn Future<Output = Result<MethodResponse, Error>> + 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 = Result<Option<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,
items: Vec<StorageQuery<String>>,
child_trie: Option<String>
) -> Pin<Box<dyn Future<Output = Result<MethodResponse, 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
) -> Pin<Box<dyn Future<Output = Result<MethodResponse, Error>> + 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_or_hashes: ListOrValue<Hash>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn chain_head_unstable_continue<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
operation_id: String
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn chain_head_unstable_stop_operation<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
operation_id: String
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn chain_head_unstable_follow<'life0, 'async_trait>(
&'life0 self,
with_runtime: bool
) -> Pin<Box<dyn Future<Output = Result<Subscription<FollowEvent<Hash>>, 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_body<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash
) -> Pin<Box<dyn Future<Output = Result<MethodResponse, 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
) -> Pin<Box<dyn Future<Output = Result<MethodResponse, 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_v1_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_header<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + 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 = Result<Option<String>, Error>> + 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_v1_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_storage<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash: Hash,
items: Vec<StorageQuery<String>>,
child_trie: Option<String>
) -> Pin<Box<dyn Future<Output = Result<MethodResponse, 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,
items: Vec<StorageQuery<String>>,
child_trie: Option<String>
) -> Pin<Box<dyn Future<Output = Result<MethodResponse, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns storage entries 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
) -> Pin<Box<dyn Future<Output = Result<MethodResponse, 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
) -> Pin<Box<dyn Future<Output = Result<MethodResponse, 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.
sourcefn chain_head_unstable_unpin<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
hash_or_hashes: ListOrValue<Hash>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 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_or_hashes: ListOrValue<Hash>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Unpin a block or multiple blocks reported by the follow
method.
Ongoing operations that require the provided block will continue normally.
When this method returns an error, it is guaranteed that no blocks have been unpinned.
§Unstable
This method is unstable and subject to change in the future.
sourcefn chain_head_unstable_continue<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
operation_id: String
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn chain_head_unstable_continue<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
operation_id: String
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Resumes a storage fetch started with chainHead_storage
after it has generated an
operationWaitingForContinue
event.
§Unstable
This method is unstable and subject to change in the future.
sourcefn chain_head_unstable_stop_operation<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
operation_id: String
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn chain_head_unstable_stop_operation<'life0, 'async_trait>(
&'life0 self,
follow_subscription: String,
operation_id: String
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Stops an operation started with chainHead_v1_body, chainHead_v1_call, or chainHead_v1_storage. If the operation was still in progress, this interrupts it. If the operation was already finished, this call has no effect.
§Unstable
This method is unstable and subject to change in the future.
sourcefn chain_head_unstable_follow<'life0, 'async_trait>(
&'life0 self,
with_runtime: 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,
with_runtime: 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.