CatapultServer  v0.5.0.1 (Elephant)
ChainApi.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "ApiTypes.h"
25 #include "catapult/thread/Future.h"
27 
28 namespace catapult { namespace api {
29 
31  struct ChainInfo {
34 
37  };
38 
40  class ChainApi : public utils::NonCopyable {
41  public:
42  virtual ~ChainApi() = default;
43 
44  public:
46  virtual thread::future<ChainInfo> chainInfo() const = 0;
47 
49  virtual thread::future<model::HashRange> hashesFrom(Height height, uint32_t maxHashes) const = 0;
50  };
51 }}
catapult::api::ChainApi::~ChainApi
virtual ~ChainApi()=default
catapult::api::ChainApi
An api for retrieving chain information from a node.
Definition: ChainApi.h:40
catapult::utils::BaseValue< uint64_t, Height_tag >
catapult::model::ChainScore
Definition: ChainScore.h:30
catapult::api::ChainApi::hashesFrom
virtual thread::future< model::HashRange > hashesFrom(Height height, uint32_t maxHashes) const =0
Gets at most maxHashes hashes starting at height.
ApiTypes.h
catapult::thread::future
Provides a way to access the result of an asynchronous operation.
Definition: Future.h:29
ChainScore.h
catapult::api::ChainInfo
Information about a chain.
Definition: ChainApi.h:31
catapult::api::ChainInfo::Score
model::ChainScore Score
Chain score.
Definition: ChainApi.h:36
catapult
Definition: AddressExtractionExtension.cpp:28
Future.h
catapult::utils::NonCopyable
A class that can neither be copied nor moved.
Definition: NonCopyable.h:26
catapult::api::ChainInfo::Height
catapult::Height Height
Chain height.
Definition: ChainApi.h:33
catapult::api::ChainApi::chainInfo
virtual thread::future< ChainInfo > chainInfo() const =0
Gets information about the chain.
RangeTypes.h
NonCopyable.h