From 70a2c169761c3ecd6d4bad37f36de781d1bb1d42 Mon Sep 17 00:00:00 2001 From: Ashley Harwood <60303491+ashleythedeveloper@users.noreply.github.com> Date: Tue, 24 Oct 2023 10:33:55 +1100 Subject: [PATCH] add context --- contexts/deforestationCert.json | 118 +++++++++++++++++++++++++++ eNVD.json | 21 +++-- vcs/farmDeforestationCredential.json | 77 +++++++++++++++++ 3 files changed, 208 insertions(+), 8 deletions(-) create mode 100644 contexts/deforestationCert.json create mode 100644 vcs/farmDeforestationCredential.json diff --git a/contexts/deforestationCert.json b/contexts/deforestationCert.json new file mode 100644 index 0000000..fcf94cf --- /dev/null +++ b/contexts/deforestationCert.json @@ -0,0 +1,118 @@ +{ + "@context": { + "@version": 1.1, + "id": "xsd:string", + "description": "xsd:string", + "validFrom": "xsd:string", + "validTo": "xsd:string", + "scope": { + "@id": "xsd:string", + "@context": { + "id": "xsd:string", + "name": "xsd:string", + "dateOfIssue": "xsd:string", + "issuingBody": { + "@id": "xsd:string", + "@context": { + "id": "xsd:string", + "name": "xsd:string", + "type": "xsd:string" + } + }, + "criteria": { + "@id": "xsd:string", + "@container": "@list", + "@context": { + "id": "xsd:string", + "description": "xsd:string", + "type": "xsd:string", + "validationService": "xsd:string" + } + } + } + }, + "issuedBy": { + "@id": "xsd:string", + "@context": { + "id": "xsd:string", + "name": "xsd:string", + "type": "xsd:string" + } + }, + "issuedTo": { + "@id": "xsd:string", + "@context": { + "id": "xsd:string", + "name": "xsd:string", + "type": "xsd:string" + } + }, + "subjects": { + "@id": "xsd:string", + "@container": "@list", + "@context": { + "facilityID": "xsd:string" + } + }, + "claims": { + "@id": "xsd:string", + "@container": "@list", + "@context": { + "scope": "xsd:string", + "threshold": { + "@id": "xsd:string", + "@context": { + "Metric": "xsd:string", + "Unit": "xsd:string", + "Value": "xsd:integer" + } + }, + "metric": { + "@id": "xsd:string", + "@container": "@list", + "@context": { + "Metric": "xsd:string", + "Unit": "xsd:string", + "Value": "xsd:integer" + } + }, + "evidence": { + "@id": "xsd:string", + "@context": { + "evidenceRootHash": "xsd:string", + "description": "xsd:string", + "evidenceData": { + "@id": "xsd:string", + "@container": "@list", + "@context": { + "fileHash": "xsd:string", + "fileLocation": "xsd:string", + "fileType": "xsd:string", + "inEncrypted": "xsd:boolean" + } + } + } + }, + "snapshotDate": "xsd:string", + "decryptionKeyRequest": "xsd:string", + "compliance": "xsd:boolean" + } + }, + "accreditation": { + "@id": "xsd:string", + "@context": { + "credential": "xsd:string", + "authority": { + "@id": "xsd:string", + "@context": { + "id": "xsd:string", + "name": "xsd:string", + "type": "xsd:string" + } + }, + "validFrom": "xsd:string", + "validTo": "xsd:string" + } + } + } +} diff --git a/eNVD.json b/eNVD.json index b38e376..8c997ac 100644 --- a/eNVD.json +++ b/eNVD.json @@ -1,20 +1,25 @@ { - "pdfUrl": "https://api.envd.uat.integritysystems.com.au/api/v3/vendordeclaration/consignments/C-101507451/$print?authToken=CfDJ8Cj2KovPNzREtqzsje3SqEciXBi_7Jq1TMMPrGV7ZkgcRvWf-UppMJB9VFx5KvJc3hnnTdwYpaHUvTpO1z0DybZP60G1bGWg1mYeOqntE0wOLH-jEqfxqs5fnoJObslqbg", - "number": "C-101507451", - "consignmentNumber": "C-101507451", + "pdfUrl": "https://api.envd.uat.integritysystems.com.au/api/v3/vendordeclaration/consignments/C-101507453/$print?authToken=CfDJ8Cj2KovPNzREtqzsje3SqEdlmhDZA7fQhq7FU2LUR0vI0ohPPYnKbgAHjrBiFOvVuxQhqk1xs5aRPcOh7bzs595J_UWViqqtOQKGIsqqTlbaihYm7pO7MN3Uj6gpDIGD_A", + "number": "C-101507453", + "consignmentNumber": "C-101507453", "forms": [ { - "serialNumber": "41384820", + "serialNumber": "41384822", "type": "LPAC1" } ], "movementDate": "2023-06-10T00:00:00", "movementTime": "01:00", - "createdAt": "2023-10-20T05:57:35.0628093+00:00", - "updatedAt": "2023-10-20T05:57:36.8312143+00:00", + "createdAt": "2023-10-20T06:02:34.6738301+00:00", + "updatedAt": "2023-10-20T06:02:35.9020097+00:00", "submittedAt": null, - "consignee": { - "name": null + "origin": { + "name": "AgTrace farms", + "pic": "NH020188" + }, + "destination": { + "name": "AgTrace processors", + "pic": "QBZZ2222" }, "declaration": { "accept": true, diff --git a/vcs/farmDeforestationCredential.json b/vcs/farmDeforestationCredential.json new file mode 100644 index 0000000..27ce5fe --- /dev/null +++ b/vcs/farmDeforestationCredential.json @@ -0,0 +1,77 @@ +{ + "id": "", + "description": "EU deforestation free assessment", + "scope": { + "id": "https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32023R1115", + "name": "Regulation (EU) 2023/1115 on deforestation-free products", + "issuingBody": { + "id": "did:web:european-union.europa.eu", + "name": "European Union", + "type": "Supranational Organization" + }, + "dateOfIssue": "09/06/2023", + "criteria": [ + { + "id": "https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32023R1115#canopy-cover", + "description": "No more than 10% canopy cover reduction per km2", + "type": "mandatory", + "validationService": "https://validation.europa.eu/2023-1115" + } + ] + }, + "issuedBy": { + "id": "did:web:cibolabs.com.au", + "name": "CIBO Labs", + "type": "Accredited Deforestation Free Certifying Body" + }, + "issuedTo": { + "id": "did:web:farm.agtrace.showthething.com", + "name": "AgTrace Farms", + "type": "Cattle Farm" + }, + "validFrom": "23/10/2023", + "validTo": "23/10/2024", + "subjects": [{ "facilityID": "NH020188" }], + "claims": [ + { + "scope": "", + "threshold": { + "Metric": "Canopy cover reduction", + "Unit": "% per km^2", + "Value": 10 + }, + "metric": [ + { + "Metric": "Canopy cover reduction", + "Unit": "% per km^2", + "Value": 0 + } + ], + "evidence": { + "evidenceRootHash": "03c7c0ace395d80182db07ae2c30f034", + "description": "Deforestation Free Assessment Report", + "evidenceData": [ + { + "fileHash": "f880d8520f8edbac052269a1a969e61d", + "fileLocation": "secure-data.cibolabs.com.au/e7d4c0c9-9c7a-4a01-a28f-473bda17e10f.pdf", + "fileType": "application/pdf", + "inEncrypted": true + } + ] + }, + "snapshotDate": "23/10/2023", + "decryptionKeyRequest": "keys.cibolabs.com.au/d4c7c497-bb9f-4bff-bc0a-7c492092b0b7", + "compliance": true + } + ], + "accreditation": { + "credential": "accreditation.cibolabs.com.au/d4c7c497-bb9f-4bff-bc0a-7c492092b0b7", + "authority": { + "id": "did:web:agriculture.gov.au", + "name": "Department of Agriculture, Fisheries and Forestry", + "type": "Federal Government" + }, + "validFrom": "23/10/2022", + "validTo": "23/10/2024" + } +}