#mnemonic #bip-39 #bitcoin #crypto

no-std bip0039

Another Rust implementation of BIP-0039 standard

10 releases (6 breaking)

0.12.0 Feb 19, 2024
0.11.0 Nov 22, 2022
0.10.1 Dec 14, 2021
0.9.0 Aug 30, 2021
0.6.0 Jan 7, 2020

#11 in #bip-39

Download history 2079/week @ 2024-06-29 2536/week @ 2024-07-06 3741/week @ 2024-07-13 4588/week @ 2024-07-20 4141/week @ 2024-07-27 4672/week @ 2024-08-03 3647/week @ 2024-08-10 5011/week @ 2024-08-17 3973/week @ 2024-08-24 3143/week @ 2024-08-31 3159/week @ 2024-09-07 2241/week @ 2024-09-14 3775/week @ 2024-09-21 3988/week @ 2024-09-28 3042/week @ 2024-10-05 4204/week @ 2024-10-12

15,398 downloads per month
Used in 11 crates (4 directly)

MIT/Apache

320KB
12K SLoC

bip0039

gha-svg crates-svg docs-svg msrv-svg

Another Rust implementation of BIP-0039 standard.

Usage

Generate a random BIP-0039 mnemonic in English.

use bip0039::{Count, English, Mnemonic};

// Generates an English mnemonic with 12 words randomly
let mnemonic = <Mnemonic<English>>::generate(Count::Words12);
// Or use the default generic type (English) of struct Mnemonic.
let mnemonic = <Mnemonic>::generate(Count::Words12);
// Gets the phrase
let phrase = mnemonic.phrase();
// Generates the HD wallet seed from the mnemonic and the passphrase.
let seed = mnemonic.to_seed("");

Documentation

See documentation and examples at https://docs.rs/bip0039.

Features

  • Support all languages in the BIP-0039 Word Lists
    • English
    • Japanese
    • Korean
    • Spanish
    • Chinese (Simplified)
    • Chinese (Traditional)
    • French
    • Italian
    • Czech
    • Portuguese
  • Support no_std environment

Alternatives

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1.3–1.8MB
~47K SLoC