Kagome
Polkadot Runtime Engine in C++17
secp256k1_provider.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CRYPTO_SECP256K1_PROVIDER_HPP
7 #define KAGOME_CRYPTO_SECP256K1_PROVIDER_HPP
8 
10 #include "outcome/outcome.hpp"
11 
12 namespace kagome::crypto {
13 
18  public:
19  virtual ~Secp256k1Provider() = default;
20 
27  virtual outcome::result<secp256k1::UncompressedPublicKey>
29  const secp256k1::RSVSignature &signature,
30  const secp256k1::MessageHash &message_hash) const = 0;
31 
38  virtual outcome::result<secp256k1::CompressedPublicKey>
40  const secp256k1::RSVSignature &signature,
41  const secp256k1::MessageHash &message_hash) const = 0;
42  };
43 
44 } // namespace kagome::crypto
45 
46 #endif // KAGOME_CRYPTO_SECP256K1_PROVIDER_HPP
virtual ~Secp256k1Provider()=default
virtual outcome::result< secp256k1::CompressedPublicKey > recoverPublickeyCompressed(const secp256k1::RSVSignature &signature, const secp256k1::MessageHash &message_hash) const =0
recover public key in compressed form
virtual outcome::result< secp256k1::UncompressedPublicKey > recoverPublickeyUncompressed(const secp256k1::RSVSignature &signature, const secp256k1::MessageHash &message_hash) const =0
recover public key in uncompressed form