Interface TxEvaluator

Interface for transaction evaluation strategies. This will compute the required execution units for each redeemer in a transaction.

interface TxEvaluator {
    evaluate(tx: string, additionalUtxos?: UTxO[]): Promise<Redeemer[]>;
    getName(): string;
}

Implemented by

Methods

  • Run transaction evaluation to obtain script redeemers / execution units.

    Parameters

    • tx: string

      Transaction payload to evaluate (hex-encoded CBOR).

    • OptionaladditionalUtxos: UTxO[]

      Optional extra UTxOs the evaluator may consider for inputs/collateral.

    Returns Promise<Redeemer[]>

    Promise that resolves to a list of redeemers (with costs/ex-units) for the transaction.