Registry / crypto / bip39
library2.2.2rscratesunverified

Library for BIP-39 Bitcoin mnemonic codes used in cryptocurrency wallets.

# Cargo.toml [dependencies] bip39 = "2.2.2"
INSTALL
IMPORT
SIG · BIP39
B
bip39
cryptorustv2.2.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Mnemonic
use bip39::Mnemonic;

Generates a 12-word BIP-39 mnemonic phrase in English.

use bip39::{Mnemonic, Language}; fn main() -> Result<(), Box<dyn std::error::Error>> { let mnemonic = Mnemonic::generate_in(Language::English, 12)?; println!("{}", mnemonic); Ok(()) }
Debug
Known issues
gotchaThe default word count is 12; for higher security use 24 words.
fix
Use Mnemonic::generate_in(Language::English, 24) for 24-word phrases.
affects: >=2.0.0
Upgrade
Version history
2.2.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
20
Resources
bip39 — cargo add bip39 · libregistry