Trait sc_rpc::state::ChildStateApi [−][src]
pub trait ChildStateApi<Hash>: 'static + Send + Sync { type Metadata: Metadata; fn storage_keys(
&self,
child_storage_key: PrefixedStorageKey,
prefix: StorageKey,
hash: Option<Hash>
) -> Box<dyn Future<Item = Vec<StorageKey, Global>, Error = Error> + Send + 'static, Global>; fn storage_keys_paged(
&self,
child_storage_key: PrefixedStorageKey,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>,
hash: Option<Hash>
) -> Box<dyn Future<Item = Vec<StorageKey, Global>, Error = Error> + Send + 'static, Global>; fn storage(
&self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>
) -> Box<dyn Future<Item = Option<StorageData>, Error = Error> + Send + 'static, Global>; fn storage_hash(
&self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>
) -> Box<dyn Future<Item = Option<Hash>, Error = Error> + Send + 'static, Global>; fn storage_size(
&self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>
) -> Box<dyn Future<Item = Option<u64>, Error = Error> + Send + 'static, Global>; fn read_child_proof(
&self,
child_storage_key: PrefixedStorageKey,
keys: Vec<StorageKey, Global>,
hash: Option<Hash>
) -> Box<dyn Future<Item = ReadProof<Hash>, Error = Error> + Send + 'static, Global>; fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
where
Hash: Send + Sync + 'static + Serialize + DeserializeOwned, { ... } }
Expand description
Substrate child state API
Note that all PrefixedStorageKey
are deserialized
from json and not guaranteed valid.
Associated Types
Required methods
fn storage_keys(
&self,
child_storage_key: PrefixedStorageKey,
prefix: StorageKey,
hash: Option<Hash>
) -> Box<dyn Future<Item = Vec<StorageKey, Global>, Error = Error> + Send + 'static, Global>
fn storage_keys(
&self,
child_storage_key: PrefixedStorageKey,
prefix: StorageKey,
hash: Option<Hash>
) -> Box<dyn Future<Item = Vec<StorageKey, Global>, Error = Error> + Send + 'static, Global>
DEPRECATED: Please use childstate_getKeysPaged
with proper paging support.
Returns the keys with prefix from a child storage, leave empty to get all the keys
fn storage_keys_paged(
&self,
child_storage_key: PrefixedStorageKey,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>,
hash: Option<Hash>
) -> Box<dyn Future<Item = Vec<StorageKey, Global>, Error = Error> + Send + 'static, Global>
fn storage_keys_paged(
&self,
child_storage_key: PrefixedStorageKey,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>,
hash: Option<Hash>
) -> Box<dyn Future<Item = Vec<StorageKey, Global>, Error = Error> + Send + 'static, Global>
Returns the keys with prefix from a child storage with pagination support.
Up to count
keys will be returned.
If start_key
is passed, return next keys in storage in lexicographic order.
fn storage(
&self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>
) -> Box<dyn Future<Item = Option<StorageData>, Error = Error> + Send + 'static, Global>
fn storage(
&self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>
) -> Box<dyn Future<Item = Option<StorageData>, Error = Error> + Send + 'static, Global>
Returns a child storage entry at a specific block’s state.
fn storage_hash(
&self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>
) -> Box<dyn Future<Item = Option<Hash>, Error = Error> + Send + 'static, Global>
fn storage_hash(
&self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>
) -> Box<dyn Future<Item = Option<Hash>, Error = Error> + Send + 'static, Global>
Returns the hash of a child storage entry at a block’s state.
fn storage_size(
&self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>
) -> Box<dyn Future<Item = Option<u64>, Error = Error> + Send + 'static, Global>
fn storage_size(
&self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>
) -> Box<dyn Future<Item = Option<u64>, Error = Error> + Send + 'static, Global>
Returns the size of a child storage entry at a block’s state.
fn read_child_proof(
&self,
child_storage_key: PrefixedStorageKey,
keys: Vec<StorageKey, Global>,
hash: Option<Hash>
) -> Box<dyn Future<Item = ReadProof<Hash>, Error = Error> + Send + 'static, Global>
fn read_child_proof(
&self,
child_storage_key: PrefixedStorageKey,
keys: Vec<StorageKey, Global>,
hash: Option<Hash>
) -> Box<dyn Future<Item = ReadProof<Hash>, Error = Error> + Send + 'static, Global>
Returns proof of storage for child key entries at a specific block’s state.
Provided methods
fn to_delegate(self) -> IoDelegate<Self, Self::Metadata> where
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
fn to_delegate(self) -> IoDelegate<Self, Self::Metadata> where
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
Create an IoDelegate
, wiring rpc calls to the trait methods.
Implementors
impl<Block, Client> ChildStateApi<<Block as Block>::Hash> for ChildState<Block, Client> where
Block: BlockT + 'static,
Client: Send + Sync + 'static,