Bitcoin Core 28.99.0
P2P Digital Currency
|
#include <addresstype.h>
#include <consensus/amount.h>
#include <map>
#include <string>
#include <optional>
Go to the source code of this file.
Functions | |
void | SignTransaction (CMutableTransaction &mtx, const SigningProvider *keystore, const std::map< COutPoint, Coin > &coins, const UniValue &hashType, UniValue &result) |
Sign a transaction with the given keystore and previous transactions. More... | |
void | SignTransactionResultToJSON (CMutableTransaction &mtx, bool complete, const std::map< COutPoint, Coin > &coins, const std::map< int, bilingual_str > &input_errors, UniValue &result) |
void | ParsePrevouts (const UniValue &prevTxsUnival, FlatSigningProvider *keystore, std::map< COutPoint, Coin > &coins) |
Parse a prevtxs UniValue array and get the map of coins from it. More... | |
void | AddInputs (CMutableTransaction &rawTx, const UniValue &inputs_in, bool rbf) |
Normalize univalue-represented inputs and add them to the transaction. More... | |
UniValue | NormalizeOutputs (const UniValue &outputs_in) |
Normalize univalue-represented outputs. More... | |
std::vector< std::pair< CTxDestination, CAmount > > | ParseOutputs (const UniValue &outputs) |
Parse normalized outputs into destination, amount tuples. More... | |
void | AddOutputs (CMutableTransaction &rawTx, const UniValue &outputs_in) |
Normalize, parse, and add outputs to the transaction. More... | |
CMutableTransaction | ConstructTransaction (const UniValue &inputs_in, const UniValue &outputs_in, const UniValue &locktime, std::optional< bool > rbf) |
Create a transaction from univalue parameters. More... | |
void AddInputs | ( | CMutableTransaction & | rawTx, |
const UniValue & | inputs_in, | ||
bool | rbf | ||
) |
Normalize univalue-represented inputs and add them to the transaction.
void AddOutputs | ( | CMutableTransaction & | rawTx, |
const UniValue & | outputs_in | ||
) |
Normalize, parse, and add outputs to the transaction.
Definition at line 132 of file rawtransaction_util.cpp.
CMutableTransaction ConstructTransaction | ( | const UniValue & | inputs_in, |
const UniValue & | outputs_in, | ||
const UniValue & | locktime, | ||
std::optional< bool > | rbf | ||
) |
Create a transaction from univalue parameters.
Definition at line 146 of file rawtransaction_util.cpp.
Normalize univalue-represented outputs.
Definition at line 73 of file rawtransaction_util.cpp.
std::vector< std::pair< CTxDestination, CAmount > > ParseOutputs | ( | const UniValue & | outputs | ) |
Parse normalized outputs into destination, amount tuples.
Definition at line 100 of file rawtransaction_util.cpp.
void ParsePrevouts | ( | const UniValue & | prevTxsUnival, |
FlatSigningProvider * | keystore, | ||
std::map< COutPoint, Coin > & | coins | ||
) |
Parse a prevtxs UniValue array and get the map of coins from it.
prevTxsUnival | Array of previous txns outputs that tx depends on but may not yet be in the block chain |
keystore | A pointer to the temporary keystore if there is one |
coins | Map of unspent outputs - coins in mempool and current chain UTXO set, may be extended by previous txns outputs after call |
Definition at line 184 of file rawtransaction_util.cpp.
void SignTransaction | ( | CMutableTransaction & | mtx, |
const SigningProvider * | keystore, | ||
const std::map< COutPoint, Coin > & | coins, | ||
const UniValue & | hashType, | ||
UniValue & | result | ||
) |
Sign a transaction with the given keystore and previous transactions.
mtx | The transaction to-be-signed |
keystore | Temporary keystore containing signing keys |
coins | Map of unspent outputs |
hashType | The signature hash type |
result | JSON object where signed transaction results accumulate |
Definition at line 305 of file rawtransaction_util.cpp.
void SignTransactionResultToJSON | ( | CMutableTransaction & | mtx, |
bool | complete, | ||
const std::map< COutPoint, Coin > & | coins, | ||
const std::map< int, bilingual_str > & | input_errors, | ||
UniValue & | result | ||
) |
Definition at line 316 of file rawtransaction_util.cpp.