diff options
Diffstat (limited to 'src/core_io.h')
-rw-r--r-- | src/core_io.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/core_io.h b/src/core_io.h new file mode 100644 index 0000000000..aba1928a36 --- /dev/null +++ b/src/core_io.h @@ -0,0 +1,31 @@ +// Copyright (c) 2009-2014 The Bitcoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef BITCOIN_CORE_IO_H +#define BITCOIN_CORE_IO_H + +#include <string> +#include <vector> + +class CBlock; +class CScript; +class CTransaction; +class uint256; +class UniValue; + +// core_read.cpp +extern CScript ParseScript(std::string s); +extern bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx); +extern bool DecodeHexBlk(CBlock&, const std::string& strHexBlk); +extern uint256 ParseHashUV(const UniValue& v, const std::string& strName); +extern std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName); + +// core_write.cpp +extern std::string FormatScript(const CScript& script); +extern std::string EncodeHexTx(const CTransaction& tx); +extern void ScriptPubKeyToUniv(const CScript& scriptPubKey, + UniValue& out, bool fIncludeHex); +extern void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry); + +#endif // BITCOIN_CORE_IO_H |