Kagome
Polkadot Runtime Engine in C++17
core_api_factory.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_RUNTIME_CORE_API_FACTORY_IMPL_HPP
7 #define KAGOME_CORE_RUNTIME_CORE_API_FACTORY_IMPL_HPP
8 
9 #include <memory>
10 #include <vector>
11 
12 namespace kagome::host_api {
13  class HostApiFactory;
14 }
15 
16 namespace kagome::crypto {
17  class Hasher;
18 }
19 
20 namespace kagome::runtime {
21 
22  class Core;
23 
29  public:
30  virtual ~CoreApiFactory() = default;
31 
32  [[nodiscard]] virtual std::unique_ptr<Core> make(
33  std::shared_ptr<const crypto::Hasher> hasher,
34  const std::vector<uint8_t> &runtime_code) const = 0;
35  };
36 
37 } // namespace kagome::runtime
38 
39 #endif // KAGOME_CORE_RUNTIME_CORE_API_FACTORY_IMPL_HPP