Bitcoin Core 32.1.0
P2P Digital Currency
Loading...
Searching...
No Matches
rawtransaction.cpp File Reference
#include <rpc/register.h>
#include <addresstype.h>
#include <base58.h>
#include <chain.h>
#include <coins.h>
#include <common/types.h>
#include <consensus/amount.h>
#include <core_io.h>
#include <crypto/common.h>
#include <crypto/hex_base.h>
#include <hash.h>
#include <index/txindex.h>
#include <kernel/chainparams.h>
#include <key.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 <policy/feerate.h>
#include <primitives/block.h>
#include <primitives/transaction.h>
#include <psbt.h>
#include <pubkey.h>
#include <random.h>
#include <rpc/protocol.h>
#include <rpc/rawtransaction_util.h>
#include <rpc/request.h>
#include <rpc/server.h>
#include <rpc/server_util.h>
#include <rpc/util.h>
#include <script/interpreter.h>
#include <script/keyorigin.h>
#include <script/script.h>
#include <script/sign.h>
#include <script/signingprovider.h>
#include <script/solver.h>
#include <serialize.h>
#include <streams.h>
#include <sync.h>
#include <tinyformat.h>
#include <txmempool.h>
#include <uint256.h>
#include <undo.h>
#include <univalue.h>
#include <util/bip32.h>
#include <util/check.h>
#include <util/expected.h>
#include <util/result.h>
#include <util/strencodings.h>
#include <util/translation.h>
#include <util/vector.h>
#include <validation.h>
#include <algorithm>
#include <any>
#include <bitset>
#include <cstddef>
#include <cstdint>
#include <map>
#include <memory>
#include <optional>
#include <set>
#include <span>
#include <tuple>
#include <utility>
#include <vector>

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< RPCArg > CreateTxDoc ()
PartiallySignedTransaction ProcessPSBT (const std::string &psbt_string, const std::any &context, const HidingSigningProvider &provider, std::optional< int > sighash_type, bool finalize)
static RPCMethod getrawtransaction ()
static RPCMethod createrawtransaction ()
static RPCMethod decoderawtransaction ()
static RPCMethod decodescript ()
static RPCMethod combinerawtransaction ()
static RPCMethod signrawtransactionwithkey ()
const RPCResult & DecodePSBTInputs ()
const RPCResult & DecodePSBTOutputs ()
static RPCMethod decodepsbt ()
static RPCMethod combinepsbt ()
static RPCMethod finalizepsbt ()
static RPCMethod createpsbt ()
static RPCMethod converttopsbt ()
static RPCMethod utxoupdatepsbt ()
static RPCMethod joinpsbts ()
static RPCMethod analyzepsbt ()
RPCMethod 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::version) DEFAULT_RAWTX_VERSION {CTransaction::CURRENT_VERSION}

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.

◆ analyzepsbt()

RPCMethod analyzepsbt ( )
static

Definition at line 1973 of file rawtransaction.cpp.

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

◆ combinepsbt()

RPCMethod combinepsbt ( )
static

Definition at line 1623 of file rawtransaction.cpp.

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

◆ combinerawtransaction()

RPCMethod combinerawtransaction ( )
static

Definition at line 611 of file rawtransaction.cpp.

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

◆ converttopsbt()

RPCMethod converttopsbt ( )
static

Definition at line 1774 of file rawtransaction.cpp.

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

◆ createpsbt()

RPCMethod createpsbt ( )
static

Definition at line 1727 of file rawtransaction.cpp.

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

◆ createrawtransaction()

RPCMethod createrawtransaction ( )
static

Definition at line 403 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 113 of file rawtransaction.cpp.

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

◆ decodepsbt()

RPCMethod decodepsbt ( )
static

Definition at line 1074 of file rawtransaction.cpp.

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

◆ DecodePSBTInputs()

const RPCResult & DecodePSBTInputs ( )

Definition at line 822 of file rawtransaction.cpp.

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

◆ DecodePSBTOutputs()

const RPCResult & DecodePSBTOutputs ( )

Definition at line 988 of file rawtransaction.cpp.

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

◆ decoderawtransaction()

RPCMethod decoderawtransaction ( )
static

Definition at line 435 of file rawtransaction.cpp.

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

◆ decodescript()

RPCMethod decodescript ( )
static

Definition at line 476 of file rawtransaction.cpp.

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

◆ descriptorprocesspsbt()

RPCMethod descriptorprocesspsbt ( )

Definition at line 2083 of file rawtransaction.cpp.

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

◆ finalizepsbt()

RPCMethod finalizepsbt ( )
static

Definition at line 1670 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()

RPCMethod getrawtransaction ( )
static

Definition at line 240 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 142 of file transaction.cpp.

◆ joinpsbts()

RPCMethod joinpsbts ( )
static

Definition at line 1890 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 154 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 2170 of file rawtransaction.cpp.

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

◆ signrawtransactionwithkey()

RPCMethod signrawtransactionwithkey ( )
static

Definition at line 716 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 84 of file rawtransaction.cpp.

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

◆ utxoupdatepsbt()

RPCMethod utxoupdatepsbt ( )
static

Definition at line 1843 of file rawtransaction.cpp.

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

Variable Documentation

◆ DEFAULT_RAWTX_VERSION

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

Definition at line 82 of file rawtransaction.cpp.