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