Dash Core  0.12.2.1
P2P Digital Currency
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 <boost/assign/list_of.hpp>
#include <boost/foreach.hpp>

Go to the source code of this file.

Functions

string FormatScript (const CScript &script)
 
string ScriptToAsmStr (const CScript &script, const bool fAttemptSighashDecode)
 
string EncodeHexTx (const CTransaction &tx)
 
void ScriptPubKeyToUniv (const CScript &scriptPubKey, UniValue &out, bool fIncludeHex)
 
void TxToUniv (const CTransaction &tx, const uint256 &hashBlock, UniValue &entry)
 

Variables

const map< unsigned char, string > mapSigHashTypes
 

Function Documentation

◆ EncodeHexTx()

◆ FormatScript()

string FormatScript ( const CScript script)

Definition at line 23 of file core_write.cpp.

◆ ScriptPubKeyToUniv()

void ScriptPubKeyToUniv ( const CScript scriptPubKey,
UniValue out,
bool  fIncludeHex 
)

Definition at line 126 of file core_write.cpp.

Referenced by TxToUniv().

◆ ScriptToAsmStr()

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 75 of file core_write.cpp.

Referenced by CPrivateSendServer::AddScriptSig(), CMasternodePaymentVote::CheckSignature(), CGovernanceObject::IsCollateralValid(), CPrivateSendServer::IsInputScriptSigValid(), MutateTxSign(), CPrivateSendServer::ProcessMessage(), ScriptPubKeyToJSON(), ScriptPubKeyToUniv(), CMasternodePaymentVote::Sign(), CPrivateSendClient::SignFinalTransaction(), signrawtransaction(), CMasternodePaymentVote::ToString(), TxToJSON(), and TxToUniv().

◆ TxToUniv()

void TxToUniv ( const CTransaction tx,
const uint256 hashBlock,
UniValue entry 
)

Definition at line 151 of file core_write.cpp.

Referenced by OutputTxJSON().

Variable Documentation

◆ mapSigHashTypes

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

Definition at line 58 of file core_write.cpp.

Referenced by ScriptToAsmStr().