@@ -125,6 +125,7 @@ export class ReclaimProofRequest {
125125 private intervals : Map < string , NodeJS . Timer > = new Map ( ) ;
126126 private timeStamp : string ;
127127 private sdkVersion : string ;
128+ private jsonProofResponse : boolean = false ;
128129
129130 // Private constructor
130131 private constructor ( applicationId : string , providerId : string , options ?: ProofRequestOptions ) {
@@ -197,7 +198,8 @@ export class ReclaimProofRequest {
197198 timeStamp,
198199 appCallbackUrl,
199200 options,
200- sdkVersion
201+ sdkVersion,
202+ jsonProofResponse
201203 } : ProofPropertiesJSON = JSON . parse ( jsonString )
202204
203205 validateFunctionParams ( [
@@ -223,6 +225,12 @@ export class ReclaimProofRequest {
223225 validateContext ( context ) ;
224226 }
225227
228+ if ( jsonProofResponse !== undefined ) {
229+ validateFunctionParams ( [
230+ { input : jsonProofResponse , paramName : 'jsonProofResponse' }
231+ ] , 'fromJsonString' ) ;
232+ }
233+
226234 const proofRequestInstance = new ReclaimProofRequest ( applicationId , providerId , options ) ;
227235 proofRequestInstance . sessionId = sessionId ;
228236 proofRequestInstance . context = context ;
@@ -240,9 +248,10 @@ export class ReclaimProofRequest {
240248 }
241249
242250 // Setter methods
243- setAppCallbackUrl ( url : string ) : void {
251+ setAppCallbackUrl ( url : string , jsonProofResponse ?: boolean ) : void {
244252 validateURL ( url , 'setAppCallbackUrl' )
245253 this . appCallbackUrl = url
254+ this . jsonProofResponse = jsonProofResponse ?? false
246255 }
247256
248257 setRedirectUrl ( url : string ) : void {
@@ -395,7 +404,8 @@ export class ReclaimProofRequest {
395404 redirectUrl : this . redirectUrl ,
396405 timeStamp : this . timeStamp ,
397406 options : this . options ,
398- sdkVersion : this . sdkVersion
407+ sdkVersion : this . sdkVersion ,
408+ jsonProofResponse : this . jsonProofResponse
399409 } )
400410 }
401411
@@ -420,7 +430,8 @@ export class ReclaimProofRequest {
420430 parameters : getFilledParameters ( requestedProof ) ,
421431 redirectUrl : this . redirectUrl ?? '' ,
422432 acceptAiProviders : this . options ?. acceptAiProviders ?? false ,
423- sdkVersion : this . sdkVersion
433+ sdkVersion : this . sdkVersion ,
434+ jsonProofResponse : this . jsonProofResponse
424435 }
425436
426437 const link = await createLinkWithTemplateData ( templateData )
0 commit comments