File tree Expand file tree Collapse file tree 4 files changed +12
-2
lines changed
agent-service/src/interface
api-gateway/src/verification/dto Expand file tree Collapse file tree 4 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,7 @@ export interface IInputDescriptors {
361
361
export interface IProofRequestPresentationDefinition {
362
362
id : string ;
363
363
name : string ;
364
+ purpose ?: string ;
364
365
input_descriptors : IInputDescriptors [ ] ;
365
366
}
366
367
Original file line number Diff line number Diff line change @@ -112,8 +112,7 @@ export class InputDescriptors {
112
112
@IsOptional ( )
113
113
@IsNotEmpty ( { message : 'purpose is required' } )
114
114
purpose :string ;
115
-
116
-
115
+
117
116
@ApiProperty ( { type : ( ) => [ Schema ] } )
118
117
@IsNotEmpty ( { message : 'schema is required' } )
119
118
@ValidateNested ( )
@@ -132,6 +131,7 @@ export class InputDescriptors {
132
131
133
132
export class ProofRequestPresentationDefinition {
134
133
134
+ @ApiProperty ( )
135
135
@IsString ( )
136
136
@IsNotEmpty ( { message : 'id is required' } )
137
137
id : string ;
@@ -140,6 +140,11 @@ export class ProofRequestPresentationDefinition {
140
140
@IsOptional ( )
141
141
name : string ;
142
142
143
+ @ApiPropertyOptional ( )
144
+ @IsString ( )
145
+ @IsOptional ( )
146
+ purpose ?: string ;
147
+
143
148
@ApiProperty ( { type : ( ) => [ InputDescriptors ] } )
144
149
@IsArray ( { message : 'inputDescriptors must be an array' } )
145
150
@IsNotEmpty ( { message : 'inputDescriptors is required' } )
@@ -223,6 +228,7 @@ export class RequestProofDtoBase extends ProofPayload {
223
228
'example' :
224
229
{
225
230
id : '32f54163-7166-48f1-93d8-ff217bdb0653' ,
231
+ purpose : 'Used for KYC verification.' ,
226
232
// eslint-disable-next-line camelcase
227
233
input_descriptors : [
228
234
{
@@ -388,6 +394,7 @@ export class SendProofRequestPayload {
388
394
'example' :
389
395
{
390
396
id : '32f54163-7166-48f1-93d8-ff217bdb0653' ,
397
+ purpose : 'Used for KYC verification.' ,
391
398
inputDescriptors : [
392
399
{
393
400
'id' : 'banking_input_1' ,
Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ export interface IInputDescriptors {
122
122
export interface IProofRequestPresentationDefinition {
123
123
id :string ;
124
124
name : string ;
125
+ purpose ?: string ;
125
126
input_descriptors :IInputDescriptors [ ] ;
126
127
}
127
128
Original file line number Diff line number Diff line change @@ -491,6 +491,7 @@ export class VerificationService {
491
491
presentationDefinition : {
492
492
id : outOfBandRequestProof . presentationDefinition . id ,
493
493
name : outOfBandRequestProof . presentationDefinition . name ,
494
+ purpose : outOfBandRequestProof ?. presentationDefinition ?. purpose ,
494
495
input_descriptors : [ ...outOfBandRequestProof . presentationDefinition . input_descriptors ]
495
496
}
496
497
}
You can’t perform that action at this time.
0 commit comments