Skip to content
Merged
18 changes: 18 additions & 0 deletions credentials/fire-fighter-vc-v2/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import fs from 'node:fs';
import path from 'node:path';

const svgPath = path.join(import.meta.dirname, 'fire-fighter.svg');
const jsonPath = path.join(import.meta.dirname, 'credential.json');

const svgContent = fs.readFileSync(svgPath, 'utf8');
// put SVG on a single line and remove excess whitespace
const minifiedSvg = svgContent
.replace(/\r?\n|\r/g, ' ')
.replace(/\s{2,}/g, ' ')
.replace(/>\s+</g, '><')
.trim();

// add the SVG as the `template` value of the first `renderMethod` property
const json = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
json.renderMethod[0].template = minifiedSvg;
fs.writeFileSync(jsonPath, JSON.stringify(json, null, 2));
90 changes: 90 additions & 0 deletions credentials/fire-fighter-vc-v2/credential.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions credentials/fire-fighter-vc-v2/fire-fighter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added credentials/fire-fighter-vc-v2/photo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added credentials/fire-fighter-vc-v2/photo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions credentials/fire-fighter-vc-v2/queries.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"default": {
"type": "QueryByExample",
"credentialQuery": [{
"reason": "Please present your FirstResponderCredential Verifiable Credential(s) to complete the verification process.",
"example": {
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://w3id.org/first-responder/v1",
"https://w3id.org/vc/render-method/v2rc1",
"https://w3id.org/vc/render-method/v2rc2"
],
"type": ["FirstResponderCredential"]
},
"acceptedCryptosuites": [
"Ed25519Signature2020",
"eddsa-rdfc-2022",
"ecdsa-rdfc-2019",
"bbs-2023",
"ecdsa-sd-2023"
]
},
{
"reason": "Please present your FirstResponderCredential Verifiable Credential(s) to complete the verification process.",
"example": {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/ns/credentials/examples/v2",
"https://w3id.org/first-responder/v1",
"https://w3id.org/vc/render-method/v2rc1",
"https://w3id.org/vc/render-method/v2rc2"
],
"type": ["FirstResponderCredential"]
},
"acceptedCryptosuites": [
"Ed25519Signature2020",
"eddsa-rdfc-2022",
"ecdsa-rdfc-2019",
"bbs-2023",
"ecdsa-sd-2023"
]
}]
}
}
37 changes: 37 additions & 0 deletions credentials/fire-fighter-vc-v2/usft-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions credentials/fr-medical-technician/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import fs from 'node:fs';
import path from 'node:path';

const svgPath = path.join(import.meta.dirname, 'landscape.svg');
const jsonPath = path.join(import.meta.dirname, 'credential.json');

const svgContent = fs.readFileSync(svgPath, 'utf8');
// put SVG on a single line and remove excess whitespace
const minifiedSvg = svgContent
.replace(/\r?\n|\r/g, ' ')
.replace(/\s{2,}/g, ' ')
.replace(/>\s+</g, '><')
.trim();

// add the SVG as the `template` value of the first `renderMethod` property
const json = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
json.renderMethod[0].template = minifiedSvg;
fs.writeFileSync(jsonPath, JSON.stringify(json, null, 2));
39 changes: 31 additions & 8 deletions credentials/fr-medical-technician/credential.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions credentials/fr-medical-technician/queries.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"reason": "Please present your FirstResponderCredential Verifiable Credential(s) to complete the verification process.",
"example": {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://examples.vcplayground.org/contexts/first-responder/v1.json",
"https://examples.vcplayground.org/contexts/shim-render-method-term/v1.json",
"https://w3id.org/vc/render-method/v2rc1"
"https://www.w3.org/ns/credentials/v2",
"https://w3id.org/first-responder/v1",
"https://w3id.org/vc/render-method/v2rc1",
"https://w3id.org/vc/render-method/v2rc2"
],
"type": ["FirstResponderCredential"]
},
Expand All @@ -26,7 +26,9 @@
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/first-responder/v1",
"https://www.w3.org/ns/credentials/examples/v2"
"https://www.w3.org/ns/credentials/examples/v2",
"https://w3id.org/vc/render-method/v2rc1",
"https://w3id.org/vc/render-method/v2rc2"
],
"type": ["FirstResponderCredential"]
},
Expand Down