Skip to content

Commit

Permalink
CIP-0100 | Small clean up on example files (#736)
Browse files Browse the repository at this point in the history
* small clean up on example files

* change hashing algo used in examples

* align hashing algo through example files

* changed links from  to github

* update example hash in readme
  • Loading branch information
Ryun1 authored Jan 22, 2024
1 parent 03af06d commit a6267d5
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 56 deletions.
2 changes: 1 addition & 1 deletion CIP-0100/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ An example document with an inline context is provided in [this](./example.json)

Canonicalization should produce the following blak2b-256 hash:

34cbb91e044cbd1dbda9e5aa542a74e712d23d0bf151c436c52920dcac03629c
`6ea05c0e97b1b7316d48b5587a9e60d47c0c44993c8609c9544d88c111814819`

## Path to Active

Expand Down
33 changes: 16 additions & 17 deletions CIP-0100/cip-0100.common.jsonld
Original file line number Diff line number Diff line change
@@ -1,42 +1,41 @@
{
"@context": {
"Proposal": "https://cips.cardano.org/cip/CIP-0100#Proposal",
"hashAlgorithm": "https://cips.cardano.org/cip/CIP-0100#hashAlgorithm",
"hashAlgorithm": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#hashAlgorithm",
"body": {
"@id": "https://cips.cardano.org/cip/CIP-0100#body",
"@id": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#body",
"@context": {
"references": {
"@id": "https://cips.cardano.org/cip/CIP-0100#references",
"@id": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#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"
"governanceMetadata": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#GovernanceMetadataReference",
"other": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#OtherReference",
"label": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#reference-label",
"uri": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#reference-uri"
}
},
"comment": "https://cips.cardano.org/cip/CIP-0100#comment",
"comment": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#comment",
"externalUpdates": {
"@id": "https://cips.cardano.org/cip/CIP-0100#externalUpdates",
"@id": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#externalUpdates",
"@context": {
"title": "https://cips.cardano.org/cip/CIP-0100#update-title",
"uri": "https://cips.cardano.org/cip/CIP-0100#update-uri"
"title": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#update-title",
"uri": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#update-uri"
}
}
}
},
"authors": {
"@id": "https://cips.cardano.org/cip/CIP-0100#authors",
"@id": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#authors",
"@container": "@set",
"@context": {
"did": "@id",
"name": "http://xmlns.com/foaf/0.1/name",
"witness": {
"@id": "https://cips.cardano.org/cip/CIP-0100#witness",
"@id": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#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"
"witnessAlgorithm": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#witnessAlgorithm",
"publicKey": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#publicKey",
"signature": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#signature"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion CIP-0100/cip-0100.common.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"description": "The hash algorithm used to authenticate this document externally",
"type": "string",
"enum": [
"blake2b-224"
"blake2b-256"
]
},
"Author": {
Expand Down
18 changes: 9 additions & 9 deletions CIP-0100/example.body.canonical
Original file line number Diff line number Diff line change
@@ -1,9 +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 .
_:c14n0 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#update-title> "Blog"@en-us .
_:c14n0 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#update-uri> "https://314pool.com"@en-us .
_:c14n2 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#body> _:c14n5 .
_:c14n3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#OtherReference> .
_:c14n3 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#reference-label> "CIP-100"@en-us .
_:c14n3 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#reference-uri> "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md"@en-us .
_:c14n5 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#comment> "This is a test vector for CIP-100"@en-us .
_:c14n5 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#externalUpdates> _:c14n0 .
_:c14n5 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#references> _:c14n3 .
18 changes: 9 additions & 9 deletions CIP-0100/example.canonical
Original file line number Diff line number Diff line change
@@ -1,10 +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 .
_:c14n0 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#update-title> "Blog"@en-us .
_:c14n0 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#update-uri> "https://314pool.com"@en-us .
_:c14n2 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#body> _:c14n5 .
_:c14n3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#OtherReference> .
_:c14n3 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#reference-label> "CIP-100"@en-us .
_:c14n3 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#reference-uri> "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md"@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 .
_:c14n5 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#comment> "This is a test vector for CIP-100"@en-us .
_:c14n5 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#externalUpdates> _:c14n0 .
_:c14n5 <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#references> _:c14n3 .
37 changes: 18 additions & 19 deletions CIP-0100/example.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,54 @@
{
"@context": {
"@language": "en-us",
"Proposal": "https://cips.cardano.org/cip/CIP-0100#Proposal",
"hashAlgorithm": "https://cips.cardano.org/cip/CIP-0100#hashAlgorithm",
"hashAlgorithm": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#hashAlgorithm",
"body": {
"@id": "https://cips.cardano.org/cip/CIP-0100#body",
"@id": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#body",
"@context": {
"references": {
"@id": "https://cips.cardano.org/cip/CIP-0100#references",
"@id": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#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"
"governanceMetadata": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#GovernanceMetadataReference",
"other": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#OtherReference",
"label": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#reference-label",
"uri": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#reference-uri"
}
},
"comment": "https://cips.cardano.org/cip/CIP-0100#comment",
"comment": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#comment",
"externalUpdates": {
"@id": "https://cips.cardano.org/cip/CIP-0100#externalUpdates",
"@id": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#externalUpdates",
"@context": {
"title": "https://cips.cardano.org/cip/CIP-0100#update-title",
"uri": "https://cips.cardano.org/cip/CIP-0100#update-uri"
"title": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#update-title",
"uri": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#update-uri"
}
}
}
},
"authors": {
"@id": "https://cips.cardano.org/cip/CIP-0100#authors",
"@id": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#authors",
"@container": "@set",
"@context": {
"did": "@id",
"name": "http://xmlns.com/foaf/0.1/name",
"witness": {
"@id": "https://cips.cardano.org/cip/CIP-0100#witness",
"@id": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#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"
"witnessAlgorithm": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#witnessAlgorithm",
"publicKey": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#publicKey",
"signature": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#signature"
}
}
}
}
},
"hashAlgorithm": "blake2b-224",
"hashAlgorithm": "blake2b-256",
"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" }
{ "@type": "other", "label": "CIP-100", "uri": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md" }
],
"comment": "This is a test vector for CIP-100",
"externalUpdates": [
Expand Down

0 comments on commit a6267d5

Please sign in to comment.