1 // Copyright (c) 2009-2014 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or https://www.opensource.org/licenses/mit-license.php .
5 #ifndef BITCOIN_CORE_IO_H
6 #define BITCOIN_CORE_IO_H
18 extern CScript ParseScript(const std::string& s);
19 extern std::string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDecode = false);
20 extern bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx);
21 extern bool DecodeHexBlk(CBlock&, const std::string& strHexBlk);
22 extern uint256 ParseHashUV(const UniValue& v, const std::string& strName);
23 extern uint256 ParseHashStr(const std::string&, const std::string& strName);
24 extern std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
27 extern std::string FormatScript(const CScript& script);
28 extern std::string EncodeHexTx(const CTransaction& tx);
29 extern std::string EncodeHexBlk(const CBlock& tx);
30 extern void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex);
31 extern void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry);
33 #endif // BITCOIN_CORE_IO_H