Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
transaction_utils.h File Reference
#include <primitives/transaction.h>
#include <script/sign.h>
#include <array>
Include dependency graph for transaction_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

CMutableTransaction BuildCreditingTransaction (const CScript &scriptPubKey, int nValue=0)
CMutableTransaction BuildSpendingTransaction (const CScript &scriptSig, const CScriptWitness &scriptWitness, const CTransaction &txCredit)
std::vector< CMutableTransactionSetupDummyInputs (FillableSigningProvider &keystoreRet, CCoinsViewCache &coinsRet, const std::array< CAmount, 4 > &nValues)
void BulkTransaction (CMutableTransaction &tx, int32_t target_weight)
bool SignSignature (const SigningProvider &provider, const CScript &fromPubKey, CMutableTransaction &txTo, unsigned int nIn, const CAmount &amount, int nHashType, SignatureData &sig_data)
 Produce a satisfying script (scriptSig or witness).
bool SignSignature (const SigningProvider &provider, const CTransaction &txFrom, CMutableTransaction &txTo, unsigned int nIn, int nHashType, SignatureData &sig_data)

Function Documentation

◆ BuildCreditingTransaction()

CMutableTransaction BuildCreditingTransaction ( const CScript & scriptPubKey,
int nValue = 0 )

Definition at line 10 of file transaction_utils.cpp.

Here is the caller graph for this function:

◆ BuildSpendingTransaction()

CMutableTransaction BuildSpendingTransaction ( const CScript & scriptSig,
const CScriptWitness & scriptWitness,
const CTransaction & txCredit )

Definition at line 26 of file transaction_utils.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BulkTransaction()

void BulkTransaction ( CMutableTransaction & tx,
int32_t target_weight )

Definition at line 74 of file transaction_utils.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetupDummyInputs()

std::vector< CMutableTransaction > SetupDummyInputs ( FillableSigningProvider & keystoreRet,
CCoinsViewCache & coinsRet,
const std::array< CAmount, 4 > & nValues )

Definition at line 44 of file transaction_utils.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SignSignature() [1/2]

bool SignSignature ( const SigningProvider & provider,
const CScript & fromPubKey,
CMutableTransaction & txTo,
unsigned int nIn,
const CAmount & amount,
int nHashType,
SignatureData & sig_data )

Produce a satisfying script (scriptSig or witness).

Parameters
providerUtility containing the information necessary to solve a script.
fromPubKeyThe script to produce a satisfaction for.
txToThe spending transaction.
nInThe index of the input in txTo referring the output being spent.
amountThe value of the output being spent.
nHashTypeSignature hash type.
sig_dataAdditional data provided to solve a script. Filled with the resulting satisfying script and whether the satisfaction is complete.
Returns
True if the produced script is entirely satisfying fromPubKey.

Definition at line 94 of file transaction_utils.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SignSignature() [2/2]

bool SignSignature ( const SigningProvider & provider,
const CTransaction & txFrom,
CMutableTransaction & txTo,
unsigned int nIn,
int nHashType,
SignatureData & sig_data )

Definition at line 105 of file transaction_utils.cpp.

Here is the call graph for this function: