Kagome
Polkadot Runtime Engine in C++17
rotate_keys.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_REQUESTS_ROTATE_KEYS_HPP
7 #define KAGOME_REQUESTS_ROTATE_KEYS_HPP
8 
9 #include <jsonrpc-lean/request.h>
10 
13 #include "outcome/outcome.hpp"
14 
16 
17  class RotateKeys final : public details::RequestType<common::Buffer> {
18  public:
19  explicit RotateKeys(std::shared_ptr<AuthorApi> api) : api_(std::move(api)) {
20  BOOST_ASSERT(api_);
21  };
22 
23  outcome::result<Return> execute() override {
24  return api_->rotateKeys();
25  }
26 
27  private:
28  std::shared_ptr<AuthorApi> api_;
29  };
30 
31 } // namespace kagome::api::author::request
32 
33 #endif // KAGOME_REQUESTS_ROTATE_KEYS_HPP
STL namespace.
std::shared_ptr< AuthorApi > api_
Definition: rotate_keys.hpp:28
RotateKeys(std::shared_ptr< AuthorApi > api)
Definition: rotate_keys.hpp:19
outcome::result< Return > execute() override
Definition: rotate_keys.hpp:23