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§
pub use self::language::ChineseSimplified;
pub use self::language::ChineseTraditional;
pub use self::language::Czech;
pub use self::language::French;
pub use self::language::Italian;
pub use self::language::Japanese;
pub use self::language::Korean;
pub use self::language::Portuguese;
pub use self::language::Spanish;
pub use self::language::English;
pub use self::language::Language;
Modules§
- Supported languages for BIP-0039.
Structs§
- A mnemonic representation.
Enums§
- Determines the words count that will be present in a
Mnemonic
phrase. - The BIP-0039 error.