Bitcoin Core  0.19.99
P2P Digital Currency
Functions | Variables
rawtransaction.cpp File Reference
#include <chain.h>
#include <coins.h>
#include <consensus/validation.h>
#include <core_io.h>
#include <index/txindex.h>
#include <key_io.h>
#include <merkleblock.h>
#include <node/coin.h>
#include <node/context.h>
#include <node/psbt.h>
#include <node/transaction.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/util.h>
#include <script/script.h>
#include <script/sign.h>
#include <script/signingprovider.h>
#include <script/standard.h>
#include <uint256.h>
#include <util/moneystr.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <validation.h>
#include <validationinterface.h>
#include <numeric>
#include <stdint.h>
#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)
 
static UniValue getrawtransaction (const JSONRPCRequest &request)
 
static UniValue gettxoutproof (const JSONRPCRequest &request)
 
static UniValue verifytxoutproof (const JSONRPCRequest &request)
 
static UniValue createrawtransaction (const JSONRPCRequest &request)
 
static UniValue decoderawtransaction (const JSONRPCRequest &request)
 
static std::string GetAllOutputTypes ()
 
static UniValue decodescript (const JSONRPCRequest &request)
 
static UniValue combinerawtransaction (const JSONRPCRequest &request)
 
static UniValue signrawtransactionwithkey (const JSONRPCRequest &request)
 
static UniValue sendrawtransaction (const JSONRPCRequest &request)
 
static UniValue testmempoolaccept (const JSONRPCRequest &request)
 
static std::string WriteHDKeypath (std::vector< uint32_t > &keypath)
 
UniValue decodepsbt (const JSONRPCRequest &request)
 
UniValue combinepsbt (const JSONRPCRequest &request)
 
UniValue finalizepsbt (const JSONRPCRequest &request)
 
UniValue createpsbt (const JSONRPCRequest &request)
 
UniValue converttopsbt (const JSONRPCRequest &request)
 
UniValue utxoupdatepsbt (const JSONRPCRequest &request)
 
UniValue joinpsbts (const JSONRPCRequest &request)
 
UniValue analyzepsbt (const JSONRPCRequest &request)
 
void RegisterRawTransactionRPCCommands (CRPCTable &t)
 Register raw transaction RPC commands. More...
 

Variables

static const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE {COIN / 10}
 Maximum fee rate for sendrawtransaction and testmempoolaccept. More...
 
static const CRPCCommand commands []
 

Function Documentation

◆ analyzepsbt()

UniValue analyzepsbt ( const JSONRPCRequest request)

Definition at line 1708 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ combinepsbt()

UniValue combinepsbt ( const JSONRPCRequest request)

Definition at line 1277 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ combinerawtransaction()

static UniValue combinerawtransaction ( const JSONRPCRequest request)
static

Definition at line 619 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ converttopsbt()

UniValue converttopsbt ( const JSONRPCRequest request)

Definition at line 1460 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ createpsbt()

UniValue createpsbt ( const JSONRPCRequest request)

Definition at line 1382 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ createrawtransaction()

static UniValue createrawtransaction ( const JSONRPCRequest request)
static

Definition at line 363 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ decodepsbt()

UniValue decodepsbt ( const JSONRPCRequest request)

Definition at line 972 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ decoderawtransaction()

static UniValue decoderawtransaction ( const JSONRPCRequest request)
static

Definition at line 432 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ decodescript()

static UniValue decodescript ( const JSONRPCRequest request)
static

Definition at line 528 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ finalizepsbt()

UniValue finalizepsbt ( const JSONRPCRequest request)

Definition at line 1325 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ GetAllOutputTypes()

static std::string GetAllOutputTypes ( )
static

Definition at line 518 of file rawtransaction.cpp.

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

◆ getrawtransaction()

static UniValue getrawtransaction ( const JSONRPCRequest request)
static

Definition at line 75 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ gettxoutproof()

static UniValue gettxoutproof ( const JSONRPCRequest request)
static

Definition at line 225 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ joinpsbts()

UniValue joinpsbts ( const JSONRPCRequest request)

Definition at line 1615 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ RegisterRawTransactionRPCCommands()

void RegisterRawTransactionRPCCommands ( CRPCTable t)

Register raw transaction RPC commands.

Definition at line 1842 of file rawtransaction.cpp.

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

◆ sendrawtransaction()

static UniValue sendrawtransaction ( const JSONRPCRequest request)
static

Definition at line 797 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ signrawtransactionwithkey()

