Bitcoin ABC  0.23.1
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
 
NODISCARD 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...
 
PartiallySignedTransactionoperator= (const PartiallySignedTransaction &other)=default
 
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 333 of file psbt.h.

Constructor & Destructor Documentation

◆ PartiallySignedTransaction() [1/3]

PartiallySignedTransaction::PartiallySignedTransaction ( )
inline

Definition at line 349 of file psbt.h.

◆ PartiallySignedTransaction() [2/3]

PartiallySignedTransaction::PartiallySignedTransaction ( const CMutableTransaction txIn)
explicit

Definition at line 9 of file psbt.cpp.

◆ PartiallySignedTransaction() [3/3]

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

Definition at line 503 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 37 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 49 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 56 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 16 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 20 of file psbt.cpp.

Here is the caller graph for this function:

◆ operator=()

PartiallySignedTransaction& PartiallySignedTransaction::operator= ( const PartiallySignedTransaction other)
default

◆ Serialize()

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

Definition at line 363 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 393 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 335 of file psbt.h.

◆ outputs

std::vector<PSBTOutput> PartiallySignedTransaction::outputs

Definition at line 336 of file psbt.h.

◆ tx

std::optional<CMutableTransaction> PartiallySignedTransaction::tx

Definition at line 334 of file psbt.h.

◆ unknown

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

Definition at line 337 of file psbt.h.


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