diff options
| author | Andrew Chow <[email protected]> | 2018-06-28 18:56:34 -0700 |
|---|---|---|
| committer | Andrew Chow <[email protected]> | 2018-07-13 14:27:31 -0700 |
| commit | 8b5ef2793748065727a9a2498805ae5b269dcb4f (patch) | |
| tree | 66d4ffbac5555defeb41c4dd6118ad73998634d4 /src/script/sign.h | |
| parent | Refactor transaction creation and transaction funding logic (diff) | |
| download | discoin-8b5ef2793748065727a9a2498805ae5b269dcb4f.tar.xz discoin-8b5ef2793748065727a9a2498805ae5b269dcb4f.zip | |
SignPSBTInput wrapper function
The SignPSBTInput function takes a PSBTInput, SignatureData, SigningProvider,
and other data necessary for signing. It fills the SignatureData with data from
the PSBTInput, retrieves the UTXO from the PSBTInput, signs and finalizes the
input if possible, and then extracts the results from the SignatureData and
puts them back into the PSBTInput.
Diffstat (limited to 'src/script/sign.h')
| -rw-r--r-- | src/script/sign.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/sign.h b/src/script/sign.h index ab2153e3b..9f0382e25 100644 --- a/src/script/sign.h +++ b/src/script/sign.h @@ -634,6 +634,9 @@ bool ProduceSignature(const SigningProvider& provider, const BaseSignatureCreato bool SignSignature(const SigningProvider &provider, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, const CAmount& amount, int nHashType); bool SignSignature(const SigningProvider &provider, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType); +/** Signs a PSBTInput */ +bool SignPSBTInput(const SigningProvider& provider, const CMutableTransaction& tx, PSBTInput& input, SignatureData& sigdata, int index, int sighash = 1); + /** Extract signature data from a transaction input, and insert it. */ SignatureData DataFromTransaction(const CMutableTransaction& tx, unsigned int nIn, const CTxOut& txout); void UpdateInput(CTxIn& input, const SignatureData& data); |