1 // Copyright (c) 2009-2014 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
18 extern CScript ParseScript(std::string s);
19 extern bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx);
20 extern bool DecodeHexBlk(CBlock&, const std::string& strHexBlk);
21 extern uint256 ParseHashUV(const UniValue& v, const std::string& strName);
22 extern uint256 ParseHashStr(const std::string&, const std::string& strName);
23 extern std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
26 extern std::string FormatScript(const CScript& script);
27 extern std::string EncodeHexTx(const CTransaction& tx);
28 extern void ScriptPubKeyToUniv(const CScript& scriptPubKey,
29 UniValue& out, bool fIncludeHex);
30 extern void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry);
32 #endif // BITCOIN_CORE_IO_H