Changeset View
Changeset View
Standalone View
Standalone View
src/script/sign.h
Show First 20 Lines • Show All 659 Lines • ▼ Show 20 Lines | |||||
/** Produce a script signature for a transaction. */ | /** Produce a script signature for a transaction. */ | ||||
bool SignSignature(const SigningProvider &provider, const CScript &fromPubKey, | bool SignSignature(const SigningProvider &provider, const CScript &fromPubKey, | ||||
CMutableTransaction &txTo, unsigned int nIn, | CMutableTransaction &txTo, unsigned int nIn, | ||||
const Amount amount, SigHashType sigHashType); | const Amount amount, SigHashType sigHashType); | ||||
bool SignSignature(const SigningProvider &provider, const CTransaction &txFrom, | bool SignSignature(const SigningProvider &provider, const CTransaction &txFrom, | ||||
CMutableTransaction &txTo, unsigned int nIn, | CMutableTransaction &txTo, unsigned int nIn, | ||||
SigHashType sigHashType); | SigHashType sigHashType); | ||||
/** Signs a PSBTInput */ | /** | ||||
* Signs a PSBTInput, verifying that all provided data matches what is being | |||||
* signed. | |||||
*/ | |||||
bool SignPSBTInput(const SigningProvider &provider, | bool SignPSBTInput(const SigningProvider &provider, | ||||
const CMutableTransaction &tx, PSBTInput &input, | const CMutableTransaction &tx, PSBTInput &input, | ||||
SignatureData &sigdata, int index, | SignatureData &sigdata, int index, | ||||
SigHashType sighash = SigHashType()); | SigHashType sighash = SigHashType()); | ||||
/** Extract signature data from a transaction input, and insert it. */ | /** Extract signature data from a transaction input, and insert it. */ | ||||
SignatureData DataFromTransaction(const CMutableTransaction &tx, | SignatureData DataFromTransaction(const CMutableTransaction &tx, | ||||
unsigned int nIn, const CTxOut &txout); | unsigned int nIn, const CTxOut &txout); | ||||
void UpdateInput(CTxIn &input, const SignatureData &data); | void UpdateInput(CTxIn &input, const SignatureData &data); | ||||
#endif // BITCOIN_SCRIPT_SIGN_H | #endif // BITCOIN_SCRIPT_SIGN_H |