Skip to content

Commit

Permalink
Add JSONLD context and example for Permission
Browse files Browse the repository at this point in the history
Signed-off-by: George J Padayatti <george.padayatti@igrant.io>
  • Loading branch information
georgepadayatti committed Aug 23, 2022
1 parent 405149f commit 206b638
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 8 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
"@context": {
"@version": 1.1,
"@protected": true,
"ddaRegistry": "https://docs.igrant.io/docs/data-exchange-agreements/#",
"dexaRegistry": "https://docs.igrant.io/docs/data-exchange-agreements/#",
"permissionVocab": "https://docs.igrant.io/schema/permission/v1.0/#",
"DataDisclosureAgreement": {
"@id": "ddaRegistry:data-disclosure-agreement",
"@type": "ddaRegistry:data-disclosure-agreement",
"@id": "dexaRegistry:data-disclosure-agreement",
"@type": "dexaRegistry:data-disclosure-agreement",
"@context": {
"dda": "https://docs.igrant.io/schema/data-disclosure-agreement/v1.0/#",
"schema": "https://schema.org/",
Expand Down Expand Up @@ -141,6 +142,35 @@
"@container": "@list"
}
}
},
"Permission": {
"@id": "dexaRegistry:permission",
"@type": "dexaRegistry:permission",
"@context": {
"permissionVocab": "https://docs.igrant.io/schema/permission/v1.0/#",
"mydataDidVocab": "https://docs.igrant.io/schema/mydata-did/v2.0/#",
"@version": 1.1,
"@protected": true,
"personalDataAttributes": {
"@id": "permissionVocab:personalDataAttributes",
"@type": "@id",
"@container": "@list",
"@context": {
"dda": "https://docs.igrant.io/schema/data-disclosure-agreement/v1.0/#",
"permissionVocab": "https://docs.igrant.io/schema/permission/v2.0/#",
"@version": 1.1,
"@protected": true,
"attributeId": "dda:pdAttributeId",
"permission": "permissionVocab:permission"
}
},
"dataAgreementDid": "mydataDidVocab:dataAgreementDid",
"proofChain": {
"@id": "sec:proof",
"@type": "@id",
"@container": "@list"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context": [
"https://raw.githubusercontent.com/decentralised-dataexchange/data-exchange-agreements/main/interface-specs/data-disclosure-agreement-schema/data-disclosure-agreement-schema-context.jsonld",
"https://raw.githubusercontent.com/decentralised-dataexchange/data-exchange-agreements/main/interface-specs/jsonld/dexa-context.jsonld",
"https://w3id.org/security/v2"
],
"@id": "urn:uuid:xyz",
Expand Down Expand Up @@ -62,10 +62,10 @@
"proofChain": [
{
"id": "urn:uuid:proof",
"type": "Assertion",
"created": "1234",
"verificationMethod": "Assertion",
"proofPurpose": "Assertion",
"type": "Ed25519Signature2018",
"created": "2017-06-18T21:19:10Z",
"verificationMethod": "did:key:abc",
"proofPurpose": "authentication",
"proofValue": "x.y.z"
}
]
Expand Down
26 changes: 26 additions & 0 deletions interface-specs/jsonld/example-permission.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"@context": [
"https://raw.githubusercontent.com/decentralised-dataexchange/data-exchange-agreements/main/interface-specs/jsonld/dexa-context.jsonld",
"https://w3id.org/security/v2"
],
"@id": "urn:uuid:xyz",
"@type": [
"Permission"
],
"personalDataAttributes": [
{
"permission": "allow",
"attributeId": "abc"
}
],
"dataAgreementDid": "did:mydata:zj53m..",
"proofChain": [
{
"type": "Ed25519Signature2018",
"created": "2017-06-18T21:19:10Z",
"verificationMethod": "did:key:abc",
"proofPurpose": "authentication",
"proofValue": "x.y.z"
}
]
}

0 comments on commit 206b638

Please sign in to comment.