Bitcoin Core  0.20.99
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 IsSane () const
 
bool AddInput (const CTxIn &txin, PSBTInput &psbtin)
 
bool AddOutput (const CTxOut &txout, const PSBTOutput &psbtout)
 
 PartiallySignedTransaction ()
 
 PartiallySignedTransaction (const CMutableTransaction &tx)
 
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

Optional< CMutableTransactiontx
 
std::vector< PSBTInputinputs
 
std::vector< PSBTOutputoutputs
 
std::map< std::vector< unsigned char >, std::vector< unsigned char > > unknown
 

Detailed Description

A version of CTransaction with the PSBT format.

Definition at line 392 of file psbt.h.

Constructor & Destructor Documentation

◆ PartiallySignedTransaction() [1/3]

PartiallySignedTransaction::PartiallySignedTransaction ( )
inline

Definition at line 407 of file psbt.h.

◆ PartiallySignedTransaction() [2/3]

PartiallySignedTransaction::PartiallySignedTransaction ( const CMutableTransaction tx)
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 561 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 46 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 59 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 66 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 15 of file psbt.cpp.

◆ IsSane()

bool PartiallySignedTransaction::IsSane ( ) const

Definition at line 38 of file psbt.cpp.

Here is the caller graph for this function:

◆ 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:

◆ Serialize()

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

Definition at line 419 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 452 of file psbt.h.

Here is the call graph for this function:

Member Data Documentation

◆ inputs

std::vector<PSBTInput> PartiallySignedTransaction::inputs

Definition at line 395 of file psbt.h.

◆ outputs

std::vector<PSBTOutput> PartiallySignedTransaction::outputs

Definition at line 396 of file psbt.h.

◆ tx

Optional<CMutableTransaction> PartiallySignedTransaction::tx

Definition at line 394 of file psbt.h.

◆ unknown

std::map<std::vector<unsigned char>, std::vector<unsigned char> > PartiallySignedTransaction::unknown

Definition at line 397 of file psbt.h.


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