23 result.
SetInvalid(
"PSBT cannot be made into a valid transaction");
37 for (
unsigned int i = 0; i <
psbtx.inputs.size(); ++i) {
64 if (!
utxo.IsNull() &&
utxo.scriptPubKey.IsUnspendable()) {
86 if (
outdata.missing_pubkeys.empty() &&
outdata.missing_redeem_script.IsNull() &&
outdata.missing_witness_script.IsNull() && !
outdata.missing_sigs.empty()) {
94 }
else if (!
utxo.IsNull()){
101 for (
unsigned int i = 0; i <
psbtx.inputs.size(); ++i) {
118 result.
SetInvalid(
"PSBT is not valid. Output amount invalid");
130 for (
unsigned int i = 0; i <
psbtx.inputs.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.
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.
static CoinsViewEmpty & Get()
A structure for PSBTs which contains per output information.
A version of CTransaction with the PSBT format.
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).
constexpr script_verify_flags STANDARD_SCRIPT_VERIFY_FLAGS
Standard script verification flags that standard transactions will comply with.
util::Expected< void, PSBTError > SignPSBTInput(const SigningProvider &provider, PartiallySignedTransaction &psbt, int index, const PrecomputedTransactionData *txdata, const common::PSBTFillOptions &options, SignatureData *out_sigdata)
Signs a PSBTInput, verifying that all provided data matches what is being signed.
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.
std::optional< PrecomputedTransactionData > PrecomputePSBTData(const PartiallySignedTransaction &psbt)
Compute a PrecomputedTransactionData object from a psbt.
const SigningProvider & DUMMY_SIGNING_PROVIDER
A mutable version of CTransaction.
std::vector< CKeyID > missing_pubkeys
KeyIDs of pubkeys which could not be found.
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.