mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 04:07:57 +00:00
* Add RPC function state_getProof, resolves #1110 * Apply suggestions from code review * Update client/rpc/src/state/state_full.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update Cargo.lock * Make block hash optional * Wrap StorageProof as Bytes * Add struct ReadProof * Fix typo Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
//! Substrate state API.
|
||||
|
||||
pub mod error;
|
||||
pub mod helpers;
|
||||
|
||||
use jsonrpc_core::Result as RpcResult;
|
||||
use jsonrpc_core::futures::Future;
|
||||
@@ -28,6 +29,7 @@ use sp_version::RuntimeVersion;
|
||||
use self::error::FutureResult;
|
||||
|
||||
pub use self::gen_client::Client as StateClient;
|
||||
pub use self::helpers::ReadProof;
|
||||
|
||||
/// Substrate state API
|
||||
#[rpc]
|
||||
@@ -100,6 +102,10 @@ pub trait StateApi<Hash> {
|
||||
at: Option<Hash>,
|
||||
) -> FutureResult<Vec<StorageChangeSet<Hash>>>;
|
||||
|
||||
/// Returns proof of storage entries at a specific block's state.
|
||||
#[rpc(name = "state_getReadProof")]
|
||||
fn read_proof(&self, keys: Vec<StorageKey>, hash: Option<Hash>) -> FutureResult<ReadProof<Hash>>;
|
||||
|
||||
/// New runtime version subscription
|
||||
#[pubsub(
|
||||
subscription = "state_runtimeVersion",
|
||||
|
||||
Reference in New Issue
Block a user