Expand description
BIP39 mnemonic conversion for KDK.
Each *_mnemonic pipeline returns a GameMnemonic<O, W> — a
sensitive wrapper carrying an origin marker O (e.g.
kdk_entropy::Coin, kdk_entropy::Dice<F>,
kdk_entropy::Deck<C>) and the BIP39 word count
W in [12, 15, 18, 21, 24].
Supported word counts are gated by Cargo features. Defaults
(words-12, words-24) enable the Krux-compatible 12 and 24-word
mnemonics; extended enables 15/18/21-word.
Structs§
- Game
Mnemonic - Sensitive BIP39 mnemonic wrapper.
Ois a zero-sized origin marker (e.g.kdk_entropy::Coin,kdk_entropy::Dice<F>,kdk_entropy::Deck<C>) andWis the word count (12 / 15 / 18 / 21 / 24).
Enums§
- Mnemonic
Error - Errors returned by the conversion functions.
Traits§
- Sensitive
Game - Contract for any entropy-source (“game”) that can produce a BIP39
mnemonic. Implementers supply only [
to_entropy]. Per-W.
Functions§
- dice_
mnemonic - Dice rolls to BIP39 mnemonic.
FACESis the die size andWthe word count; the matchingwords-<W>Cargo feature must be enabled. - entropy_
to_ mnemonic - Pre-built entropy bytes sets to a BIP39 GameMnemonic<O,W>. Validates that
Wis enabled and thatNmatches its BIP39 byte count, then wraps the produced [bip39::Mnemonic].
Type Aliases§
- Dice
Mnemonic - Dice-roll BIP39 mnemonic.
FACESis the die size (e.g. 6, 20);Wis the word countin [12, 15, 18, 21, 24].