Fabcoin Core  0.16.2
P2P Digital Currency
core_io.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2017 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.
4 
5 #ifndef FABCOIN_CORE_IO_H
6 #define FABCOIN_CORE_IO_H
7 
8 #include <amount.h>
9 
10 #include <string>
11 #include <vector>
12 
13 class CBlock;
14 class CScript;
15 class CTransaction;
16 struct CMutableTransaction;
17 class uint256;
18 class UniValue;
19 
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);
28 
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);
35 
36 #endif // FABCOIN_CORE_IO_H
std::vector< unsigned char > ParseHexUV(const UniValue &v, const std::string &strName)
Definition: core_read.cpp:181
std::string FormatScript(const CScript &script)
Definition: core_write.cpp:29
bool DecodeHexBlk(CBlock &, const std::string &strHexBlk)
Definition: core_read.cpp:146
Definition: block.h:155
UniValue ValueFromAmount(const CAmount &amount)
Definition: core_write.cpp:19
int64_t CAmount
Amount in lius (Can be negative)
Definition: amount.h:15
std::string ScriptToAsmStr(const CScript &script, const bool fAttemptSighashDecode=false)
Create the assembly string representation of a CScript object.
Definition: core_write.cpp:80
bool DecodeHexTx(CMutableTransaction &tx, const std::string &strHexTx, bool fTryNoWitness=false)
Definition: core_read.cpp:111
uint256 ParseHashUV(const UniValue &v, const std::string &strName)
Definition: core_read.cpp:163
256-bit opaque blob.
Definition: uint256.h:132
uint256 ParseHashStr(const std::string &, const std::string &strName)
Definition: core_read.cpp:171
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:417
std::string EncodeHexTx(const CTransaction &tx, const int serializeFlags=0)
Definition: core_write.cpp:124
void ScriptPubKeyToUniv(const CScript &scriptPubKey, UniValue &out, bool fIncludeHex)
Definition: core_write.cpp:131
A mutable version of CTransaction.
Definition: transaction.h:390
void TxToUniv(const CTransaction &tx, const uint256 &hashBlock, UniValue &entry, bool include_hex=true, int serialize_flags=0)
Definition: core_write.cpp:156
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:275
CScript ParseScript(const std::string &s)
Definition: core_read.cpp:22