diff --git a/CIP-0136/cip-xxxx.common.jsonld b/CIP-0136/cip-136.common.jsonld similarity index 61% rename from CIP-0136/cip-xxxx.common.jsonld rename to CIP-0136/cip-136.common.jsonld index d99ccd9a3c..e3ab959060 100644 --- a/CIP-0136/cip-xxxx.common.jsonld +++ b/CIP-0136/cip-136.common.jsonld @@ -1,34 +1,35 @@ { "@context": { + "@language": "en-us", "CIP100": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#", - "CIPXXX": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0XXX/README.md#", + "CIP136": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0136/README.md#", "hashAlgorithm": "CIP100:hashAlgorithm", "body": { - "@id": "CIPXXX:body", + "@id": "CIP136:body", "@context": { "references": { - "@id": "CIPXXX:references", + "@id": "CIP100:references", "@container": "@set", "@context": { "GovernanceMetadata": "CIP100:GovernanceMetadataReference", "Other": "CIP100:OtherReference", "label": "CIP100:reference-label", "uri": "CIP100:reference-uri", - "RelevantArticles": "CIPXXX:RelevantArticles" + "RelevantArticles": "CIP136:RelevantArticles" } }, - "summary": "CIPXXX:summary", - "rationaleStatement": "CIPXXX:rationaleStatement", - "precedentDiscussion": "CIPXXX:precedentDiscussion", - "counterargumentDiscussion": "CIPXXX:counterargumentDiscussion", - "conclusion": "CIPXXX:conclusion", + "summary": "CIP136:summary", + "rationaleStatement": "CIP136:rationaleStatement", + "precedentDiscussion": "CIP136:precedentDiscussion", + "counterargumentDiscussion": "CIP136:counterargumentDiscussion", + "conclusion": "CIP136:conclusion", "internalVote": { - "@id": "CIPXXX:internalVote", + "@id": "CIP136:internalVote", "@context": { - "constitutional": "CIPXXX:constitutional", - "unconstitutional": "CIPXXX:unconstitutional", - "abstain": "CIPXXX:abstain", - "didNotVote": "CIPXXX:didNotVote" + "constitutional": "CIP136:constitutional", + "unconstitutional": "CIP136:unconstitutional", + "abstain": "CIP136:abstain", + "didNotVote": "CIP136:didNotVote" } } } diff --git a/CIP-0136/cip-xxxx.common.schema.json b/CIP-0136/cip-136.common.schema.json similarity index 94% rename from CIP-0136/cip-xxxx.common.schema.json rename to CIP-0136/cip-136.common.schema.json index ab88028ca4..742bfc7cec 100644 --- a/CIP-0136/cip-xxxx.common.schema.json +++ b/CIP-0136/cip-136.common.schema.json @@ -1,5 +1,5 @@ { - "title": "CIP-XXX Common", + "title": "CIP-136 Common", "description": "Metadata document for Cardano Constitutional Committee vote rationales, extending CIP-100", "type": "object", "required": ["hashAlgorithm", "authors", "body"], @@ -72,6 +72,13 @@ "type": "object", "required": ["summary", "rationaleStatement"], "properties": { + "references": { + "title": "References", + "type": "array", + "items": { + "$ref": "#/definitions/Reference" + } + }, "summary": { "type": "string", "title": "Summary", diff --git a/CIP-0136/examples/ryans-island-is-unconstitutional.jsonld b/CIP-0136/examples/treasury-withdrawal-unconstitutional.jsonld similarity index 51% rename from CIP-0136/examples/ryans-island-is-unconstitutional.jsonld rename to CIP-0136/examples/treasury-withdrawal-unconstitutional.jsonld index 8f2c1f7482..41e8aa6e8e 100644 --- a/CIP-0136/examples/ryans-island-is-unconstitutional.jsonld +++ b/CIP-0136/examples/treasury-withdrawal-unconstitutional.jsonld @@ -2,52 +2,54 @@ "@context": { "@language": "en-us", "CIP100": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#", - "CIPXXX": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0108/README.md#", + "CIP136": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0136/README.md#", "hashAlgorithm": "CIP100:hashAlgorithm", "body": { - "@id": "CIPXXX:body", - "@context": { - "references": { - "@id": "CIPXXX:references", - "@container": "@set", - "@context": { - "GovernanceMetadata": "CIP100:GovernanceMetadataReference", - "Other": "CIP100:OtherReference", - "label": "CIP100:reference-label", - "uri": "CIP100:reference-uri" - } - }, - "summary": "CIPXXX:summary", - "rationaleStatement": "CIPXXX:rationale-statement", - "precedentDiscussion": "CIPXXX:precedentDiscussion", - "counterargumentDiscussion": "CIPXXX:counterarguments", - "conclusion": "CIPXXX:conclusion", - "internalVote": { - "@id": "CIPXXX:internalVote", - "@context": { - "constitutional": "CIPXXX:constitutional", - "unconstitutional": "CIPXXX:unconstitutional", - "abstain": "CIPXXX:abstain", - "didNotVote": "CIPXXX:didNotVote" - } + "@id": "CIP136:body", + "@context": { + "references": { + "@id": "CIP100:references", + "@container": "@set", + "@context": { + "GovernanceMetadata": "CIP100:GovernanceMetadataReference", + "Other": "CIP100:OtherReference", + "label": "CIP100:reference-label", + "uri": "CIP100:reference-uri", + "RelevantArticles": "CIP136:RelevantArticles" + } + }, + "summary": "CIP136:summary", + "rationaleStatement": "CIP136:rationaleStatement", + "precedentDiscussion": "CIP136:precedentDiscussion", + "counterargumentDiscussion": "CIP136:counterargumentDiscussion", + "conclusion": "CIP136:conclusion", + "internalVote": { + "@id": "CIP136:internalVote", + "@container": "@set", + "@context": { + "constitutional": "CIP136:constitutional", + "unconstitutional": "CIP136:unconstitutional", + "abstain": "CIP136:abstain", + "didNotVote": "CIP136:didNotVote" + } + } } - - } }, "authors": { - "@id": "CIP100:authors", - "@container": "@set", - "@context": { - "name": "http://xmlns.com/foaf/0.1/name", - "witness": { - "@id": "CIP100:witness", - "@context": { - "witnessAlgorithm": "CIP100:witnessAlgorithm", - "publicKey": "CIP100:publicKey", - "signature": "CIP100:signature" - } + "@id": "CIP100:authors", + "@container": "@set", + "@context": { + "did": "@id", + "name": "http://xmlns.com/foaf/0.1/name", + "witness": { + "@id": "CIP100:witness", + "@context": { + "witnessAlgorithm": "CIP100:witnessAlgorithm", + "publicKey": "CIP100:publicKey", + "signature": "CIP100:signature" + } + } } - } } }, "hashAlgorithm": "blake2b-256", diff --git a/CIP-0136/test-vector.md b/CIP-0136/test-vector.md index 9c66e4fd2a..d71054799d 100644 --- a/CIP-0136/test-vector.md +++ b/CIP-0136/test-vector.md @@ -1,3 +1,50 @@ +# Test Vector for CIP-136 +Here we create some useful definitions and some examples. + +## Common Context + +### Common Fields + +The context fields which could be added to CIP-136 compliant jsonld files. +See [cip-0136.common.jsonld](./cip-0136.common.jsonld). + +### Common Fields Schema + +A json schema for the common context fields. +See [cip-0136.common.schema.json](./cip-0136.common.schema.json). + +## Examples + +### Treasury Withdrawal is Unconstitutional + +Example metadata document file: [treasury-withdrawal-unconstitutional.jsonld](./examples/treasury-withdrawal-unconstitutional.jsonld). +Blake2b-256 of the file content (to go onchain): `` + +#### Intermediate files + +Files produced to articulate process, these are not necessary in implementations. + +Body files, used to correctly generate author's witness: +- [treasury-withdrawal-unconstitutional.body.jsonld](./examples/treasury-withdrawal-unconstitutional.body.jsonld) +- [treasury-withdrawal-unconstitutional.body.nq](./examples/treasury-withdrawal-unconstitutional.body.nq) + +Blake2b-256 hash digest of canonicalized body: `` + +## How-to Recreate Examples + +This tutorial creates additional intermediate files, these are not required in implementations but are shown here to articulate the process. + +### Author + +Keys used for author property, provided here for convenience. + +Private extended signing key (hex): `105d2ef2192150655a926bca9cccf5e2f6e496efa9580508192e1f4a790e6f53de06529129511d1cacb0664bcf04853fdc0055a47cc6d2c6d205127020760652` + +Public verification key (hex): +`7ea09a34aebb13c9841c71397b1cabfec5ddf950405293dee496cac2f437480a` + +Public verification key hash (hex): `0fdc780023d8be7c9ff3a6bdc0d8d3b263bd0cc12448c40948efbf42` + +Mainnet public enterprize address (hex): `610fdc780023d8be7c9ff3a6bdc0d8d3b263bd0cc12448c40948efbf42` -// todo \ No newline at end of file