6 #ifndef KAGOME_API_SERVICE_CHILD_STATE_API 7 #define KAGOME_API_SERVICE_CHILD_STATE_API 25 const std::shared_ptr<api::ApiService> &api_service) = 0;
38 virtual outcome::result<std::vector<common::Buffer>>
getKeys(
40 const std::optional<common::Buffer> &prefix,
41 const std::optional<primitives::BlockHash> &block_hash_opt)
const = 0;
56 virtual outcome::result<std::vector<common::Buffer>>
getKeysPaged(
58 const std::optional<common::Buffer> &prefix,
60 const std::optional<common::Buffer> &prev_key_opt,
61 const std::optional<primitives::BlockHash> &block_hash_opt)
const = 0;
71 virtual outcome::result<std::optional<common::Buffer>>
getStorage(
74 const std::optional<primitives::BlockHash> &block_hash_opt)
const = 0;
84 virtual outcome::result<std::optional<primitives::BlockHash>>
88 const std::optional<primitives::BlockHash> &block_hash_opt)
const = 0;
101 const std::optional<primitives::BlockHash> &block_hash_opt)
const = 0;
106 #endif // KAGOME_API_SERVICE_CHILD_STATE_API
Class represents arbitrary (including empty) byte buffer.
virtual outcome::result< std::vector< common::Buffer > > getKeysPaged(const common::Buffer &child_storage_key, const std::optional< common::Buffer > &prefix, uint32_t keys_amount, const std::optional< common::Buffer > &prev_key_opt, const std::optional< primitives::BlockHash > &block_hash_opt) const =0
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.
virtual 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 =0
Returns a child storage entry.
virtual outcome::result< std::vector< common::Buffer > > getKeys(const common::Buffer &child_storage_key, const std::optional< common::Buffer > &prefix, const std::optional< primitives::BlockHash > &block_hash_opt) const =0
Warning: This method is UNSAFE. Returns the keys from the specified child storage. The keys can also be filtered based on a prefix.
virtual 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 =0
Returns the hash of a child storage entry.
virtual ~ChildStateApi()=default
virtual void setApiService(const std::shared_ptr< api::ApiService > &api_service)=0
virtual 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 =0
Returns the size of a child storage entry.