epam / near-nftchecker

MIT License
1 stars 0 forks source link

Token: display token metadata #9

Open zahhar opened 3 years ago

zahhar commented 3 years ago

Method: nft_token_metadata

Full JSON:

{
  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: