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

CIP-0100? | Governance Metadata #556

Merged
merged 8 commits into from
Dec 12, 2023
Merged
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
4 changes: 4 additions & 0 deletions CIP-0010/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
"transaction_metadatum_label": 1667,
"description": "CIP-72: dApp registration & Discovery"
},
{
"transaction_metadataum_label": 1694,
"description": "Voltaire - additional metadata for governance, provided in a separate transaction"
},
{
"transaction_metadatum_label": 1870,
"description": "Open Badges v2.0 compliant metadata"
Expand Down
312 changes: 312 additions & 0 deletions CIP-0100/README.md

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions CIP-0100/cip-0100.common.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"@context": {
"Proposal": "https://cips.cardano.org/cip/CIP-0100#Proposal",
"hashAlgorithm": "https://cips.cardano.org/cip/CIP-0100#hashAlgorithm",
"body": {
"@id": "https://cips.cardano.org/cip/CIP-0100#body",
"@context": {
"references": {
"@id": "https://cips.cardano.org/cip/CIP-0100#references",
"@container": "@set",
"@context": {
"GovernanceMetadata": "https://cips.cardano.org/cip/CIP-0100#GovernanceMetadataReference",
"Other": "https://cips.cardano.org/cip/CIP-0100#OtherReference",
"label": "https://cips.cardano.org/cip/CIP-0100#reference-label",
"uri": "https://cips.cardano.org/cip/CIP-0100#reference-uri"
}
},
"comment": "https://cips.cardano.org/cip/CIP-0100#comment",
"externalUpdates": {
"@id": "https://cips.cardano.org/cip/CIP-0100#externalUpdates",
"@context": {
"title": "https://cips.cardano.org/cip/CIP-0100#update-title",
"uri": "https://cips.cardano.org/cip/CIP-0100#update-uri"
}
}
}
},
"authors": {
"@id": "https://cips.cardano.org/cip/CIP-0100#authors",
"@container": "@set",
"@context": {
"did": "@id",
"name": "http://xmlns.com/foaf/0.1/name",
"witness": {
"@id": "https://cips.cardano.org/cip/CIP-0100#witness",
"@context": {
"witnessAlgorithm": "https://cips.cardano.org/cip/CIP-0100#witnessAlgorithm",
"publicKey": "https://cips.cardano.org/cip/CIP-0100#publicKey",
"signature": "https://cips.cardano.org/cip/CIP-0100#signature"
}
}
}
}
}
}
146 changes: 146 additions & 0 deletions CIP-0100/cip-0100.common.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"title": "CIP-100 Common",
"description": "A base-line CIP-100 governance metadata document",
"type": "object",
"required": [
"hashAlgorithm",
"authors",
"body"
],
"properties": {
"hashAlgorithm": {
"$ref": "#/definitions/hashAlgorithm"
},
"authors": {
"title": "Authors",
"description": "The authors of this governance metadata",
"type": "array",
"items": {
"$ref": "#/definitions/Author"
}
},
"body": {
"$ref": "#/definitions/Body"
}
},
"definitions": {
"hashAlgorithm": {
"title": "Hash Algorithm",
"description": "The hash algorithm used to authenticate this document externally",
"type": "string",
"enum": [
"blake2b-224"
]
},
"Author": {
"title": "Author",
"description": "An author endorsing the content of a metadata document",
"type": "object",
"required": [
"witness"
],
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"witness": {
"$ref": "#/definitions/Witness"
}
}
},
"Witness": {
"title": "Witness",
"description": "A witness proving that the author endorses the content of the metadata",
"type": "object",
"properties": {
"witnessAlgorithm": {
"title": "WitnessAlgorithm",
"type": "string",
"enum": [
"ed25519"
]
},
"publicKey": {
"title": "PublicKey",
"type": "string"
},
"signature": {
"title": "Signature",
"type": "string"
}
}
},
"Body": {
"title": "Body",
"description": "The body of the metadata document that is hashed to produce a signature",
"properties": {
"references": {
"title": "References",
"type": "array",
"items": {
"$ref": "#/definitions/Reference"
}
},
"comment": {
"title": "Comment",
"type": "string"
},
"externalUpdatess": {
"title": "ExternalUpdates",
"type": "array",
"items": {
"$ref": "#/definitions/ExternalUpdate"
}
}
}
},
"Reference": {
"title": "Reference",
"description": "A reference to a document",
"type": "object",
"required": [
"@type",
"label",
"uri"
],
"properties": {
"@type": {
"title": "Type",
"type": "string",
"enum": [
"GovernanceMetadata",
"Other"
]
},
"label": {
"title": "Label",
"type": "string"
},
"uri": {
"title": "URI",
"type": "string"
}
}
},
"ExternalUpdate": {
"title": "ExternalUpdate",
"type": "object",
"description": "An source for updates *after* the metadata is published",
"required": [
"title",
"uri"
],
"properties": {
"title": {
"title": "Title",
"type": "string"
},
"uri": {
"title": "URI",
"type": "string"
}
}
}
}
}
9 changes: 9 additions & 0 deletions CIP-0100/example.body.canonical
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
_:c14n0 <https://cips.cardano.org/cip/CIP-0100#update-title> "Blog"@en-us .
_:c14n0 <https://cips.cardano.org/cip/CIP-0100#update-uri> "https://314pool.com"@en-us .
_:c14n2 <https://cips.cardano.org/cip/CIP-0100#body> _:c14n5 .
_:c14n3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://cips.cardano.org/cip/CIP-0100#OtherReference> .
_:c14n3 <https://cips.cardano.org/cip/CIP-0100#reference-label> "CIP-100"@en-us .
_:c14n3 <https://cips.cardano.org/cip/CIP-0100#reference-uri> "https://cips.cardano.org/cip/CIP-0100"@en-us .
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#comment> "This is a test vector for CIP-100"@en-us .
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#externalUpdates> _:c14n0 .
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#references> _:c14n3 .
10 changes: 10 additions & 0 deletions CIP-0100/example.canonical
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
_:c14n0 <https://cips.cardano.org/cip/CIP-0100#update-title> "Blog"@en-us .
_:c14n0 <https://cips.cardano.org/cip/CIP-0100#update-uri> "https://314pool.com"@en-us .
_:c14n2 <https://cips.cardano.org/cip/CIP-0100#body> _:c14n5 .
_:c14n3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://cips.cardano.org/cip/CIP-0100#OtherReference> .
_:c14n3 <https://cips.cardano.org/cip/CIP-0100#reference-label> "CIP-100"@en-us .
_:c14n3 <https://cips.cardano.org/cip/CIP-0100#reference-uri> "https://cips.cardano.org/cip/CIP-0100"@en-us .
_:c14n4 <http://xmlns.com/foaf/0.1/name> "Pi Lanningham"@en-us .
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#comment> "This is a test vector for CIP-100"@en-us .
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#externalUpdates> _:c14n0 .
_:c14n5 <https://cips.cardano.org/cip/CIP-0100#references> _:c14n3 .
59 changes: 59 additions & 0 deletions CIP-0100/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"@context": {
"@language": "en-us",
"Proposal": "https://cips.cardano.org/cip/CIP-0100#Proposal",
"hashAlgorithm": "https://cips.cardano.org/cip/CIP-0100#hashAlgorithm",
"body": {
"@id": "https://cips.cardano.org/cip/CIP-0100#body",
"@context": {
"references": {
"@id": "https://cips.cardano.org/cip/CIP-0100#references",
"@container": "@set",
"@context": {
"GovernanceMetadata": "https://cips.cardano.org/cip/CIP-0100#GovernanceMetadataReference",
"Other": "https://cips.cardano.org/cip/CIP-0100#OtherReference",
"label": "https://cips.cardano.org/cip/CIP-0100#reference-label",
"uri": "https://cips.cardano.org/cip/CIP-0100#reference-uri"
}
},
"comment": "https://cips.cardano.org/cip/CIP-0100#comment",
"externalUpdates": {
"@id": "https://cips.cardano.org/cip/CIP-0100#externalUpdates",
"@context": {
"title": "https://cips.cardano.org/cip/CIP-0100#update-title",
"uri": "https://cips.cardano.org/cip/CIP-0100#update-uri"
}
}
}
},
"authors": {
"@id": "https://cips.cardano.org/cip/CIP-0100#authors",
"@container": "@set",
"@context": {
"did": "@id",
"name": "http://xmlns.com/foaf/0.1/name",
"witness": {
"@id": "https://cips.cardano.org/cip/CIP-0100#witness",
"@context": {
"witnessAlgorithm": "https://cips.cardano.org/cip/CIP-0100#witnessAlgorithm",
"publicKey": "https://cips.cardano.org/cip/CIP-0100#publicKey",
"signature": "https://cips.cardano.org/cip/CIP-0100#signature"
}
}
}
}
},
"hashAlgorithm": "blake2b-224",
"authors": [
{ "name": "Pi Lanningham", "witness": { "witnessAlgorithm": "ed25519", "publicKey": "46e4db7f87497ba232977ccd591b3d040316b155e8c60e3ea49176c03fa269de", "signature": "abcd"}}
],
"body": {
"references": [
{ "@type": "Other", "label": "CIP-100", "uri": "https://cips.cardano.org/cip/CIP-0100" }
],
"comment": "This is a test vector for CIP-100",
"externalUpdates": [
{ "title": "Blog", "uri": "https://314pool.com" }
]
}
}