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

docs: (spec) private property prefix, remove data blob #60

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
24 changes: 12 additions & 12 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -594,18 +594,6 @@ type TokenMetadata = record {

All of the following are reserved by the spec to verify and display assets across all applications.

Noted that `data` and `location` are mutual exclusive, only one of them is required.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we delete it?

data is useful when the contract wants to store in-canister and serve it through HTTP request.


#### data - **Required**

---

blob asset data.

```
{"data", BlobContent(<blob asset data of the NFT>)}
```

#### location - **Required**

---
Expand Down Expand Up @@ -646,6 +634,18 @@ URL location for the preview thumbnail for asset content
{"thumbnail", TextContent(<thumbnail URL of the NFT>)}
```

#### Private properties - **Optional**

---

To store any private properties that should not be displayed in a dapps frontend (eg. Plug Wallet's trait chips), simply prefix the key with an `_`.

```
{"_hidden", TextContent(<developer-focused property>)}
```

Developers should keep in mind though, that storing large amounts of data directly in the metadata could lead to errors due to the IC's 2MB message limit, and is not recommended.

<br>

### NftError
Expand Down