Merge #9911: Wshadow: various gcc fixes
[bitcoinplatinum.git] / src / core_io.h
blob2d63be5fc4fe0b488f913e7327dae585addfab74
1 // Copyright (c) 2009-2016 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
8 #include <string>
9 #include <vector>
11 class CBlock;
12 class CScript;
13 class CTransaction;
14 struct CMutableTransaction;
15 class uint256;
16 class UniValue;
18 // core_read.cpp
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);
27 // core_write.cpp
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