Bitcoin
Functions | Variables
core_write.cpp File Reference
#include <core_io.h>
#include <consensus/consensus.h>
#include <consensus/validation.h>
#include <key_io.h>
#include <script/script.h>
#include <script/standard.h>
#include <serialize.h>
#include <streams.h>
#include <univalue.h>
#include <util/system.h>
#include <util/strencodings.h>

Functions

UniValue ValueFromAmount (const CAmount &amount)
 
std::string FormatScript (const CScript &script)
 
std::string SighashToStr (unsigned char sighash_type)
 
std::string ScriptToAsmStr (const CScript &script, const bool fAttemptSighashDecode)
 
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 uint256 &hashBlock, UniValue &entry, bool include_hex, int serialize_flags)
 

Variables

const std::map< unsigned char, std::string > mapSigHashTypes
 

Function Documentation

◆ EncodeHexTx()

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

◆ FormatScript()

std::string FormatScript ( const CScript script)

◆ ScriptPubKeyToUniv()

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

◆ 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.

◆ ScriptToUniv()

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

◆ SighashToStr()

std::string SighashToStr ( unsigned char  sighash_type)

◆ TxToUniv()

void TxToUniv ( const CTransaction tx,
const uint256 hashBlock,
UniValue entry,
bool  include_hex,
int  serialize_flags 
)

◆ ValueFromAmount()

UniValue ValueFromAmount ( const CAmount amount)

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: interpreter.h:26
Definition: interpreter.h:24
Definition: interpreter.h:25
Definition: interpreter.h:27