Skip to content

Add a method to PSBT to compute sighash::Prevouts #849

@sanket1729

Description

@sanket1729

The most important feature of Psbt's is that they have all the information to compute the sighash. Our new APIs for taproot_key_spend_signature_hash and taproot_script_spend_signature_hash require a sighash::Prevouts struct. This is essentially a collection of all utxos the transaction is spending.

It would be great to have the following API:

impl PartialSignedTransaction {
	pub fn to_prevouts(&self) -> sighash::Prevouts {
		/// Always return the  Prevouts::All variant as psbts must have UTXO information
	}
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions