Bitcoin Core  27.99.0
P2P Digital Currency
Enumerations | Functions
core_io.h File Reference
#include <consensus/amount.h>
#include <util/result.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.

Enumerations

enum class  TxVerbosity { SHOW_TXID , SHOW_DETAILS , SHOW_DETAILS_AND_PREVOUT }
 Verbose level for block's transaction. More...
 

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 &hex_tx, bool try_no_witness=false, bool try_witness=true)
 
bool DecodeHexBlk (CBlock &, const std::string &strHexBlk)
 
bool DecodeHexBlockHeader (CBlockHeader &, const std::string &hex_header)
 
util::Result< int > SighashFromStr (const std::string &sighash)
 
UniValue ValueFromAmount (const CAmount amount)
 
std::string FormatScript (const CScript &script)
 
std::string EncodeHexTx (const CTransaction &tx)
 
std::string SighashToStr (unsigned char sighash_type)
 
void ScriptToUniv (const CScript &script, UniValue &out, bool include_hex=true, bool include_address=false, const SigningProvider *provider=nullptr)
 
void TxToUniv (const CTransaction &tx, const uint256 &block_hash, UniValue &entry, bool include_hex=true, const CTxUndo *txundo=nullptr, TxVerbosity verbosity=TxVerbosity::SHOW_DETAILS)
 

Enumeration Type Documentation

◆ TxVerbosity

enum TxVerbosity
strong

Verbose level for block's transaction.

Enumerator
SHOW_TXID 

Only TXID for each block's transaction.

SHOW_DETAILS 

Include TXID, inputs, outputs, and other common block's transaction information.

SHOW_DETAILS_AND_PREVOUT 

The same as previous option with information about prevouts if available.

Definition at line 27 of file core_io.h.

Function Documentation

◆ DecodeHexBlk()

bool DecodeHexBlk ( CBlock block,
const std::string &  strHexBlk 
)

Definition at line 220 of file core_read.cpp.

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

◆ DecodeHexBlockHeader()

bool DecodeHexBlockHeader ( CBlockHeader header,
const std::string &  hex_header 
)

Definition at line 206 of file core_read.cpp.

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

◆ DecodeHexTx()

bool DecodeHexTx ( CMutableTransaction tx,
const std::string &  hex_tx,
bool  try_no_witness = false,
bool  try_witness = true 
)

Definition at line 196 of file core_read.cpp.

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

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

◆ ParseScript()

CScript ParseScript ( const std::string &  s)

Definition at line 63 of file core_read.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 = true,
bool  include_address = false,
const SigningProvider provider = nullptr 
)

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:

◆ SighashFromStr()

util::Result<int> SighashFromStr ( const std::string &  sighash)

Definition at line 237 of file core_read.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 = true,
const CTxUndo txundo = nullptr,
TxVerbosity  verbosity = TxVerbosity::SHOW_DETAILS 
)

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: