jmwallet.mnemonic
jmwallet.mnemonic
BIP39 mnemonic generation from operating-system entropy.
Attributes
SUPPORTED_ENTROPY_BITS = frozenset({128, 160, 192, 224, 256})
module-attribute
Classes
EntropySourceError
Bases: RuntimeError
Raised when the operating-system entropy source violates its contract.
Source code in jmwallet/src/jmwallet/mnemonic.py
12 13 | |
Functions:
generate_wallet_entropy(strength: int = 256) -> bytes
Return a supported BIP39 entropy length from the operating-system CSPRNG.
Source code in jmwallet/src/jmwallet/mnemonic.py
16 17 18 19 20 21 22 23 24 25 26 27 28 | |
generate_wallet_mnemonic(strength: int = 256) -> str
Generate an English BIP39 mnemonic from operating-system entropy.
Source code in jmwallet/src/jmwallet/mnemonic.py
40 41 42 | |
mnemonic_from_entropy(entropy: bytes) -> str
Encode supported raw entropy as an English BIP39 mnemonic.
Source code in jmwallet/src/jmwallet/mnemonic.py
31 32 33 34 35 36 37 | |