Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an explicit TxBuilder method to enable non-ALL sighashes #350

Closed
afilini opened this issue May 24, 2021 · 0 comments · Fixed by #353
Closed

Add an explicit TxBuilder method to enable non-ALL sighashes #350

afilini opened this issue May 24, 2021 · 0 comments · Fixed by #353

Comments

@afilini
Copy link
Member

afilini commented May 24, 2021

BDK signs using the sighash specified in the PSBT (or ALL if it's not provided). It's currently up to the user of the library to check that the PSBT they are signing doesn't have a dangerous sighash, but to avoid accidents it's probably better to have this check internally and force the user to explicitly opt-in to use non-ALL sighashes.

afilini added a commit to afilini/bdk that referenced this issue May 26, 2021
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.

Fixes bitcoindevkit#350
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant