Kagome
Polkadot Runtime Engine in C++17
|
#include <chain_api.hpp>
Public Types | |
using | BlockNumber = primitives::BlockNumber |
using | BlockHash = kagome::primitives::BlockHash |
using | ValueType = boost::variant< BlockNumber, std::string > |
Public Member Functions | |
virtual | ~ChainApi ()=default |
virtual void | setApiService (const std::shared_ptr< api::ApiService > &api_service)=0 |
virtual outcome::result< BlockHash > | getBlockHash () const =0 |
virtual outcome::result< BlockHash > | getBlockHash (BlockNumber block_number) const =0 |
virtual outcome::result< BlockHash > | getBlockHash (std::string_view hex_number) const =0 |
virtual outcome::result< std::vector< BlockHash > > | getBlockHash (gsl::span< const ValueType > values) const =0 |
virtual outcome::result< primitives::BlockHeader > | getHeader (std::string_view hash)=0 |
virtual outcome::result< primitives::BlockHeader > | getHeader ()=0 |
virtual outcome::result< primitives::BlockData > | getBlock (std::string_view hash)=0 |
virtual outcome::result< primitives::BlockData > | getBlock ()=0 |
virtual outcome::result< primitives::BlockHash > | getFinalizedHead () const =0 |
virtual outcome::result< uint32_t > | subscribeFinalizedHeads ()=0 |
virtual outcome::result< void > | unsubscribeFinalizedHeads (uint32_t subscription_id)=0 |
virtual outcome::result< uint32_t > | subscribeNewHeads ()=0 |
virtual outcome::result< void > | unsubscribeNewHeads (uint32_t subscription_id)=0 |
for blockchain api
Definition at line 23 of file chain_api.hpp.
Definition at line 27 of file chain_api.hpp.
Definition at line 26 of file chain_api.hpp.
using kagome::api::ChainApi::ValueType = boost::variant<BlockNumber, std::string> |
Definition at line 28 of file chain_api.hpp.
|
virtualdefault |
|
pure virtual |
hash | hex-string of a block to retrieve |
Implemented in kagome::api::ChainApiImpl.
|
pure virtual |
Returns header of a last finalized block.
Implemented in kagome::api::ChainApiImpl.
|
pure virtual |
Implemented in kagome::api::ChainApiImpl.
|
pure virtual |
block_number | block number |
Implemented in kagome::api::ChainApiImpl.
|
pure virtual |
hex_number | hex-encoded block number |
Implemented in kagome::api::ChainApiImpl.
|
pure virtual |
values | mixed values array either of block number of hex-encoded block number as string |
Implemented in kagome::api::ChainApiImpl.
|
pure virtual |
Get hash of the last finalized block in the canon chain.
Implemented in kagome::api::ChainApiImpl.
|
pure virtual |
hash | hex-string of a block to retrieve |
Implemented in kagome::api::ChainApiImpl.
|
pure virtual |
Returns header of a last finalized block.
Implemented in kagome::api::ChainApiImpl.
|
pure virtual |
Implemented in kagome::api::ChainApiImpl.
|
pure virtual |
Subscribes to events of Finalized Heads type.
Implemented in kagome::api::ChainApiImpl.
|
pure virtual |
Subscribes to events of New Heads type
Implemented in kagome::api::ChainApiImpl.
|
pure virtual |
Unsubscribes from events of Finalized Heads type.
Implemented in kagome::api::ChainApiImpl.
|
pure virtual |
Unsubscribes from events of New Heads type.
Implemented in kagome::api::ChainApiImpl.