Kagome
Polkadot Runtime Engine in C++17
child_state_jrpc_processor.cpp
Go to the documentation of this file.
1 
7 
14 
16 
18  std::shared_ptr<JRpcServer> server, std::shared_ptr<ChildStateApi> api)
19  : api_{std::move(api)}, server_{std::move(server)} {
20  BOOST_ASSERT(api_ != nullptr);
21  BOOST_ASSERT(server_ != nullptr);
22  }
23 
24  template <typename Request>
26 
28  server_->registerHandler("childstate_getKeys",
30 
31  server_->registerHandler("childstate_getKeysPaged",
33 
34  server_->registerHandler("childstate_getStorage",
36 
37  // duplicate of `childstate_getStorage`. Required for compatibility with
38  // some clients
39  server_->registerHandler("childstate_getStorageAt",
41 
42  server_->registerHandler("childstate_getStorageHash",
44 
45  // duplicate of `childstate_getStorageHash`. Required for compatibility with
46  // some client
47  server_->registerHandler("childstate_getStorageHashAt",
49 
50  server_->registerHandler("childstate_getStorageSize",
52 
53  // duplicate of `childstate_getStorageSize`. Required for compatibility with
54  // some client
55  server_->registerHandler("childstate_getStorageSizeAt",
57  }
58 
59 } // namespace kagome::api::child_state
void registerHandlers() override
registers callbacks for jrpc request
ChildStateJrpcProcessor(std::shared_ptr< JRpcServer > server, std::shared_ptr< ChildStateApi > api)