Bitcoin Core 31.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | Private Attributes | List of all members
PartiallySignedTransaction Class 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 PSBTInput &psbtin)
 
bool AddOutput (const PSBTOutput &psbtout)
 
std::optional< uint32_t > ComputeTimeLock () const
 
std::optional< CMutableTransactionGetUnsignedTx () const
 
std::optional< TxidGetUniqueID () const
 
 PartiallySignedTransaction (const CMutableTransaction &tx, uint32_t version=2)
 
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::map< KeyOriginInfo, std::set< CExtPubKey > > m_xpubs
 
std::optional< std::bitset< 8 > > m_tx_modifiable
 
std::vector< PSBTInputinputs
 
std::vector< PSBTOutputoutputs
 
std::map< std::vector< unsigned char >, std::vector< unsigned char > > unknown
 
std::set< PSBTProprietarym_proprietary
 
uint32_t tx_version
 
std::optional< uint32_t > fallback_locktime
 

Private Attributes

std::optional< uint32_t > m_version
 

Detailed Description

A version of CTransaction with the PSBT format.

Definition at line 1238 of file psbt.h.

Constructor & Destructor Documentation

◆ PartiallySignedTransaction() [1/2]

PartiallySignedTransaction::PartiallySignedTransaction ( const CMutableTransaction tx,
uint32_t  version = 2 
)
explicit

Definition at line 18 of file psbt.cpp.

Here is the call graph for this function:

◆ PartiallySignedTransaction() [2/2]

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

Definition at line 1619 of file psbt.h.

Here is the call graph for this function:

Member Function Documentation

◆ AddInput()

bool PartiallySignedTransaction::AddInput ( const PSBTInput psbtin)

Definition at line 162 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 PSBTOutput psbtout)

Definition at line 245 of file psbt.cpp.

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

◆ ComputeTimeLock()

std::optional< uint32_t > PartiallySignedTransaction::ComputeTimeLock ( ) const

Definition at line 87 of file psbt.cpp.

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

◆ GetUniqueID()

std::optional< Txid > PartiallySignedTransaction::GetUniqueID ( ) const

Definition at line 147 of file psbt.cpp.

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

◆ GetUnsignedTx()

std::optional< CMutableTransaction > PartiallySignedTransaction::GetUnsignedTx ( ) const

Definition at line 121 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 884 of file psbt.cpp.

Here is the caller graph for this function:

◆ IsNull()

bool PartiallySignedTransaction::IsNull ( ) const

Definition at line 34 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 39 of file psbt.cpp.

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

◆ Serialize()

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

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

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

Member Data Documentation

◆ fallback_locktime

std::optional<uint32_t> PartiallySignedTransaction::fallback_locktime

Definition at line 1254 of file psbt.h.

◆ inputs

std::vector<PSBTInput> PartiallySignedTransaction::inputs

Definition at line 1248 of file psbt.h.

◆ m_proprietary

std::set<PSBTProprietary> PartiallySignedTransaction::m_proprietary

Definition at line 1251 of file psbt.h.

◆ m_tx_modifiable

std::optional<std::bitset<8> > PartiallySignedTransaction::m_tx_modifiable

Definition at line 1247 of file psbt.h.

◆ m_version

std::optional<uint32_t> PartiallySignedTransaction::m_version
private

Definition at line 1241 of file psbt.h.

◆ m_xpubs

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

Definition at line 1246 of file psbt.h.

◆ outputs

std::vector<PSBTOutput> PartiallySignedTransaction::outputs

Definition at line 1249 of file psbt.h.

◆ tx_version

uint32_t PartiallySignedTransaction::tx_version

Definition at line 1253 of file psbt.h.

◆ unknown

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

Definition at line 1250 of file psbt.h.


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