Kagome
Polkadot Runtime Engine in C++17
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dictionary.hpp
Go to the documentation of this file.
1
6
#ifndef KAGOME_CRYPTO_BIP39_DICTIONARIES_HPP
7
#define KAGOME_CRYPTO_BIP39_DICTIONARIES_HPP
8
9
#include "
crypto/bip39/entropy_accumulator.hpp
"
10
#include "
outcome/outcome.hpp
"
11
12
#include <unordered_map>
13
14
namespace
kagome::crypto::bip39
{
15
16
enum class
DictionaryError
{
17
ENTRY_NOT_FOUND
= 1,
18
};
19
24
class
Dictionary
{
25
public
:
29
void
initialize();
30
36
outcome::result<EntropyToken> findValue(std::string_view word)
const
;
37
38
private
:
39
std::unordered_map<std::string_view, EntropyToken>
entropy_map_
;
40
};
41
}
// namespace kagome::crypto::bip39
42
43
OUTCOME_HPP_DECLARE_ERROR
(
kagome::crypto::bip39
,
DictionaryError
);
44
45
#endif // KAGOME_CRYPTO_BIP39_DICTIONARIES_HPP
OUTCOME_HPP_DECLARE_ERROR
OUTCOME_HPP_DECLARE_ERROR(kagome::crypto::bip39, DictionaryError)
kagome::crypto::bip39::Dictionary::entropy_map_
std::unordered_map< std::string_view, EntropyToken > entropy_map_
Definition:
dictionary.hpp:39
kagome::crypto::bip39::Dictionary
Definition:
dictionary.hpp:24
outcome.hpp
kagome::crypto::bip39::DictionaryError
DictionaryError
Definition:
dictionary.hpp:16
kagome::crypto::bip39
Definition:
bip39_types.hpp:11
kagome::crypto::bip39::DictionaryError::ENTRY_NOT_FOUND
entropy_accumulator.hpp
core
crypto
bip39
dictionary.hpp
Generated by
1.8.11