Overview
TransactionIndex is a brandednumber type representing a transaction’s position within a block. Indices start at 0 for the first transaction in a block.
Type Definition
Creating TransactionIndexes
from
Create from number or bigint.Converting TransactionIndexes
toNumber
Convert to number (zero-cost).Comparing TransactionIndexes
equals
Check equality.Usage in Receipts
TransactionIndex appears in transaction receipts to indicate position within a block:Errors
InvalidTransactionIndexError: Invalid value (negative, non-integer, wrong type).See Also
- Receipt - Transaction receipts
- LogIndex - Log position
- TransactionHash - Transaction identifier

