Bitcoin ABC 0.30.5
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
PartiallySignedTransaction Struct Reference

A version of CTransaction with the PSBT format. More...

#include <psbt.h>

Public Member Functions

bool IsNull () const
 
bool Merge (const PartiallySignedTransaction &psbt)
 Merge psbt into this. More...
 
bool AddInput (const CTxIn &txin, PSBTInput &psbtin)
 
bool AddOutput (const CTxOut &txout, const PSBTOutput &psbtout)
 
 PartiallySignedTransaction ()
 
 PartiallySignedTransaction (const CMutableTransaction &txIn)
 
bool GetInputUTXO (CTxOut &utxo, int input_index) const
 Finds the UTXO for a given input index. More...
 
template<typename Stream >
void Serialize (Stream &s) const
 
template<typename Stream >
void Unserialize (Stream &s)
 
template<typename Stream >
 PartiallySignedTransaction (deserialize_type, Stream &s)
 

Public Attributes

std::optional< CMutableTransactiontx
 
std::vector< PSBTInputinputs
 
std::vector< PSBTOutputoutputs
 
std::map< std::vector< uint8_t >, std::vector< uint8_t > > unknown
 

Detailed Description

A version of CTransaction with the PSBT format.

Definition at line 334 of file psbt.h.

Constructor & Destructor Documentation

◆ PartiallySignedTransaction() [1/3]

PartiallySignedTransaction::PartiallySignedTransaction ( )
inline

Definition at line 350 of file psbt.h.

◆ PartiallySignedTransaction() [2/3]

PartiallySignedTransaction::PartiallySignedTransaction ( const CMutableTransaction txIn)
explicit

Definition at line 10 of file psbt.cpp.

◆ PartiallySignedTransaction() [3/3]

template<typename Stream >
PartiallySignedTransaction::PartiallySignedTransaction ( deserialize_type  ,
Stream &  s 
)
inline

Definition at line 501 of file psbt.h.

Here is the call graph for this function:

Member Function Documentation

◆ AddInput()

bool PartiallySignedTransaction::AddInput ( const CTxIn txin,
PSBTInput psbtin 
)

Definition at line 38 of file psbt.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddOutput()

bool PartiallySignedTransaction::AddOutput ( const CTxOut txout,
const PSBTOutput psbtout 
)

Definition at line 50 of file psbt.cpp.

Here is the caller graph for this function:

◆ GetInputUTXO()

bool PartiallySignedTransaction::GetInputUTXO ( CTxOut utxo,
int  input_index 
) const

Finds the UTXO for a given input index.

Parameters
[out]utxoThe UTXO of the input if found
[in]input_indexIndex of the input to retrieve the UTXO of
Returns
Whether the UTXO for the specified input was found

Definition at line 57 of file psbt.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsNull()

bool PartiallySignedTransaction::IsNull ( ) const

Definition at line 17 of file psbt.cpp.

◆ Merge()

bool PartiallySignedTransaction::Merge ( const PartiallySignedTransaction psbt)

Merge psbt into this.

The two psbts must have the same underlying CTransaction (i.e. the same actual Bitcoin transaction.) Returns true if the merge succeeded, false otherwise.

Definition at line 21 of file psbt.cpp.

Here is the caller graph for this function:

◆ Serialize()

template<typename Stream >
void PartiallySignedTransaction::Serialize ( Stream &  s) const
inline

Definition at line 361 of file psbt.h.

Here is the call graph for this function:

◆ Unserialize()

template<typename Stream >
void PartiallySignedTransaction::Unserialize ( Stream &  s)
inline

Definition at line 391 of file psbt.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ inputs

std::vector<PSBTInput> PartiallySignedTransaction::inputs

Definition at line 336 of file psbt.h.

◆ outputs

std::vector<PSBTOutput> PartiallySignedTransaction::outputs

Definition at line 337 of file psbt.h.

◆ tx

std::optional<CMutableTransaction> PartiallySignedTransaction::tx

Definition at line 335 of file psbt.h.

◆ unknown

std::map<std::vector<uint8_t>, std::vector<uint8_t> > PartiallySignedTransaction::unknown

Definition at line 338 of file psbt.h.


The documentation for this struct was generated from the following files: