mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +00:00
Paged keys rpc for child storage. (#9100)
* childstate_getKeysPaged rpc * Rename `v` to `iter`. * Update client/api/src/backend.rs Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com> * Update client/api/src/backend.rs Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com> Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com>
This commit is contained in:
@@ -34,6 +34,7 @@ pub trait ChildStateApi<Hash> {
|
||||
/// RPC Metadata
|
||||
type Metadata;
|
||||
|
||||
/// 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
|
||||
#[rpc(name = "childstate_getKeys")]
|
||||
fn storage_keys(
|
||||
@@ -43,6 +44,19 @@ pub trait ChildStateApi<Hash> {
|
||||
hash: Option<Hash>
|
||||
) -> FutureResult<Vec<StorageKey>>;
|
||||
|
||||
/// 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.
|
||||
#[rpc(name = "childstate_getKeysPaged", alias("childstate_getKeysPagedAt"))]
|
||||
fn storage_keys_paged(
|
||||
&self,
|
||||
child_storage_key: PrefixedStorageKey,
|
||||
prefix: Option<StorageKey>,
|
||||
count: u32,
|
||||
start_key: Option<StorageKey>,
|
||||
hash: Option<Hash>,
|
||||
) -> FutureResult<Vec<StorageKey>>;
|
||||
|
||||
/// Returns a child storage entry at a specific block's state.
|
||||
#[rpc(name = "childstate_getStorage")]
|
||||
fn storage(
|
||||
|
||||
Reference in New Issue
Block a user