This module contains code that aids in various transaction checks and comparisons.


is_spending_input(inputs: List<Input>, out_ref: OutputReference) -> Bool

Check if a specific input by output reference is being spent. This is useful when a minting script requires a utxo to be spent but doesn’t need any specific information about that input.

tx.is_spending_input(tx.inputs, output_reference)

  validator_hashes: List<ValidatorHash>,
  inputs: List<Input>,
) -> Bool

Given a set of validator hashes prove that none of them are being spent. Assume every address is not staked and that the is list is complete.

  inputs: List<Input>,
  pid: PolicyId,
  tkn: AssetName,
  threshold: Int,
) -> Bool

Calculate the total amount of a token within the set of inputs for the transaction and check if it is at least equal to the provided threshold.

values.total_token_amount(tx.inputs,, datum.tkn, datum.threshold)
Search Document