BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
Functions
core_io.h File Reference
#include <amount.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.

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)
 
bool ParseHashStr (const std::string &strHex, uint256 &result)
 Parse a hex string into 256 bits. More...
 
std::vector< unsigned char > ParseHexUV (const UniValue &v, const std::string &strName)
 
bool DecodePSBT (PartiallySignedTransaction &psbt, const std::string &base64_tx, std::string &error)
 
int ParseSighashString (const UniValue &sighash)
 
UniValue ValueFromAmount (const CAmount &amount)
 
std::string FormatScript (const CScript &script)
 
std::string EncodeHexTx (const CTransaction &tx, const int serializeFlags=0)
 
std::string SighashToStr (unsigned char sighash_type)
 
void ScriptPubKeyToUniv (const CScript &scriptPubKey, UniValue &out, bool fIncludeHex)
 
void ScriptToUniv (const CScript &script, UniValue &out, bool include_address)
 
void TxToUniv (const CTransaction &tx, const uint256 &hashBlock, UniValue &entry, bool include_hex=true, int serialize_flags=0)
 

Function Documentation

◆ DecodeHexBlk()

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

Definition at line 162 of file core_read.cpp.

Here is the call graph for this function:

◆ DecodeHexBlockHeader()

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

Definition at line 148 of file core_read.cpp.

Here is the call 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 113 of file core_read.cpp.

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

◆ DecodePSBT()

bool DecodePSBT ( PartiallySignedTransaction psbt,
const std::string &  base64_tx,
std::string &  error 
)

Definition at line 179 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,
const int  serializeFlags = 0 
)

Definition at line 131 of file core_write.cpp.

Here is the caller graph for this function:

◆ FormatScript()

std::string FormatScript ( const CScript script)

Definition at line 29 of file core_write.cpp.

Here is the call graph for this function:

◆ ParseHashStr()

bool ParseHashStr ( const std::string &  strHex,
uint256 result 
)

Parse a hex string into 256 bits.

Parameters
[in]strHexa hex-formatted, 64-character string
[out]resultthe result of the parasing
Returns
true if successful, false if not
See also
ParseHashV for an RPC-oriented version of this

Definition at line 196 of file core_read.cpp.

Here is the call graph for this function:

◆ ParseHexUV()

std::vector<unsigned char> ParseHexUV ( const UniValue v,
const std::string &  strName 
)

Definition at line 205 of file core_read.cpp.

Here is the call graph for this function:

◆ ParseScript()

CScript ParseScript ( const std::string &  s)

Definition at line 24 of file core_read.cpp.

Here is the caller graph for this function:

◆ ParseSighashString()

int ParseSighashString ( const UniValue sighash)

Definition at line 215 of file core_read.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 153 of file core_write.cpp.

Here is the call 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 87 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 138 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 73 of file core_write.cpp.

Here is the caller graph for this function:

◆ TxToUniv()

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

Definition at line 179 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 19 of file core_write.cpp.

Here is the caller graph for this function: