Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
rawtransaction.cpp File Reference
#include <base58.h>
#include <chain.h>
#include <coins.h>
#include <consensus/amount.h>
#include <consensus/validation.h>
#include <core_io.h>
#include <index/txindex.h>
#include <key_io.h>
#include <node/blockstorage.h>
#include <node/coin.h>
#include <node/context.h>
#include <node/psbt.h>
#include <node/transaction.h>
#include <node/types.h>
#include <policy/packages.h>
#include <policy/policy.h>
#include <policy/rbf.h>
#include <primitives/transaction.h>
#include <psbt.h>
#include <random.h>
#include <rpc/blockchain.h>
#include <rpc/rawtransaction_util.h>
#include <rpc/server.h>
#include <rpc/server_util.h>
#include <rpc/util.h>
#include <script/script.h>
#include <script/sign.h>
#include <script/signingprovider.h>
#include <script/solver.h>
#include <uint256.h>
#include <undo.h>
#include <util/bip32.h>
#include <util/check.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <util/vector.h>
#include <validation.h>
#include <validationinterface.h>
#include <cstdint>
#include <numeric>
#include <univalue.h>
Include dependency graph for rawtransaction.cpp:

Go to the source code of this file.

Functions

static void TxToJSON (const CTransaction &tx, const uint256 hashBlock, UniValue &entry, Chainstate &active_chainstate, const CTxUndo *txundo=nullptr, TxVerbosity verbosity=TxVerbosity::SHOW_DETAILS)
static std::vector< RPCArgCreateTxDoc ()
PartiallySignedTransaction ProcessPSBT (const std::string &psbt_string, const std::any &context, const HidingSigningProvider &provider, std::optional< int > sighash_type, bool finalize)
static RPCHelpMan getrawtransaction ()
static RPCHelpMan createrawtransaction ()
static RPCHelpMan decoderawtransaction ()
static RPCHelpMan decodescript ()
static RPCHelpMan combinerawtransaction ()
static RPCHelpMan signrawtransactionwithkey ()
static RPCHelpMan decodepsbt ()
static RPCHelpMan combinepsbt ()
static RPCHelpMan finalizepsbt ()
static RPCHelpMan createpsbt ()
static RPCHelpMan converttopsbt ()
static RPCHelpMan utxoupdatepsbt ()
static RPCHelpMan joinpsbts ()
static RPCHelpMan analyzepsbt ()
RPCHelpMan descriptorprocesspsbt ()
void RegisterRawTransactionRPCCommands (CRPCTable &t)
PSBTAnalysis AnalyzePSBT (PartiallySignedTransaction psbtx)
 Provides helpful miscellaneous information about where a PSBT is in the signing workflow.
void FindCoins (const node::NodeContext &node, std::map< COutPoint, Coin > &coins)
 Look up unspent output information.
CTransactionRef GetTransaction (const CBlockIndex *block_index, const CTxMemPool *mempool, const Txid &hash, const BlockManager &blockman, uint256 &hashBlock)
 Return transaction with a given hash.

Variables

