Kagome
Polkadot Runtime Engine in C++17
version.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_API_SYSTEM_REQUEST_VERSION
7 #define KAGOME_API_SYSTEM_REQUEST_VERSION
8 
9 #include <jsonrpc-lean/request.h>
10 
11 #include "outcome/outcome.hpp"
12 
13 namespace kagome::api {
14  class SystemApi;
15 }
16 
18 
23  class Version final {
24  public:
25  Version(const Version &) = delete;
26  Version &operator=(const Version &) = delete;
27 
28  Version(Version &&) = default;
29  Version &operator=(Version &&) = default;
30 
31  explicit Version(std::shared_ptr<SystemApi> api);
32  ~Version() = default;
33 
34  outcome::result<void> init(const jsonrpc::Request::Parameters &params);
35 
36  outcome::result<std::string> execute();
37 
38  private:
39  std::shared_ptr<SystemApi> api_;
40  };
41 
42 } // namespace kagome::api::system::request
43 
44 #endif // KAGOME_API_SYSTEM_REQUEST_VERSION
Version & operator=(const Version &)=delete
Version(const Version &)=delete
Get the node implementation&#39;s version. Should be a semver string.
Definition: version.hpp:23
outcome::result< void > init(const jsonrpc::Request::Parameters &params)
Definition: version.cpp:18
outcome::result< std::string > execute()
Definition: version.cpp:26
std::shared_ptr< SystemApi > api_
Definition: version.hpp:39