Bitcoin Core 28.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
core_write.cpp File Reference
#include <core_io.h>
#include <common/system.h>
#include <consensus/amount.h>
#include <consensus/consensus.h>
#include <consensus/validation.h>
#include <key_io.h>
#include <script/descriptor.h>
#include <script/script.h>
#include <script/solver.h>
#include <serialize.h>
#include <streams.h>
#include <undo.h>
#include <univalue.h>
#include <util/check.h>
#include <util/strencodings.h>
#include <map>
#include <string>
#include <vector>
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 SighashToStr (unsigned char sighash_type)
 
std::string ScriptToAsmStr (const CScript &script, const bool fAttemptSighashDecode)
 Create the assembly string representation of a CScript object.
 
std::string EncodeHexTx (const CTransaction &tx)
 
void ScriptToUniv (const CScript &script, UniValue &out, bool include_hex, bool include_address, const SigningProvider *provider)
 
void TxToUniv (const CTransaction &tx, const uint256 &block_hash, UniValue &entry, bool include_hex, const CTxUndo *txundo, TxVerbosity verbosity)
 

Variables

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

Function Documentation

◆ EncodeHexTx()

std::string EncodeHexTx ( const CTransaction & tx)

Definition at line 143 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 39 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 98 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_hex,
bool include_address,
const SigningProvider * provider )

Definition at line 150 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 ( unsigned char sighash_type)

Definition at line 84 of file core_write.cpp.

Here is the caller graph for this function:

◆ TxToUniv()

void TxToUniv ( const CTransaction & tx,
const uint256 & block_hash,
UniValue & entry,
bool include_hex,
const CTxUndo * txundo,
TxVerbosity verbosity )

Definition at line 171 of file core_write.cpp.

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

◆ ValueFromAmount()

UniValue ValueFromAmount ( const CAmount amount)

Definition at line 26 of file core_write.cpp.

Here is the caller graph for this function:

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")},
}
@ SIGHASH_ANYONECANPAY
Definition interpreter.h:33
@ SIGHASH_ALL
Definition interpreter.h:30
@ SIGHASH_NONE
Definition interpreter.h:31
@ SIGHASH_SINGLE
Definition interpreter.h:32

Definition at line 75 of file core_write.cpp.