Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Go to the source code of this file.
Functions | |
CScript | ParseScript (const std::string &s) |
std::string | ScriptToAsmStr (const CScript &script, const bool fAttemptSighashDecode=false) |
Create the assembly string representation of a CScript object. More... | |
bool | DecodeHexTx (CMutableTransaction &tx, const std::string &strHexTx) |
bool | DecodeHexBlk (CBlock &, const std::string &strHexBlk) |
uint256 | ParseHashUV (const UniValue &v, const std::string &strName) |
uint256 | ParseHashStr (const std::string &, const std::string &strName) |
std::vector< unsigned char > | ParseHexUV (const UniValue &v, const std::string &strName) |
UniValue | ValueFromAmount (const CAmount &amount) |
std::string | FormatScript (const CScript &script) |
std::string | EncodeHexTx (const CTransaction &tx) |
void | ScriptPubKeyToUniv (const CScript &scriptPubKey, UniValue &out, bool fIncludeHex) |
void | TxToUniv (const CTransaction &tx, const uint256 &hashBlock, UniValue &entry, bool include_hex=true, const CSpentIndexTxInfo *ptxSpentInfo=nullptr) |
Function Documentation
◆ DecodeHexBlk()
bool DecodeHexBlk | ( | CBlock & | , |
const std::string & | strHexBlk | ||
) |
Definition at line 109 of file core_read.cpp.
References IsHex(), ParseHex(), PROTOCOL_VERSION, and SER_NETWORK.
Referenced by getblocktemplate(), and submitblock().
◆ DecodeHexTx()
bool DecodeHexTx | ( | CMutableTransaction & | tx, |
const std::string & | strHexTx | ||
) |
Definition at line 90 of file core_read.cpp.
References CDataStream::empty(), IsHex(), ParseHex(), PROTOCOL_VERSION, and SER_NETWORK.
Referenced by combinerawtransaction(), CommandLineRawTx(), decoderawtransaction(), fundrawtransaction(), importprunedfunds(), sendrawtransaction(), and signrawtransaction().
◆ EncodeHexTx()
std::string EncodeHexTx | ( | const CTransaction & | tx | ) |
Definition at line 130 of file core_write.cpp.
References CDataStream::begin(), CDataStream::end(), HexStr(), PROTOCOL_VERSION, and SER_NETWORK.
Referenced by combinerawtransaction(), createrawtransaction(), fundrawtransaction(), getblocktemplate(), getrawtransaction(), getspecialtxes(), gettransaction(), TransactionTablePriv::getTxHex(), OutputTxHex(), signrawtransaction(), CSimplifiedMNListDiff::ToJson(), and TxToUniv().
◆ FormatScript()
std::string FormatScript | ( | const CScript & | script | ) |
Definition at line 35 of file core_write.cpp.
References prevector< N, T, Size, Diff >::begin(), prevector< N, T, Size, Diff >::end(), CScript::GetOp2(), GetOpName(), HexStr(), OP_0, OP_1, OP_16, OP_1NEGATE, OP_NOP, OP_NOP10, and strprintf.
◆ ParseHashStr()
uint256 ParseHashStr | ( | const std::string & | , |
const std::string & | strName | ||
) |
Definition at line 134 of file core_read.cpp.
References IsHex(), and base_blob< BITS >::SetHex().
Referenced by ParseHashUV(), and prioritisetransaction().
◆ ParseHashUV()
Definition at line 126 of file core_read.cpp.
References UniValue::getValStr(), UniValue::isStr(), and ParseHashStr().
Referenced by MutateTxSign().
◆ ParseHexUV()
std::vector<unsigned char> ParseHexUV | ( | const UniValue & | v, |
const std::string & | strName | ||
) |
Definition at line 144 of file core_read.cpp.
References UniValue::getValStr(), IsHex(), UniValue::isStr(), and ParseHex().
Referenced by MutateTxSign().
◆ ParseScript()
CScript ParseScript | ( | const std::string & | s | ) |
Definition at line 22 of file core_read.cpp.
References atoi64(), prevector< N, T, Size, Diff >::end(), GetOpName(), prevector< N, T, Size, Diff >::insert(), IsHex(), MAX_OPCODE, name, OP_NOP, OP_RESERVED, and ParseHex().
Referenced by MutateTxAddOutScript().
◆ ScriptPubKeyToUniv()
Definition at line 137 of file core_write.cpp.
References prevector< N, T, Size, Diff >::begin(), EncodeDestination(), prevector< N, T, Size, Diff >::end(), ExtractDestinations(), GetTxnOutputType(), HexStr(), UniValue::push_back(), UniValue::pushKV(), ScriptToAsmStr(), and UniValue::VARR.
Referenced by decodescript(), gettxout(), rest_getutxos(), and TxToUniv().
◆ ScriptToAsmStr()
std::string ScriptToAsmStr | ( | const CScript & | script, |
const bool | fAttemptSighashDecode | ||
) |
Create the assembly string representation of a CScript object.
- Parameters
-
[in] script CScript object to convert into the asm string representation. [in] fAttemptSighashDecode Whether to attempt to decode sighash types on data within the script that matches the format of a signature. Only pass true for scripts you believe could contain signatures. For example, pass false, or omit the this argument (defaults to false), for scriptPubKeys.
Definition at line 86 of file core_write.cpp.
References prevector< N, T, Size, Diff >::begin(), CheckSignatureEncoding(), prevector< N, T, Size, Diff >::end(), CScript::GetOp(), GetOpName(), HexStr(), CScript::IsUnspendable(), mapSigHashTypes, OP_PUSHDATA4, SCRIPT_VERIFY_STRICTENC, and strprintf.
Referenced by CPrivateSendServer::AddScriptSig(), CGovernanceObject::IsCollateralValid(), CPrivateSendServer::IsInputScriptSigValid(), CPrivateSendBaseSession::IsValidInOuts(), MutateTxSign(), ScriptPubKeyToUniv(), CPrivateSendClientSession::SignFinalTransaction(), signrawtransaction(), and TxToUniv().
◆ TxToUniv()
void TxToUniv | ( | const CTransaction & | tx, |
const uint256 & | hashBlock, | ||
UniValue & | entry, | ||
bool | include_hex = true , |
||
const CSpentIndexTxInfo * | ptxSpentInfo = nullptr |
||
) |
Definition at line 163 of file core_write.cpp.
References prevector< N, T, Size, Diff >::begin(), EncodeDestination(), EncodeHexTx(), prevector< N, T, Size, Diff >::end(), CTransaction::GetHash(), base_blob< BITS >::GetHex(), GetSerializeSize(), GetTxPayload(), COutPoint::hash, HexStr(), CTransaction::IsCoinBase(), base_blob< BITS >::IsNull(), CSpentIndexTxInfo::mSpentInfo, COutPoint::n, CTransaction::nLockTime, CTxIn::nSequence, CTransaction::nType, CTxOut::nValue, CTransaction::nVersion, Pair(), CTxIn::prevout, PROTOCOL_VERSION, UniValue::push_back(), UniValue::pushKV(), CTxOut::scriptPubKey, ScriptPubKeyToUniv(), CTxIn::scriptSig, ScriptToAsmStr(), SER_NETWORK, CCbTx::ToJson(), CProRegTx::ToJson(), CProUpServTx::ToJson(), llmq::CFinalCommitmentTxPayload::ToJson(), CProUpRegTx::ToJson(), CProUpRevTx::ToJson(), TRANSACTION_COINBASE, TRANSACTION_PROVIDER_REGISTER, TRANSACTION_PROVIDER_UPDATE_REGISTRAR, TRANSACTION_PROVIDER_UPDATE_REVOKE, TRANSACTION_PROVIDER_UPDATE_SERVICE, TRANSACTION_QUORUM_COMMITMENT, ValueFromAmount(), UniValue::VARR, CTransaction::vExtraPayload, CTransaction::vin, UniValue::VOBJ, and CTransaction::vout.
Referenced by blockToJSON(), decoderawtransaction(), OutputTxJSON(), rest_tx(), and TxToJSON().
◆ ValueFromAmount()
Definition at line 25 of file core_write.cpp.
References COIN, strprintf, and UniValue::VNUM.
Referenced by AcentryToJSON(), CPrivateSend::DenominationToString(), entryToJSON(), estimatefee(), estimaterawfee(), estimatesmartfee(), fundrawtransaction(), getbalance(), getgovernanceinfo(), CPrivateSendServer::GetJsonInfo(), CPrivateSendClientSession::GetJsonInfo(), getnetworkinfo(), getreceivedbyaccount(), getreceivedbyaddress(), getsuperblockbudget(), gettransaction(), gettxout(), gettxoutsetinfo(), getunconfirmedbalance(), getwalletinfo(), listaccounts(), listaddressbalances(), listaddressgroupings(), ListReceived(), ListTransactions(), listunspent(), mempoolInfoToJSON(), rest_getutxos(), and TxToUniv().