static UniValue signrawtransactionwithkey ( const JSONRPCRequest request)
static

Definition at line 702 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ testmempoolaccept()

static UniValue testmempoolaccept ( const JSONRPCRequest request)
static

Definition at line 858 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ TxToJSON()

static void TxToJSON ( const CTransaction tx,
const uint256  hashBlock,
UniValue entry 
)
static

Definition at line 49 of file rawtransaction.cpp.

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

◆ utxoupdatepsbt()

UniValue utxoupdatepsbt ( const JSONRPCRequest request)

Definition at line 1527 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ verifytxoutproof()

static UniValue verifytxoutproof ( const JSONRPCRequest request)
static

Definition at line 318 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ WriteHDKeypath()

static std::string WriteHDKeypath ( std::vector< uint32_t > &  keypath)
static

Definition at line 953 of file rawtransaction.cpp.

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

Variable Documentation

◆ commands

const CRPCCommand commands[]
static
Initial value:
=
{
{ "rawtransactions", "getrawtransaction", &getrawtransaction, {"txid","verbose","blockhash"} },
{ "rawtransactions", "createrawtransaction", &createrawtransaction, {"inputs","outputs","locktime","replaceable"} },
{ "rawtransactions", "decoderawtransaction", &decoderawtransaction, {"hexstring","iswitness"} },
{ "rawtransactions", "decodescript", &decodescript, {"hexstring"} },
{ "rawtransactions", "sendrawtransaction", &sendrawtransaction, {"hexstring","allowhighfees|maxfeerate"} },
{ "rawtransactions", "combinerawtransaction", &combinerawtransaction, {"txs"} },
{ "rawtransactions", "signrawtransactionwithkey", &signrawtransactionwithkey, {"hexstring","privkeys","prevtxs","sighashtype"} },
{ "rawtransactions", "testmempoolaccept", &testmempoolaccept, {"rawtxs","allowhighfees|maxfeerate"} },
{ "rawtransactions", "decodepsbt", &decodepsbt, {"psbt"} },
{ "rawtransactions", "combinepsbt", &combinepsbt, {"txs"} },
{ "rawtransactions", "finalizepsbt", &finalizepsbt, {"psbt", "extract"} },
{ "rawtransactions", "createpsbt", &createpsbt, {"inputs","outputs","locktime","replaceable"} },
{ "rawtransactions", "converttopsbt", &converttopsbt, {"hexstring","permitsigdata","iswitness"} },
{ "rawtransactions", "utxoupdatepsbt", &utxoupdatepsbt, {"psbt", "descriptors"} },
{ "rawtransactions", "joinpsbts", &joinpsbts, {"txs"} },
{ "rawtransactions", "analyzepsbt", &analyzepsbt, {"psbt"} },
{ "blockchain", "gettxoutproof", &gettxoutproof, {"txids", "blockhash"} },
{ "blockchain", "verifytxoutproof", &verifytxoutproof, {"proof"} },
}
static UniValue combinerawtransaction(const JSONRPCRequest &request)
static UniValue createrawtransaction(const JSONRPCRequest &request)
static UniValue sendrawtransaction(const JSONRPCRequest &request)
UniValue converttopsbt(const JSONRPCRequest &request)
static UniValue gettxoutproof(const JSONRPCRequest &request)
static UniValue decodescript(const JSONRPCRequest &request)
UniValue finalizepsbt(const JSONRPCRequest &request)
UniValue decodepsbt(const JSONRPCRequest &request)
static UniValue verifytxoutproof(const JSONRPCRequest &request)
UniValue analyzepsbt(const JSONRPCRequest &request)
UniValue joinpsbts(const JSONRPCRequest &request)
static UniValue signrawtransactionwithkey(const JSONRPCRequest &request)
static UniValue getrawtransaction(const JSONRPCRequest &request)
static UniValue decoderawtransaction(const JSONRPCRequest &request)
UniValue combinepsbt(const JSONRPCRequest &request)
static UniValue testmempoolaccept(const JSONRPCRequest &request)
UniValue utxoupdatepsbt(const JSONRPCRequest &request)
UniValue createpsbt(const JSONRPCRequest &request)

Definition at line 1817 of file rawtransaction.cpp.

◆ DEFAULT_MAX_RAW_TX_FEE_RATE

const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE {COIN / 10}
static

Maximum fee rate for sendrawtransaction and testmempoolaccept.

By default, a transaction with a fee rate higher than this will be rejected by the RPCs. This can be overridden with the maxfeerate argument.

Definition at line 47 of file rawtransaction.cpp.