All the necessary information about BeyondNFT's InteractiveNFT format version 2. Any more question? Join our discord http://chat.beyondnft.io

What are they?

Interactive NFTs are NFTs that are defined with code: HTML/CSS/JavaScript/SVG...

When they are displayed to users, instead of showing a still image, the code is executed and the NFT becomes Interactive.

This way, anything that works in a browser can become an NFT. Anything.

BeyondNFT new format

The first version of BeyondNFT's Interactive NFT fomat was powerful and very flexible, however too complicated for most platform to support.

In version 2 we decided to go to the simplest way possible: the code you create in the browser / or that you upload in a Zip Archive, is uploaded to IPFS or Arweave as a full standalone HTML entity and then access in an iframe.

To this iframe, we pass several query parameters, that you can access directly in your code.

If you use the editor or one of our template, , there is an helper already added to the code that helps you get those data

/**
 * BeyondNFT Helper.
 */
window.beyondHelpers = {
  /**
   * beyondHelpers.get(paramName) returns a queryParameter value
   * Usage: const owner = beyondHelpers.get('owner'); 
   * const seed =beyondHelpers.get('seed'); 
   * ...
   * to get parameters or Factory Data
   */
  get(name, defaultValue = null) {
    const params =  new URLSearchParams(window.location.search);
    return params.has(name) ? params.get(name) : defaultValue
  },
  /**
   * The token can access its own metadata using this
   * Usage: await beyondHelpers.getMetadata()
   */
  async getMetadata() {
    let metadata = {};
    const tokenURI = this.get('tokenURI');
    if (tokenURI) {
      metadata = await fetch(tokenURI).then(res => res.json());
    }
    return metadata;
  }
};

This format has been thought with decentralization and interoperability in mind.

It doesn't need BeyondNFT to work. Once an NFT is emitted, it can live on its own.