Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

core_io.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2015 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 BITCOIN_CORE_IO_H
6 #define BITCOIN_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 struct CSpentIndexTxInfo;
21 
22 // core_read.cpp
23 CScript ParseScript(const std::string& s);
24 std::string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDecode = false);
25 bool DecodeHexTx(CMutableTransaction& tx, const std::string& strHexTx);
26 bool DecodeHexBlk(CBlock&, const std::string& strHexBlk);
27 uint256 ParseHashUV(const UniValue& v, const std::string& strName);
28 uint256 ParseHashStr(const std::string&, const std::string& strName);
29 std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
30 
31 // core_write.cpp
32 UniValue ValueFromAmount(const CAmount& amount);
33 std::string FormatScript(const CScript& script);
34 std::string EncodeHexTx(const CTransaction& tx);
35 void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex);
36 void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry, bool include_hex = true, const CSpentIndexTxInfo* ptxSpentInfo = nullptr);
37 
38 #endif // BITCOIN_CORE_IO_H
std::vector< unsigned char > ParseHexUV(const UniValue &v, const std::string &strName)
Definition: core_read.cpp:144
std::string FormatScript(const CScript &script)
Definition: core_write.cpp:35
bool DecodeHexBlk(CBlock &, const std::string &strHexBlk)
Definition: core_read.cpp:109
Definition: block.h:72
UniValue ValueFromAmount(const CAmount &amount)
Definition: core_write.cpp:25
bool DecodeHexTx(CMutableTransaction &tx, const std::string &strHexTx)
Definition: core_read.cpp:90
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
std::string ScriptToAsmStr(const CScript &script, const bool fAttemptSighashDecode=false)
Create the assembly string representation of a CScript object.
Definition: core_write.cpp:86
uint256 ParseHashUV(const UniValue &v, const std::string &strName)
Definition: core_read.cpp:126
256-bit opaque blob.
Definition: uint256.h:123
std::string EncodeHexTx(const CTransaction &tx)
Definition: core_write.cpp:130
uint256 ParseHashStr(const std::string &, const std::string &strName)
Definition: core_read.cpp:134
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:389
void TxToUniv(const CTransaction &tx, const uint256 &hashBlock, UniValue &entry, bool include_hex=true, const CSpentIndexTxInfo *ptxSpentInfo=nullptr)
Definition: core_write.cpp:163
void ScriptPubKeyToUniv(const CScript &scriptPubKey, UniValue &out, bool fIncludeHex)
Definition: core_write.cpp:137
A mutable version of CTransaction.
Definition: transaction.h:291
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:198
CScript ParseScript(const std::string &s)
Definition: core_read.cpp:22
Released under the MIT license