Kagome
Polkadot Runtime Engine in C++17
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
payment_jrpc_processor.cpp
Go to the documentation of this file.
1
6
#include "
api/service/payment/payment_jrpc_processor.hpp
"
7
8
#include <boost/assert.hpp>
9
10
#include "
api/jrpc/jrpc_method.hpp
"
11
#include "
api/jrpc/jrpc_server.hpp
"
12
13
#include "
api/service/payment/requests/query_info.hpp
"
14
15
namespace
kagome::api::payment
{
16
17
PaymentJRpcProcessor::PaymentJRpcProcessor
(std::shared_ptr<JRpcServer> server,
18
std::shared_ptr<PaymentApi> 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>
25
using
Handler
=
Method<Request, PaymentApi>
;
26
27
void
PaymentJRpcProcessor::registerHandlers
() {
28
server_
->registerHandler(
"payment_queryInfo"
,
29
Handler<request::QueryInfo>
(
api_
));
30
}
31
32
}
// namespace kagome::api::payment
payment_jrpc_processor.hpp
kagome::api::payment::PaymentJRpcProcessor::api_
std::shared_ptr< PaymentApi > api_
Definition:
payment_jrpc_processor.hpp:28
query_info.hpp
kagome::api::payment
Definition:
payment_jrpc_processor.cpp:15
jrpc_server.hpp
kagome::api::payment::PaymentJRpcProcessor::registerHandlers
void registerHandlers() override
registers callbacks for jrpc request
Definition:
payment_jrpc_processor.cpp:27
kagome::api::Method
Definition:
jrpc_method.hpp:20
jrpc_method.hpp
kagome::api::payment::PaymentJRpcProcessor::PaymentJRpcProcessor
PaymentJRpcProcessor(std::shared_ptr< JRpcServer > server, std::shared_ptr< PaymentApi > api)
Definition:
payment_jrpc_processor.cpp:17
kagome::api::payment::PaymentJRpcProcessor::server_
std::shared_ptr< JRpcServer > server_
Definition:
payment_jrpc_processor.hpp:29
core
api
service
payment
payment_jrpc_processor.cpp
Generated by
1.8.11