30 auto str = fuzzed_data_provider.ConsumeRandomLengthString();
44 std::optional<CMutableTransaction> tx = psbt.
tx;
60 for (
size_t i = 0; i < psbt.
tx->vin.size(); ++i) {
78 str = fuzzed_data_provider.ConsumeRandomLengthString();
83 (void)psbt_mut.
Merge(psbt_merge);
87 for (
unsigned int i = 0; i < psbt_merge.
tx->vin.size(); ++i) {
90 for (
unsigned int i = 0; i < psbt_merge.
tx->vout.size(); ++i) {
#define Assert(val)
Identity function.
An output of a transaction.
std::string ToString() const
PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx)
Provides helpful miscellaneous information about where a PSBT is in the signing workflow.
std::string PSBTRoleName(PSBTRole role)
bool CombinePSBTs(PartiallySignedTransaction &out, const std::vector< PartiallySignedTransaction > &psbtxs)
Combines PSBTs with the same underlying transaction, resulting in a single PSBT with all partial sign...
size_t CountPSBTUnsignedInputs(const PartiallySignedTransaction &psbt)
Counts the unsigned inputs of a PSBT.
bool FinalizeAndExtractPSBT(PartiallySignedTransaction &psbtx, CMutableTransaction &result)
Finalizes a PSBT if possible, and extracts it to a CMutableTransaction if it could be finalized.
bool DecodeRawPSBT(PartiallySignedTransaction &psbt, Span< const std::byte > tx_data, std::string &error)
Decode a raw (binary blob) PSBT into a PartiallySignedTransaction.
bool PSBTInputSigned(const PSBTInput &input)
Checks whether a PSBTInput is already signed by checking for non-null finalized fields.
bool FinalizePSBT(PartiallySignedTransaction &psbtx)
Finalizes a PSBT if possible, combining partial signatures.
Span< const std::byte > MakeByteSpan(V &&v) noexcept
A mutable version of CTransaction.
A structure for PSBTs which contains per output information.
A version of CTransaction with the PSBT format.
bool Merge(const PartiallySignedTransaction &psbt)
Merge psbt into this.
bool GetInputUTXO(CTxOut &utxo, int input_index) const
Finds the UTXO for a given input index.
std::map< std::vector< unsigned char >, std::vector< unsigned char > > unknown
bool AddOutput(const CTxOut &txout, const PSBTOutput &psbtout)
std::vector< PSBTInput > inputs
std::optional< CMutableTransaction > tx
bool AddInput(const CTxIn &txin, PSBTInput &psbtin)
std::vector< PSBTOutput > outputs
Holds the results of AnalyzePSBT (miscellaneous information about a PSBT)
std::vector< PSBTInputAnalysis > inputs
More information about the individual inputs of the transaction.
PSBTRole next
Which of the BIP 174 roles needs to handle the transaction next.
void SeedRandomStateForTest(SeedRand seedtype)
Seed the global RNG state for testing and log the seed value.
@ ZEROS
Seed with a compile time constant of zeros.