@@ -557,23 +557,29 @@ enum class PSBTRole {
557
557
EXTRACTOR
558
558
};
559
559
560
+ /* *
561
+ * Holds an analysis of one input from a PSBT
562
+ */
560
563
struct PSBTInputAnalysis {
561
- bool has_utxo;
562
- bool is_final;
563
- PSBTRole next;
564
-
565
- std::vector<CKeyID> missing_pubkeys;
566
- std::vector<CKeyID> missing_sigs;
567
- uint160 missing_redeem_script;
568
- uint256 missing_witness_script;
564
+ bool has_utxo; // !< Whether we have UTXO information for this input
565
+ bool is_final; // !< Whether the input has all required information including signatures
566
+ PSBTRole next; // !< Which of the BIP 174 roles needs to handle this input next
567
+
568
+ std::vector<CKeyID> missing_pubkeys; // !< Pubkeys whose BIP32 derivation path is missing
569
+ std::vector<CKeyID> missing_sigs; // !< Pubkeys whose signatures are missing
570
+ uint160 missing_redeem_script; // !< Hash160 of redeem script, if missing
571
+ uint256 missing_witness_script; // !< SHA256 of witness script, if missing
569
572
};
570
573
574
+ /* *
575
+ * Holds the results of AnalyzePSBT (miscellaneous information about a PSBT)
576
+ */
571
577
struct PSBTAnalysis {
572
- Optional<size_t > estimated_vsize;
573
- Optional<CFeeRate> estimated_feerate;
574
- Optional<CAmount> fee;
575
- std::vector<PSBTInputAnalysis> inputs;
576
- PSBTRole next;
578
+ Optional<size_t > estimated_vsize; // !< Estimated weight of the transaction
579
+ Optional<CFeeRate> estimated_feerate; // !< Estimated feerate (fee / weight) of the transaction
580
+ Optional<CAmount> fee; // !< Amount of fee being paid by the transaction
581
+ std::vector<PSBTInputAnalysis> inputs; // !< More information about the individual inputs of the transaction
582
+ PSBTRole next; // !< Which of the BIP 174 roles needs to handle the transaction next
577
583
};
578
584
579
585
std::string PSBTRoleName (PSBTRole role);
0 commit comments