-
Notifications
You must be signed in to change notification settings - Fork 323
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
CIP-0067 | Asset Name Label Registry #298
Changes from 1 commit
791e098
cc35597
c23e8c7
c49d661
b281c9a
7f284f4
1ef3605
17c3558
0ba75d3
a3065d2
bee1db4
0db0017
f816432
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,49 @@ | ||||
--- | ||||
CIP: | ||||
Title: Asset Name Label Registry | ||||
Authors: Alessandro Konrad <[email protected]>, Thomas Vellekoop <[email protected]> | ||||
Comments-URI: | ||||
Status: Draft | ||||
rphair marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
Type: Informational | ||||
Created: 2022-07-13 | ||||
Post-History: | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
License: CC-BY-4.0 | ||||
--- | ||||
|
||||
## Abstract | ||||
|
||||
This proposal defines a standard to classify Cardano native assets by the asset name. | ||||
|
||||
## Motivation | ||||
|
||||
As more assets are minted and different standards are used to query data for these assets, it's gettinger harder for 3rd parties to determine the asset type and how to proceed with it. This standard is similar to [CIP-0010](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0010), but focuses on the asset name of an asset. | ||||
|
||||
|
||||
## Specification | ||||
|
||||
To classify assets the `asset_name` needs to be prefixed with an opening and closing parentheses and the label in betwen: `({Label})`. | ||||
|
||||
KtorZ marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
For example: | ||||
|
||||
UTF-8 encoded: `(123)TestToken`\ | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, (333) ends up taking 5 bytes of ascii which is more than coming up with a binary specification for this. I guess the advantage is that this is human readable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah that's true, I think the compromise is worth it. With 5-6 bytes you still have 25-26 bytes free in the asset name. |
||||
HEX encoded: `283132332954657374546F6B656E` | ||||
|
||||
|
||||
These are the reserved `asset_name_label` values | ||||
|
||||
`asset_name_label` | description | ||||
---------------------------- | ----------------------- | ||||
0 - 15 | reserved\* | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does the asterisk points to? |
||||
65536 - 131071 | reserved - private use | ||||
|
||||
For the registry itself, please see [registry.json](./registry.json) in the machine-readable format. Please open your pull request against | ||||
this file. | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One problem we had / have with CIP-0010 is that there's no particular "rule" that defines what can go in the registry. As editors we try to do some basic sanity check and ask people to pitch / justify a bit their project; but it would be nice / preferable if these rules were specified in the specification itself. For example: Adding an entry to the registryTo propose an addition to the registry edit the |
||||
|
||||
|
||||
## References | ||||
|
||||
- CIP-0010: https://github.com/cardano-foundation/CIPs/blob/master/CIP-0010 | ||||
|
||||
## Copyright | ||||
|
||||
This CIP is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"$id": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-?", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://cips.cardano.org/cips/cip67/registry.schema.json should (eventually) work. e.g. https://cips.cardano.org/cips/cip10/registry.schema.json |
||
"type": "array", | ||
"title": "Asset Name Label Registry", | ||
"description": "JSON schema for asset name label registry", | ||
"default": [], | ||
"examples": [ | ||
[ | ||
{ | ||
"asset_name_label": 721, | ||
"class": "NFT", | ||
"description": "CIP-0025 - NFT Metadata Standard" | ||
} | ||
] | ||
], | ||
"additionalItems": false, | ||
"items": { | ||
"$id": "#/items", | ||
"anyOf": [ | ||
{ | ||
"$id": "#/items/anyOf/0", | ||
"type": "object", | ||
"title": "The first anyOf schema", | ||
"description": "An entry in the asset name label registry", | ||
"default": {}, | ||
"examples": [ | ||
{ | ||
"asset_name_label": 721, | ||
"class": "NFT", | ||
"description": "CIP-0025 - NFT Metadata Standard" | ||
} | ||
], | ||
"required": ["asset_name_label", "class", "description"], | ||
"properties": { | ||
"asset_name_label": { | ||
"$id": "#/items/anyOf/0/properties/asset_name_label", | ||
"type": "integer", | ||
"title": "The asset_name_label number", | ||
"default": 0, | ||
"examples": [1967] | ||
}, | ||
"class": { | ||
"$id": "#/items/anyOf/0/properties/class", | ||
"type": "string", | ||
"title": "The asset class", | ||
KtorZ marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"default": "", | ||
"examples": ["NFT", "FT"] | ||
}, | ||
"description": { | ||
"$id": "#/items/anyOf/0/properties/description", | ||
"type": "string", | ||
"title": "The asset name label description", | ||
"default": "", | ||
"examples": ["CIP-0025 - NFT Metadata Standard"] | ||
} | ||
}, | ||
"additionalProperties": true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why allow additional properties? |
||
} | ||
] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.