Resolve CIP-68 metadata through the reference NFT output
A Cardano user token can point to mutable on-chain metadata through a related reference NFT. The metadata belongs to the output carrying that reference asset.
Find the matching reference asset
For the illustrated NFT, retain the original policy P and suffix bytes edition-7. Replace the user label 222 with reference label 100 using the proper CIP-67 binary prefix. Locate the unspent output holding that reference token.
user asset: policy P / (222) edition-7
reference asset: policy P / (100) edition-7
Read the output datum and decode its constructor, metadata map and version under CIP-68. An output holding the user NFT may have no metadata datum of its own. Verify both the policy and unmodified suffix before connecting the two.
Follow updates by output identity
An update can spend the current reference output and recreate the asset at another output with a new datum. Store the observed transaction ID and output index alongside metadata. A permanently cached first observation will miss later updates. cips.cardano.org Cardano CIP-68