Kagome
Polkadot Runtime Engine in C++17
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
author_jrpc_processor.cpp
Go to the documentation of this file.
1
6
#include "
api/service/author/author_jrpc_processor.hpp
"
7
8
#include "
api/jrpc/jrpc_method.hpp
"
9
#include "
api/service/author/requests/has_key.hpp
"
10
#include "
api/service/author/requests/has_session_keys.hpp
"
11
#include "
api/service/author/requests/insert_key.hpp
"
12
#include "
api/service/author/requests/pending_extrinsics.hpp
"
13
#include "
api/service/author/requests/rotate_keys.hpp
"
14
#include "
api/service/author/requests/submit_and_watch_extrinsic.hpp
"
15
#include "
api/service/author/requests/submit_extrinsic.hpp
"
16
#include "
api/service/author/requests/unwatch_extrinsic.hpp
"
17
18
namespace
kagome::api::author
{
19
20
AuthorJRpcProcessor::AuthorJRpcProcessor
(std::shared_ptr<JRpcServer> server,
21
std::shared_ptr<AuthorApi> 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>
28
using
Handler
=
kagome::api::Method<Request, AuthorApi>
;
29
30
void
AuthorJRpcProcessor::registerHandlers
() {
31
server_
->registerHandler(
"author_submitExtrinsic"
,
32
Handler<request::SubmitExtrinsic>
(
api_
));
33
34
server_
->registerHandler(
"author_insertKey"
,
35
Handler<request::InsertKey>
(
api_
));
36
37
server_
->registerHandler(
"author_hasSessionKeys"
,
38
Handler<request::HasSessionKeys>
(
api_
));
39
40
server_
->registerHandler(
"author_hasKey"
,
Handler<request::HasKey>
(
api_
));
41
42
server_
->registerHandler(
"author_rotateKeys"
,
43
Handler<request::RotateKeys>
(
api_
));
44
45
server_
->registerHandler(
"author_submitAndWatchExtrinsic"
,
46
Handler<request::SubmitAndWatchExtrinsic>
(
api_
));
47
48
server_
->registerHandler(
"author_unwatchExtrinsic"
,
49
Handler<request::UnwatchExtrinsic>
(
api_
));
50
51
server_
->registerHandler(
"author_pendingExtrinsics"
,
52
Handler<request::PendingExtrinsics>
(
api_
));
53
}
54
55
}
// namespace kagome::api::author
rotate_keys.hpp
has_key.hpp
pending_extrinsics.hpp
unwatch_extrinsic.hpp
author_jrpc_processor.hpp
kagome::api::author::AuthorJRpcProcessor::registerHandlers
void registerHandlers() override
registers callbacks for jrpc request
Definition:
author_jrpc_processor.cpp:30
kagome::api::author::AuthorJRpcProcessor::AuthorJRpcProcessor
AuthorJRpcProcessor(std::shared_ptr< JRpcServer > server, std::shared_ptr< AuthorApi > api)
Definition:
author_jrpc_processor.cpp:20
kagome::api::author::AuthorJRpcProcessor::api_
std::shared_ptr< AuthorApi > api_
Definition:
author_jrpc_processor.hpp:26
submit_extrinsic.hpp
kagome::api::author::AuthorJRpcProcessor::server_
std::shared_ptr< JRpcServer > server_
Definition:
author_jrpc_processor.hpp:27
submit_and_watch_extrinsic.hpp
kagome::api::Method
Definition:
jrpc_method.hpp:20
jrpc_method.hpp
kagome::api::author
Definition:
author_jrpc_processor.cpp:18
has_session_keys.hpp
insert_key.hpp
core
api
service
author
author_jrpc_processor.cpp
Generated by
1.8.11