Changeset View
Changeset View
Standalone View
Standalone View
src/psbt.h
Show First 20 Lines • Show All 324 Lines • ▼ Show 20 Lines | struct PartiallySignedTransaction { | ||||
bool IsSane() const; | bool IsSane() const; | ||||
bool AddInput(const CTxIn &txin, PSBTInput &psbtin); | bool AddInput(const CTxIn &txin, PSBTInput &psbtin); | ||||
bool AddOutput(const CTxOut &txout, const PSBTOutput &psbtout); | bool AddOutput(const CTxOut &txout, const PSBTOutput &psbtout); | ||||
PartiallySignedTransaction() {} | PartiallySignedTransaction() {} | ||||
PartiallySignedTransaction(const PartiallySignedTransaction &psbt_in) | PartiallySignedTransaction(const PartiallySignedTransaction &psbt_in) | ||||
: tx(psbt_in.tx), inputs(psbt_in.inputs), outputs(psbt_in.outputs), | : tx(psbt_in.tx), inputs(psbt_in.inputs), outputs(psbt_in.outputs), | ||||
unknown(psbt_in.unknown) {} | unknown(psbt_in.unknown) {} | ||||
explicit PartiallySignedTransaction(const CTransaction &txIn); | explicit PartiallySignedTransaction(const CTransaction &txIn); | ||||
/** | |||||
* Finds the UTXO for a given input index | |||||
* | |||||
* @param[out] utxo The UTXO of the input if found | |||||
* @param[in] input_index Index of the input to retrieve the UTXO of | |||||
* @return Whether the UTXO for the specified input was found | |||||
*/ | |||||
bool GetInputUTXO(CTxOut &utxo, int input_index) const; | |||||
PartiallySignedTransaction & | PartiallySignedTransaction & | ||||
operator=(const PartiallySignedTransaction &other) = default; | operator=(const PartiallySignedTransaction &other) = default; | ||||
template <typename Stream> inline void Serialize(Stream &s) const { | template <typename Stream> inline void Serialize(Stream &s) const { | ||||
// magic bytes | // magic bytes | ||||
s << PSBT_MAGIC_BYTES; | s << PSBT_MAGIC_BYTES; | ||||
▲ Show 20 Lines • Show All 180 Lines • Show Last 20 Lines |