Kagome
Polkadot Runtime Engine in C++17
offchain_worker_api.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_RUNTIME_OFFCHAINWORKERAPI
7 #define KAGOME_RUNTIME_OFFCHAINWORKERAPI
8 
9 #include "outcome/outcome.hpp"
11 #include "primitives/common.hpp"
12 
13 namespace kagome::runtime {
14 
16  public:
17  virtual ~OffchainWorkerApi() = default;
18 
24  virtual outcome::result<void> offchain_worker(
25  const primitives::BlockHash &block,
26  const primitives::BlockHeader &header) = 0;
27  };
28 
29 } // namespace kagome::runtime
30 
31 #endif // KAGOME_RUNTIME_OFFCHAINWORKER
virtual outcome::result< void > offchain_worker(const primitives::BlockHash &block, const primitives::BlockHeader &header)=0
calls offchain_worker method of OffchainWorker runtime api
virtual ~OffchainWorkerApi()=default