For the most part we want to keep NFT data off chain. To facilitate this we will have a small amount of data on chain that is either a reference to off-chain data, a hash for security, or values that we want to ensure are immutable.
On-chain metadata will be kept in a compact list of key/value pairs. These pairs will be read and re formatted as JSON by RPC.
The list of currently proposed on-chain metadata values are:
- Data URLs - This is an array of URLs that can be used to access the NFT data (e.g. image file). Multiple URLs can be provided for backup.
- Data hash - This is a SHA256 hash of the data file
- Metadata URL - This is a URL that can be used to access the off-chain metadata
- Metadata hash - This is a SHA256 hash of the metadata file
- License URL - This is a URL that contains license/usage information for this NFT
- License hash - This is a SHA256 hash of the license file
- Edition number - This is the edition number for this NFT
- Edition count - (optional) This is the total number of NFTs in this collection
The JSON response coming from the RPC endpoint will be formatted as
{
"data_url": ["https://..."],
"data_hash": "...",
"metadata_url": ]"https://..."],
"metadata_hash": "...",
"license_url": ["https://..."],
"license_hash": "...",
"edition_number": 1,
"edition_count": 1,
}
edition_count
is optional and may be null