Signs a PSBTInput, verifying that all provided data matches what is being signed.
Synopsis
Declared in <psbt.h>
[[nodiscard]]
util::Expected<void, common::PSBTError>
SignPSBTInput(
SigningProvider const& provider,
PartiallySignedTransaction& psbt,
int index,
PrecomputedTransactionData const* txdata,
common::PSBTFillOptions const& options,
SignatureData* out_sigdata = nullptr);
Description
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.
Return Value
Success, or a PSBTError describing why signing failed.
|
Note
|
The return value should not be discarded. |
Parameters
Name |
Description |
provider |
The source of keys and scripts used to sign. |
psbt |
The PSBT containing the input. |
index |
The index of the input to sign. |
txdata |
Precomputed transaction data, or nullptr for a dummy signature. |
options |
Options controlling how fields are filled. |
out_sigdata |
Optional output receiving the resulting signature data. |
Created with MrDocs