Kagome
Polkadot Runtime Engine in C++17
system_jrpc_processor.cpp
Go to the documentation of this file.
1 
7 
17 
18 namespace kagome::api::system {
19 
20  SystemJrpcProcessor::SystemJrpcProcessor(std::shared_ptr<JRpcServer> server,
21  std::shared_ptr<SystemApi> api)
22  : api_{std::move(api)}, server_{std::move(server)} {
23  BOOST_ASSERT(api_ != nullptr);
24  BOOST_ASSERT(server_ != nullptr);
25  }
26 
27  template <typename Request>
29 
31  server_->registerHandler("system_chain", Handler<request::Chain>(api_));
32 
33  server_->registerHandler("system_chainType",
35 
36  server_->registerHandler("system_health", Handler<request::Health>(api_));
37 
38  server_->registerHandler("system_name", Handler<request::Name>(api_));
39 
40  server_->registerHandler("system_properties",
42 
43  server_->registerHandler("system_version", Handler<request::Version>(api_));
44 
45  server_->registerHandler("system_accountNextIndex",
47  server_->registerHandler(
48  "account_nextIndex",
50 
51  server_->registerHandler("system_peers", Handler<request::Peers>(api_));
52  }
53 
54 } // namespace kagome::api::system
void registerHandlers() override
registers callbacks for jrpc request
SystemJrpcProcessor(std::shared_ptr< JRpcServer > server, std::shared_ptr< SystemApi > api)