2015-12-13 16:58:29 +00:00
|
|
|
// Copyright (c) 2009-2015 The Bitcoin Core developers
|
2014-12-13 04:09:33 +00:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
2014-08-01 06:39:06 +00:00
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2014-11-03 15:16:40 +00:00
|
|
|
#ifndef BITCOIN_CORE_IO_H
|
|
|
|
#define BITCOIN_CORE_IO_H
|
2014-06-24 03:10:24 +00:00
|
|
|
|
|
|
|
#include <string>
|
2014-08-01 06:32:41 +00:00
|
|
|
#include <vector>
|
2014-06-24 03:10:24 +00:00
|
|
|
|
2014-10-30 02:56:33 +00:00
|
|
|
class CBlock;
|
2014-06-24 03:16:33 +00:00
|
|
|
class CScript;
|
2014-06-24 03:10:24 +00:00
|
|
|
class CTransaction;
|
2014-09-14 10:43:56 +00:00
|
|
|
class uint256;
|
2014-07-29 15:12:44 +00:00
|
|
|
class UniValue;
|
2014-06-24 03:10:24 +00:00
|
|
|
|
|
|
|
// core_read.cpp
|
2015-05-31 13:36:44 +00:00
|
|
|
extern CScript ParseScript(const std::string& s);
|
2015-07-30 23:56:00 +00:00
|
|
|
extern std::string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDecode = false);
|
2014-06-24 03:10:24 +00:00
|
|
|
extern bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx);
|
2014-10-30 02:56:33 +00:00
|
|
|
extern bool DecodeHexBlk(CBlock&, const std::string& strHexBlk);
|
2014-07-29 15:12:44 +00:00
|
|
|
extern uint256 ParseHashUV(const UniValue& v, const std::string& strName);
|
2014-12-17 09:34:09 +00:00
|
|
|
extern uint256 ParseHashStr(const std::string&, const std::string& strName);
|
2014-07-29 15:12:44 +00:00
|
|
|
extern std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
|
2014-06-24 03:10:24 +00:00
|
|
|
|
|
|
|
// core_write.cpp
|
2014-09-20 01:13:04 +00:00
|
|
|
extern std::string FormatScript(const CScript& script);
|
2014-06-24 03:10:24 +00:00
|
|
|
extern std::string EncodeHexTx(const CTransaction& tx);
|
2015-07-30 23:56:00 +00:00
|
|
|
extern void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex);
|
2014-07-29 15:12:44 +00:00
|
|
|
extern void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry);
|
2014-06-24 03:10:24 +00:00
|
|
|
|
2014-11-03 15:16:40 +00:00
|
|
|
#endif // BITCOIN_CORE_IO_H
|