-
Notifications
You must be signed in to change notification settings - Fork 55
Added Mnemonic Interface #219
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
Added Mnemonic Interface #219
Conversation
This looks good, can you also add a |
215399e
to
4b69e3b
Compare
Added the |
4b69e3b
to
1390423
Compare
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! 🚀 🚀 |
1390423
to
9866649
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 9866649.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 9866649
Description
This PR adds
interface Mnemonic
which 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 makeMnemonic
an interface and use that instead of stringMnemonic
so that the API to generateDescriptorSecretKey
doesn'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 fmt
andcargo clippy
before committingNew Features:
Bugfixes:
generate_mnemonic(...)
was removed