Crate bip0039

source ·
Expand description

Another Rust implementation of BIP-0039 standard.

§Usage

use bip0039::{Count, Mnemonic};

// Generates an English mnemonic with 12 words randomly
let mnemonic = <Mnemonic>::generate(Count::Words12);
let phrase = mnemonic.phrase();
println!("phrase: {}", phrase);

// Generates the HD wallet seed from the mnemonic and the passphrase.
let seed = mnemonic.to_seed("");
println!("seed: {}", hex::encode(&seed[..]));
use bip0039::{ChineseSimplified, Count, Mnemonic};

// Generates a Simplified Chinese mnemonic with 12 words randomly
let mnemonic = <Mnemonic<ChineseSimplified>>::generate(Count::Words12);
println!("phrase: {}", mnemonic.phrase());

Re-exports§

Modules§

  • Supported languages for BIP-0039.

Structs§

Enums§

  • Determines the words count that will be present in a Mnemonic phrase.
  • The BIP-0039 error.