Add ability to retrieve private keys as bytes#199
Add ability to retrieve private keys as bytes#199thunderbiscuit merged 4 commits intobitcoindevkit:masterfrom
Conversation
1d08b6a to
3585c0b
Compare
3585c0b to
33c185f
Compare
403af63 to
cdd2a64
Compare
|
|
||
| DescriptorPublicKey as_public(); | ||
|
|
||
| sequence<u8> secret_key_bytes(); |
There was a problem hiding this comment.
How about shortening the name to secret_bytes() same as the internal bdk function?
There was a problem hiding this comment.
Yeah let's do it. In this case I had made a deliberate choice because I actually don't like the API, (DescriptorSecretKey.secret_bytes? it's not explicit to me that it's about to return you the secret key). But I agree we should stick to the names we have in the Rust libs (and if I don't like it I should take it up with the upstream! haha).
Fixed.
|
To answer your question in the descriptor, yes, since we're only internally storing extended keys there's no chance it will be a single key. My current thinking is to add a new construction for |
notmandatory
left a comment
There was a problem hiding this comment.
utACK 1b9bd6d
Up to you if you'd also like to shorten the function name to secret_bytes().
390cd48 to
432e432
Compare
This feature is needed for compatibility with LDKLite, where the initial entropy given to LDK is the private key of the root of the BIP32 derivation tree. Closes bitcoindevkit#188
432e432 to
1cc9afa
Compare
This feature is needed for compatibility with LDKLite, where the initial entropy given to LDK is the private key of the root of the BIP32 derivation tree.
Closes #188
Description
Changelog notice
APIs Added: - Add `secret_key_bytes()` method on the `DescriptorSecretKey` [#199] [#199](https://github.com/bitcoindevkit/bdk-ffi/pull/199)Notes to the reviewers
I just want to make sure I understand why the
BdkDescriptorSecretKey::SinglePriv(_)is unreachable (will fix the code to add theunreachable!()if my understanding is correct. Is it because we currently only build the DescriptorSecretKey from mnemonics, and always make them extendable?All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
CHANGELOG.md