Bitcoin Core  22.99.0
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
 
uint32_t GetVersion () 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 &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

std::optional< CMutableTransactiontx
 
std::map< KeyOriginInfo, std::set< CExtPubKey > > m_xpubs
 
std::vector< PSBTInputinputs
 
std::vector< PSBTOutputoutputs
 
std::map< std::vector< unsigned char >, std::vector< unsigned char > > unknown
 
std::optional< uint32_t > m_version
 
std::set< PSBTProprietarym_proprietary
 

Detailed Description

A version of CTransaction with the PSBT format.

Definition at line 668 of file psbt.h.

Constructor & Destructor Documentation

◆ PartiallySignedTransaction() [1/3]

PartiallySignedTransaction::PartiallySignedTransaction ( )
inline

Definition at line 688 of file psbt.h.

◆ PartiallySignedTransaction() [2/3]

PartiallySignedTransaction::PartiallySignedTransaction ( const CMutableTransaction tx)
explicit

Definition at line 11 of file psbt.cpp.

◆ PartiallySignedTransaction() [3/3]

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

Definition at line 925 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 47 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 60 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 67 of file psbt.cpp.

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

◆ GetVersion()

uint32_t PartiallySignedTransaction::GetVersion ( ) const

Definition at line 416 of file psbt.cpp.

Here is the caller graph for this function:

◆ IsNull()

bool PartiallySignedTransaction::IsNull ( ) const

Definition at line 17 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 22 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 700 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 757 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 674 of file psbt.h.

◆ m_proprietary

std::set<PSBTProprietary> PartiallySignedTransaction::m_proprietary

Definition at line 678 of file psbt.h.

◆ m_version

std::optional<uint32_t> PartiallySignedTransaction::m_version

Definition at line 677 of file psbt.h.

◆ m_xpubs

std::map<KeyOriginInfo, std::set<CExtPubKey> > PartiallySignedTransaction::m_xpubs

Definition at line 673 of file psbt.h.

◆ outputs

std::vector<PSBTOutput> PartiallySignedTransaction::outputs

Definition at line 675 of file psbt.h.

◆ tx

std::optional<CMutableTransaction> PartiallySignedTransaction::tx

Definition at line 670 of file psbt.h.

◆ unknown

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

Definition at line 676 of file psbt.h.


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