Kagome
Polkadot Runtime Engine in C++17
name.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_API_SYSTEM_REQUEST_NAME
7 #define KAGOME_API_SYSTEM_REQUEST_NAME
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 Name final {
24  public:
25  Name(const Name &) = delete;
26  Name &operator=(const Name &) = delete;
27 
28  Name(Name &&) = default;
29  Name &operator=(Name &&) = default;
30 
31  explicit Name(std::shared_ptr<SystemApi> api);
32  ~Name() = 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_NAME
Get the node&#39;s implementation name.
Definition: name.hpp:23
outcome::result< void > init(const jsonrpc::Request::Parameters &params)
Definition: name.cpp:16
std::shared_ptr< SystemApi > api_
Definition: name.hpp:39
outcome::result< std::string > execute()
Definition: name.cpp:23
Name & operator=(const Name &)=delete