We're thrilled to announce the launch of NFTLists.dev, designed to make NFT data more accessible to developers, aggregators, and other users.
🟣 What is NFTLists.dev?
NFTLists.dev is a specification for lists of NFT metadata, such as address, decimals, and more. These lists can be seamlessly integrated into any dApp interfaces that require one or more lists of NFTs. Specifically, an instance of an NFT list is a JSON blob containing a list of ERC721 or ERC1155 NFT metadata for use in dApp user interfaces.
🟣 The Technical Side
The package includes a JSON schema for NFT lists and TypeScript utilities for working with these lists. This JSON schema represents the technical specification for an NFT list, which can be utilized in dApp interfaces like the NFTY Finance Interface.
The JSON schema ID is http://nftylabs.io/tokenlist.schema.json.
🟣 Validating NFT Lists
While the package doesn't include code for NFT list validation, developers can easily validate NFT lists using libraries like ajv against the provided JSON schema. The schema is exported from the package for convenience.
🟣 Authoring NFT Lists
👍 Manual Creation
For those who prefer manual creation, using an editor that supports JSON schema validation is recommended. Popular code editors like IntelliJ or VSCode are perfect for this. The schema is registered in the SchemaStore, ensuring that any file matching the pattern *.nftlist.json will automatically utilize the JSON schema in supported text editors.
♻️ Automated Creation
For automation, developers can use the npm package to leverage the JSON schema for validation and TypeScript types. This makes it easy to generate and validate NFT lists programmatically.
🟣 Semantic Versioning
Each list includes a version field adhering to semantic versioning. The rules are straightforward:
- Major version increments when NFTs are removed.
- Minor version increments when NFTs are added.
- Patch version increments for minor changes to existing NFTs.
🟣 Deploying Your List
After authoring the list, it can be made available at any URI. It's recommended to pin the list to IPFS and reference it using an ENS name that resolves to the contenthash. If hosted on HTTPS, ensure the endpoint is configured to send an access-control-allow-origin header to prevent CORS errors.
🟣 A Few Examples
For those interested in examples, a simple NFT list can be found in test/schema/example.nftlist.json. Additionally, a snapshot of the NFTYLabs default list encoded as an NFT list is available in test/schema/bigexample.nftlist.json.
🟣 A Work in Progress
While we're excited about the potential of NFTLists.dev, we acknowledge there are areas for improvement:
- A documented listing process for the registry.
- Enhanced test data for the schema.
- A front-end React companion.
However, it's worth noting that this project is already being utilized for the upcoming NFTYFinance launch.
🟣 Join Us in This Journey
We're open to all forms of input. Feel free to DM us or open an issue on either of the codebases:
- Schema: https://github.com/NFTYLabs/nft-lists
- Registry: (Link not provided in the original text)
Join us in revolutionizing the NFT data landscape!