mnemonic
Module containing common classes for mnemonic.
- class MnemonicLanguages(value)
Bases:
Enum
Base enum for mnemonic languages.
- class Mnemonic(mnemonic_list: List[str])
Bases:
object
Mnemonic class. It represents a generic mnemonic phrase. It acts as a simple container with some helper functions, so it doesn’t validate the given mnemonic.
- classmethod FromString(mnemonic_str: str) Mnemonic
Create a class from mnemonic string.
- Parameters:
mnemonic_str (str) – Mnemonic string
- Returns:
Mnemonic object
- Return type:
- classmethod FromList(mnemonic_list: List[str]) Mnemonic
Create a class from mnemonic list.
- Parameters:
mnemonic_list (list[str]) – Mnemonic list
- Returns:
Mnemonic object
- Return type:
- m_mnemonic_list: List[str]
- WordsCount() int
Get the words count.
- Returns:
Words count
- Return type:
int
- ToList() List[str]
Get the mnemonic as a list.
- Returns:
Mnemonic as a list
- Return type:
list[str]
- ToStr() str
Get the mnemonic as a string.
- Returns:
Mnemonic as a string
- Return type:
str
- __str__() str
Get the mnemonic as a string.
- Returns:
Mnemonic as a string
- Return type:
str