Added Mnemonic Interface#219
Conversation
|
This looks good, can you also add a |
|
Added the |
|
I think this one is ready to go. I tested it by running also a quick test in import org.bitcoindevkit.*
val network = Network.TESTNET
val mnemonic = Mnemonic(WordCount.WORDS12)
println("mnemonic = ${mnemonic.asString()}")
val descriptorSecKey = DescriptorSecretKey(network, mnemonic, null)
println("descriptorSecKey = ${descriptorSecKey.asString()}")
println("mnemonic = ${mnemonic.asString()}") |
|
Also since this is calling |
|
Just to be clear the "changes" I'm requesting are regarding the documentation. The mnemonic generation is a bit weird to me but I don't want to block this PR on it. Just hoping to start a discussion. Also: hey glad to see you back @dhruv-1001! It's awesome to see a Summer of Bitcoin student contributing again after the summer is over! 🚀 🚀 |
Description
This PR adds
interface Mnemonicwhich will make the API to generate new DescriptorSecretKey have type-safe arguments.Notes to the reviewers
This PR doesn't have any issue linked to it, as it was discusses on a call during the implementation of
DescriptorSecretKey(PR #154). It was discussed to makeMnemonican interface and use that instead of stringMnemonicso that the API to generateDescriptorSecretKeydoesn't have any potential failure (like in case it's provided with incorrect Mnemonic words).APIs added
Along with some changes to
DescriptorSecretKey::new()to fit these new APIsChangelog notice
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
Bugfixes:
generate_mnemonic(...)was removed