From 6082814ab2df853178204d992f767846db6032dd Mon Sep 17 00:00:00 2001 From: Mike Parkhill Date: Mon, 22 Jul 2024 15:33:14 -0400 Subject: [PATCH 1/2] switch to kvacs for quotient and forsur credentials --- _credentials/forsur.js | 30 ++++++++++++++---------------- _credentials/quotient.js | 2 +- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/_credentials/forsur.js b/_credentials/forsur.js index fa2f236..8717aad 100644 --- a/_credentials/forsur.js +++ b/_credentials/forsur.js @@ -1,5 +1,5 @@ -import { v4 as uuidv4 } from "uuid"; -import { dockUrl } from "utils/constants"; +import { v4 as uuidv4 } from 'uuid'; +import { dockUrl } from 'utils/constants'; import { validateEmail } from 'utils/validation'; export function createBiometricsCredential({ @@ -7,27 +7,26 @@ export function createBiometricsCredential({ recipientEmail } ) { - - console.log("Creating ForSur - Biometric Enrollment Credential for:", receiverDid); + console.log('Creating ForSur - Biometric Enrollment Credential for:', receiverDid); const credentialPayload = { url: `${dockUrl}/credentials`, body: { anchor: false, - algorithm: "dockbbs", + algorithm: 'bbdt16', distribute: true, credential: { id: `https://creds-testnet.dock.io/${uuidv4()}`, - name: "ForSur - Biometric", - description: "The \"ForSur - Biometric\" schema is specifically developed for the secure registration and storage of biometric data.", + name: 'ForSur - Biometric', + description: 'The "ForSur - Biometric" schema is specifically developed for the secure registration and storage of biometric data.', type: [ - "VerifiableCredential", - "ForSurBiometric" + 'VerifiableCredential', + 'ForSurBiometric' ], issuer: { - name: "Forsur", - description: "Forsur is the biometric provider.", - logo: "https://img.dock.io/80f154126a78bba321b413c3ffb8d4a7", + name: 'Forsur', + description: 'Forsur is the biometric provider.', + logo: 'https://img.dock.io/80f154126a78bba321b413c3ffb8d4a7', id: process.env.NEXT_PUBLIC_FORSUR_ISSUER_ID }, subject: { @@ -35,7 +34,7 @@ export function createBiometricsCredential({ biometric: { id: uuidv4(), created: new Date().toISOString(), - data: "some biometric data", + data: 'some biometric data', } } } @@ -43,9 +42,8 @@ export function createBiometricsCredential({ }; if (recipientEmail && recipientEmail.length > 2 && validateEmail(recipientEmail)) { - credentialPayload.recipientEmail = recipientEmail + credentialPayload.recipientEmail = recipientEmail; } - return credentialPayload - + return credentialPayload; } diff --git a/_credentials/quotient.js b/_credentials/quotient.js index 29f8f08..b5fd5e6 100644 --- a/_credentials/quotient.js +++ b/_credentials/quotient.js @@ -15,7 +15,7 @@ export function createBankIdCredential({ url: `${dockUrl}/credentials`, body: { anchor: false, - algorithm: 'dockbbs', + algorithm: 'bbdt16', distribute: true, credential: { id: `https://creds-testnet.dock.io/${uuidv4()}`, From b67f30289948d39ba67686ce79e3bf151ee83084 Mon Sep 17 00:00:00 2001 From: Mike Parkhill Date: Mon, 29 Jul 2024 13:01:30 -0400 Subject: [PATCH 2/2] added schema to issued KVAC credentials --- _credentials/forsur.js | 1 + _credentials/quotient.js | 1 + 2 files changed, 2 insertions(+) diff --git a/_credentials/forsur.js b/_credentials/forsur.js index 8717aad..3af2f4b 100644 --- a/_credentials/forsur.js +++ b/_credentials/forsur.js @@ -16,6 +16,7 @@ export function createBiometricsCredential({ algorithm: 'bbdt16', distribute: true, credential: { + schema: 'https://schema.dock.io/ForSurBiometricCheck-V4-1709846734949.json', id: `https://creds-testnet.dock.io/${uuidv4()}`, name: 'ForSur - Biometric', description: 'The "ForSur - Biometric" schema is specifically developed for the secure registration and storage of biometric data.', diff --git a/_credentials/quotient.js b/_credentials/quotient.js index b5fd5e6..02a95b2 100644 --- a/_credentials/quotient.js +++ b/_credentials/quotient.js @@ -19,6 +19,7 @@ export function createBankIdCredential({ distribute: true, credential: { id: `https://creds-testnet.dock.io/${uuidv4()}`, + schema: 'https://schema.dock.io/QuotientBankIdentity-V4-1708715398120.json', name: 'Quotient - Bank Identity', description: "The \"Quotient - Bank Identity\" schema provides a secure and standardized format for representing key aspects of an individual's bank identity.", type: [