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

Remove trait ComputeSighash #1424

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ValuedMammal
Copy link
Contributor

@ValuedMammal ValuedMammal commented May 3, 2024

This PR does some cleanup of the bdk_wallet signer module most notably by removing the internal trait ComputeSighash and replacing old code for computing the sighash (for legacy and segwit context) with a single method Psbt::sighash_ecdsa. The logic for computing the taproot sighash is unchanged and extracted to a new helper function compute_tap_sighash.

fixes #1038

Notes to the reviewers

Changelog notice

Checklists

All Submissions:

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

@ValuedMammal ValuedMammal self-assigned this May 3, 2024
@nondiremanuel nondiremanuel added this to the 1.0.0-alpha milestone May 7, 2024
@ValuedMammal ValuedMammal marked this pull request as ready for review May 25, 2024 01:02
- Change param `hash` to `&Message` in `sign_psbt_ecdsa`
- Remove unused methods `compute_legacy_sighash`,
and `compute_segwitv0_sighash`.
- Match on `self.ctx` when signing for `SignerWrapper<PrivateKey>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Remove ComputeSighash
2 participants