> BMIP: 10
> Title: Bytom NFT Protocol
> Author: Lang Yu <[email protected]></[email protected]>
> Comments-Summary: No comments yet.
> Comments-URI: https://github.com/bytom/bmips/wiki/Comments:BMIP-0010(https://github.com/bytom/bmips/wiki/Comments:BMIP-0010)
> Status: Draft
> Type: Standards Track
> Created: 2021-12-09
- Abstract
The following proposal describes a standard for issuing non-fungible token (NFT) on the Bytom blockchain. The standard provides the definition of basic chain data and the specification of management through smart contracts
- Motivation
There are a large number of unique and indivisible assets in the real world, such as estate, vehicles, works of art, props, etc. these assets cannot be described by the existing asset types.
This standard providesstandard interfaces for wallet/agent/auction and other types of applications and provides users with a simple method to issue NFT. NFT which is compatible with this standard can be easily supported by applications. For example, the wallet can quickly display NFT assets issued by users according to this standard.
- Specification
- 1、NFT data definition
- 1.1 Name
Define the name of the NFT, for example: MyPunk
The asset name cannot be longer than 30 characters. The name can represent an NFT or a series NFTs.
- 1.2 Symbol
Define the abbreviations of the NFT name, such as MP
Symbols are generally composed of capital letters.
- 1.3 Properties
Define NFT related information, such as type, creator, storage location, etc
The properties use the Map(key -> value). In addition to the following, you can also add some custom data.
```
properties {
type //the type of NFT,image, text or video, etc
creator //creator name
identity // The identity certificate of the creator, is obtained by signing raw_data_sha256 with the creator's private key
raw_data_sha256 //original data hash to prevent tampering
resource_uri //The storage link of original data, can be decentralized storage ipfs:// , can be centralized storage oss://
}
```
- 1.4 Metadata
Define the unique attributes of NFT
The metadata uses Map(key -> value), developers can add custom data. For example:
```
metadata {
raw_data
avatar {
skin
eye
hair
mouse
}
}
```
- 1.5 Example
A complete example describing the definition of an NFT asset is as follows:
```
{
string name
string symbol
map<> properties {
string type
string creator
string identity_key
string raw_sha256
string resource_uri
}
map<> metadata {
bytes raw_data
map avatar {
string skin
string eye
string hair
string mouse
}
}
}
```
- 2、NFT issuance
NFT asset issuance will inherit the standard of BAP, but requires additional settings to meet the requirements of NFT
BAP standard reference:https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki#Implementation(https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki#Implementation)
- 2.1 Set data accuracy
To ensure the indivisibility of NFT, you need to set the decimal of token to 0
```
decimals = 0
```
- 2.2 Disable additional issuance
To ensure the uniqueness of NFT, developers have to disable additional NFT issuance
```
reissue = false
```
- 2.3 Read NFT properties
The attributes and metadata of NFT will be put into the description field of BAP standard. Specific interfaces need to be implemented to facilitate application parsing and display.
The following interfaces can be designed:
```
func getProperties(string assetID)
func getMetadata(string assetID)
```
For specific implementation, please refer to: (to do)
- Copyright
This document is placed in the public domain.