6 #ifndef KAGOME_CRYPTO_EXTENSION_HPP 7 #define KAGOME_CRYPTO_EXTENSION_HPP 20 class Sr25519Provider;
22 class Ed25519Provider;
23 class Secp256k1Provider;
35 static constexpr uint32_t kVerifyBatchSuccess = 1;
36 static constexpr uint32_t kVerifyBatchFail = 0;
37 static constexpr uint32_t kVerifySuccess = 1;
38 static constexpr uint32_t kVerifyFail = 0;
41 std::shared_ptr<const runtime::MemoryProvider> memory_provider,
42 std::shared_ptr<const crypto::Sr25519Provider> sr25519_provider,
43 std::shared_ptr<const crypto::EcdsaProvider> ecdsa_provider,
44 std::shared_ptr<const crypto::Ed25519Provider> ed25519_provider,
45 std::shared_ptr<const crypto::Secp256k1Provider> secp256k1_provider,
46 std::shared_ptr<const crypto::Hasher> hasher,
47 std::shared_ptr<crypto::CryptoStore> crypto_store,
48 std::shared_ptr<const crypto::Bip39Provider> bip39_provider);
92 void ext_crypto_start_batch_verify_version_1();
147 int32_t ext_crypto_sr25519_verify_version_1(
152 int32_t ext_crypto_sr25519_verify_version_2(
207 int32_t ext_crypto_ecdsa_verify_prehashed_version_1(
216 return memory_provider_->getCurrentMemory()->get();
224 std::shared_ptr<const crypto::Hasher>
hasher_;
231 #endif // KAGOME_CRYPTO_EXTENSION_HPP
uint32_t WasmSize
Size type is uint32_t because we are working in 32 bit address space.
std::shared_ptr< const crypto::Ed25519Provider > ed25519_provider_
std::shared_ptr< const crypto::Secp256k1Provider > secp256k1_provider_
runtime::Memory & getMemory() const
std::shared_ptr< crypto::CryptoStore > crypto_store_
std::shared_ptr< soralog::Logger > Logger
uint64_t WasmSpan
combination of pointer and size, where less significant part represents wasm pointer, and most significant represents size
std::shared_ptr< const crypto::Sr25519Provider > sr25519_provider_
uint32_t WasmPointer
type of wasm memory is 32 bit integer
std::shared_ptr< const crypto::Bip39Provider > bip39_provider_
std::shared_ptr< const crypto::EcdsaProvider > ecdsa_provider_
std::shared_ptr< const runtime::MemoryProvider > memory_provider_
std::shared_ptr< const crypto::Hasher > hasher_