Skip to content

A proposal for metadata which support NFT and other kinds of non fungible assets

askender edited this page Jun 23, 2021 · 2 revisions

We are developing a dweb search engine which also support non fungible asset and NFT(standards: ERC-721 & ERC-1155 and others...) too.

A definition of non fungible asset

Before a Creative Works is made a on- chain NFT((standards: ERC-721 & ERC-1155), it is a non fungible asset. It should contain a metadata.json along with the non fungible asset.

Now we have:

We plan to extend metadata spec based on https://docs.ipfs.io/how-to/best-practices-for-nft-data/ :

Basic Principle(or best practices)

  • A nft should be a directory(the name of the directory will not be included in IPFS)
  • The filename of the NFT should be meaningful and with a filename extension.
  • The metadata.json should be included in a directory.
  • There are many ways to structure metadata for an NFT, and a lot of the details depend on the specific use cases for your NFT platform. The metadata.json should follow the same metadata schema which extends the schema defined in the ERC-721 standard.
➜  example-nft-001 tree
.
├── metadata
│   └── metadata.json
└── nft
    └── no-time-to-explain.html

ipfs add -r nft
# ipfs cat QmQKoWtanBw7vZ9DrF2snzxhxrUj8M86TaAhuvXhRo7GrG/no-time-to-explain.html
ipfs add -r metadata

Metadata Spec(draft schema v0.1): A example of metadata.json

{
    "name": "No time to explain!",
    "description": "I said there was no time to explain, and I stand by that.",
    "image": "ipfs://bafybeict2kq6gt4ikgulypt7h7nwj4hmfi2kevrqvnx2osibfulyy5x3hu/no-time-to-explain.html"
    "authors": [
        {
            "name": "askender",
            "url": "ipns://askender.xyz",
            "wallet": {
                "filecoin": "f1xxx"
            }
        }
    ],
    "tags" : [
        "test",
    ],
    "license": "CC-BY-SA",
    "asset_type": "text/html",
    "asset_size_in_bytes": 11915,
}

The raw design is: https://github.com/anwen/dweb-search/wiki/protocols , which is based on RSS&jsonfeed.