Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nft user documentation #2666

Merged
merged 5 commits into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 32 additions & 18 deletions docs/cli-client/nft.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,48 @@

## Available Commands

| Name | Description |
| ---------------------------------------- | -------------------------------------------------------------------------------------- |
| [issue](#iris-tx-nft-issue) | Specify the nft Denom (nft category) and metadata JSON Schema to issue nft. |
| [mint](#iris-tx-nft-mint) | Additional issuance (create) of specific nft of this type can be made. |
| [edit](#iris-tx-nft-edit) | The metadata of the specified nft can be updated. |
| [transfer](#iris-tx-nft-transfer) | Transfer designated nft. |
| [burn](#iris-tx-nft-burn) | Destroy the created nft. |
| [supply](#iris-query-nft-supply) | Query the total amount of nft according to Denom; accept the optional owner parameter. |
| [owner](#iris-query-nft-owner) | Query all nft owned by an account; you can specify the Denom parameter. |
| [collection](#iris-query-nft-collection) | Query all nft according to Denom. |
| [denom](#iris-query-nft-denom) | Query nft denom information based on Denom. |
| [denoms](#iris-query-nft-denoms) | Query the total amount of nft according to Denom; accept the optional owner parameter. |
| [token](#iris-query-nft-token) | Query specific nft based on Denom and ID. |
| Name | Description |
| --------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| [issue](#iris-tx-nft-issue) | Specify the nft Denom (nft classification) and metadata JSON Schema to issue nft. |
| [transfer-denom](#iris-tx-nft-transfer-denom) | The owner of the NFT classification can transfer the ownership of the NFT classification to others. |
| [mint](#iris-tx-nft-mint) | Additional issuance (create) of specific nft of this type can be made. |
| [edit](#iris-tx-nft-edit) | The metadata of the specified nft can be updated. |
| [transfer](#iris-tx-nft-transfer) | Transfer designated nft. |
| [burn](#iris-tx-nft-burn) | Destroy the created nft. |
| [supply](#iris-query-nft-supply) | Query the total amount of nft according to Denom; accept the optional owner parameter. |
| [owner](#iris-query-nft-owner) | Query all nft owned by an account; you can specify the Denom parameter. |
| [collection](#iris-query-nft-collection) | Query all nft according to Denom. |
| [denom](#iris-query-nft-denom) | Query nft denom information based on Denom. |
| [denoms](#iris-query-nft-denoms) | Query the total amount of nft according to Denom; accept the optional owner parameter. |
| [token](#iris-query-nft-token) | Query specific nft based on Denom and ID. |

## iris tx nft issue

Specify the nft Denom (nft category) and metadata JSON Schema to issue nft.
Specify the nft Denom (nft classification) and metadata JSON Schema to issue nft.

```bash
iris tx nft issue [denom-id] [flags]
```

**Flags:**

| Name, shorthand | Required | Default | Description |
| --------------- | -------- | ------------------------------- | ----------- |
| --name | | The name of the denom | |
| --schema | | Denom data structure definition | |
| Name, shorthand | Required | Default | Description |
| ------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| --name | | The name of the denom | |
| --uri | | The uri of the denom | |
| --data | | Off-chain metadata for supplementation (JSON object) | |
| --schema | | Denom data structure definition | |
| --symbol | | The symbol of the denom | |
| --mint-restricted | | This field indicates whether there are restrictions on the issuance of NFTs under this classification, true means that only Denom owners can issue NFTs under this classification, false means anyone can | |
| --update-restricted | | This field indicates whether there are restrictions on updating NFTs under this classification, true means that no one under this classification can update the NFT, false means that only the owner of this NFT can update | |

## iris tx nft transfer-denom

The owner of the NFT classification can transfer the ownership of the NFT classification to others.

```bash
iris tx nft transfer-denom [recipient] [denom-id]
```

## iris tx nft mint

Expand Down
26 changes: 21 additions & 5 deletions docs/features/nft.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ nft metadata (`metadata`) can be stored directly on the chain, or the `URI` of i

nft need to be issued before creation to declare their abstract properties:

-_Denom_: the globally unique nft category name
-_Denom_: the globally unique nft classification name

-_Denom ID_: the globally unique nft category identifier of Denom
-_Denom ID_: the globally unique nft classification identifier of Denom

-_Symbol_: the symbol of the token

-_Mint-restricted_: This field indicates whether there are restrictions on the issuance of NFTs under this classification, true means that only Denom owners can issue NFTs under this classification, false means anyone can

-_Update-restricted_: This field indicates whether there are restrictions on updating NFTs under this classification, true means that no one under this classification can update the NFT, false means that only the owner of this NFT can update

-_Metadata Specification_: The JSON Schema that nft metadata should follow

Each specific nft is described by the following elements:

-_Denom_: the category of the nft
-_Denom_: the classification of the nft

-_ID_: The identifier of the nft, which is unique in this nft denom; this ID is generated off-chain

Expand All @@ -30,12 +36,22 @@ Each specific nft is described by the following elements:

### issued

Specify the nft Denom (nft category) and metadata JSON Schema to issue nft.
Specify the nft Denom (nft classification) and metadata JSON Schema to issue nft.

`CLI`

```bash
iris tx nft issue <denom-id> --from=<key-name> --name=<denom-name> --schema=<schema-content or path/to/schema.json> --symbol=<denom-symbol> --mint-restricted=<mint-restricted> --update-restricted=<update-restricted> --chain-id=<chain-id> --fees=<fee>
```

### transfer denom

The owner of the NFT classification can transfer the ownership of the NFT classification to others.

`CLI`

```bash
iris tx nft issue <denom-id> --from=<key-name> --name=<denom-name> --schema=<schema-content or path/to/schema.json> --chain-id=<chain-id> --fees=<fee>
iris tx nft transfer-denom <recipient> <denom-id>
```

### Additional issuance
Expand Down
48 changes: 31 additions & 17 deletions docs/zh/cli-client/nft.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@

## 可用命令

| 名称 | 描述 |
| ---------------------------------------- | -------------- |
| [issue](#iris-tx-nft-issue) | 发行资产 |
| [mint](#iris-tx-nft-mint) | 增发资产 |
| [edit](#iris-tx-nft-edit) | 编辑资产 |
| [transfer](#iris-tx-nft-transfer) | 转让资产 |
| [burn](#iris-tx-nft-burn) | 销毁资产 |
| [supply](#iris-query-nft-supply) | 查询supply |
| [owner](#iris-query-nft-owner) | 通过owner查询 |
| [collection](#iris-query-nft-collection) | 查询collection |
| [denom](#iris-query-nft-denom) | 查询denom |
| [denoms](#iris-query-nft-denoms) | 查询denoms |
| [token](#iris-query-nft-token) | 查询token |
| 名称 | 描述 |
| --------------------------------------------- | ----------------- |
| [issue](#iris-tx-nft-issue) | 发行资产 |
| [transfer-denom](#iris-tx-nft-transfer-denom) | 转移nft分类所有权 |
| [mint](#iris-tx-nft-mint) | 增发资产 |
| [edit](#iris-tx-nft-edit) | 编辑资产 |
| [transfer](#iris-tx-nft-transfer) | 转让资产 |
| [burn](#iris-tx-nft-burn) | 销毁资产 |
| [supply](#iris-query-nft-supply) | 查询supply |
| [owner](#iris-query-nft-owner) | 通过owner查询 |
| [collection](#iris-query-nft-collection) | 查询collection |
| [denom](#iris-query-nft-denom) | 查询denom |
| [denoms](#iris-query-nft-denoms) | 查询denoms |
| [token](#iris-query-nft-token) | 查询token |

## iris tx nft issue

Expand All @@ -28,10 +29,23 @@ iris tx nft issue [denom-id] [flags]

**标志:**

| 名称,速记 | 默认 | 描述 | 必须 |
| ---------- | ---- | ----------------- | ---- |
| --name | | denom名字 | |
| --schema | | denom数据结构定义 | |
| 名称,速记 | 默认 | 描述 | 必须 |
| ------------------- | ---- | -------------------------------------------------------------------------------------------------------------- | ---- |
| --name | | denom名字 | |
| --uri | | 用于补充的off-chain元数据的URI(JSON对象) | |
| --schema | | denom数据结构定义 | |
| --data | | 用于补充的off-chain元数据(JSON对象) | |
| --symbol | | 分类的简短名称 | |
| --mint-restricted | | 此字段表示在此分类下是否有发行NFT的限制,true表示只有Denom的拥有者可以在此分类下发行NFT,false表示任何人可以 | |
| --update-restricted | | 此字段表示在此分类下是否有更新NFT的限制,true表示此分类下任何人不得更新NFT,false表示只有此NFT的拥有者可以更新 | |

## iris tx nft transfer-denom

转移nft分类所有权

```bash
iris tx nft transfer-denom [recipient] [denom-id]
```

## iris tx nft mint

Expand Down
20 changes: 18 additions & 2 deletions docs/zh/features/nft.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@

- _Denom_:即全局唯一的资产类别名

- _Denom ID_:Demon的全局唯一标识符
- _Denom ID_:Demon的全局唯一标识符

- _Symbol_: 分类的简短名称

- _Mint-restricted_: 表示此分类下是否有发行NFT的限制,true表示只有Denom的拥有者可以在此分类下发行NFT,false表示任何人可以

- _Update-restricted_: 表示此分类下是否有更新NFT的限制,true表示此分类下任何人不得更新NFT,false表示只有此NFT的拥有者可以更新

- _元数据规范_:资产元数据应遵循的 JSON Schema

Expand All @@ -35,7 +41,17 @@
`CLI`

```bash
iris tx nft issue <denom-id> --from=<key-name> --schema=<schema-content or path/to/schema.json> --chain-id=<chain-id> --fees=<fee>
iris tx nft issue <denom-id> --from=<key-name> --schema=<schema-content or path/to/schema.json> --symbol=<denom-symbol> --mint-restricted=<mint-restricted> --update-restricted=<update-restricted> --chain-id=<chain-id> --fees=<fee>
```

### 转让NFT分类所有权

NFT分类拥有者可以转移NFT分类的所有权

`CLI`

```bash
iris tx nft transfer-denom <recipient> <denom-id>
```

### 增发
Expand Down