Trait sc_rpc_api::state::StateApi [−][src]
Substrate state API
Associated Types
type Metadata: PubSubMetadata
[src]
RPC Metadata
Required methods
fn call(
&self,
name: String,
bytes: Bytes,
hash: Option<Hash>
) -> FutureResult<Bytes>
[src]
&self,
name: String,
bytes: Bytes,
hash: Option<Hash>
) -> FutureResult<Bytes>
Call a contract at a block’s state.
fn storage_keys(
&self,
prefix: StorageKey,
hash: Option<Hash>
) -> FutureResult<Vec<StorageKey>>
[src]
&self,
prefix: StorageKey,
hash: Option<Hash>
) -> FutureResult<Vec<StorageKey>>
DEPRECATED: Please use state_getKeysPaged
with proper paging support.
Returns the keys with prefix, leave empty to get all the keys.
fn storage_pairs(
&self,
prefix: StorageKey,
hash: Option<Hash>
) -> FutureResult<Vec<(StorageKey, StorageData)>>
[src]
&self,
prefix: StorageKey,
hash: Option<Hash>
) -> FutureResult<Vec<(StorageKey, StorageData)>>
Returns the keys with prefix, leave empty to get all the keys
fn storage_keys_paged(
&self,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>,
hash: Option<Hash>
) -> FutureResult<Vec<StorageKey>>
[src]
&self,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>,
hash: Option<Hash>
) -> FutureResult<Vec<StorageKey>>
Returns the keys with prefix 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,
key: StorageKey,
hash: Option<Hash>
) -> FutureResult<Option<StorageData>>
[src]
&self,
key: StorageKey,
hash: Option<Hash>
) -> FutureResult<Option<StorageData>>
Returns a storage entry at a specific block’s state.
fn storage_hash(
&self,
key: StorageKey,
hash: Option<Hash>
) -> FutureResult<Option<Hash>>
[src]
&self,
key: StorageKey,
hash: Option<Hash>
) -> FutureResult<Option<Hash>>
Returns the hash of a storage entry at a block’s state.
fn storage_size(
&self,
key: StorageKey,
hash: Option<Hash>
) -> FutureResult<Option<u64>>
[src]
&self,
key: StorageKey,
hash: Option<Hash>
) -> FutureResult<Option<u64>>
Returns the size of a storage entry at a block’s state.
fn metadata(&self, hash: Option<Hash>) -> FutureResult<Bytes>
[src]
Returns the runtime metadata as an opaque blob.
fn runtime_version(&self, hash: Option<Hash>) -> FutureResult<RuntimeVersion>
[src]
Get the runtime version.
fn query_storage(
&self,
keys: Vec<StorageKey>,
block: Hash,
hash: Option<Hash>
) -> FutureResult<Vec<StorageChangeSet<Hash>>>
[src]
&self,
keys: Vec<StorageKey>,
block: Hash,
hash: Option<Hash>
) -> FutureResult<Vec<StorageChangeSet<Hash>>>
Query historical storage entries (by key) starting from a block given as the second parameter.
NOTE This first returned result contains the initial state of storage for all keys. Subsequent values in the vector represent changes to the previous state (diffs).
fn query_storage_at(
&self,
keys: Vec<StorageKey>,
at: Option<Hash>
) -> FutureResult<Vec<StorageChangeSet<Hash>>>
[src]
&self,
keys: Vec<StorageKey>,
at: Option<Hash>
) -> FutureResult<Vec<StorageChangeSet<Hash>>>
Query storage entries (by key) starting at block hash given as the second parameter.
fn read_proof(
&self,
keys: Vec<StorageKey>,
hash: Option<Hash>
) -> FutureResult<ReadProof<Hash>>
[src]
&self,
keys: Vec<StorageKey>,
hash: Option<Hash>
) -> FutureResult<ReadProof<Hash>>
Returns proof of storage entries at a specific block’s state.
fn subscribe_runtime_version(
&self,
metadata: Self::Metadata,
subscriber: Subscriber<RuntimeVersion>
)
[src]
&self,
metadata: Self::Metadata,
subscriber: Subscriber<RuntimeVersion>
)
New runtime version subscription
fn unsubscribe_runtime_version(
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> RpcResult<bool>
[src]
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> RpcResult<bool>
Unsubscribe from runtime version subscription
fn subscribe_storage(
&self,
metadata: Self::Metadata,
subscriber: Subscriber<StorageChangeSet<Hash>>,
keys: Option<Vec<StorageKey>>
)
[src]
&self,
metadata: Self::Metadata,
subscriber: Subscriber<StorageChangeSet<Hash>>,
keys: Option<Vec<StorageKey>>
)
New storage subscription
fn unsubscribe_storage(
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> RpcResult<bool>
[src]
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> RpcResult<bool>
Unsubscribe from storage subscription
Provided methods
fn to_delegate(self) -> IoDelegate<Self, Self::Metadata> where
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
[src]
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
Create an IoDelegate
, wiring rpc calls to the trait methods.