Trait sc_rpc::state::ChildStateApi[][src]

pub trait ChildStateApi<Hash>: 'static + Send + Sync {
    type Metadata: Metadata;
    pub fn storage_keys(
        &self,
        child_storage_key: PrefixedStorageKey,
        prefix: StorageKey,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Vec<StorageKey, Global>> + 'static + Send, Global>;
pub fn storage(
        &self,
        child_storage_key: PrefixedStorageKey,
        key: StorageKey,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Option<StorageData>> + 'static + Send, Global>;
pub fn storage_hash(
        &self,
        child_storage_key: PrefixedStorageKey,
        key: StorageKey,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Option<Hash>> + 'static + Send, Global>;
pub fn storage_size(
        &self,
        child_storage_key: PrefixedStorageKey,
        key: StorageKey,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Option<u64>> + 'static + Send, Global>; pub fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
    where
        Hash: Send + Sync + 'static + Serialize + DeserializeOwned
, { ... } }

Substrate child state API

Note that all PrefixedStorageKey are desierialized from json and not guaranted valid.

Associated Types

type Metadata: Metadata[src]

RPC Metadata

Loading content...

Required methods

pub fn storage_keys(
    &self,
    child_storage_key: PrefixedStorageKey,
    prefix: StorageKey,
    hash: Option<Hash>
) -> Box<dyn Future<Error = Error, Item = Vec<StorageKey, Global>> + 'static + Send, Global>
[src]

Returns the keys with prefix from a child storage, leave empty to get all the keys

pub fn storage(
    &self,
    child_storage_key: PrefixedStorageKey,
    key: StorageKey,
    hash: Option<Hash>
) -> Box<dyn Future<Error = Error, Item = Option<StorageData>> + 'static + Send, Global>
[src]

Returns a child storage entry at a specific block’s state.

pub fn storage_hash(
    &self,
    child_storage_key: PrefixedStorageKey,
    key: StorageKey,
    hash: Option<Hash>
) -> Box<dyn Future<Error = Error, Item = Option<Hash>> + 'static + Send, Global>
[src]

Returns the hash of a child storage entry at a block’s state.

pub fn storage_size(
    &self,
    child_storage_key: PrefixedStorageKey,
    key: StorageKey,
    hash: Option<Hash>
) -> Box<dyn Future<Error = Error, Item = Option<u64>> + 'static + Send, Global>
[src]

Returns the size of a child storage entry at a block’s state.

Loading content...

Provided methods

pub fn to_delegate(self) -> IoDelegate<Self, Self::Metadata> where
    Hash: Send + Sync + 'static + Serialize + DeserializeOwned
[src]

Create an IoDelegate, wiring rpc calls to the trait methods.

Loading content...

Implementors

impl<Block, Client> ChildStateApi<<Block as Block>::Hash> for ChildState<Block, Client> where
    Block: BlockT + 'static,
    Client: Send + Sync + 'static, 
[src]

type Metadata = Metadata

Loading content...