Skip to content

Introduce per-input sighash type via Input::set_sighash_type#69

Open
evanlinjin wants to merge 1 commit into
bitcoindevkit:masterfrom
evanlinjin:feature/per-input-sighash-type
Open

Introduce per-input sighash type via Input::set_sighash_type#69
evanlinjin wants to merge 1 commit into
bitcoindevkit:masterfrom
evanlinjin:feature/per-input-sighash-type

Conversation

@evanlinjin
Copy link
Copy Markdown
Member

Description

Closes #60

Replace PsbtParams::sighash_type with a per-input setter/getter on Input. Selection::create_psbt propagates each input's sighash type into the resulting PSBT input.

Changelog notice

Added:
- `Input::set_sighash_type` (setter) and `Input::sighash_type` (getter) methods which specifies per-input sighash type.

Removed:
- `PsbtParams::sighash_type` which sets sighash type for all inputs. Replaced by `Input::{set_}sighash_type` for per-input control.

Before submitting

@evanlinjin evanlinjin self-assigned this May 14, 2026
@evanlinjin evanlinjin force-pushed the feature/per-input-sighash-type branch 3 times, most recently from 556f0e1 to 9ffb42c Compare May 15, 2026 20:25
Copy link
Copy Markdown
Contributor

@noahjoeris noahjoeris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!
ACK 9ffb42c

Comment thread src/input.rs
Replace `PsbtParams::sighash_type` with a per-input setter/getter on
`Input`. `Selection::create_psbt` propagates each input's sighash type
into the resulting PSBT input.

`Input::set_sighash_type` accepts anything convertible into
`PsbtSighashType`, including the standard `EcdsaSighashType` and
`TapSighashType` from rust-bitcoin.

BREAKING CHANGE: `PsbtParams::sighash_type` is removed. Callers should
call `Input::set_sighash_type` on each input before selection.
@evanlinjin evanlinjin force-pushed the feature/per-input-sighash-type branch from 9ffb42c to 95d4b35 Compare May 16, 2026 12:55
@evanlinjin evanlinjin requested a review from noahjoeris May 16, 2026 12:56
Copy link
Copy Markdown
Contributor

@noahjoeris noahjoeris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 95d4b35

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 this pull request may close these issues.

PsbtParams::sighash_type does not make sense

2 participants