-
Notifications
You must be signed in to change notification settings - Fork 61
Description
Describe the enhancement
Psbt::sign is yet to exposed in our Psbt type. This allows you to sign a Psbt be simply calling the sign method from rust-bitcoin Psbt::sign on the psbt you would like to sign.
Use case
- To sign a psbt
Additional context
In preparation for bdk-wallet 3.0 migration, Signers will be removed from bdk-wallet as described here. Having this feature serves as a replacement and enhancement of how we sign psbt's.
Using the sign method requires as parameters a type that impelements GetKey and a Secp256k1. For GetKey it is important to note that types like KeyMap
and DescriptorSecretKey
have implemented GetKey in rust-miniscript and there might be no need to create any extra types here in FFI. KeyMap
and DescriptorSecretKey
are existing types in FFI which will have access to implemented GetKey;
- once bdk-wallet updates to rust-miniscript version that has GetKey implementation for those types,
- and then bdk-ffi updates to updated bdk-wallet version.
Once psbt sign method is exposed, and the above conditions fulfilled, using psbt.sign will be as simple as passing the Descriptor's KeyMap as param. Below is the PR to watch/wait for, for this issue to be completed.
- PR: remove signers
Note: In order to see how sign from psbt will work here in FFI even before all above conditions are satisfied, one can use a SignerWrapper from testutils like in PR: remove signers
Metadata
Metadata
Assignees
Labels
Type
Projects
Status