From b444167ef07289e0d4ec39bf214c31a64209caa2 Mon Sep 17 00:00:00 2001 From: Ankita Patidar Date: Mon, 9 Dec 2024 15:36:12 +0530 Subject: [PATCH] added purpose attribute for proofPresentation for biometric enabled VC sharing Signed-off-by: Ankita Patidar --- apps/agent-service/src/interface/agent-service.interface.ts | 1 + apps/api-gateway/src/verification/dto/request-proof.dto.ts | 4 ++++ apps/verification/src/interfaces/verification.interface.ts | 1 + apps/verification/src/verification.service.ts | 1 + 4 files changed, 7 insertions(+) diff --git a/apps/agent-service/src/interface/agent-service.interface.ts b/apps/agent-service/src/interface/agent-service.interface.ts index ef12eee2c..2b70cc900 100644 --- a/apps/agent-service/src/interface/agent-service.interface.ts +++ b/apps/agent-service/src/interface/agent-service.interface.ts @@ -361,6 +361,7 @@ export interface IInputDescriptors { export interface IProofRequestPresentationDefinition { id: string; name: string; + purpose: string; input_descriptors: IInputDescriptors[]; } diff --git a/apps/api-gateway/src/verification/dto/request-proof.dto.ts b/apps/api-gateway/src/verification/dto/request-proof.dto.ts index 789d70bcd..67d998512 100644 --- a/apps/api-gateway/src/verification/dto/request-proof.dto.ts +++ b/apps/api-gateway/src/verification/dto/request-proof.dto.ts @@ -138,6 +138,10 @@ export class ProofRequestPresentationDefinition { @IsOptional() name: string; + @IsString() + @IsOptional() + purpose: string; + @ApiProperty({type: () => [InputDescriptors]}) @IsNotEmpty({ message: 'inputDescriptors is required.' }) @IsArray({ message: 'inputDescriptors must be an array' }) diff --git a/apps/verification/src/interfaces/verification.interface.ts b/apps/verification/src/interfaces/verification.interface.ts index 1fd8e4e09..4fdf01190 100644 --- a/apps/verification/src/interfaces/verification.interface.ts +++ b/apps/verification/src/interfaces/verification.interface.ts @@ -121,6 +121,7 @@ export interface IInputDescriptors { export interface IProofRequestPresentationDefinition { id:string; name: string; + purpose: string; input_descriptors:IInputDescriptors[]; } diff --git a/apps/verification/src/verification.service.ts b/apps/verification/src/verification.service.ts index c56604bbb..867d681fc 100644 --- a/apps/verification/src/verification.service.ts +++ b/apps/verification/src/verification.service.ts @@ -443,6 +443,7 @@ export class VerificationService { presentationDefinition: { id: outOfBandRequestProof.presentationDefinition.id, name: outOfBandRequestProof.presentationDefinition.name, + purpose: outOfBandRequestProof.presentationDefinition.purpose, input_descriptors: [...outOfBandRequestProof.presentationDefinition.input_descriptors] } }