Bitcoin ABC 0.30.7
P2P Digital Currency
Functions | Variables
core_write.cpp File Reference
#include <core_io.h>
#include <common/system.h>
#include <config.h>
#include <consensus/amount.h>
#include <key_io.h>
#include <primitives/blockhash.h>
#include <primitives/transaction.h>
#include <script/script.h>
#include <script/sigencoding.h>
#include <script/standard.h>
#include <serialize.h>
#include <streams.h>
#include <undo.h>
#include <util/check.h>
#include <util/strencodings.h>
#include <univalue.h>
Include dependency graph for core_write.cpp:

Go to the source code of this file.

Functions

std::string FormatScript (const CScript &script)
 
std::string SighashToStr (uint8_t sighash_type)
 
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, const int serializeFlags)
 
void ScriptToUniv (const CScript &script, UniValue &out, bool include_address)
 
void ScriptPubKeyToUniv (const CScript &scriptPubKey, UniValue &out, bool fIncludeHex)
 
void TxToUniv (const CTransaction &tx, const BlockHash &hashBlock, UniValue &entry, bool include_hex, int serialize_flags, const CTxUndo *txundo)
 

Variables

const std::map< uint8_t, std::string > mapSigHashTypes
 

Function Documentation

◆ EncodeHexTx()

std::string EncodeHexTx ( const CTransaction tx,
const int  serializeFlags 
)

Definition at line 169 of file core_write.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FormatScript()

std::string FormatScript ( const CScript script)

Definition at line 24 of file core_write.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScriptPubKeyToUniv()

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

Definition at line 190 of file core_write.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScriptToUniv()

void ScriptToUniv ( const CScript script,
UniValue out,
bool  include_address 
)

Definition at line 175 of file core_write.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SighashToStr()

std::string SighashToStr ( uint8_t  sighash_type)

Definition at line 89 of file core_write.cpp.

Here is the caller graph for this function:

◆ TxToUniv()

void TxToUniv ( const CTransaction tx,
const BlockHash hashBlock,
UniValue entry,
bool  include_hex,
int  serialize_flags,
const CTxUndo txundo 
)

Definition at line 217 of file core_write.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ mapSigHashTypes

const std::map<uint8_t, std::string> mapSigHashTypes
Initial value:
= {
{SIGHASH_ALL, "ALL"},
{SIGHASH_ALL | SIGHASH_ANYONECANPAY, "ALL|ANYONECANPAY"},
{SIGHASH_ALL | SIGHASH_FORKID, "ALL|FORKID"},
"ALL|FORKID|ANYONECANPAY"},
{SIGHASH_NONE, "NONE"},
{SIGHASH_NONE | SIGHASH_ANYONECANPAY, "NONE|ANYONECANPAY"},
{SIGHASH_NONE | SIGHASH_FORKID, "NONE|FORKID"},
"NONE|FORKID|ANYONECANPAY"},
{SIGHASH_SINGLE, "SINGLE"},
{SIGHASH_SINGLE | SIGHASH_ANYONECANPAY, "SINGLE|ANYONECANPAY"},
{SIGHASH_SINGLE | SIGHASH_FORKID, "SINGLE|FORKID"},
"SINGLE|FORKID|ANYONECANPAY"},
}
@ SIGHASH_FORKID
Definition: sighashtype.h:18
@ SIGHASH_ANYONECANPAY
Definition: sighashtype.h:19
@ SIGHASH_ALL
Definition: sighashtype.h:15
@ SIGHASH_NONE
Definition: sighashtype.h:16
@ SIGHASH_SINGLE
Definition: sighashtype.h:17

Definition at line 71 of file core_write.cpp.