Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

core_write.cpp File Reference
#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>
+ Include dependency graph for core_write.cpp:

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()

◆ FormatScript()

◆ ScriptPubKeyToUniv()

◆ ScriptToAsmStr()

std::string ScriptToAsmStr ( const CScript script,
const bool  fAttemptSighashDecode 
)

Create the assembly string representation of a CScript object.

Parameters
[in]scriptCScript object to convert into the asm string representation.
[in]fAttemptSighashDecodeWhether 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()

◆ ValueFromAmount()

Variable Documentation

◆ mapSigHashTypes

const std::map<unsigned char, std::string> mapSigHashTypes
Initial value:
= {
{static_cast<unsigned char>(SIGHASH_ALL), std::string("ALL")},
{static_cast<unsigned char>(SIGHASH_ALL|SIGHASH_ANYONECANPAY), std::string("ALL|ANYONECANPAY")},
{static_cast<unsigned char>(SIGHASH_NONE), std::string("NONE")},
{static_cast<unsigned char>(SIGHASH_NONE|SIGHASH_ANYONECANPAY), std::string("NONE|ANYONECANPAY")},
{static_cast<unsigned char>(SIGHASH_SINGLE), std::string("SINGLE")},
{static_cast<unsigned char>(SIGHASH_SINGLE|SIGHASH_ANYONECANPAY), std::string("SINGLE|ANYONECANPAY")},
}

Definition at line 70 of file core_write.cpp.

Referenced by ScriptToAsmStr().

Released under the MIT license