AIUI, when using the blockfrost.io API, the
tx_index field in a redeemer contains the index of the enclosing transaction's input that it consumes (is that true ?).
However, with reference inputs, it seems that in this API the reference inputs and "regular" inputs are all merged in the transaction's
In that case, it looks the
tx_index field in the redeemer no longer matches the index of the referenced input in the
inputs list, but rather the position of the Nth non-reference input in the list.
- without reference inputs:
utxos.inputs = [i1,i2,i3]` redeemer.tx_index=2
In that case, the redeemer points at
- with reference inputs (marked as
utxos.inputs = [ri1, ri2, i1,i2,i3]` redeemer.tx_index=2
In that case, the redeemer also points at
i3 because the reference inputs are ignored in the indexing.
Can someone confirm that this understanding is correct, or provide the correct way of interpreting the redeemer's
tx_index field ?