29 for (
unsigned int i = 0; i <
psbtx.tx->vin.size(); ++i) {
56 if (!
utxo.IsNull() &&
utxo.scriptPubKey.IsUnspendable()) {
77 if (
outdata.missing_pubkeys.empty() &&
outdata.missing_redeem_script.IsNull() &&
outdata.missing_witness_script.IsNull() && !
outdata.missing_sigs.empty()) {
85 }
else if (!
utxo.IsNull()){
92 for (
unsigned int i = 0; i <
psbtx.tx->vin.size(); ++i) {
109 result.
SetInvalid(
"PSBT is not valid. Output amount invalid");
123 for (
unsigned int i = 0; i <
psbtx.tx->vin.size(); ++i) {
bool MoneyRange(const CAmount &nValue)
int64_t CAmount
Amount in satoshis (Can be negative)
CCoinsView that adds a memory cache for transactions to another CCoinsView.
Abstract view on the open txout dataset.
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac.
The basic transaction that is broadcasted on the network and contained in blocks.
An output of a transaction.
PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx)
Provides helpful miscellaneous information about where a PSBT is in the signing workflow.
unsigned int nBytesPerSigOp
int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost, unsigned int bytes_per_sigop)
Compute the virtual transaction size (weight reinterpreted as bytes).
static constexpr script_verify_flags STANDARD_SCRIPT_VERIFY_FLAGS
Standard script verification flags that standard transactions will comply with.
bool PSBTInputSignedAndVerified(const PartiallySignedTransaction &psbt, unsigned int input_index, const PrecomputedTransactionData *txdata)
Checks whether a PSBTInput is already signed by doing script verification using final fields.
PrecomputedTransactionData PrecomputePSBTData(const PartiallySignedTransaction &psbt)
Compute a PrecomputedTransactionData object from a psbt.
PSBTError SignPSBTInput(const SigningProvider &provider, PartiallySignedTransaction &psbt, int index, const PrecomputedTransactionData *txdata, std::optional< int > sighash, SignatureData *out_sigdata, bool finalize)
Signs a PSBTInput, verifying that all provided data matches what is being signed.
const SigningProvider & DUMMY_SIGNING_PROVIDER
A mutable version of CTransaction.
A version of CTransaction with the PSBT format.
Holds the results of AnalyzePSBT (miscellaneous information about a PSBT)
std::vector< PSBTInputAnalysis > inputs
More information about the individual inputs of the transaction.
void SetInvalid(std::string err_msg)
std::optional< CAmount > fee
Amount of fee being paid by the transaction.
std::optional< size_t > estimated_vsize
Estimated weight of the transaction.
std::optional< CFeeRate > estimated_feerate
Estimated feerate (fee / weight) of the transaction.
PSBTRole next
Which of the BIP 174 roles needs to handle the transaction next.
int64_t GetTransactionSigOpCost(const CTransaction &tx, const CCoinsViewCache &inputs, script_verify_flags flags)
Compute total signature operation cost of a transaction.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.