Skip to content

Support 12 word BIP39 entropy #1175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
richardanaya opened this issue Sep 18, 2023 · 4 comments
Open

Support 12 word BIP39 entropy #1175

richardanaya opened this issue Sep 18, 2023 · 4 comments

Comments

@richardanaya
Copy link

No description provided.

@gilmarwsr
Copy link

I created a PR..
#1179

@NicolaLS
Copy link

NicolaLS commented Apr 8, 2025

I think it would make more sense to add a "bip39" feature and then use the bip39 crate. Since most users will use this create with this feature it could be activated by default and there could be a --no-bip39 instead too.

  • Get rid of bits.rs
  • Fully support BIP-39 (not only 12, but also 15, 18, 21 words)

Let me know if you agree, I can also implement it if you want (or @gilmarwsr since they already opened a PR)

@tony-iqlusion
Copy link
Member

I think bip39 wasn't used before due to lack of no_std support but that has been corrected.

If someone wants to attempt it, it's something that could be considered.

@NicolaLS
Copy link

@tony-iqlusion I started working on it but noticed that the bip32 logic does not interact with any types/api from the mnemonic module anyways. The Xpriv/Xpub can be constructed from AsRef<[u8]> which works with the bip39 crate Mnemonic::to_seed (doc) which requires alloc feature.

So there is really no point in adding bip39 and re-exporting it, forwarding the features would clutter the Cargo.toml and the end-to-end ergonomics of creating a mnemonic and deriving an extended key from it would be the same, users just need to add bip39 separately. With the features alloc and rand_core.

I think it makes sense to just remove mnemonic.rs / mnemonic/ completely, it is out of scope for this crate anyways and the only reason that it was here was that bip39 did not support no-std which is now fixed. Do you agree ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants