bdk-cli icon indicating copy to clipboard operation
bdk-cli copied to clipboard

Feature/bip322 integration

Open aagbotemi opened this issue 8 months ago • 5 comments

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:

  • [x] I've signed all my commits
  • [x] I followed the contribution guidelines
  • [x] I ran cargo fmt and cargo clippy before committing

New Features:

  • [x] I've added docs for the new feature
  • [x] I've updated CHANGELOG.md

aagbotemi avatar Apr 26 '25 12:04 aagbotemi

I'd rather not have a separate key file for this feature and try to protect it with a password and all that. This bdk-cli tool is primarily meant as a manual testing tool and example of how to use the bdk_wallet APIs so providing the public or private key descriptor via command line or environment var should also work for this signing feature.

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.

notmandatory avatar Apr 28 '25 23:04 notmandatory

I'd rather not have a separate key file for this feature and try to protect it with a password and all that.

Still actively working on this. Will push updates once I'm done (likely within this week).

aagbotemi avatar May 18 '25 21:05 aagbotemi

Hi @aagbotemi, can you rebase and fix the CI failures?

tvpeter avatar Jun 12 '25 22:06 tvpeter

@aagbotemi, please consider changing bip322 feature flag to reserves.

Alright @tvpeter, will do that.

@notmandatory I don't know whether it is ideal that the crate he is referencing should be published for security reasons.

Yes, I'm revamping the crate to use descriptor instead of private key, but I will continue the PR with the reserves crate.

aagbotemi avatar Jun 13 '25 13:06 aagbotemi

Thanks for the review and suggestion to rename the bip322 feature to reserves @tvpeter. I’m blocked on integrating bdk-reserves into this PR due to a version mismatch: bdk-cli uses bdk_wallet 2.0.0, but bdk-reserves uses another bdk_wallet version as the ProofOfReserves trait in bdk-reserves is implemented for it.

A PR (https://github.com/bitcoindevkit/bdk-reserves/pull/39) updates bdk-reserves to support bdk_wallet 1.2.0. Once merged, we can bump bdk-reserves to use bdk_wallet 2.0.0.

aagbotemi avatar Jun 25 '25 06:06 aagbotemi