Conversation
|
I'd rather not have a separate key file for this feature and try to protect it with a password and all that. This More importantly the use of bip322 as I understand it is to be able to sign a message using what ever bitcoin descriptor script your bitcoin wallet has. If you have a private key descriptor you should be able to sign the invalid input message transaction, and if not you should still be able to create a PSBT that your hardware signers can sign. Does that make sense? Also have you seen the bdk-reserves crate? it does something similar. |
Still actively working on this. Will push updates once I'm done (likely within this week). |
|
Hi @aagbotemi, can you rebase and fix the CI failures? |
tvpeter
left a comment
There was a problem hiding this comment.
This PR is similar to the reserves feature that was taken out in the v1.0 update.
@aagbotemi, please consider changing bip322 feature flag to reserves.
Also, after rebasing, check whether there is need to update the workflows. I would prefer the workflows to go in a separate PR if necessary.
@notmandatory I don't know whether it is ideal that the crate he is referencing should be published for security reasons.
Alright @tvpeter, will do that.
Yes, I'm revamping the crate to use descriptor instead of private key, but I will continue the PR with the reserves crate. |
|
Thanks for the review and suggestion to rename the A PR (bitcoindevkit/bdk-reserves#39) updates |
9afe400 to
7b94ecc
Compare
7b94ecc to
007f71b
Compare
|
The update is a follow-up to the BIP322 refactor that migrated signing from raw keys to descriptor-based |
Pull Request Test Coverage Report for Build 21173945658Details
💛 - Coveralls |
tvpeter
left a comment
There was a problem hiding this comment.
Thank you for working on this @aagbotemi
I have left some comments.
| }, | ||
| /// Sign a message using BIP322 | ||
| #[cfg(feature = "bip322")] | ||
| SignBip322 { |
There was a problem hiding this comment.
I think SignMessage will be more descriptive
| }, | ||
| /// Verify a BIP322 signature | ||
| #[cfg(feature = "bip322")] | ||
| VerifyBip322 { |
There was a problem hiding this comment.
VerifyMessage should be better here too
| let address: Address = parse_address(&address)?; | ||
| let signature_format = parse_signature_format(&signature_type)?; | ||
|
|
||
| let proof: Bip322Proof = wallet |
There was a problem hiding this comment.
I think before attempting to sign, you should check if the provided address belongs to the wallet.
| #[cfg(feature = "bip322")] | ||
| impl From<bdk_bip322::error::Error> for BDKCliError { | ||
| fn from(e: bdk_bip322::error::Error) -> Self { | ||
| BDKCliError::Generic(e.to_string()) |
There was a problem hiding this comment.
I think it's better add an error variant for BIP322 so we don't lose the error type from the library rather than wrapping everything inside the Generic variant.
Thank you for the review. I'll attend to the comments shortly. |
Description
This PR added BIP322 feature into BDK CLI.
It also has a usage file for testing purposes
Notes to the reviewers
Changelog notice
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
CHANGELOG.md