Trait sc_rpc_spec_v2::archive::api::ArchiveApiClient

source ·
pub trait ArchiveApiClient<Hash>: ClientT
where Hash: Send + Sync + 'static + Serialize,
{ // Provided methods fn archive_unstable_body<'life0, 'async_trait>( &'life0 self, hash: Hash, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<String>>, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn archive_unstable_genesis_hash<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn archive_unstable_header<'life0, 'async_trait>( &'life0 self, hash: Hash, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn archive_unstable_finalized_height<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn archive_unstable_hash_by_height<'life0, 'async_trait>( &'life0 self, height: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn archive_unstable_call<'life0, 'async_trait>( &'life0 self, hash: Hash, function: String, call_parameters: String, ) -> Pin<Box<dyn Future<Output = Result<MethodResult, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn archive_unstable_storage<'life0, 'async_trait>( &'life0 self, hash: Hash, items: Vec<PaginatedStorageQuery<String>>, child_trie: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<ArchiveStorageResult, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } }
Expand description

Client implementation for the ArchiveApi RPC API.

Provided Methods§

source

fn archive_unstable_body<'life0, 'async_trait>( &'life0 self, hash: Hash, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<String>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Retrieves the body (list of transactions) of a given block hash.

Returns an array of strings containing the hexadecimal-encoded SCALE-codec-encoded transactions in that block. If no block with that hash is found, null.

§Unstable

This method is unstable and subject to change in the future.

source

fn archive_unstable_genesis_hash<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Get the chain’s genesis hash.

Returns a string containing the hexadecimal-encoded hash of the genesis block of the chain.

§Unstable

This method is unstable and subject to change in the future.

source

fn archive_unstable_header<'life0, 'async_trait>( &'life0 self, hash: Hash, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Get the block’s header.

Returns a string containing the hexadecimal-encoded SCALE-codec encoding header of the block.

§Unstable

This method is unstable and subject to change in the future.

source

fn archive_unstable_finalized_height<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Get the height of the current finalized block.

Returns an integer height of the current finalized block of the chain.

§Unstable

This method is unstable and subject to change in the future.

source

fn archive_unstable_hash_by_height<'life0, 'async_trait>( &'life0 self, height: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Get the hashes of blocks from the given height.

Returns an array (possibly empty) of strings containing an hexadecimal-encoded hash of a block header.

§Unstable

This method is unstable and subject to change in the future.

source

fn archive_unstable_call<'life0, 'async_trait>( &'life0 self, hash: Hash, function: String, call_parameters: String, ) -> Pin<Box<dyn Future<Output = Result<MethodResult, 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.

source

fn archive_unstable_storage<'life0, 'async_trait>( &'life0 self, hash: Hash, items: Vec<PaginatedStorageQuery<String>>, child_trie: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<ArchiveStorageResult, 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.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<TypeJsonRpseeInteral, Hash> ArchiveApiClient<Hash> for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: ClientT, Hash: Send + Sync + 'static + Serialize,