diff --git a/_credentials/forsur.js b/_credentials/forsur.js index fa2f236..3af2f4b 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,27 @@ 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: { + 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.", + 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 +35,7 @@ export function createBiometricsCredential({ biometric: { id: uuidv4(), created: new Date().toISOString(), - data: "some biometric data", + data: 'some biometric data', } } } @@ -43,9 +43,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..02a95b2 100644 --- a/_credentials/quotient.js +++ b/_credentials/quotient.js @@ -15,10 +15,11 @@ export function createBankIdCredential({ url: `${dockUrl}/credentials`, body: { anchor: false, - algorithm: 'dockbbs', + algorithm: 'bbdt16', 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: [