Bitcoin Core 28.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 ()=default
 
 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 950 of file psbt.h.

Constructor & Destructor Documentation

◆ PartiallySignedTransaction() [1/3]

PartiallySignedTransaction::PartiallySignedTransaction ( )
default

◆ PartiallySignedTransaction() [2/3]

PartiallySignedTransaction::PartiallySignedTransaction ( const CMutableTransaction tx)
explicit

Definition at line 13 of file psbt.cpp.

◆ PartiallySignedTransaction() [3/3]

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

Definition at line 1210 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 49 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 62 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 69 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 562 of file psbt.cpp.

Here is the caller graph for this function:

◆ IsNull()

bool PartiallySignedTransaction::IsNull ( ) const

Definition at line 19 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 24 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 982 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 1038 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 956 of file psbt.h.

◆ m_proprietary

std::set<PSBTProprietary> PartiallySignedTransaction::m_proprietary

Definition at line 960 of file psbt.h.

◆ m_version

std::optional<uint32_t> PartiallySignedTransaction::m_version

Definition at line 959 of file psbt.h.

◆ m_xpubs

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

Definition at line 955 of file psbt.h.

◆ outputs

std::vector<PSBTOutput> PartiallySignedTransaction::outputs

Definition at line 957 of file psbt.h.

◆ tx

std::optional<CMutableTransaction> PartiallySignedTransaction::tx

Definition at line 952 of file psbt.h.

◆ unknown

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

Definition at line 958 of file psbt.h.


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