NFT 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.
}
title
: The name of this NFTdescription
: A longer description of the token.media
: URL to associated media. Preferably to decentralized, content-addressed storage. If you havebase_uri
on your contract metadata, it will be prepended tomedia
.copies
: The number of tokens with this set of metadata ormedia
known to exist at the time of minting. This will be shown on Paras ascopies
extra
: anything extra the NFT wants to store on-chain. Can be stringified JSON. You can putattributes
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 onreference
You can put the non-standard metadata as on-chain
extra
or inside JSON file in reference
.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
: URL to multimedia attachment. If you havebase_uri
on your contract metadata, it will be prepended toanimation_url
. We useanimation_url
for the newly supported audio NFTs with .MP3, .AAC, and .WAV formats.
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 modified 1yr ago