Merge #11603: Move RPC registration out of AppInitParameterInteraction
[bitcoinplatinum.git] / src / core_io.h
blob7ed84d6665d4bd1ba9a40e2aeff71e3b4707d9b3
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 <amount.h>
10 #include <string>
11 #include <vector>
13 class CBlock;
14 class CScript;
15 class CTransaction;
16 struct CMutableTransaction;
17 class uint256;
18 class UniValue;
20 // core_read.cpp
21 CScript ParseScript(const std::string& s);
22 std::string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDecode = false);
23 bool DecodeHexTx(CMutableTransaction& tx, const std::string& strHexTx, bool fTryNoWitness = false);
24 bool DecodeHexBlk(CBlock&, const std::string& strHexBlk);
25 uint256 ParseHashUV(const UniValue& v, const std::string& strName);
26 uint256 ParseHashStr(const std::string&, const std::string& strName);
27 std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
29 // core_write.cpp
30 UniValue ValueFromAmount(const CAmount& amount);
31 std::string FormatScript(const CScript& script);
32 std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0);
33 void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex);
34 void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry, bool include_hex = true, int serialize_flags = 0);
36 #endif // BITCOIN_CORE_IO_H