Skip to content

Commit

Permalink
Merge pull request #23 from Bhutan-NDI/fix/add-purpose-to-w3c-present…
Browse files Browse the repository at this point in the history
…ation

fix: added purpose attribute for proofPresentation
  • Loading branch information
ankita-p17 authored Dec 9, 2024
2 parents 353b581 + 4bb4a3b commit 782b624
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ export interface IInputDescriptors {
export interface IProofRequestPresentationDefinition {
id: string;
name: string;
purpose: string;
input_descriptors: IInputDescriptors[];
}

Expand Down
4 changes: 4 additions & 0 deletions apps/api-gateway/src/verification/dto/request-proof.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' })
Expand Down
1 change: 1 addition & 0 deletions apps/verification/src/interfaces/verification.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export interface IInputDescriptors {
export interface IProofRequestPresentationDefinition {
id:string;
name: string;
purpose: string;
input_descriptors:IInputDescriptors[];
}

Expand Down
1 change: 1 addition & 0 deletions apps/verification/src/verification.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
}
Expand Down

0 comments on commit 782b624

Please sign in to comment.