Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <core_io.h>
#include <base58.h>
#include <primitives/transaction.h>
#include <script/script.h>
#include <script/standard.h>
#include <serialize.h>
#include <streams.h>
#include <univalue.h>
#include <util.h>
#include <utilmoneystr.h>
#include <utilstrencodings.h>
#include <spentindex.h>
#include <evo/cbtx.h>
#include <evo/providertx.h>
#include <evo/specialtx.h>
#include <llmq/quorums_commitment.h>
Go to the source code of this file.
Functions | |
UniValue | ValueFromAmount (const CAmount &amount) |
std::string | FormatScript (const CScript &script) |
std::string | ScriptToAsmStr (const CScript &script, const bool fAttemptSighashDecode) |
Create the assembly string representation of a CScript object. More... | |
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, const CSpentIndexTxInfo *ptxSpentInfo) |
Variables | |
const std::map< unsigned char, std::string > | mapSigHashTypes |
Function Documentation
◆ 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.
◆ 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, | ||
const CSpentIndexTxInfo * | ptxSpentInfo | ||
) |
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().
Variable Documentation
◆ mapSigHashTypes
const std::map<unsigned char, std::string> mapSigHashTypes |
Definition at line 70 of file core_write.cpp.
Referenced by ScriptToAsmStr().