Changeset View
Changeset View
Standalone View
Standalone View
src/psbt.h
Show First 20 Lines • Show All 473 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Signs a PSBTInput, verifying that all provided data matches what is being | * Signs a PSBTInput, verifying that all provided data matches what is being | ||||
* signed. | * signed. | ||||
*/ | */ | ||||
bool SignPSBTInput(const SigningProvider &provider, | bool SignPSBTInput(const SigningProvider &provider, | ||||
PartiallySignedTransaction &psbt, int index, | PartiallySignedTransaction &psbt, int index, | ||||
SigHashType sighash = SigHashType()); | SigHashType sighash = SigHashType()); | ||||
/** | |||||
* Finalizes a PSBT if possible, combining partial signatures. | |||||
* | |||||
* @param[in,out] &psbtx reference to PartiallySignedTransaction to finalize | |||||
* return True if the PSBT is now complete, false otherwise | |||||
*/ | |||||
bool FinalizePSBT(PartiallySignedTransaction &psbtx); | |||||
/** | |||||
* Finalizes a PSBT if possible, and extracts it to a CMutableTransaction if it | |||||
* could be finalized. | |||||
* | |||||
* @param[in] &psbtx reference to PartiallySignedTransaction | |||||
* @param[out] result CMutableTransaction representing the complete transaction, | |||||
* if successful | |||||
* @return True if we successfully extracted the transaction, false otherwise | |||||
*/ | |||||
bool FinalizeAndExtractPSBT(PartiallySignedTransaction &psbtx, | |||||
CMutableTransaction &result); | |||||
/** | |||||
* Combines PSBTs with the same underlying transaction, resulting in a single | |||||
* PSBT with all partial signatures from each input. | |||||
* | |||||
* @param[out] &out the combined PSBT, if successful | |||||
* @param[out] &error reference to TransactionError to fill with error info on | |||||
* failure | |||||
* @param[in] psbtxs the PSBTs to combine | |||||
* @return True if we successfully combined the transactions, false if they were | |||||
* not compatible | |||||
*/ | |||||
bool CombinePSBTs(PartiallySignedTransaction &out, TransactionError &error, | |||||
const std::vector<PartiallySignedTransaction> &psbtxs); | |||||
#endif // BITCOIN_PSBT_H | #endif // BITCOIN_PSBT_H |