LogoLogo
  • FAQ
    • Welcome To xHaven FAQs
      • Where Can I Find xHaven's Whitepaper?
      • Where Can I Read About XVN Token?
  • About xHaven & Digital Collectibles
    • What Is xHaven?
    • What Are xHaven's Marketplace Fees?
    • What Are Digital Collectibles?
      • How Are Digital Collectibles Stored?
      • Aren’t Digital Collectibles Bad For the Environment & Is xHaven Doing Anything About This?
      • Where Can I Learn More About Digital Collectibles & NFTs?
    • What Blockchain Does xHaven Support?
      • Why Is xHaven Built On Flare?
    • What Makes xHaven Different?
    • How Do I Become A Part Of The xHaven Community?
  • Getting Started
    • Getting Started
      • What Is A Wallet & Why Do I Need One?
      • How Do I Add Flare To My MetaMask Wallet?
        • Where Can I Get $FLR?
      • How Do I Add Songbird To My MetaMask Wallet?
        • Where Can I Get $SGB?
      • How Do I Import Bifrost Wallet Into MetaMask?
    • Why Do I Have To Approve Tokens?
    • What Are The Recommended Specifications For Images?
    • How Do I Refresh Metadata?
    • Metadata Standards
  • Buying & Selling Digital Collectibles
    • How Do I See Which Digital Collectibles Are For Sale?
    • How Do I Buy Digital Collectibles?
    • How Do I Make & Remove Offers?
    • How Do I Accept An Offer?
    • How Do I List Digital Collectibles For Sale?
    • How Do I Remove Digital Collectibles From Sale?
    • How Do Auctions Work?
  • Safety & Security
    • Is Connecting My Wallet To xHaven Safe & Secure?
      • Does xHaven Have Access To My Wallet’s Private Keys?
      • How Do I Keep My Digital Collectibles Safe?
    • What Is xHaven’s Policy On Stolen Items?
    • Intellectual Property Infringement
      • What Should I Do If Works I Own The Copyright In Are Being Sold Without My Consent?
      • How Do I Submit A Copyright Counter-Notice?
      • Are Spin-Off, Homage, Remix Or Derivative Collections Permitted?
    • What Should I Do If I Think Items On xHaven Breach The Terms & Conditions?
      • How Do I Report Fake Or Fraudulent Content?
    • What Should I Do If I Think My Account Has Been Compromised?
  • Troubleshooting
    • My Digital Collectibles Aren't Displaying In My Wallet, What Can I Do?
    • The xHaven Marketplace Isn’t Working, Where Can I Get Help?
  • How to Participate in Staking and Rewards on xHaven
    • 1. Simple Staking
    • 2. Marketplace Rewards (Governance Token Distribution Mechanism)
    • 3. LP Staking
    • 4. Platform Rewards
    • 5. NFT Rewards
    • Helpful Tips
  • Legal
    • Terms & Conditions
    • Privacy Policy
  • Community Tools
    • NFT Airdrop Tool
Powered by GitBook

© 2024 xHaven All Rights Reserved

On this page
  • Why are metadata standards important?
  • Token URI implementation
  • Metadata structure
  • Attributes
  • IPFS and Arweave URIs
  1. Getting Started

Metadata Standards

PreviousHow Do I Refresh Metadata?NextHow Do I See Which Digital Collectibles Are For Sale?

Last updated 1 year ago

Providing metadata to universally recognized standards for your assets permits dApps, such as xHaven, to pull in rich data for digital assets and display them as expected in-app. Digital assets on a given smart contract are typically represented solely by a unique identifier (e.g., token_id in ERC-721). The metadata associated to these unique identifiers allows the assets to have additional properties, such as a name, description, and image.

Why are metadata standards important?

Metadata standards ensure that universally recognised approaches are followed, giving confidence to NFT purchasers that an NFT's metadata is structured correctly.

This becomes particularly important as assets become cross-chain on blockchains, as it ensures that your NFT will display correctly, regardless of the EVM chain it is on.

Failure to follow means that your NFT is not structured correctly. This will lead to display issues within any application that does follow .

