Kagome
Polkadot Runtime Engine in C++17
methods.cpp
Go to the documentation of this file.
1 
7 
9 
11 
12  outcome::result<void> Methods::init(
13  const jsonrpc::Request::Parameters &params) {
14  if (!params.empty()) {
15  throw jsonrpc::InvalidParametersFault("Method should not have params");
16  }
17 
18  return outcome::success();
19  }
20 
21  outcome::result<primitives::RpcMethods> Methods::execute() {
22  OUTCOME_TRY(methods, api_->methods());
24  result.methods = std::move(methods);
25  return result;
26  }
27 
28 } // namespace kagome::api::rpc::request
outcome::result< void > init(const jsonrpc::Request::Parameters &params)
Definition: methods.cpp:12
std::shared_ptr< RpcApi > api_
Definition: methods.hpp:43
outcome::result< primitives::RpcMethods > execute()
Definition: methods.cpp:21
Methods methods
A set of methods names as strings.
Definition: rpc_methods.hpp:33