Skip to content

Commit

Permalink
chore: test did config
Browse files Browse the repository at this point in the history
  • Loading branch information
OR13 committed Nov 3, 2021
1 parent 04083a4 commit 6e5f4e6
Show file tree
Hide file tree
Showing 8 changed files with 307 additions and 124 deletions.
11 changes: 11 additions & 0 deletions core/contexts/did-config-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"@context": [
{
"@version": 1.1,
"@protected": true,
"DomainLinkageCredential": "https://identity.foundation/.well-known/contexts/did-configuration-v0.2#DomainLinkageCredential",
"origin": "https://identity.foundation/.well-known/contexts/did-configuration-v0.2#origin",
"linked_dids": "https://identity.foundation/.well-known/contexts/did-configuration-v0.2#linked_dids"
}
]
}
3 changes: 3 additions & 0 deletions core/contexts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import secv2 from "./sec-v2.json";
import secv1 from "./sec-v1.json";

import tracev1 from "./trace-v1.json";
import didConfigv1 from "./did-config-v1.json";

export const contexts: any = {
"https://www.w3.org/2018/credentials/v1": credsv1,
Expand All @@ -22,4 +23,6 @@ export const contexts: any = {
"https://w3id.org/security/v1": secv1,

"https://w3id.org/traceability/v1": tracev1,
"https://identity.foundation/.well-known/contexts/did-configuration-v0.2.jsonld":
didConfigv1,
};
14 changes: 14 additions & 0 deletions data/did-configuration.credential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://identity.foundation/.well-known/contexts/did-configuration-v0.2.jsonld"
],
"issuer": "did:key:z6MkjRagNiMu91DduvCvgEsqLZDVzrJzFrwahc4tXLt9DoHd",
"issuanceDate": "2020-12-04T08:56:37-06:00",
"expirationDate": "2025-12-04T08:56:37-06:00",
"type": ["VerifiableCredential", "DomainLinkageCredential"],
"credentialSubject": {
"id": "did:key:z6MkjRagNiMu91DduvCvgEsqLZDVzrJzFrwahc4tXLt9DoHd",
"origin": "https://api.did.actor"
}
}
4 changes: 4 additions & 0 deletions data/did-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"@context": "https://identity.foundation/.well-known/contexts/did-configuration-v0.2.jsonld",
"linked_dids": []
}
124 changes: 0 additions & 124 deletions data/example-mtr.json

This file was deleted.

196 changes: 196 additions & 0 deletions data/steel-product-mtr.credential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/traceability/v1"
],
"id": "http://example.org/credentials/",
"type": ["VerifiableCredential", "MillTestReportCertificate"],
"name": "Certified Mill Test Report",
"description": "This document includes recommended mill certificate fields.",
"issuanceDate": "2021-10-02T12:30:00-01:00",
"issuer": "did:key:z6MktiSzqF9kqwdU8VkdBKx56EYzXfpgnNPUAGznpicNiWfn",
"credentialSubject": {
"type": "MillTestReport",
"manufacturer": {
"type": "Organization",
"name": "Canadian Melters",
"address": {
"type": "PostalAddress",
"streetAddress": "1029 Langford Rd",
"addressLocality": "Baysville",
"addressRegion": "ON",
"postalCode": "P0B 1A0",
"addressCountry": "Canada"
}
},
"product": {
"type": "SteelProduct",
"heatNumber": "14012",
"specification": "AISI",
"grade": "304",
"originalCountryOfMeltAndPour": "Canada",
"inspection": {
"type": "InspectionReport",
"observation": [
{
"type": "Observation",
"date": "2021-10-02T12:30:00-01:00",
"property": {
"type": "ChemicalProperty",
"name": "Chromium",
"formula": "Cr",
"inchi": "InChI=1S/Cr.Ni",
"inchikey": "VNNRSPGTAMTISX-UHFFFAOYSA-N"
},
"measurement": {
"type": "MeasuredValue",
"value": "18.58",
"unitCode": "P1"
}
},
{
"type": "Observation",
"date": "2021-10-02T12:30:00-01:00",
"property": {
"type": "ChemicalProperty",
"name": "Nickel",
"formula": "Ni",
"inchi": "InChI=1S/Ni/i1+6",
"inchikey": "PXHVJJICTQNCMI-LZFNBGRKSA-N"
},
"measurement": {
"type": "MeasuredValue",
"value": "8.94",
"unitCode": "P1"
}
},
{
"type": "Observation",
"date": "2021-10-02T12:30:00-01:00",
"property": {
"type": "ChemicalProperty",
"name": "Carbon",
"formula": "C"
},
"measurement": {
"type": "MeasuredValue",
"value": ".03",
"unitCode": "P1"
}
},
{
"type": "Observation",
"date": "2021-10-02T12:30:00-01:00",
"property": {
"type": "ChemicalProperty",
"name": "Manganese",
"formula": "Mn"
},
"measurement": {
"type": "MeasuredValue",
"value": ".11",
"unitCode": "P1"
}
},
{
"type": "Observation",
"date": "2021-10-02T12:30:00-01:00",
"property": {
"type": "MechanicalProperty",
"name": "Yield Strength"
},
"measurement": {
"type": "MeasuredValue",
"value": "467.5",
"unitCode": "MPA"
}
},
{
"type": "Observation",
"date": "2021-10-02T12:30:00-01:00",
"property": {
"type": "MechanicalProperty",
"name": "Tensile Strength"
},
"measurement": {
"type": "MeasuredValue",
"value": "712.3",
"unitCode": "MPA"
}
},
{
"type": "Observation",
"date": "2021-10-02T12:30:00-01:00",
"property": {
"type": "MechanicalProperty",
"name": "Elongation",
"description": "Elongation"
},
"measurement": {
"type": "MeasuredValue",
"value": "14",
"unitCode": "P1"
}
},
{
"type": "Observation",
"date": "2021-10-02T12:30:00-01:00",
"property": {
"type": "MechanicalProperty",
"name": "Gauge Length"
},
"measurement": {
"type": "MeasuredValue",
"value": "203",
"unitCode": "MMT"
}
},
{
"type": "Observation",
"date": "2021-10-02T12:30:00-01:00",
"property": {
"type": "MechanicalProperty",
"name": "Bend Test Diameter"
},
"measurement": {
"type": "MeasuredValue",
"value": "250.51",
"unitCode": "MMT"
}
}
]
}
},
"purchase": {
"type": "Purchase",
"customer": {
"type": "Person",
"email": "[email protected]",
"phoneNumber": "555-350-7955"
}
},
"shipment": {
"type": ["ParcelDelivery"],
"deliveryAddress": {
"type": ["PostalAddress"],
"organizationName": "Ultimate Steel",
"streetAddress": "52448 Steel Blvd",
"addressLocality": "Old Steeltown",
"addressRegion": "Texas",
"postalCode": "78121",
"addressCountry": "United States"
},
"originAddress": {
"type": ["PostalAddress"],
"organizationName": "Canadian Melters",
"streetAddress": "1029 Langford Rd",
"addressLocality": "Baysville",
"addressRegion": "ON",
"postalCode": "P0B 1A0",
"addressCountry": "Canada"
},
"deliveryMethod": "Rail freight transport",
"trackingNumber": "122119945475"
}
}
}
Loading

0 comments on commit 6e5f4e6

Please sign in to comment.