Kagome
Polkadot Runtime Engine in C++17
rpc_jrpc_processor.cpp
Go to the documentation of this file.
1 
7 
10 
11 namespace kagome::api::rpc {
12 
13  RpcJRpcProcessor::RpcJRpcProcessor(std::shared_ptr<JRpcServer> server,
14  std::shared_ptr<RpcApi> api)
15  : api_{std::move(api)}, server_{std::move(server)} {
16  BOOST_ASSERT(api_ != nullptr);
17  BOOST_ASSERT(server_ != nullptr);
18  }
19 
20  template <typename Request>
22 
24  server_->registerHandler("rpc_methods", Handler<request::Methods>(api_));
25  }
26 
27 } // namespace kagome::api::rpc
RpcJRpcProcessor(std::shared_ptr< JRpcServer > server, std::shared_ptr< RpcApi > api)
std::shared_ptr< JRpcServer > server_
void registerHandlers() override
registers callbacks for jrpc request