Kagome
Polkadot Runtime Engine in C++17
kagome::crypto::bip39::Dictionary Class Reference

#include <dictionary.hpp>

Collaboration diagram for kagome::crypto::bip39::Dictionary:

Public Member Functions

void initialize ()
 initializes dictionary More...
 
outcome::result< EntropyTokenfindValue (std::string_view word) const
 looks for word in dictionary More...
 

Private Attributes

std::unordered_map< std::string_view, EntropyTokenentropy_map_
 

Detailed Description

provides correspondence between mnemonic words and entropy value. Only english dictionary is supported for now

Definition at line 24 of file dictionary.hpp.

Member Function Documentation

outcome::result< EntropyToken > kagome::crypto::bip39::Dictionary::findValue ( std::string_view  word) const

looks for word in dictionary

Parameters
wordword to look for
Returns
entropy value or error if not found

Definition at line 22 of file dictionary.cpp.

void kagome::crypto::bip39::Dictionary::initialize ( )

initializes dictionary

Definition at line 14 of file dictionary.cpp.

Member Data Documentation

std::unordered_map<std::string_view, EntropyToken> kagome::crypto::bip39::Dictionary::entropy_map_
private

Definition at line 39 of file dictionary.hpp.


The documentation for this class was generated from the following files: