taproot: use new field for taproot tweak in SignDescriptor
rather than overloading the WitnessScript
field
#6446
Milestone
SignDescriptor
rather than overloading the WitnessScript
field
#6446
A user experimenting with the new taproot keyspend signing features were confused when they realized they actually needed to set the witness script field. Today we use that field to have the user pass in the internal taproot tweak which is used to derive the output key from an internal key. For BIP 86 this tweak is "empty" with the internal key being used. For tapscript spends, this should be the script root itself.
Rather than overload an existing field (the
WitnessScript
), we should add a new field (TapTweak
?) and update the documentation accordingly. If taproot spends are being attempted, then this field should always be set.While we're at it, we may want to reconsider the existing implicit context when it comes to signing tapscript (the default) vs taproot key spends. The alternative here would be a new enum that needs to be set to determine which of the signature+sighash variants should be used.
The text was updated successfully, but these errors were encountered: