#include <child_state_api_impl.hpp>
|
| ChildStateApiImpl (std::shared_ptr< blockchain::BlockHeaderRepository > block_repo, std::shared_ptr< const storage::trie::TrieStorage > trie_storage, std::shared_ptr< blockchain::BlockTree > block_tree, std::shared_ptr< runtime::Core > runtime_core, std::shared_ptr< runtime::Metadata > metadata) |
|
void | setApiService (const std::shared_ptr< api::ApiService > &api_service) override |
|
outcome::result< std::vector< common::Buffer > > | getKeys (const common::Buffer &child_storage_key, const std::optional< common::Buffer > &prefix_opt, const std::optional< primitives::BlockHash > &block_hash_opt) const override |
| Warning: This method is UNSAFE. Returns the keys from the specified child storage. The keys can also be filtered based on a prefix. More...
|
|
outcome::result< std::vector< common::Buffer > > | getKeysPaged (const common::Buffer &child_storage_key, const std::optional< common::Buffer > &prefix_opt, uint32_t keys_amount, const std::optional< common::Buffer > &prev_key_opt, const std::optional< primitives::BlockHash > &block_hash_opt) const override |
| Warning: This method is UNSAFE. Returns the keys from the specified child storage. Paginated version of getKeys. The keys can also be filtered based on a prefix. More...
|
|
outcome::result< std::optional< common::Buffer > > | getStorage (const common::Buffer &child_storage_key, const common::Buffer &key, const std::optional< primitives::BlockHash > &block_hash_opt) const override |
| Returns a child storage entry. More...
|
|
outcome::result< std::optional< primitives::BlockHash > > | getStorageHash (const common::Buffer &child_storage_key, const common::Buffer &key, const std::optional< primitives::BlockHash > &block_hash_opt) const override |
| Returns the hash of a child storage entry. More...
|
|
outcome::result< std::optional< uint64_t > > | getStorageSize (const common::Buffer &child_storage_key, const common::Buffer &key, const std::optional< primitives::BlockHash > &block_hash_opt) const override |
| Returns the size of a child storage entry. More...
|
|
virtual | ~ChildStateApi ()=default |
|
Definition at line 18 of file child_state_api_impl.hpp.
Warning: This method is UNSAFE. Returns the keys from the specified child storage. The keys can also be filtered based on a prefix.
- Parameters
-
child_storage_key | The child storage key. |
prefix | The prefix of the child storage keys to be filtered for. Leave empty ("") to return all child storage keys. |
block_hash_opt | (OPTIONAL) The block hash indicating the state. NULL implies the current state. |
- Returns
- (OPTIONAL) Storage keys (Array)
Implements kagome::api::ChildStateApi.
Definition at line 42 of file child_state_api_impl.cpp.
Warning: This method is UNSAFE. Returns the keys from the specified child storage. Paginated version of getKeys. The keys can also be filtered based on a prefix.
- Parameters
-
child_storage_key | The child storage key. |
prefix | The prefix of the child storage keys to be filtered for. |
keys_amount | Result page limit |
prev_key_opt | Last reported key |
block_hash_opt | (OPTIONAL) The block hash indicating the state. NULL implies the current state. |
- Returns
- (OPTIONAL) Storage keys (Array, up to keys_amount of size)
Implements kagome::api::ChildStateApi.
Definition at line 78 of file child_state_api_impl.cpp.
Returns a child storage entry.
- Parameters
-
child_storage_key | The child storage key. |
key | The key within the child storage. |
block_hash_opt | (OPTIONAL) The block hash indicating the state. NULL implies the current state. |
- Returns
- (OPTIONAL) Storage data, if found.
Implements kagome::api::ChildStateApi.
Definition at line 126 of file child_state_api_impl.cpp.
Returns the hash of a child storage entry.
- Parameters
-
child_storage_key | The child storage key. |
key | The key within the child storage. |
block_hash_opt | (OPTIONAL) The block hash indicating the state. NULL implies the current state. |
- Returns
- (OPTIONAL) The hash of the child storage entry, if found.
Implements kagome::api::ChildStateApi.
Definition at line 145 of file child_state_api_impl.cpp.
Returns the size of a child storage entry.
- Parameters
-
child_storage_key | The child storage key. |
key | The key within the child storage. |
block_hash_opt | (OPTIONAL) The block hash indicating the state. NULL implies the current state. |
- Returns
- (OPTIONAL) The size of the storage entry in bytes, if found.
Implements kagome::api::ChildStateApi.
Definition at line 158 of file child_state_api_impl.cpp.
void kagome::api::ChildStateApiImpl::setApiService |
( |
const std::shared_ptr< api::ApiService > & |
api_service | ) |
|
|
overridevirtual |
std::weak_ptr<api::ApiService> kagome::api::ChildStateApiImpl::api_service_ |
|
private |
std::shared_ptr<runtime::Core> kagome::api::ChildStateApiImpl::runtime_core_ |
|
private |
The documentation for this class was generated from the following files: