mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-03 04:01:43 +02:00
Construct and use PrecomputedTransactionData in PSBT signing
This commit is contained in:
11
src/psbt.h
11
src/psbt.h
@ -567,11 +567,18 @@ enum class PSBTRole {
|
||||
|
||||
std::string PSBTRoleName(PSBTRole role);
|
||||
|
||||
/** Compute a PrecomputedTransactionData object from a psbt. */
|
||||
PrecomputedTransactionData PrecomputePSBTData(const PartiallySignedTransaction& psbt);
|
||||
|
||||
/** Checks whether a PSBTInput is already signed. */
|
||||
bool PSBTInputSigned(const PSBTInput& input);
|
||||
|
||||
/** Signs a PSBTInput, verifying that all provided data matches what is being signed. */
|
||||
bool SignPSBTInput(const SigningProvider& provider, PartiallySignedTransaction& psbt, int index, int sighash = SIGHASH_ALL, SignatureData* out_sigdata = nullptr, bool use_dummy = false);
|
||||
/** Signs a PSBTInput, verifying that all provided data matches what is being signed.
|
||||
*
|
||||
* txdata should be the output of PrecomputePSBTData (which can be shared across
|
||||
* multiple SignPSBTInput calls). If it is nullptr, a dummy signature will be created.
|
||||
**/
|
||||
bool SignPSBTInput(const SigningProvider& provider, PartiallySignedTransaction& psbt, int index, const PrecomputedTransactionData* txdata, int sighash = SIGHASH_ALL, SignatureData* out_sigdata = nullptr);
|
||||
|
||||
/** Counts the unsigned inputs of a PSBT. */
|
||||
size_t CountPSBTUnsignedInputs(const PartiallySignedTransaction& psbt);
|
||||
|
Reference in New Issue
Block a user