Skip to content

Commit

Permalink
feat: copy schema versions past v0.4 in traceability events (#124)
Browse files Browse the repository at this point in the history
* feat: copy schema versions past v0.4 in traceability events

* refactor: update instance data for v0.4.0 schema

* feat: add schema and data schema for product passport version pass v0.4

* feat: add schema and data schema for conformity credential version pass v4.0

* feat: copy schema versions past v0.4 in facility record
  • Loading branch information
ldhyen99 authored Oct 25, 2024
1 parent 6fa2cb4 commit 7ad1b6d
Show file tree
Hide file tree
Showing 32 changed files with 19,121 additions and 633 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
{
"type": ["DigitalFacilityRecord", "VerifiableCredential"],
"@context": ["https://www.w3.org/ns/credentials/v2", "https://vocabulary.uncefact.org/untp/dfr/0.4.0/"],
"id": "https://example-company.com/credentials/2a423366-a0d6-4855-ba65-2e0c926d09b0",
"issuer": {
"type": ["CredentialIssuer"],
"id": "did:web:identifiers.example-company.com:12345",
"name": "Example Company Pty Ltd",
"otherIdentifiers": [
{
"type": ["Identifier"],
"id": "https://id.gs1.org/01/09520123456788/21/12345",
"name": "Battery Product Identifier",
"registeredId": "90664869327",
"idScheme": {
"type": ["IdentifierScheme"],
"id": "https://id.gs1.org/01/",
"name": "Global Trade Identification Number (GTIN)"
}
}
]
},
"validFrom": "2024-03-15T12:00:00Z",
"validUntil": "2034-03-15T12:00:00Z",
"credentialSubject": {
"type": ["Facility"],
"id": "https://id.gs1.org/gln/0614141123452",
"registeredId": "614141123452",
"name": "Example Facility 7",
"description": "LiFePO4 Battery Plant number 7",
"idScheme": {
"type": ["IdentifierScheme"],
"id": "https://id.gs1.org/01/",
"name": "Global Trade Identification Number (GTIN)"
},
"countryOfOperation": "AU",
"processCategories": [
{
"type": ["Classification"],
"id": "https://unstats.un.org/unsd/classifications/Econ/cpc/46410",
"code": "46410",
"name": "Primary cells and primary batteries",
"schemeID": "https://unstats.un.org/unsd/classifications/Econ/cpc/",
"schemeName": "UN Central Product Classification (CPC)"
}
],
"operatedByParty": {
"type": ["Identifier"],
"id": "https://id.gs1.org/01/09520123456788/21/12345",
"name": "Battery Manufacturing Company",
"registeredId": "90664869327",
"idScheme": {
"type": ["IdentifierScheme"],
"id": "https://id.gs1.org/01/",
"name": "Global Trade Identification Number (GTIN)"
}
},
"address": {
"type": ["Address"],
"streetAddress": "Level 11, 15 London Circuit",
"postalCode": "2601",
"addressLocality": "Acton",
"addressRegion": "ACT",
"addressCountry": "AU"
},
"locationInformation": {
"type": ["Location"],
"plusCode": "https://plus.codes/8CGRC78W+MM",
"geoLocation": {
"type": "Point",
"coordinates": [3.141579, 3.141579]
},
"geoBoundary": {
"type": "Polygon",
"coordinates": [
[
[3.141579, 3.141579],
[3.141579, 3.141579]
]
]
}
},
"conformityClaims": [
{
"type": ["Claim", "Declaration"],
"assessmentDate": "2024-03-15",
"id": "https://products.example-company.com/09520123456788/declarations/12345",
"compliance": true,
"conformityTopic": "environment.emissions",
"referenceStandard": {
"type": ["Standard"],
"id": "https://www.globalbattery.org/media/publications/gba-rulebook-v2.0-master.pdf",
"name": "GBA Battery Passport Greenhouse Gas Rulebook - V.2.0",
"issuingParty": {
"type": ["Identifier"],
"id": "https://id.gs1.org/01/09520123456788/21/12345",
"name": "Battery Product Identifier",
"registeredId": "90664869327",
"idScheme": {
"type": ["IdentifierScheme"],
"id": "https://id.gs1.org/01/",
"name": "Global Trade Identification Number (GTIN)"
}
},
"issueDate": "2023-12-05"
},
"referenceRegulation": {
"type": ["Regulation"],
"id": "https://www.legislation.gov.au/F2008L02309/latest/versions",
"name": "National Greenhouse and Energy Reporting (Measurement) Determination",
"jurisdictionCountry": "AU",
"administeredBy": {
"type": ["Identifier"],
"id": "https://id.gs1.org/01/09520123456788/21/12345",
"name": "Battery Product Identifier",
"registeredId": "90664869327",
"idScheme": {
"type": ["IdentifierScheme"],
"id": "https://id.gs1.org/01/",
"name": "Global Trade Identification Number (GTIN)"
}
},
"effectiveDate": "2024-03-20"
},
"assessmentCriteria": [
{
"type": ["Criterion"],
"id": "https://www.globalbattery.org/media/publications/gba-rulebook-v2.0-master.pdf#BatteryAssembly",
"name": "Battery Assembly Guidelines",
"thresholdValues": [
{
"type": ["Metric"],
"metricName": "GHG emissions intensity",
"metricValue": { "value": 10, "unit": "KGM" },
"score": "BB",
"accuracy": 0.05
}
]
}
],
"declaredValues": [
{
"type": ["Metric"],
"metricName": "GHG emissions intensity",
"metricValue": { "value": 10, "unit": "KGM" },
"score": "BB",
"accuracy": 0.05
}
],
"conformityEvidence": {
"type": ["SecureLink", "Link"],
"linkURL": "https://files.example-certifier.com/1234567.json",
"linkName": "GBA Rulebook Conformity Certificate",
"linkType": "https://test.uncefact.org/vocabulary/linkTypes/dcc",
"hashDigest": "6239119dda5bd4c8a6ffb832fe16feaa5c27b7dba154d24c53d4470a2c69adc2",
"hashMethod": "SHA-256",
"encryptionMethod": "AES"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
{
"type": ["DigitalFacilityRecord", "VerifiableCredential"],
"@context": ["https://www.w3.org/ns/credentials/v2", "https://vocabulary.uncefact.org/untp/dfr/0.4.1/"],
"id": "https://example-company.com/credentials/2a423366-a0d6-4855-ba65-2e0c926d09b0",
"issuer": {
"type": ["CredentialIssuer"],
"id": "did:web:identifiers.example-company.com:12345",
"name": "Example Company Pty Ltd",
"otherIdentifier": [
{
"type": ["Identifier"],
"id": "https://id.gs1.org/01/09520123456788/21/12345",
"name": "EV battery 300Ah",
"registeredId": "90664869327",
"idScheme": {
"type": ["IdentifierScheme"],
"id": "https://id.gs1.org/01/",
"name": "Global Trade Identification Number (GTIN)"
}
}
]
},
"validFrom": "2024-03-15T12:00:00Z",
"validUntil": "2034-03-15T12:00:00Z",
"credentialSubject": {
"type": ["Facility"],
"id": "https://id.gs1.org/gln/0614141123452",
"registeredId": "614141123452",
"description": "LiFePO4 Battery Plant Number 7",
"name": "Example Facility 7",
"idScheme": {
"type": ["IdentifierScheme"],
"id": "https://id.gs1.org/01/",
"name": "Global Trade Identification Number (GTIN)"
},
"countryOfOperation": "AU",
"processCategory": [
{
"type": ["Classification"],
"id": "https://unstats.un.org/unsd/classifications/Econ/cpc/46410",
"code": "46410",
"name": "Primary cells and primary batteries",
"schemeID": "https://unstats.un.org/unsd/classifications/Econ/cpc/",
"schemeName": "UN Central Product Classification (CPC)"
}
],
"operatedByParty": {
"type": ["Identifier"],
"id": "https://id.gs1.org/01/09520123456788/21/12345",
"name": "Battery Production Facility",
"registeredId": "90664869327",
"idScheme": {
"type": ["IdentifierScheme"],
"id": "https://id.gs1.org/01/",
"name": "Global Trade Identification Number (GTIN)"
}
},
"address": {
"type": ["Address"],
"streetAddress": "Level 11, 15 London Circuit",
"postalCode": "2601",
"addressLocality": "Acton",
"addressRegion": "ACT",
"addressCountry": "AU"
},
"locationInformation": {
"type": ["Location"],
"plusCode": "https://plus.codes/8CGRC78W+MM",
"geoLocation": {
"type": "Point",
"coordinates": [3.141579, 3.141579]
},
"geoBoundary": {
"type": "Polygon",
"coordinates": [[[3.141579, 3.141579]]]
}
},
"conformityClaim": [
{
"type": ["Claim", "Declaration"],
"assessmentDate": "2024-03-15",
"id": "https://products.example-company.com/09520123456788/declarations/12345",
"referenceStandard": {
"type": ["Standard"],
"id": "https://www.globalbattery.org/media/publications/gba-rulebook-v2.0-master.pdf",
"name": "GBA Battery Passport Greenhouse Gas Rulebook - V.2.0",
"issuingParty": {
"type": ["Identifier"],
"id": "https://id.gs1.org/01/09520123456788/21/12345",
"name": "Battery Production Facility",
"registeredId": "90664869327",
"idScheme": {
"type": ["IdentifierScheme"],
"id": "https://id.gs1.org/01/",
"name": "Global Trade Identification Number (GTIN)"
}
},
"issueDate": "2023-12-05"
},
"referenceRegulation": {
"type": ["Regulation"],
"id": "https://www.legislation.gov.au/F2008L02309/latest/versions",
"name": "National Greenhouse and Energy Reporting (Measurement) Determination",
"jurisdictionCountry": "AU",
"administeredBy": {
"type": ["Identifier"],
"id": "https://id.gs1.org/01/09520123456788/21/12345",
"name": "Battery Production Facility",
"registeredId": "90664869327",
"idScheme": {
"type": ["IdentifierScheme"],
"id": "https://id.gs1.org/01/",
"name": "Global Trade Identification Number (GTIN)"
}
},
"effectiveDate": "2024-03-20"
},
"assessmentCriteria": [
{
"type": ["Criterion"],
"id": "https://www.globalbattery.org/media/publications/gba-rulebook-v2.0-master.pdf#BatteryAssembly",
"name": "Battery Assembly Guidelines",
"thresholdValues": [
{
"type": ["Metric"],
"metricName": "GHG Emissions Intensity",
"metricValue": {
"value": 10,
"unit": "KGM"
},
"score": "BB",
"accuracy": 0.05
}
]
}
],
"declaredValue": [
{
"type": ["Metric"],
"metricName": "GHG Emissions Intensity",
"metricValue": {
"value": 10,
"unit": "KGM"
},
"score": "BB",
"accuracy": 0.05
}
],
"compliance": true,
"conformityTopic": "environment.emissions",
"conformityEvidence": {
"type": ["SecureLink", "Link"],
"linkURL": "https://files.example-certifier.com/1234567.json",
"linkName": "GBA Rulebook Conformity Certificate",
"linkType": "https://test.uncefact.org/vocabulary/linkTypes/dcc",
"hashDigest": "6239119dda5bd4c8a6ffb832fe16feaa5c27b7dba154d24c53d4470a2c69adc2",
"hashMethod": "SHA-256",
"encryptionMethod": "AES"
}
}
]
}
}
Loading

0 comments on commit 7ad1b6d

Please sign in to comment.