xHaven follows the official metadata standards to ensure future .

Token URI implementation

To allow the xHaven Marketplace to pull off-chain metadata for ERC-721 and ERC-1155 assets, your contract needs to return a URI where the metadata can be found. To find this URI, xHaven uses the tokenURI method in ERC-721 and the uri method in ERC-1155.

The tokenURI function in your ERC-721 contract or the uri function in your ERC-1155 contract needs to return either an HTTP or IPFS URL. Upon querying your URL, it should return the JSON data with the metadata for your token.

For more information on this, see the section on IPFS and Arweave for handling decentralized metadata URIs (below).

Metadata structure

xHaven supports the metadata structures in accordance with the and/or the .

Furthermore, xHaven supports multiple other properties allowing multi-media attachments (e.g., audio, video, 3D models), allowing you to utilize functionality on the xHaven Marketplace.

Below is an example of metadata structuring within an NFT according to metadata standards:

{
"name": "The Sparkles Genesis Collection #742",
"image": "ipfs://QmZbZvhjja1qhMbZN3tCfntRa2XPC88QB8PBSowgJfw5vw/742.png",
"edition": 742,
"description": "The Songbird Canary Project",
"attributes": [ ... ],
"animation_url": "ipfs://QmeRu734ndhjfeEJDB1M3XgVTj2xMNJ/742.mp4"
}

This is how the properties work:

name

Name of the item.

image

edition

Number of the token within the collection.

description

Human readable description of the item.

attributes

Attributes for the item, which show as properties the on the item page of xHaven. (see below)

animation_url

URL to a multi-media attachment for the item. The file extensions such as GLTF, GLB, WEBM, MP4, M4V, MOV, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.

youtube_url

A URL to a YouTube video.

external_url

This is the URL that will appear below the asset's image on xHaven and will allow users to leave xHaven and view the item on your site.

You should use an image file type within an "image" property.

You should not use multi-media file types within an "image" field.

If you wish to include multi-media files within your metadata, you should include these within an "animation" field.

Attributes

To give your items more panache, your metadata can include "attributes" or "traits" which display as "Properties" under the "Info" tab within the NFT item page on xHaven.

Below is an example of metadata structuring of traits within an NFT according to metadata standards:

...
{
"attributes": [
{
      "trait_type": "Background"
      "value": "Blue Grad",
    },
    {
      "trait_type": "Body"
      "value": "Rainbow Body",
    },
    {
      "trait_type": "Eyes"
      "value": "Money",
    },
    {
      "trait_type": "Bodywear"
      "value": "White Tank",
    },
    {
      "trait_type": "Headwear"
      "value": "No Hat",
    },
    {
      "trait_type": "Ear Feathers"
      "value": "Money",
    },
    {
      "trait_type": "Beaks"
      "value": "Golden Toothed Grin",
    },
    {
      "trait_type": "Extras"
      "value": "None",
    }

In the above example, trait_type is the name of the trait (displayed as a property on xHaven), and value is the value of the trait.

IPFS and Arweave URIs

Storage of NFT metadata in decentralized file networks such as IPFS and Arweave, to prevent modification by a centralized entity, are supported by xHaven.

URL to the item image. Can be most type of image (e.g., JPG, PNG, SVG, GIF), and can be URLs or paths. We recommend equal proportions with a minimum of 350 x 350 image.

When using the image property, .

Failure to follow means that your NFT is not structured correctly. This will lead to display issues within any application that does follow .

Should you utilise for metadata hosting, your item URL should follow the format of ipfs://<hash>, e.g., ipfs://QmZbZvhjja1qhMbZN3tCfntRa2XPC88QB8PBSowgJfw5vw.png. If you do choose to store on IPFS, is a good and easy starting point to store data.

The equivalent format is ar://<hash>.

use the official metadata standards
the official metadata standards
the proper and official metadata standards
IPFS
Pinata
Arweave
IPFS
EVM
the official metadata standards
the proper and official metadata standards
Official ERC721 Metadata Standards
Enjin Metadata Suggestions
filtering and sorting
cross-chain compatibility