bip39_mnemonic_encoder

Module for BIP39 mnemonic encoding. Reference: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki

class Bip39MnemonicEncoder(lang: Bip39Languages = Bip39Languages.ENGLISH)

Bases: MnemonicEncoderBase

BIP39 mnemonic encoder class. It encodes bytes to the mnemonic phrase.

Encode(entropy_bytes: bytes) Mnemonic

Encode bytes to mnemonic phrase.

Parameters:

entropy_bytes (bytes) – Entropy bytes (accepted lengths in bits: 128, 160, 192, 224, 256)

Returns:

Encoded mnemonic

Return type:

Mnemonic object

Raises:

ValueError – If entropy is not valid

m_words_list: MnemonicWordsList