Kagome
Polkadot Runtime Engine in C++17
mnemonic.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CRYPTO_BIP39_MNEMONIC_HPP
7 #define KAGOME_CRYPTO_BIP39_MNEMONIC_HPP
8 
9 #include <string>
10 #include <vector>
11 
12 #include "outcome/outcome.hpp"
13 
14 namespace kagome::crypto::bip39 {
15  enum class MnemonicError {
16  INVALID_MNEMONIC = 1,
17  };
18 
19  struct Mnemonic {
20  std::vector<std::string> words;
21  std::string password;
27  static outcome::result<Mnemonic> parse(std::string_view phrase);
28  };
29 } // namespace kagome::crypto::bip39
30 
32 
33 #endif // KAGOME_CRYPTO_BIP39_MNEMONIC_HPP
OUTCOME_HPP_DECLARE_ERROR(kagome::crypto::bip39, MnemonicError)
std::vector< std::string > words
Definition: mnemonic.hpp:20