Bitcoin
Public Member Functions | Public Attributes | List of all members
PartiallySignedTransaction Struct Reference

#include <psbt.h>

Public Member Functions

bool IsNull () const
 
NODISCARD bool Merge (const PartiallySignedTransaction &psbt)
 
bool IsSane () const
 
bool AddInput (const CTxIn &txin, PSBTInput &psbtin)
 
bool AddOutput (const CTxOut &txout, const PSBTOutput &psbtout)
 
 PartiallySignedTransaction ()
 
 PartiallySignedTransaction (const PartiallySignedTransaction &psbt_in)
 
 PartiallySignedTransaction (const CMutableTransaction &tx)
 
bool GetInputUTXO (CTxOut &utxo, int input_index) const
 
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

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

Constructor & Destructor Documentation

◆ PartiallySignedTransaction() [1/4]

PartiallySignedTransaction::PartiallySignedTransaction ( )
inline

◆ PartiallySignedTransaction() [2/4]

PartiallySignedTransaction::PartiallySignedTransaction ( const PartiallySignedTransaction psbt_in)
inline

◆ PartiallySignedTransaction() [3/4]

PartiallySignedTransaction::PartiallySignedTransaction ( const CMutableTransaction tx)
explicit

◆ PartiallySignedTransaction() [4/4]

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

Member Function Documentation

◆ AddInput()

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

◆ AddOutput()

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

◆ 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

◆ IsNull()

bool PartiallySignedTransaction::IsNull ( ) const

◆ IsSane()

bool PartiallySignedTransaction::IsSane ( ) const

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

◆ Serialize()

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

◆ Unserialize()

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

Member Data Documentation

◆ inputs

std::vector<PSBTInput> PartiallySignedTransaction::inputs

◆ outputs

std::vector<PSBTOutput> PartiallySignedTransaction::outputs

◆ tx

boost::optional<CMutableTransaction> PartiallySignedTransaction::tx

◆ unknown

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

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