[signer] Add an option to explicitly allow using non-ALL sighashes#353
Conversation
Instead of blindly using the `sighash_type` set in a psbt input, we now only sign `SIGHASH_ALL` inputs by default, and require the user to explicitly opt-in to using other sighashes if they desire to do so. Fixes bitcoindevkit#350
|
ACK 881ca8d. I guess what you really want is to make sure that you are not signing any of your inputs with an unusual sighash (regardless of what others do). I don't think we need to account for this though since you are likely going to have to do a lot of manual verification work anyway in more exotic scenarios. |
notmandatory
left a comment
There was a problem hiding this comment.
utACK 881ca8d. Test is easy to follow and covers expected cases.
Yeah I tried to do that initially but it was a mess. If somebody needs that kind of "precision" they can just always opt-in on the BDK side and implement the check themselves before calling |
Description
Instead of blindly using the
sighash_typeset in a psbt input, we now only signSIGHASH_ALLinputs by default, and require the user to explicitly opt-in to using other sighashes if they desire to do so.Fixes #350
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
CHANGELOG.md