Kagome
Polkadot Runtime Engine in C++17
kagome::api::StateApi Class Referenceabstract

#include <state_api.hpp>

Inheritance diagram for kagome::api::StateApi:
Collaboration diagram for kagome::api::StateApi:

Classes

struct  StorageChangeSet
 

Public Member Functions

virtual ~StateApi ()=default
 
virtual void setApiService (const std::shared_ptr< api::ApiService > &api_service)=0
 
virtual outcome::result< common::Buffercall (std::string_view method, common::Buffer data, const std::optional< primitives::BlockHash > &opt_at) const =0
 
virtual outcome::result< std::vector< common::Buffer > > getKeysPaged (const std::optional< common::BufferView > &prefix, uint32_t keys_amount, const std::optional< common::BufferView > &prev_key, const std::optional< primitives::BlockHash > &block_hash_opt) const =0
 
virtual outcome::result< std::optional< common::Buffer > > getStorage (const common::BufferView &key) const =0
 
virtual outcome::result< std::optional< common::Buffer > > getStorageAt (const common::BufferView &key, const primitives::BlockHash &at) const =0
 
virtual outcome::result< std::vector< StorageChangeSet > > queryStorage (gsl::span< const common::Buffer > keys, const primitives::BlockHash &from, std::optional< primitives::BlockHash > to) const =0
 
virtual outcome::result< std::vector< StorageChangeSet > > queryStorageAt (gsl::span< const common::Buffer > keys, std::optional< primitives::BlockHash > at) const =0
 
virtual outcome::result< uint32_t > subscribeStorage (const std::vector< common::Buffer > &keys)=0
 
virtual outcome::result< bool > unsubscribeStorage (const std::vector< uint32_t > &subscription_id)=0
 
virtual outcome::result< primitives::VersiongetRuntimeVersion (const std::optional< primitives::BlockHash > &at) const =0
 
virtual outcome::result< uint32_t > subscribeRuntimeVersion ()=0
 
virtual outcome::result< void > unsubscribeRuntimeVersion (uint32_t subscription_id)=0
 
virtual outcome::result< std::string > getMetadata ()=0
 
virtual outcome::result< std::string > getMetadata (std::string_view hex_block_hash)=0
 

Detailed Description

Definition at line 21 of file state_api.hpp.


Class Documentation

struct kagome::api::StateApi::StorageChangeSet

Definition at line 45 of file state_api.hpp.

Collaboration diagram for kagome::api::StateApi::StorageChangeSet:
Class Members
BlockHash block
vector< Change > changes

Constructor & Destructor Documentation

virtual kagome::api::StateApi::~StateApi ( )
virtualdefault

Member Function Documentation

virtual outcome::result<common::Buffer> kagome::api::StateApi::call ( std::string_view  method,
common::Buffer  data,
const std::optional< primitives::BlockHash > &  opt_at 
) const
pure virtual

Implemented in kagome::api::StateApiImpl.

virtual outcome::result<std::vector<common::Buffer> > kagome::api::StateApi::getKeysPaged ( const std::optional< common::BufferView > &  prefix,
uint32_t  keys_amount,
const std::optional< common::BufferView > &  prev_key,
const std::optional< primitives::BlockHash > &  block_hash_opt 
) const
pure virtual

Implemented in kagome::api::StateApiImpl.

virtual outcome::result<std::string> kagome::api::StateApi::getMetadata ( )
pure virtual

Implemented in kagome::api::StateApiImpl.

virtual outcome::result<std::string> kagome::api::StateApi::getMetadata ( std::string_view  hex_block_hash)
pure virtual

Implemented in kagome::api::StateApiImpl.

virtual outcome::result<primitives::Version> kagome::api::StateApi::getRuntimeVersion ( const std::optional< primitives::BlockHash > &  at) const
pure virtual

Implemented in kagome::api::StateApiImpl.

virtual outcome::result<std::optional<common::Buffer> > kagome::api::StateApi::getStorage ( const common::BufferView key) const
pure virtual

Implemented in kagome::api::StateApiImpl.

virtual outcome::result<std::optional<common::Buffer> > kagome::api::StateApi::getStorageAt ( const common::BufferView key,
const primitives::BlockHash at 
) const
pure virtual

Implemented in kagome::api::StateApiImpl.

virtual outcome::result<std::vector<StorageChangeSet> > kagome::api::StateApi::queryStorage ( gsl::span< const common::Buffer keys,
const primitives::BlockHash from,
std::optional< primitives::BlockHash to 
) const
pure virtual

Implemented in kagome::api::StateApiImpl.

virtual outcome::result<std::vector<StorageChangeSet> > kagome::api::StateApi::queryStorageAt ( gsl::span< const common::Buffer keys,
std::optional< primitives::BlockHash at 
) const
pure virtual

Implemented in kagome::api::StateApiImpl.

virtual void kagome::api::StateApi::setApiService ( const std::shared_ptr< api::ApiService > &  api_service)
pure virtual

Implemented in kagome::api::StateApiImpl.

virtual outcome::result<uint32_t> kagome::api::StateApi::subscribeRuntimeVersion ( )
pure virtual

Implemented in kagome::api::StateApiImpl.

virtual outcome::result<uint32_t> kagome::api::StateApi::subscribeStorage ( const std::vector< common::Buffer > &  keys)
pure virtual

Implemented in kagome::api::StateApiImpl.

virtual outcome::result<void> kagome::api::StateApi::unsubscribeRuntimeVersion ( uint32_t  subscription_id)
pure virtual

Implemented in kagome::api::StateApiImpl.

virtual outcome::result<bool> kagome::api::StateApi::unsubscribeStorage ( const std::vector< uint32_t > &  subscription_id)
pure virtual

Implemented in kagome::api::StateApiImpl.


The documentation for this class was generated from the following file: