{
title: string|null, // ex. "Arch Nemesis: Mail Carrier" or "Parcel #5055"
description: string|null, // free-form description
media: string|null, // URL to associated media, preferably to decentralized, content-addressed storage
media_hash: string|null, // Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included.
copies: number|null, // number of copies of this set of metadata in existence when token was minted.
issued_at: string|null, // ISO 8601 datetime when token was issued or minted
expires_at: string|null, // ISO 8601 datetime when token expires
starts_at: string|null, // ISO 8601 datetime when token starts being valid
updated_at: string|null, // ISO 8601 datetime when token was last updated
extra: string|null, // anything extra the NFT wants to store on-chain. Can be stringified JSON.
reference: string|null, // URL to an off-chain JSON file with more info.
reference_hash: string|null // Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included.
}
All attributes are optional, so if any of the following is present we are fine: title, description, media, reference, extra, copies, issued_at, expires_at, starts_at, updated_at.
Display everything as-is. Link to media and reference if they are URLs. Dealing with hashes described in #4.
Dealing with timestamps:
Check if it is ISO 8601 datetime, display as-is
Check if it is UNIX timestamp, convert to DateTime and display
Warning if issued_at > NOW when given
Warning if updated_at < issued_at when both are given
Warning if expires_at < starts_at when both are given
Method:
nft_token_metadata
Full JSON:
All attributes are optional, so if any of the following is present we are fine:
title
,description
,media
,reference
,extra
,copies
,issued_at
,expires_at
,starts_at
,updated_at
.Display everything as-is. Link to
media
andreference
if they are URLs. Dealing with hashes described in #4.Dealing with timestamps: