mutiny-node
mutiny-node copied to clipboard
Support BIP-39 passphrase
Currently we just hard coded an empty string as the passphrase, we could allow the user to set this.
This will need to be correctly set when creating the keys manager, bdk, wallet, and auth manager.
A good follow on would be to unify some logic so we aren't having this duplicate code in multiple places.
Happy to take this on. Can you point out to where this takes place? I tried looking at keygenerator but just want to be sure.
Happy to take this on. Can you point out to where this takes place? I tried looking at keygenerator but just want to be sure.
There's a few places where we call mnemonic.to_seed("")
. You'll want to switch out the ""
to a parameter and find everywhere we call it and make sure we use that bip39 passphrase. It should probably be an optional string and we can just default to the empty string if it is None
Here's one place https://github.com/MutinyWallet/mutiny-node/blob/master/mutiny-core/src/lib.rs#L127
Sorry for the delay, had some work come up. How can I test this? Any unit tests in place I could use?
https://github.com/MutinyWallet/mutiny-node/blob/3e8a0d114f7c59738137371fa3a8cfaed637e5e0/mutiny-core/src/keymanager.rs#L257
this test should break if you have a bip39 passphrase set
I thought I had a PR raised for this, but I must've forgot! Fixing this now!