Changeset View
Changeset View
Standalone View
Standalone View
src/core_io.h
Show All 23 Lines | |||||
// core_read.cpp | // core_read.cpp | ||||
CScript ParseScript(const std::string &s); | CScript ParseScript(const std::string &s); | ||||
std::string ScriptToAsmStr(const CScript &script, | std::string ScriptToAsmStr(const CScript &script, | ||||
const bool fAttemptSighashDecode = false); | const bool fAttemptSighashDecode = false); | ||||
NODISCARD bool DecodeHexTx(CMutableTransaction &tx, | NODISCARD bool DecodeHexTx(CMutableTransaction &tx, | ||||
const std::string &strHexTx); | const std::string &strHexTx); | ||||
NODISCARD bool DecodeHexBlk(CBlock &, const std::string &strHexBlk); | NODISCARD bool DecodeHexBlk(CBlock &, const std::string &strHexBlk); | ||||
bool DecodeHexBlockHeader(CBlockHeader &, const std::string &hex_header); | bool DecodeHexBlockHeader(CBlockHeader &, const std::string &hex_header); | ||||
uint256 ParseHashStr(const std::string &, const std::string &strName); | |||||
/** | |||||
* Parse a hex string into 256 bits | |||||
* @param[in] strHex a hex-formatted, 64-character string | |||||
* @param[out] result the result of the parasing | |||||
* @returns true if successful, false if not | |||||
* | |||||
* @see ParseHashV for an RPC-oriented version of this | |||||
*/ | |||||
bool ParseHashStr(const std::string &strHex, uint256 &result); | |||||
std::vector<uint8_t> ParseHexUV(const UniValue &v, const std::string &strName); | std::vector<uint8_t> ParseHexUV(const UniValue &v, const std::string &strName); | ||||
NODISCARD bool DecodePSBT(PartiallySignedTransaction &psbt, | NODISCARD bool DecodePSBT(PartiallySignedTransaction &psbt, | ||||
const std::string &base64_tx, std::string &error); | const std::string &base64_tx, std::string &error); | ||||
SigHashType ParseSighashString(const UniValue &sighash); | SigHashType ParseSighashString(const UniValue &sighash); | ||||
// core_write.cpp | // core_write.cpp | ||||
UniValue ValueFromAmount(const Amount &amount); | UniValue ValueFromAmount(const Amount &amount); | ||||
std::string FormatScript(const CScript &script); | std::string FormatScript(const CScript &script); | ||||
Show All 9 Lines |