static constexpr decltype(CTransaction::versionDEFAULT_RAWTX_VERSION {CTransaction::CURRENT_VERSION}
const RPCResult decodepsbt_inputs
const RPCResult decodepsbt_outputs

Function Documentation

◆ AnalyzePSBT()

Provides helpful miscellaneous information about where a PSBT is in the signing workflow.

Parameters
[in]psbtxthe PSBT to analyze
Returns
A PSBTAnalysis with information about the provided PSBT.

Definition at line 16 of file psbt.cpp.

Here is the caller graph for this function:

◆ analyzepsbt()

RPCHelpMan analyzepsbt ( )
static

Definition at line 1882 of file rawtransaction.cpp.

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

◆ combinepsbt()

RPCHelpMan combinepsbt ( )
static

Definition at line 1517 of file rawtransaction.cpp.

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

◆ combinerawtransaction()

RPCHelpMan combinerawtransaction ( )
static

Definition at line 585 of file rawtransaction.cpp.

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

◆ converttopsbt()

RPCHelpMan converttopsbt ( )
static

Definition at line 1665 of file rawtransaction.cpp.

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

◆ createpsbt()

RPCHelpMan createpsbt ( )
static

Definition at line 1622 of file rawtransaction.cpp.

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

◆ createrawtransaction()

RPCHelpMan createrawtransaction ( )
static

Definition at line 377 of file rawtransaction.cpp.

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

◆ CreateTxDoc()

std::vector< RPCArg > CreateTxDoc ( )
static

Definition at line 87 of file rawtransaction.cpp.

Here is the caller graph for this function:

◆ decodepsbt()

RPCHelpMan decodepsbt ( )
static

Definition at line 1014 of file rawtransaction.cpp.

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

◆ decoderawtransaction()

RPCHelpMan decoderawtransaction ( )
static

Definition at line 409 of file rawtransaction.cpp.

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

◆ decodescript()

RPCHelpMan decodescript ( )
static

Definition at line 450 of file rawtransaction.cpp.

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

◆ descriptorprocesspsbt()

RPCHelpMan descriptorprocesspsbt ( )

Definition at line 1992 of file rawtransaction.cpp.

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

◆ finalizepsbt()

RPCHelpMan finalizepsbt ( )
static

Definition at line 1565 of file rawtransaction.cpp.

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

◆ FindCoins()

void node::FindCoins ( const NodeContext & node,
std::map< COutPoint, Coin > & coins )

Look up unspent output information.

Returns coins in the mempool and in the current chain UTXO set. Iterates through all the keys in the map and populates the values.

Parameters
[in]nodeThe node context to use for lookup
[in,out]coinsmap to fill

Definition at line 12 of file coin.cpp.

Here is the caller graph for this function:

◆ getrawtransaction()

RPCHelpMan getrawtransaction ( )
static

Definition at line 216 of file rawtransaction.cpp.

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

◆ GetTransaction()

CTransactionRef node::GetTransaction ( const CBlockIndex *const block_index,
const CTxMemPool *const mempool,
const Txid & hash,
const BlockManager & blockman,
uint256 & hashBlock )

Return transaction with a given hash.

If mempool is provided and block_index is not provided, check it first for the tx. If -txindex is available, check it next for the tx. Finally, if block_index is provided, check for tx by reading entire block from disk.

Parameters
[in]block_indexThe block to read from disk, or nullptr
[in]mempoolIf provided, check mempool for tx
[in]hashThe txid
[in]blockmanUsed to access and read blocks from disk
[out]hashBlockThe block hash, if the tx was found via -txindex or block_index
Returns
The tx if found, otherwise nullptr

Definition at line 143 of file transaction.cpp.

Here is the caller graph for this function:

◆ joinpsbts()

RPCHelpMan joinpsbts ( )
static

Definition at line 1780 of file rawtransaction.cpp.

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

◆ ProcessPSBT()

PartiallySignedTransaction ProcessPSBT ( const std::string & psbt_string,
const std::any & context,
const HidingSigningProvider & provider,
std::optional< int > sighash_type,
bool finalize )

Definition at line 128 of file rawtransaction.cpp.

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

◆ RegisterRawTransactionRPCCommands()

void RegisterRawTransactionRPCCommands ( CRPCTable & t)

Definition at line 2077 of file rawtransaction.cpp.

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

◆ signrawtransactionwithkey()

RPCHelpMan signrawtransactionwithkey ( )
static

Definition at line 672 of file rawtransaction.cpp.

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

◆ TxToJSON()

void TxToJSON ( const CTransaction & tx,
const uint256 hashBlock,
UniValue & entry,
Chainstate & active_chainstate,
const CTxUndo * txundo = nullptr,
TxVerbosity verbosity = TxVerbosity::SHOW_DETAILS )
static

Definition at line 58 of file rawtransaction.cpp.

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

◆ utxoupdatepsbt()

RPCHelpMan utxoupdatepsbt ( )
static

Definition at line 1733 of file rawtransaction.cpp.

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

Variable Documentation

◆ decodepsbt_inputs

const RPCResult decodepsbt_inputs

Definition at line 778 of file rawtransaction.cpp.

◆ decodepsbt_outputs

const RPCResult decodepsbt_outputs

Definition at line 936 of file rawtransaction.cpp.

◆ DEFAULT_RAWTX_VERSION

decltype(CTransaction::version) DEFAULT_RAWTX_VERSION {CTransaction::CURRENT_VERSION}
staticconstexpr

Definition at line 56 of file rawtransaction.cpp.