NFT Metadata

On-chain metadata

We support the `TokenMetadata` from NEP-177 version 1.0.0 [1]

type TokenMetadata = {
  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, // When token was issued or minted, Unix epoch in milliseconds
  expires_at: string|null, // When token expires, Unix epoch in milliseconds
  starts_at: string|null, // When token starts being valid, Unix epoch in milliseconds
  updated_at: string|null, // When token was last updated, Unix epoch in milliseconds
  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.
}

Description of the metadata that will show up on Paras

  • title: The name of this NFT

  • description: A longer description of the token.

  • media: URL to associated media. Preferably to decentralized, content-addressed storage. If you have base_uri on your contract metadata, it will be prepended to media.

  • copies: The number of tokens with this set of metadata or media known to exist at the time of minting. This will be shown on Paras as copies

  • extra: anything extra the NFT wants to store on-chain. Can be stringified JSON. You can put attributes here which will be explained later.

  • reference: URL to an off-chain JSON file with more info. You can put more info or anything from on-chain metadata to be replaced with the ones on reference

[1] https://github.com/near/NEPs/blob/e05013e93d86f3c35585d86bcd5bac98e4443bb5/specs/Standards/NonFungibleToken/Metadata.md

Non-standard metadata

You can put the non-standard metadata as on-chain extra or inside JSON file in reference.

Attributes

Attributes that will be shown on each NFT, e.g.

{
"attributes": [
    {
      "trait_type": "Base", 
      "value": "Starfish"
    }, 
    {
      "trait_type": "Eyes", 
      "value": "Big"
    }, 
    {
      "trait_type": "lvl", 
      "value": 1
    }
]
}

Animation URL

  • animation_url : URL to multimedia attachment. If you have base_uri on your contract metadata, it will be prepended to animation_url. We use animation_url for the newly supported audio NFTs with .MP3, .AAC, and .WAV formats.

Collection Info (only if you are using shared NFT contract)

If you are using x.paras.near or paras-token-v1.testnet you need to put these inside the reference JSON. You need to create a collection first using Paras UI or API.

  • collection : collection name, e.g. "Genesis"

  • collection_id: collection id, e.g. "genesis-by-parasnear"

  • creator_id : creator NEAR wallet address, e.g. "paras.near"

Last updated