pub unsafe extern "C" fn btck_script_pubkey_verify(
script_pubkey: *const btck_ScriptPubkey,
amount: i64,
tx_to: *const btck_Transaction,
spent_outputs: *mut *const btck_TransactionOutput,
spent_outputs_len: usize,
input_index: c_uint,
flags: btck_ScriptVerificationFlags,
status: *mut btck_ScriptVerifyStatus,
) -> c_intExpand description
@brief Verify if the input at input_index of tx_to spends the script pubkey
under the constraints specified by flags. If the
btck_ScriptVerificationFlags_WITNESS flag is set in the flags bitfield, 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 btck_ScriptVerificationFlags controlling validation constraints. @param[out] status Nullable, will be set to an error code if the operation fails, or OK otherwise. @return 1 if the script is valid, 0 otherwise.