Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

core_io.h File Reference
#include <amount.h>
#include <string>
#include <vector>
+ Include dependency graph for core_io.h:
+ This graph shows which files directly or indirectly include this file:

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

◆ EncodeHexTx()

◆ FormatScript()

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

uint256 ParseHashUV ( const UniValue v,
const std::string &  strName 
)

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

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

Released under the MIT license