Skip to content
Open
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
9 changes: 9 additions & 0 deletions CIP-0088/CIPs/0102/CIP102_v1.cddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
; CIP-0102: Royalty Datum Metadata
; Version: 1

royalty-token-name = bytes .size (11..32)

cip102-details = {
? 0 : uint, ; version (default: 1)
1 : [+ royalty-token-name] ; royalty token asset names
}
6 changes: 6 additions & 0 deletions CIP-0088/CIPs/0102/CIP102_v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"102": {
"0": 1,
"1": ["001f4d70526f79616c7479"]
}
}
80 changes: 80 additions & 0 deletions CIP-0088/CIPs/0102/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# CIP-88 Extension: CIP-0102 | Royalty Datum Metadata

`Version: 1`

## Top-Level Fields

| index | name | type | required | notes |
| ----- | ------------------- | ----- | -------- | --------------------------------------------------------- |
| 0 | Version | UInt | No | Default: 1, which version of this specification is in use |
| 1 | Royalty Token Names | Array | Yes | Asset names of the royalty token(s) for this collection |

## Field Notes

#### 0: Version

**_Type: Unsigned Integer | Required: No | Default: 1_**

Which version of this CIP-88 extension specification is in use.

**Example:** `1`

#### 1: Royalty Token Names

**_Type: Array | Required: Yes_**

An array of asset names (as raw bytes) of the CIP-102 royalty NFTs minted under this collection's policy ID. The policy ID is implicit from the CIP-88 registration scope.

Implementors **must** look up each listed asset name under the collection's policy ID to retrieve the associated royalty datum, as specified in [CIP-0102][].

- For **v1** collections with a single royalty policy, this will contain one entry: `001f4d70526f79616c7479` (hex for `(500)Royalty`).
- For **v2** collections using intrapolicy royalties, this lists the asset names of all applicable royalty tokens (e.g., `001f4d70526f79616c747931` for `(500)Royalty1`, `001f4d70526f79616c747932` for `(500)Royalty2`, etc.).

Asset names follow the format defined in the CIP-0102 Pattern section: the [CIP-0067][] label `500` prefix (`001f4d70`) followed by the UTF-8 encoding of `"Royalty"` (`526f79616c7479`), with an optional UTF-8 encoded decimal postfix.

**Example (single policy):**

```
["001f4d70526f79616c7479"]
```

**Example (intrapolicy royalties):**

```
[
"001f4d70526f79616c747931",
"001f4d70526f79616c747932"
]
```

## CIP-102 Example

Single royalty policy:

```cbor
{
102: {
0: 1, ; version
1: [ ; royalty token names
h'001f4d70526f79616c7479' ; (500)Royalty
]
}
}
```

Intrapolicy royalties (multiple royalty policies):

```cbor
{
102: {
0: 1, ; version
1: [ ; royalty token names
h'001f4d70526f79616c747931', ; (500)Royalty1
h'001f4d70526f79616c747932' ; (500)Royalty2
]
}
}
```

[CIP-0102]: https://github.com/cardano-foundation/CIPs/tree/master/CIP-0102
[CIP-0067]: https://github.com/cardano-foundation/CIPs/tree/master/CIP-0067
3 changes: 2 additions & 1 deletion CIP-0088/CIPs/common/CIP88_Master_v1.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ cip-details = {
? 48 : cip48-details, ; ./cip/CIP-48_v1.cddl
? 60 : cip60-details, ; ./cip/CIP-60_v1.cddl
? 68 : cip68-details ; ./cip/CIP-68_v1.cddl
? 86 : cip86-details ; ./cip/CIP-86_v1.cddl
? 86 : cip86-details, ; ./cip/CIP-86_v1.cddl
? 102 : cip102-details ; ./cip/CIP-102_v1.cddl
}

; Registration Scopes
Expand Down
1 change: 1 addition & 0 deletions CIP-0088/CIPs/common/CIP88_Master_v2.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ cip-details = {
? 60 : cip60-details, ; ./cip/CIP-60_v1.cddl
? 68 : cip68-details, ; ./cip/CIP-68_v1.cddl
? 86 : cip86-details, ; ./cip/CIP-86_v1.cddl
? 102 : cip102-details, ; ./cip/CIP-102_v1.cddl
}

; Registration Scopes
Expand Down
Loading