6 #ifndef KAGOME_RUNTIME_HOSTAPIIMPL 7 #define KAGOME_RUNTIME_HOSTAPIIMPL 28 class OffchainExtension;
38 std::shared_ptr<const runtime::MemoryProvider> memory_provider,
39 std::shared_ptr<const runtime::CoreApiFactory> core_provider,
40 std::shared_ptr<runtime::TrieStorageProvider> storage_provider,
41 std::shared_ptr<const crypto::Sr25519Provider> sr25519_provider,
42 std::shared_ptr<const crypto::EcdsaProvider> ecdsa_provider,
43 std::shared_ptr<const crypto::Ed25519Provider> ed25519_provider,
44 std::shared_ptr<const crypto::Secp256k1Provider> secp256k1_provider,
45 std::shared_ptr<const crypto::Hasher> hasher,
46 std::shared_ptr<crypto::CryptoStore> crypto_store,
47 std::shared_ptr<const crypto::Bip39Provider> bip39_provider,
48 std::shared_ptr<offchain::OffchainPersistentStorage>
49 offchain_persistent_storage,
50 std::shared_ptr<offchain::OffchainWorkerPool> offchain_worker_pool);
54 void reset()
override;
86 void ext_storage_start_transaction_version_1()
override;
88 void ext_storage_rollback_transaction_version_1()
override;
90 void ext_storage_commit_transaction_version_1()
override;
115 void ext_crypto_start_batch_verify_version_1()
override;
117 [[nodiscard]] int32_t ext_crypto_finish_batch_verify_version_1()
override;
158 int32_t ext_crypto_sr25519_verify_version_1(
183 int32_t ext_crypto_ecdsa_verify_version_1(
188 int32_t ext_crypto_ecdsa_verify_prehashed_version_1(
229 void ext_misc_print_num_version_1(uint64_t value)
const override;
244 void ext_offchain_sleep_until_version_1(
runtime::WasmU64 deadline)
override;
248 void ext_offchain_local_storage_set_version_1(
253 void ext_offchain_local_storage_clear_version_1(
291 void ext_offchain_set_authorized_nodes_version_1(
301 void ext_default_child_storage_set_version_1(
310 void ext_default_child_storage_clear_version_1(
320 void ext_default_child_storage_clear_prefix_version_1(
329 virtual uint32_t ext_default_child_storage_exists_version_1(
333 virtual void ext_default_child_storage_storage_kill_version_1(
337 static constexpr uint64_t DEFAULT_CHAIN_ID = 42;
352 #endif // KAGOME_RUNTIME_HOSTAPIIMPL
uint32_t WasmSize
Size type is uint32_t because we are working in 32 bit address space.
std::shared_ptr< runtime::TrieStorageProvider > storage_provider_
uint32_t WasmOffset
Offset type is uint32_t because we are working in 32 bit address space.
std::shared_ptr< const runtime::MemoryProvider > memory_provider_
StorageExtension storage_ext_
uint64_t WasmSpan
combination of pointer and size, where less significant part represents wasm pointer, and most significant represents size
uint32_t WasmEnum
Enum value is uint32_t.
ChildStorageExtension child_storage_ext_
uint32_t WasmPointer
type of wasm memory is 32 bit integer
CryptoExtension crypto_ext_
OffchainExtension offchain_ext_
MemoryExtension memory_ext_