Kagome
Polkadot Runtime Engine in C++17
ed25519_types.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_CRYPTO_ED25519_TYPES_HPP
7 #define KAGOME_CORE_CRYPTO_ED25519_TYPES_HPP
8 
9 extern "C" {
10 #include <schnorrkel/schnorrkel.h>
11 }
12 
13 #include "common/blob.hpp"
14 
15 namespace kagome::crypto {
16 
17  namespace constants::ed25519 {
21  enum {
22  PRIVKEY_SIZE = ED25519_SECRET_KEY_LENGTH,
23  PUBKEY_SIZE = ED25519_PUBLIC_KEY_LENGTH,
24  SIGNATURE_SIZE = ED25519_SIGNATURE_LENGTH,
26  };
27  } // namespace constants::ed25519
28 
29 } // namespace kagome::crypto
30 
32  Ed25519PrivateKey,
35  Ed25519PublicKey,
38  Ed25519Signature,
41  Ed25519Seed,
43 
44 namespace kagome::crypto {
45 
46  struct Ed25519Keypair {
47  Ed25519PrivateKey secret_key;
48  Ed25519PublicKey public_key;
49 
50  bool operator==(const Ed25519Keypair &other) const;
51  bool operator!=(const Ed25519Keypair &other) const;
52  };
53 
55  Ed25519Seed seed;
56  };
57 } // namespace kagome::crypto
58 
59 #endif // KAGOME_CORE_CRYPTO_ED25519_TYPES_HPP
bool operator==(const Unused< N > &, const Unused< N > &)
Definition: unused.hpp:27
KAGOME_BLOB_STRICT_TYPEDEF(kagome::crypto, Ed25519PrivateKey, constants::ed25519::PRIVKEY_SIZE)