Trait sc_rpc_spec_v2::archive::api::ArchiveApiClient
source · pub trait ArchiveApiClient<Hash>: SubscriptionClientT{
// 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<StorageQuery<String>>,
child_trie: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<Subscription<ArchiveStorageEvent>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn archive_unstable_storage_diff<'life0, 'async_trait>(
&'life0 self,
hash: Hash,
items: Vec<ArchiveStorageDiffItem<String>>,
previous_hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Subscription<ArchiveStorageDiffEvent>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Client implementation for the ArchiveApi
RPC API.
Provided Methods§
sourcefn 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_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.
sourcefn 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_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.
sourcefn 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_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.
sourcefn 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_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.
sourcefn 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_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.
sourcefn 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_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.
sourcefn archive_unstable_storage<'life0, 'async_trait>(
&'life0 self,
hash: Hash,
items: Vec<StorageQuery<String>>,
child_trie: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<Subscription<ArchiveStorageEvent>, 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<StorageQuery<String>>,
child_trie: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<Subscription<ArchiveStorageEvent>, 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 archive_unstable_storage_diff<'life0, 'async_trait>(
&'life0 self,
hash: Hash,
items: Vec<ArchiveStorageDiffItem<String>>,
previous_hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Subscription<ArchiveStorageDiffEvent>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn archive_unstable_storage_diff<'life0, 'async_trait>(
&'life0 self,
hash: Hash,
items: Vec<ArchiveStorageDiffItem<String>>,
previous_hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Subscription<ArchiveStorageDiffEvent>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns the storage difference between two blocks.
§Unstable
This method is unstable and can change in minor or patch releases.