-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CIP-0088? | Token Policy Registration (#467)
* Add first draft of the on-chain token policy registration CIP. * qualify pull request discussion URL Co-authored-by: Ryan Williams <44342099+Ryun1@users.noreply.github.com> * correct anchor for CIP-0036 URL Co-authored-by: Ryan Williams <44342099+Ryun1@users.noreply.github.com> * reformat license to standard CIP form Co-authored-by: Ryan Williams <44342099+Ryun1@users.noreply.github.com> * Add proposed CIP-26 Fungible Token registration along with examples and schema documentation. * Minor formatting changes for CIP-26 README.md as well as first draft specification for CIP-25/68 NFT Metadata standards. * Minor updates to the URI Array schema definition and adding CIP-25 support documentation. * Update CIP-XXXX/README.md Co-authored-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com> * Update directory structure to use proposed CIP #88 and add 867 metadatum label to the CIP-10 registry. * Update CIP Title * **CIP-0088: Token Policy Registration** Updates to README.md based on feedback of CIP editors and community. * **CIP-0088: Token Policy Registration** - Add v1.0.0 CDDL spec - Update primary README.md file to use updated CBOR CDDL notation for examples as well as enhance display formatting and examples. * **CIP-0088: Token Policy Registration** - Update readme to address issues and questions presented by CPS-0001 - Update CDDL to support a more flexible scoping structure for future expansion * Update CIP-0088/README.md Co-authored-by: Robert Phair <rphair@cosd.com> * Update CIP-0088/README.md Co-authored-by: Robert Phair <rphair@cosd.com> * **CIP-0088: Token Policy Registration** - Update for preliminary support for CIP-48 (Metadata References) - Updates to make the validation method a UInt format index of well-defined methods for validation - Clean-up of some of the CBOR examples * **CIP-0088: Registration Certificates** - Minor typo fix * **CIP-0088: Registration Certificates** - Fix typo in discussions link * **CIP-0088: Registration Certificates** - Rename and split CDDL files to better support dynamic versioning and iteration of CIP-Specific details in the future. * - Add NFT Project Details CDDL and Specification Details * Correct minor capitalization issue in NFT-Project-Details.md * Some minor changes to CDDL specs and building out a better directory structure. * Updates to CIP-88: - Complete restructuring of CIP-Specific Documentation - Provide context for when, where, and how to create extensions and modifications to the CIP - Improve documentation and optimize some data structures - Switch to Unsigned Integer version numbers for maximum on-chain compatibility - Finalize v1 documentation for most of the specification so that work on publication and validation can begin. This version should be approaching readiness to begin testing the publication and validation of information on testnet to confirm that all data structures work as expected. * Fix YAML header * Update CIP-0088/README.md Co-authored-by: Robert Phair <rphair@cosd.com> * Update Native Script scope Updated examples to include Native Script scope and also included some updates to examples and other documentation to ensure consistency. --------- Co-authored-by: Robert Phair <rphair@cosd.com> Co-authored-by: Ryan Williams <44342099+Ryun1@users.noreply.github.com> Co-authored-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com>
- Loading branch information
1 parent
7fa28f7
commit 6d664f1
Showing
35 changed files
with
2,273 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
; CIP-0025: Token Metadata Standard | ||
; Version: 1 | ||
|
||
cip25-details = { | ||
? 0 : uint, ; version | ||
1 : token-project-details ; [CIP-0025 Token Project Details](../common/token-project-details.cddl) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"25": { | ||
"0": 1, | ||
"1": { | ||
"0": "SpaceBudz", | ||
"1": [ | ||
"10,000 SpaceBudz are out there.", | ||
"Where will your SpaceBudz take you?" | ||
], | ||
"2": [ | ||
"https://", | ||
"static.spacebudz.io", | ||
"/images/logo.png" | ||
], | ||
"3": [ | ||
"https://", | ||
"static.spacebudz.io", | ||
"/images/banner.jpg" | ||
], | ||
"4": 0, | ||
"5": [ | ||
[ | ||
"twitter", | ||
[ | ||
"https://", | ||
"twitter.com/spacebudzNFT" | ||
] | ||
], | ||
[ | ||
"discord", | ||
[ | ||
"https://", | ||
"discord.gg/spacebudz" | ||
] | ||
] | ||
], | ||
"6": "SpaceBudz" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"$id": "https://raw.githubusercontent.com/cardano-foundation/CIPs/main/CIP-0088/CIPs/0025/CIP25_v1.schema.json", | ||
"title": "CIP-25: Token Project Details", | ||
"description": "Additional context for token policy declaring support for CIP-25 token metadata standards", | ||
"type": "object", | ||
"properties": { | ||
"25": { | ||
"type": "object", | ||
"properties": { | ||
"0": { | ||
"type": "integer", | ||
"title": "Version", | ||
"description": "The version of the standard in use", | ||
"minimum": 1 | ||
}, | ||
"1": { | ||
"title": "Project Details", | ||
"description": "Describe top-level details about the Token Project", | ||
"$ref": "https://raw.githubusercontent.com/cardano-foundation/CIPs/main/CIP-0088/common/token-project-details_v1.schema.json" | ||
} | ||
}, | ||
"required": [ | ||
"1" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"25" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# CIP-88 Extension: CIP-0025 | Token Project Information | ||
|
||
`Version: 1` | ||
|
||
## Top-Level Fields | ||
|
||
Both CIP-25 and CIP-68 are specifications describing a standard for storing and retrieving token metadata from the | ||
chain. To this end, we have given them the same data structure although each will utilize their own numerical index in | ||
the feature set and CIP-Specific details section of the registration. | ||
|
||
These sections may be separated in the future if the respective CIPs diverge in terms of the data or information that | ||
may be useful to provide about one format or the other in the future. | ||
|
||
| index | name | type | required | notes | | ||
|-------|--------------------------|------------------|----------|-------------------------------------------------------------------------------------------------------------| | ||
| 0 | Version | Unsigned Integer | No | Default: 1, which version of this specification is in use | | ||
| 1 | Token Collection Details | Object | Yes | Provide additional context about this "Collection" for consumption by marketplaces, explorers, and wallets. | | ||
|
||
The information registered here is helpful to aggregator services and marketplaces, it applies equally to both CIP-25 | ||
and CIP-68 metadata standards. A project utilizing one or the other should reference this documentation and include the | ||
relevant information under index #6, prefixed by the number of the CIP (25 or 68) depending upon the metadata format. | ||
|
||
## Token Collection Details Fields | ||
|
||
| index | name | type | required | | ||
|-------|---------------------|----------|----------| | ||
| 0 | Collection Name | String | Yes | | ||
| 1 | Description | Array | No | | ||
| 2 | Project Image | UriArray | No | | ||
| 3 | Project Banner | UriArray | No | | ||
| 4 | NSFW Flag | 0 or 1 | No | | ||
| 5 | Social Media | Array | No | | ||
| 6 | Project/Artist Name | String | No | | ||
|
||
For details on what these fields represent and how they should be structured in the metadata, please refer to | ||
[Token Project Details](../common/Token-Project-Details_v1.md) | ||
|
||
## CIP-25 Example | ||
|
||
```cbor | ||
{ | ||
25: { | ||
0: 1, | ||
1: { | ||
0: "Cool NFT Project", | ||
1: [ | ||
"This is a description of my project", | ||
"longer than 64 characters so broken up into a string array" | ||
], | ||
2: [ | ||
"https://", | ||
"static.coolnftproject.io", | ||
"/images/icon.png" | ||
], | ||
3: [ | ||
"https://", | ||
"static.coolnftproject.io", | ||
"/images/banner1.jpg" | ||
], | ||
4: 0, | ||
5: [ | ||
[ | ||
"twitter", | ||
[ | ||
"https://", | ||
"twitter.com/spacebudzNFT" | ||
] | ||
], | ||
[ | ||
"discord", | ||
[ | ||
"https://", | ||
"discord.gg/spacebudz" | ||
] | ||
] | ||
], | ||
6: "Virtua Metaverse" | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
; CIP-0026: Fungible Token Registration Standard | ||
; Version: 1 | ||
|
||
string = text .size (0..64) | ||
|
||
; A uri should consist of a scheme and one or more path strings describing the path to the resource | ||
; The first entry should contain the URI "Scheme" (e.g. "https://", "ftp://", "ar://", "ipfs://") | ||
; One or more subsequent entries should describe the path of the URI | ||
|
||
uri.scheme = text .size (5..64) | ||
uri.path = text .size (1..64) | ||
uri = { | ||
uri.scheme, | ||
+ uri.path | ||
} | ||
|
||
policy_id = bytes .size(28) | ||
asset_name = bytes .size (0..32) | ||
|
||
token-asset = { | ||
policy_id, | ||
asset_name | ||
} | ||
|
||
fungible-details = { | ||
0 : token-asset, ; asset identifier | ||
1 : string, ; token name | ||
2 : [* string], ; description | ||
? 3 : string, ; token ticker | ||
? 4 : uint, ; token decimals | ||
? 5 : uri, ; uri of token website | ||
? 6 : uri, ; uri of token image | ||
? 7 : token-asset ; beacon token identifier | ||
} | ||
|
||
cip26-details = { | ||
? 0 : uint, ; version | ||
1 : [+ fungible-details] ; CIP-0026 Fungible Token Registration(s) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"26": { | ||
"0": 1, | ||
"1": [ | ||
{ | ||
"0": [ | ||
"d894897411707efa755a76deb66d26dfd50593f2e70863e1661e98a0", | ||
"7370616365636f696e73" | ||
], | ||
"1": "spacecoins", | ||
"2": "SPACE", | ||
"3": [ | ||
"the OG Cardano community token", | ||
"-", | ||
"whatever you do, your did it!", | ||
"", | ||
"Learn more at https://spacecoins.io!" | ||
], | ||
"4": 0, | ||
"5": [ | ||
"https://", | ||
"spacecoins.io" | ||
], | ||
"6": [ | ||
"ipfs://", | ||
"bafkreib3e5u4am2btduu5s76rdznmqgmmrd4l6xf2vpi4vzldxe25fqapy" | ||
], | ||
"7": [ | ||
"d894897411707efa755a76deb66d26dfd50593f2e70863e1661e98a0", | ||
"" | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
{ | ||
"$id": "https://raw.githubusercontent.com/cardano-foundation/CIPs/main/CIP-0088/CIPs/0026/CIP26_v1.schema.json", | ||
"title": "CIP-26: Fungible Token", | ||
"description": "Additional context for a policy declaring support for fungible token standards", | ||
"type": "object", | ||
"properties": { | ||
"26": { | ||
"type": "object", | ||
"properties": { | ||
"0": { | ||
"type": "integer", | ||
"title": "Version", | ||
"description": "The version of the standard in use", | ||
"minimum": 1 | ||
}, | ||
"1": { | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"title": "Fungible Token Details", | ||
"description": "Describes details about a particular fungible token under this policy", | ||
"type": "object", | ||
"properties": { | ||
"0": { | ||
"title": "Subject", | ||
"description": "The hex-encoded Policy ID and Asset ID of the token", | ||
"$ref": "#/$defs/tokenAsset" | ||
}, | ||
"1": { | ||
"title": "Name", | ||
"description": "The full display name of the token", | ||
"type": "string", | ||
"example": "spacecoins" | ||
}, | ||
"2": { | ||
"title": "Symbol/Ticker", | ||
"description": "The ticker or listing symbol for the token", | ||
"type": "string", | ||
"example": "SPACE" | ||
}, | ||
"3": { | ||
"title": "Description", | ||
"description": "A short description for the token", | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"maxLength": 64 | ||
}, | ||
"example": [ | ||
"The OG Cardano Community Token","- whatever you do, your did it!" | ||
] | ||
}, | ||
"4": { | ||
"title": "Decimals", | ||
"description": "How many decimal places this token should be rendered with", | ||
"type": "integer", | ||
"example": 0, | ||
"default": 0 | ||
}, | ||
"5": { | ||
"title": "URL", | ||
"description": "A URL to the project's web page", | ||
"$ref": "https://raw.githubusercontent.com/cardano-foundation/CIPs/main/CIP-0088/common/uri-array.schema.json" | ||
}, | ||
"6": { | ||
"title": "Logo", | ||
"description": "A URI to the token's logo", | ||
"$ref": "https://raw.githubusercontent.com/cardano-foundation/CIPs/main/CIP-0088/common/uri-array.schema.json" | ||
}, | ||
"7": { | ||
"title": "Reference Token", | ||
"description": "A reference to a 'Beacon Token' that can provide additional context via inline datum to smart contracts", | ||
"$ref": "#/$defs/tokenAsset" | ||
} | ||
}, | ||
"required": [ | ||
"0", | ||
"1", | ||
"2" | ||
] | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"1" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"26" | ||
], | ||
"$defs": { | ||
"tokenAsset": { | ||
"title": "Token Asset", | ||
"description": "The hex-encoded Policy ID and hex-encoded Asset ID of the token", | ||
"type": "array", | ||
"minItems": 2, | ||
"maxItems": 2, | ||
"items": [ | ||
{ | ||
"title": "Policy ID", | ||
"description": "The hex-encoded Policy ID of the token", | ||
"type": "string", | ||
"maxLength": 56, | ||
"minLength": 56 | ||
}, | ||
{ | ||
"title": "Asset ID", | ||
"description": "The hex-encoded Asset ID of the token", | ||
"type": "string", | ||
"minLength": 0, | ||
"maxLength": 64 | ||
} | ||
], | ||
"additionalItems": false | ||
} | ||
} | ||
} |
Oops, something went wrong.