Track individual Avalanche X-Chain NFT outputs within a group
An AVM NFT transfer output contains a group ID and payload, while the surrounding output identifies the asset. Neither group nor payload uniquely identifies an unspent output.
Identify each live holding by its outpoint
Decode the NFTTransferOutput type, preserve the group ID and raw payload, and read its ownership condition. The illustrative rows show two separate unspent outputs with identical content. A database keyed only by asset and group would silently overwrite one.
asset ID group ID outpoint payload bytes
asset A 3 transaction:0 01ff
asset A 3 transaction:1 01ff
Follow spent and created outputs through a transfer
Retire the consumed outpoint when its transaction is accepted and add the resulting NFT output with its new transaction ID and index. Preserve the spending relationship to follow provenance across owners. The payload is arbitrary bytes, so interpret it as text or a URI only when the asset’s application format calls for that interpretation.