Post
Share your knowledge.
Can I store NFT metadata and how to fetch it?
I'm working on an NFT project and I'm considering storing metadata for my NFTs. I'm curious if I can store this metadata externally and what the best practices would be for fetching it afterwards. Any advice would be greatly appreciated!
- Walrus
- Typescript SDK
Answers
2Yes, you can store NFT metadata externally. However, it's generally recommended to keep the metadata directly with the NFT on Sui, as it's typically small enough to do so. If you have specific metadata in mind, like images, sounds, or other media, you might want to consider using decentralized storage solutions like Walrus. This can ensure higher availability and integrity compared to traditional off-chain storage.
To fetch NFT metadata, you need to use the Walrus platform or similar decentralized storage solutions. Once your NFT metadata is stored on Walrus, you can create HTTP requests to the aggregators which reconstruct and serve the data. This process ensures that you retrieve data reliably even if some storage nodes are unavailable. Using services such as Walrus can also involve examining the dynamic fields within Sui for resources like HTML or CSS files tied to NFTs, which are stored by blob ID. This means checking these fields and making HTTP requests to access and render metadata as needed.
Do you know the answer?
Please log in and share it.
Walrus is a decentralized storage and data availability protocol designed specifically for large binary files, or "blobs"