Docs/Protocol reference/Metadata
Metadata
How Loyfin presents program and reward metadata to wallets, marketplaces, and indexers.
Generated metadata#
Loyfin can generate marketplace-readable metadata directly from program state.
Every expiry bucket returns generated Base64 JSON. All buckets use the program's shared media as their image and shared description, while the name and expiry attributes are derived for the requested token ID. The generated collection metadata uses the same media and description, plus the current royalty recipient and fee.
{
"name": "Bloom Coffee Rewards (Expiring)",
"description": "Rewards for Bloom Coffee customers.",
"image": "ipfs://bafy.../bloom.png",
"attributes": [
{ "trait_type": "Program", "value": "Bloom Coffee Rewards" },
{ "trait_type": "Symbol", "value": "BLOOM" },
{ "trait_type": "Issuer", "value": "0x1111111111111111111111111111111111111111" },
{ "trait_type": "Loyalty ID", "value": "0x4242424242424242424242424242424242424242424242424242424242424242" },
{ "trait_type": "Expiry", "value": "Expires" },
{ "display_type": "date", "trait_type": "Expires At", "value": 1790965800 }
]
}Refresh events#
Metadata changes emit marketplace refresh events for token and collection surfaces. Indexers can also follow the public event stream.