6 #ifndef KAGOME_CHAIN_API_IMPL_HPP 7 #define KAGOME_CHAIN_API_IMPL_HPP 27 ChainApiImpl(std::shared_ptr<blockchain::BlockHeaderRepository> block_repo,
28 std::shared_ptr<blockchain::BlockTree> block_tree,
29 std::shared_ptr<blockchain::BlockStorage> block_storage);
32 std::shared_ptr<api::ApiService>
const &api_service)
override;
34 outcome::result<BlockHash>
getBlockHash()
const override;
39 std::string_view value)
const override;
42 gsl::span<const ValueType> values)
const override;
45 std::string_view hash)
override {
50 outcome::result<primitives::BlockHeader>
getHeader()
override {
55 outcome::result<primitives::BlockData>
getBlock(
56 std::string_view hash)
override;
57 outcome::result<primitives::BlockData>
getBlock()
override;
63 uint32_t subscription_id)
override;
67 uint32_t subscription_id)
override;
79 #endif // KAGOME_CHAIN_API_IMPL_HPP outcome::result< primitives::BlockData > getBlock() override
outcome::result< uint32_t > subscribeNewHeads() override
outcome::result< primitives::BlockHeader > getHeader() override
outcome::result< void > unsubscribeFinalizedHeads(uint32_t subscription_id) override
std::shared_ptr< blockchain::BlockHeaderRepository > header_repo_
std::shared_ptr< blockchain::BlockStorage > block_storage_
primitives::BlockNumber BlockNumber
static outcome::result< Blob< size_ > > fromHexWithPrefix(std::string_view hex)
~ChainApiImpl() override=default
outcome::result< primitives::BlockHeader > getHeader(std::string_view hash) override
std::shared_ptr< blockchain::BlockTree > block_tree_
OUTCOME_HPP_DECLARE_ERROR(kagome::api, ChainApiImpl::Error)
ChainApiImpl(std::shared_ptr< blockchain::BlockHeaderRepository > block_repo, std::shared_ptr< blockchain::BlockTree > block_tree, std::shared_ptr< blockchain::BlockStorage > block_storage)
outcome::result< primitives::BlockHash > getFinalizedHead() const override
outcome::result< BlockHash > getBlockHash() const override
std::weak_ptr< api::ApiService > api_service_
void setApiService(std::shared_ptr< api::ApiService > const &api_service) override
outcome::result< uint32_t > subscribeFinalizedHeads() override
outcome::result< void > unsubscribeNewHeads(uint32_t subscription_id) override