pub unsafe extern "C" fn kernel_verify_script(
script_pubkey: *const kernel_ScriptPubkey,
amount: i64,
tx_to: *const kernel_Transaction,
spent_outputs: *mut *const kernel_TransactionOutput,
spent_outputs_len: usize,
input_index: c_uint,
flags: c_uint,
status: *mut kernel_ScriptVerifyStatus,
) -> boolExpand description
@brief Verify if the input at input_index of tx_to spends the script pubkey under the constraints specified by flags. If the witness flag is set the amount parameter is used. If the taproot flag is set, the spent outputs parameter is used to validate taproot transactions.
@param[in] script_pubkey Non-null, script pubkey to be spent. @param[in] amount Amount of the script pubkey’s associated output. May be zero if the witness flag is not set. @param[in] tx_to Non-null, transaction spending the script_pubkey. @param[in] spent_outputs Nullable if the taproot flag is not set. Points to an array of outputs spent by the transaction. @param[in] spent_outputs_len Length of the spent_outputs array. @param[in] input_index Index of the input in tx_to spending the script_pubkey. @param[in] flags Bitfield of kernel_ScriptFlags controlling validation constraints. @param[out] status Nullable, will be set to an error code if the operation fails. Should be set to kernel_SCRIPT_VERIFY_OK. @return True if the script is valid.