Bitcoin
Functions
rawtransaction_util.cpp File Reference
#include <rpc/rawtransaction_util.h>
#include <coins.h>
#include <core_io.h>
#include <key_io.h>
#include <policy/policy.h>
#include <primitives/transaction.h>
#include <rpc/request.h>
#include <rpc/util.h>
#include <script/sign.h>
#include <script/signingprovider.h>
#include <tinyformat.h>
#include <univalue.h>
#include <util/rbf.h>
#include <util/strencodings.h>

Functions

CMutableTransaction ConstructTransaction (const UniValue &inputs_in, const UniValue &outputs_in, const UniValue &locktime, const UniValue &rbf)
 
static void TxInErrorToJSON (const CTxIn &txin, UniValue &vErrorsRet, const std::string &strMessage)
 
UniValue SignTransaction (CMutableTransaction &mtx, const UniValue &prevTxsUnival, FillableSigningProvider *keystore, std::map< COutPoint, Coin > &coins, bool is_temp_keystore, const UniValue &hashType)
 

Function Documentation

◆ ConstructTransaction()

CMutableTransaction ConstructTransaction ( const UniValue inputs_in,
const UniValue outputs_in,
const UniValue locktime,
const UniValue rbf 
)

Create a transaction from univalue parameters

◆ SignTransaction()

UniValue SignTransaction ( CMutableTransaction mtx,
const UniValue prevTxs,
FillableSigningProvider keystore,
std::map< COutPoint, Coin > &  coins,
bool  tempKeystore,
const UniValue hashType 
)

Sign a transaction with the given keystore and previous transactions

Parameters
mtxThe transaction to-be-signed
prevTxsArray of previous txns outputs that tx depends on but may not yet be in the block chain
keystoreTemporary keystore containing signing keys
coinsMap of unspent outputs - coins in mempool and current chain UTXO set, may be extended by previous txns outputs after call
tempKeystoreWhether to use temporary keystore
hashTypeThe signature hash type
Returns
JSON object with details of signed transaction

◆ TxInErrorToJSON()

static void TxInErrorToJSON ( const CTxIn txin,
UniValue vErrorsRet,
const std::string &  strMessage 
)
static

Pushes a JSON object for script verification or signing errors to vErrorsRet.