Context available to the Tx builder to create redeemers and datums. Very similar to the Plutus script context, but available offchain.
Empty TxContext for initializations.
Create a TxContext from a pre-existing transaction.
WARNING: currently, this function makes the assumption
that all List
fields in the transaction are already sorted correctly.
This assumption is valid within the Tx builder.
Helper function to update the TxContext inputs and outputs after coin selection.
Reference inputs do not change with UTxO selection, only spent inputs. Inputs are sorted by output ref.
Some context available to the Tx builder to create redeemers and datums.
The contents of the
TxContext
are very similar to those of the Plutus script context. This is because the goal is to help pre-compute offchain elements that will make onchain code more efficient.For example, you could pre-compute indexes of elements in inputs list, or the redeemers list in the script context for faster onchain lookups. For this reason, lists in this
TxContext
are ordered the same as in the Plutus script context.