pub trait StateApi<Hash>: 'static + Send + Sync {
    type Metadata: PubSubMetadata;
Show 17 methods fn call(
        &self,
        name: String,
        bytes: Bytes,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Bytes> + Send + 'static, Global>Notable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;
;
fn storage_keys(
        &self,
        prefix: StorageKey,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Vec<StorageKey, Global>> + Send + 'static, Global>Notable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;
;
fn storage_pairs(
        &self,
        prefix: StorageKey,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Vec<(StorageKey, StorageData), Global>> + Send + 'static, Global>Notable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;
;
fn storage_keys_paged(
        &self,
        prefix: Option<StorageKey>,
        count: u32,
        start_key: Option<StorageKey>,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Vec<StorageKey, Global>> + Send + 'static, Global>Notable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;
;
fn storage(
        &self,
        key: StorageKey,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Option<StorageData>> + Send + 'static, Global>Notable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;
;
fn storage_hash(
        &self,
        key: StorageKey,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Option<Hash>> + Send + 'static, Global>Notable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;
;
fn storage_size(
        &self,
        key: StorageKey,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Option<u64>> + Send + 'static, Global>Notable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;
;
fn metadata(
        &self,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Bytes> + Send + 'static, Global>Notable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;
;
fn runtime_version(
        &self,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = RuntimeVersion> + Send + 'static, Global>Notable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;
;
fn query_storage(
        &self,
        keys: Vec<StorageKey, Global>,
        block: Hash,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Vec<StorageChangeSet<Hash>, Global>> + Send + 'static, Global>Notable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;
;
fn query_storage_at(
        &self,
        keys: Vec<StorageKey, Global>,
        at: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = Vec<StorageChangeSet<Hash>, Global>> + Send + 'static, Global>Notable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;
;
fn read_proof(
        &self,
        keys: Vec<StorageKey, Global>,
        hash: Option<Hash>
    ) -> Box<dyn Future<Error = Error, Item = ReadProof<Hash>> + Send + 'static, Global>Notable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;
;
fn subscribe_runtime_version(
        &self,
        metadata: Self::Metadata,
        subscriber: Subscriber<RuntimeVersion, Error>
    );
fn unsubscribe_runtime_version(
        &self,
        metadata: Option<Self::Metadata>,
        id: SubscriptionId
    ) -> Result<bool, Error>;
fn subscribe_storage(
        &self,
        metadata: Self::Metadata,
        subscriber: Subscriber<StorageChangeSet<Hash>, Error>,
        keys: Option<Vec<StorageKey, Global>>
    );
fn unsubscribe_storage(
        &self,
        metadata: Option<Self::Metadata>,
        id: SubscriptionId
    ) -> Result<bool, Error>; fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
    where
        Hash: 'static + Send + Sync + Serialize + DeserializeOwned
, { ... }
}
Expand description

Substrate state API

Associated Types

RPC Metadata

Required methods

Call a contract at a block’s state.

DEPRECATED: Please use state_getKeysPaged with proper paging support. Returns the keys with prefix, leave empty to get all the keys.

Returns the keys with prefix, leave empty to get all the keys

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.

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

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

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

Returns the runtime metadata as an opaque blob.

Get the runtime version.

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).

Query storage entries (by key) starting at block hash given as the second parameter.

Returns proof of storage entries at a specific block’s state.

New runtime version subscription

Unsubscribe from runtime version subscription

New storage subscription

Unsubscribe from storage subscription

Provided methods

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

Implementors