Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <base58.h>
#include <chain.h>
#include <coins.h>
#include <consensus/validation.h>
#include <core_io.h>
#include <init.h>
#include <keystore.h>
#include <validation.h>
#include <validationinterface.h>
#include <merkleblock.h>
#include <net.h>
#include <policy/policy.h>
#include <primitives/transaction.h>
#include <rpc/safemode.h>
#include <rpc/server.h>
#include <script/script.h>
#include <script/script_error.h>
#include <script/sign.h>
#include <script/standard.h>
#include <txmempool.h>
#include <uint256.h>
#include <utilstrencodings.h>
#include <evo/specialtx.h>
#include <evo/providertx.h>
#include <evo/cbtx.h>
#include <llmq/quorums_chainlocks.h>
#include <llmq/quorums_commitment.h>
#include <llmq/quorums_instantsend.h>
#include <future>
#include <stdint.h>
#include <univalue.h>
Go to the source code of this file.
Functions | |
void | TxToJSON (const CTransaction &tx, const uint256 hashBlock, UniValue &entry) |
UniValue | getrawtransaction (const JSONRPCRequest &request) |
UniValue | gettxoutproof (const JSONRPCRequest &request) |
UniValue | verifytxoutproof (const JSONRPCRequest &request) |
UniValue | createrawtransaction (const JSONRPCRequest &request) |
UniValue | decoderawtransaction (const JSONRPCRequest &request) |
UniValue | decodescript (const JSONRPCRequest &request) |
static void | TxInErrorToJSON (const CTxIn &txin, UniValue &vErrorsRet, const std::string &strMessage) |
Pushes a JSON object for script verification or signing errors to vErrorsRet. More... | |
UniValue | combinerawtransaction (const JSONRPCRequest &request) |
UniValue | signrawtransaction (const JSONRPCRequest &request) |
UniValue | sendrawtransaction (const JSONRPCRequest &request) |
void | RegisterRawTransactionRPCCommands (CRPCTable &t) |
Register raw transaction RPC commands. More... | |
Variables | |
static const CRPCCommand | commands [] |
Function Documentation
◆ combinerawtransaction()
UniValue combinerawtransaction | ( | const JSONRPCRequest & | request | ) |
Definition at line 614 of file rawtransaction.cpp.
References CCoinsViewCache::AccessCoin(), CombineSignatures(), CTxMemPool::cs, cs_main, DataFromTransaction(), DecodeHexTx(), EncodeHexTx(), JSONRPCRequest::fHelp, UniValue::get_array(), HelpExampleCli(), Coin::IsSpent(), JSONRPCError(), LOCK, mempool, CTxOut::nValue, Coin::out, JSONRPCRequest::params, pcoinsTip, CTxIn::prevout, RPC_DESERIALIZATION_ERROR, RPC_VERIFY_ERROR, CTxOut::scriptPubKey, CCoinsViewBacked::SetBackend(), UniValue::size(), strprintf, UpdateTransaction(), and CMutableTransaction::vin.
◆ createrawtransaction()
UniValue createrawtransaction | ( | const JSONRPCRequest & | request | ) |
Definition at line 369 of file rawtransaction.cpp.
References AmountFromValue(), CURRENCY_UNIT, DecodeDestination(), EncodeHexTx(), JSONRPCRequest::fHelp, find_value(), UniValue::get_array(), UniValue::get_int(), UniValue::get_int64(), UniValue::get_obj(), UniValue::getKeys(), GetScriptForDestination(), HelpExampleCli(), HelpExampleRpc(), UniValue::isNull(), UniValue::isNum(), IsValidDestination(), JSONRPCError(), CMutableTransaction::nLockTime, OP_RETURN, JSONRPCRequest::params, ParseHashO(), ParseHexV(), RPC_INVALID_ADDRESS_OR_KEY, RPC_INVALID_PARAMETER, RPCTypeCheck(), UniValue::size(), CMutableTransaction::vin, and CMutableTransaction::vout.
◆ decoderawtransaction()
UniValue decoderawtransaction | ( | const JSONRPCRequest & | request | ) |
Definition at line 483 of file rawtransaction.cpp.
References cs_main, CURRENCY_UNIT, DecodeHexTx(), JSONRPCRequest::fHelp, UniValue::get_str(), HelpExampleCli(), HelpExampleRpc(), JSONRPCError(), LOCK, JSONRPCRequest::params, RPC_DESERIALIZATION_ERROR, RPCTypeCheck(), UniValue::size(), TxToUniv(), and UniValue::VOBJ.
◆ decodescript()
UniValue decodescript | ( | const JSONRPCRequest & | request | ) |
Definition at line 552 of file rawtransaction.cpp.
References EncodeDestination(), JSONRPCRequest::fHelp, find_value(), UniValue::get_str(), HelpExampleCli(), HelpExampleRpc(), UniValue::isStr(), Pair(), JSONRPCRequest::params, ParseHexV(), UniValue::push_back(), RPCTypeCheck(), ScriptPubKeyToUniv(), UniValue::size(), and UniValue::VOBJ.
◆ getrawtransaction()
UniValue getrawtransaction | ( | const JSONRPCRequest & | request | ) |
Definition at line 105 of file rawtransaction.cpp.
References BLOCK_HAVE_DATA, chainActive, CChain::Contains(), cs_main, CURRENCY_UNIT, EncodeHexTx(), JSONRPCRequest::fHelp, fTxIndex, UniValue::get_bool(), UniValue::get_int(), GetTransaction(), HelpExampleCli(), HelpExampleRpc(), UniValue::isNull(), UniValue::isNum(), JSONRPCError(), LOCK, mapBlockIndex, CBlockIndex::nStatus, Pair(), JSONRPCRequest::params, Params(), ParseHashV(), UniValue::push_back(), RPC_INVALID_ADDRESS_OR_KEY, RPC_MISC_ERROR, UniValue::size(), TxToJSON(), and UniValue::VOBJ.
◆ gettxoutproof()
UniValue gettxoutproof | ( | const JSONRPCRequest & | request | ) |
Definition at line 241 of file rawtransaction.cpp.
References AccessByTxid(), CDataStream::begin(), chainActive, cs_main, CDataStream::end(), JSONRPCRequest::fHelp, UniValue::get_array(), UniValue::get_str(), GetTransaction(), HelpExampleCli(), HelpExampleRpc(), HexStr(), IsHex(), base_blob< BITS >::IsNull(), UniValue::isNull(), Coin::IsSpent(), JSONRPCError(), LOCK, mapBlockIndex, Coin::nHeight, JSONRPCRequest::params, Params(), pcoinsTip, PROTOCOL_VERSION, ReadBlockFromDisk(), RPC_INTERNAL_ERROR, RPC_INVALID_ADDRESS_OR_KEY, RPC_INVALID_PARAMETER, SER_NETWORK, UniValue::size(), uint256S(), and CBlock::vtx.
◆ RegisterRawTransactionRPCCommands()
void RegisterRawTransactionRPCCommands | ( | CRPCTable & | t | ) |
Register raw transaction RPC commands.
Definition at line 1070 of file rawtransaction.cpp.
References CRPCTable::appendCommand(), ARRAYLEN, commands, and CRPCCommand::name.
Referenced by RegisterAllCoreRPCCommands().
◆ sendrawtransaction()
UniValue sendrawtransaction | ( | const JSONRPCRequest & | request | ) |
Definition at line 956 of file rawtransaction.cpp.
References AcceptToMemoryPool(), CCoinsViewCache::AccessCoin(), CallFunctionInValidationInterfaceQueue(), cs_main, DecodeHexTx(), CTxMemPool::exists(), JSONRPCRequest::fHelp, g_connman, UniValue::get_bool(), UniValue::get_str(), base_blob< BITS >::GetHex(), CValidationState::GetRejectCode(), CValidationState::GetRejectReason(), HelpExampleCli(), HelpExampleRpc(), CValidationState::IsInvalid(), UniValue::isNull(), Coin::IsSpent(), JSONRPCError(), LOCK, MakeTransactionRef(), maxTxFee, mempool, ObserveSafeMode(), JSONRPCRequest::params, pcoinsTip, RPC_CLIENT_P2P_DISABLED, RPC_DESERIALIZATION_ERROR, RPC_TRANSACTION_ALREADY_IN_CHAIN, RPC_TRANSACTION_ERROR, RPC_TRANSACTION_REJECTED, RPCTypeCheck(), UniValue::size(), and strprintf.
◆ signrawtransaction()
UniValue signrawtransaction | ( | const JSONRPCRequest & | request | ) |
Definition at line 701 of file rawtransaction.cpp.
References CCoinsViewCache::AccessCoin(), CCoinsViewCache::AddCoin(), CBasicKeyStore::AddCScript(), CKeyStore::AddKey(), AmountFromValue(), CombineSignatures(), CTxMemPool::cs, cs_main, CWallet::cs_wallet, DataFromTransaction(), DecodeHexTx(), UniValue::empty(), EncodeHexTx(), EnsureWalletIsUnlocked(), UniValue::exists(), JSONRPCRequest::fHelp, find_value(), UniValue::get_array(), UniValue::get_int(), UniValue::get_obj(), UniValue::get_str(), CBitcoinSecret::GetKey(), GetWalletForJSONRPCRequest(), HelpExampleCli(), HelpExampleRpc(), HelpRequiringPassphrase(), UniValue::isNull(), UniValue::isObject(), Coin::IsSpent(), CKey::IsValid(), JSONRPCError(), LOCK, mempool, Coin::nHeight, CTxOut::nValue, ObserveSafeMode(), Coin::out, Pair(), JSONRPCRequest::params, ParseHashO(), ParseHexO(), ParseHexV(), pcoinsTip, CTxIn::prevout, ProduceSignature(), UniValue::push_back(), RPC_DESERIALIZATION_ERROR, RPC_INVALID_ADDRESS_OR_KEY, RPC_INVALID_PARAMETER, RPCTypeCheck(), RPCTypeCheckObj(), SCRIPT_ERR_INVALID_STACK_OPERATION, SCRIPT_ERR_OK, ScriptErrorString(), CTxOut::scriptPubKey, CTxIn::scriptSig, ScriptToAsmStr(), CCoinsViewBacked::SetBackend(), CBitcoinSecret::SetString(), SIGHASH_ALL, SIGHASH_ANYONECANPAY, SIGHASH_NONE, SIGHASH_SINGLE, UniValue::size(), STANDARD_SCRIPT_VERIFY_FLAGS, TxInErrorToJSON(), UpdateTransaction(), UniValue::VARR, VerifyScript(), CMutableTransaction::vin, UniValue::VNUM, UniValue::VOBJ, CMutableTransaction::vout, and UniValue::VSTR.
◆ TxInErrorToJSON()
|
static |
Pushes a JSON object for script verification or signing errors to vErrorsRet.
Definition at line 603 of file rawtransaction.cpp.
References prevector< N, T, Size, Diff >::begin(), prevector< N, T, Size, Diff >::end(), COutPoint::hash, HexStr(), COutPoint::n, CTxIn::nSequence, Pair(), CTxIn::prevout, UniValue::push_back(), CTxIn::scriptSig, base_blob< BITS >::ToString(), and UniValue::VOBJ.
Referenced by signrawtransaction().
◆ TxToJSON()
void TxToJSON | ( | const CTransaction & | tx, |
const uint256 | hashBlock, | ||
UniValue & | entry | ||
) |
Definition at line 48 of file rawtransaction.cpp.
References chainActive, llmq::chainLocksHandler, CChain::Contains(), CBlockIndex::GetBlockHash(), CBlockIndex::GetBlockTime(), CTransaction::GetHash(), base_blob< BITS >::GetHex(), GetSpentIndex(), llmq::CChainLocksHandler::HasChainLock(), CChain::Height(), CTransaction::IsCoinBase(), llmq::CInstantSendManager::IsLocked(), base_blob< BITS >::IsNull(), mapBlockIndex, CSpentIndexTxInfo::mSpentInfo, CBlockIndex::nHeight, Pair(), UniValue::push_back(), llmq::quorumInstantSendManager, TxToUniv(), CTransaction::vin, and CTransaction::vout.
Referenced by getrawtransaction(), and getspecialtxes().
◆ verifytxoutproof()
UniValue verifytxoutproof | ( | const JSONRPCRequest & | request | ) |
Definition at line 331 of file rawtransaction.cpp.
References chainActive, CChain::Contains(), cs_main, JSONRPCRequest::fHelp, HelpExampleCli(), HelpExampleRpc(), JSONRPCError(), LOCK, mapBlockIndex, JSONRPCRequest::params, ParseHexV(), PROTOCOL_VERSION, UniValue::push_back(), RPC_INVALID_ADDRESS_OR_KEY, SER_NETWORK, UniValue::size(), and UniValue::VARR.
Variable Documentation
◆ commands
|
static |
Definition at line 1055 of file rawtransaction.cpp.
Referenced by RegisterRawTransactionRPCCommands().