@velocitycareerlabs/vcl-react-native 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/io/velocitycareerlabs/reactnative/VclReactNativeModule.kt +2 -18
  3. package/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt +52 -20
  4. package/ios/Utils/Converter.swift +49 -21
  5. package/ios/VclReactNative.mm +2 -10
  6. package/ios/VclReactNative.swift +8 -24
  7. package/lib/commonjs/api/VCLApi.js +12 -12
  8. package/lib/commonjs/api/VCLApi.js.map +1 -1
  9. package/lib/module/api/VCLApi.js +12 -12
  10. package/lib/module/api/VCLApi.js.map +1 -1
  11. package/lib/typescript/api/VCLApi.d.ts +6 -6
  12. package/lib/typescript/api/VCLApi.d.ts.map +1 -1
  13. package/lib/typescript/api/entities/VCLCredentialManifest.d.ts +4 -0
  14. package/lib/typescript/api/entities/VCLCredentialManifest.d.ts.map +1 -1
  15. package/lib/typescript/api/entities/VCLCredentialManifestDescriptor.d.ts +4 -0
  16. package/lib/typescript/api/entities/VCLCredentialManifestDescriptor.d.ts.map +1 -1
  17. package/lib/typescript/api/entities/VCLPresentationRequest.d.ts +4 -0
  18. package/lib/typescript/api/entities/VCLPresentationRequest.d.ts.map +1 -1
  19. package/lib/typescript/api/entities/VCLPresentationRequestDescriptor.d.ts +4 -0
  20. package/lib/typescript/api/entities/VCLPresentationRequestDescriptor.d.ts.map +1 -1
  21. package/package.json +1 -1
  22. package/src/api/VCLApi.ts +12 -32
  23. package/src/api/entities/VCLCredentialManifest.ts +4 -0
  24. package/src/api/entities/VCLCredentialManifestDescriptor.ts +4 -0
  25. package/src/api/entities/VCLPresentationRequest.ts +4 -0
  26. package/src/api/entities/VCLPresentationRequestDescriptor.ts +4 -0
  27. package/velocitycareerlabs-vcl-react-native.podspec +1 -1
@@ -100,7 +100,7 @@ dependencies {
100
100
 
101
101
  // VCL:
102
102
  implementation "com.nimbusds:nimbus-jose-jwt:9.37"
103
- implementation "io.velocitycareerlabs:vcl:2.0.0"
103
+ implementation "io.velocitycareerlabs:vcl:2.1.0"
104
104
  }
105
105
 
106
106
  if (isNewArchitectureEnabled()) {
@@ -123,13 +123,11 @@ class VclReactNativeModule(private val reactContext: ReactApplicationContext) :
123
123
  @ReactMethod
124
124
  fun getPresentationRequest(
125
125
  presentationRequestDescriptorMap: ReadableMap,
126
- remoteCryptoServicesTokenMap: ReadableMap? = null,
127
126
  promise: Promise
128
127
  ) {
129
128
  try {
130
129
  vcl.getPresentationRequest(
131
130
  presentationRequestDescriptor = mapTopPresentationRequestDescriptor(presentationRequestDescriptorMap),
132
- remoteCryptoServicesToken = mapToToken(remoteCryptoServicesTokenMap),
133
131
  successHandler = {
134
132
  promise.resolve(presentationRequestToMap(it))
135
133
  },
@@ -144,15 +142,11 @@ class VclReactNativeModule(private val reactContext: ReactApplicationContext) :
144
142
  @ReactMethod
145
143
  fun submitPresentation(
146
144
  presentationSubmissionMap: ReadableMap,
147
- didJwkMap: ReadableMap,
148
- remoteCryptoServicesTokenMap: ReadableMap? = null,
149
145
  promise: Promise
150
146
  ) {
151
147
  try {
152
148
  vcl.submitPresentation(
153
149
  presentationSubmission = mapToPresentationSubmission(presentationSubmissionMap),
154
- didJwk = mapToDidJwk(didJwkMap),
155
- remoteCryptoServicesToken = mapToToken(remoteCryptoServicesTokenMap),
156
150
  successHandler = {
157
151
  promise.resolve(presentationSubmissionResultToMap(it))
158
152
  },
@@ -204,7 +198,6 @@ class VclReactNativeModule(private val reactContext: ReactApplicationContext) :
204
198
  @ReactMethod
205
199
  fun getCredentialManifest(
206
200
  credentialManifestDescriptorMap: ReadableMap,
207
- remoteCryptoServicesTokenMap: ReadableMap? = null,
208
201
  promise: Promise
209
202
  ) {
210
203
  try {
@@ -216,7 +209,6 @@ class VclReactNativeModule(private val reactContext: ReactApplicationContext) :
216
209
  )
217
210
  vcl.getCredentialManifest(
218
211
  credentialManifestDescriptor,
219
- mapToToken(remoteCryptoServicesTokenMap),
220
212
  successHandler = {
221
213
  promise.resolve(credentialManifestToMap(it))
222
214
  },
@@ -234,15 +226,11 @@ class VclReactNativeModule(private val reactContext: ReactApplicationContext) :
234
226
  @ReactMethod
235
227
  fun generateOffers(
236
228
  generateOffersDescriptorMap: ReadableMap,
237
- didJwkMap: ReadableMap,
238
- remoteCryptoServicesTokenMap: ReadableMap? = null,
239
229
  promise: Promise
240
230
  ) {
241
231
  try {
242
232
  vcl.generateOffers(
243
233
  generateOffersDescriptor = mapToGenerateOffersDescriptor(generateOffersDescriptorMap),
244
- didJwk = mapToDidJwk(didJwkMap),
245
- remoteCryptoServicesToken = mapToToken(remoteCryptoServicesTokenMap),
246
234
  successHandler = {
247
235
  promise.resolve(offersToMap(it))
248
236
  },
@@ -278,17 +266,13 @@ class VclReactNativeModule(private val reactContext: ReactApplicationContext) :
278
266
  @ReactMethod
279
267
  fun finalizeOffers(
280
268
  finalizeOffersDescriptorMap: ReadableMap,
281
- didJwkMap: ReadableMap,
282
269
  sessionTokenMap: ReadableMap,
283
- remoteCryptoServicesTokenMap: ReadableMap? = null,
284
270
  promise: Promise
285
271
  ) {
286
272
  try {
287
273
  vcl.finalizeOffers(
288
274
  finalizeOffersDescriptor = mapToFinalizedOffersDescriptor(finalizeOffersDescriptorMap),
289
- didJwk = mapToDidJwk(didJwkMap),
290
275
  sessionToken = mapToToken(sessionTokenMap),
291
- remoteCryptoServicesToken = mapToToken(remoteCryptoServicesTokenMap),
292
276
  successHandler = {
293
277
  promise.resolve(jwtVerifiableCredentialsToMap(it))
294
278
  },
@@ -363,15 +347,15 @@ class VclReactNativeModule(private val reactContext: ReactApplicationContext) :
363
347
 
364
348
  @ReactMethod
365
349
  fun generateSignedJwt(
366
- didJwkMap: ReadableMap,
367
350
  jwtDescriptorMap: ReadableMap,
351
+ didJwkMap: ReadableMap,
368
352
  remoteCryptoServicesTokenMap: ReadableMap? = null,
369
353
  promise: Promise
370
354
  ) {
371
355
  try {
372
356
  vcl.generateSignedJwt(
373
- didJwk = mapToDidJwk(didJwkMap),
374
357
  jwtDescriptor = mapToJwtDescriptor(jwtDescriptorMap),
358
+ didJwk = mapToDidJwk(didJwkMap),
375
359
  remoteCryptoServicesToken = mapToToken(remoteCryptoServicesTokenMap),
376
360
  successHandler = {
377
361
  promise.resolve(Converter.jwtToMap(it))
@@ -166,7 +166,13 @@ object Converter {
166
166
  VCLPresentationRequestDescriptor(
167
167
  deepLink = mapToDeepLink(presentationRequestDescriptorLinkMap.getMapOpt("deepLink"))
168
168
  ?: VCLDeepLink(""),
169
- pushDelegate = mapToPushDelegate(presentationRequestDescriptorLinkMap.getMapOpt("pushDelegate"))
169
+ pushDelegate = mapToPushDelegate(
170
+ presentationRequestDescriptorLinkMap.getMapOpt("pushDelegate")
171
+ ),
172
+ didJwk = mapToDidJwk(presentationRequestDescriptorLinkMap.getMapOpt("didJwk")),
173
+ remoteCryptoServicesToken = mapToToken(
174
+ presentationRequestDescriptorLinkMap.getMapOpt("remoteCryptoServicesToken")
175
+ )
170
176
  )
171
177
 
172
178
  fun mapToDeepLink(deepLinkMap: ReadableMap?): VCLDeepLink? {
@@ -196,10 +202,10 @@ object Converter {
196
202
  fun mapToToken(tokenMap: ReadableMap?) =
197
203
  VCLToken(tokenMap?.getStringOpt("value") ?: "")
198
204
 
199
- fun tokenToMap(token: VCLToken): ReadableMap {
205
+ fun tokenToMap(token: VCLToken?): ReadableMap {
200
206
  val retVal = Arguments.createMap()
201
- retVal.putString("value", token.value)
202
- token.expiresIn?.toDouble()?.let {
207
+ retVal.putString("value", token?.value)
208
+ token?.expiresIn?.toDouble()?.let {
203
209
  retVal.putDouble("expiresIn", it)
204
210
  }
205
211
  return retVal
@@ -208,9 +214,12 @@ object Converter {
208
214
  fun mapToPresentationRequest(
209
215
  presentationRequestMap: ReadableMap?
210
216
  ) = VCLPresentationRequest(
211
- mapToJwt(presentationRequestMap?.getMapOpt("jwt")),
212
- mapToPublicJwk(presentationRequestMap?.getMapOpt("publicJwk")),
213
- mapToDeepLink(presentationRequestMap?.getMapOpt("deepLink")) ?: VCLDeepLink("")
217
+ jwt = mapToJwt(presentationRequestMap?.getMapOpt("jwt")),
218
+ publicJwk = mapToPublicJwk(presentationRequestMap?.getMapOpt("publicJwk")),
219
+ deepLink = mapToDeepLink(presentationRequestMap?.getMapOpt("deepLink")) ?: VCLDeepLink(""),
220
+ pushDelegate = mapToPushDelegate(presentationRequestMap?.getMapOpt("pushDelegate")),
221
+ didJwk = mapToDidJwk(presentationRequestMap?.getMapOpt("didJwk")),
222
+ remoteCryptoServicesToken = mapToToken(presentationRequestMap?.getMapOpt("remoteCryptoServicesToken"))
214
223
  )
215
224
 
216
225
  fun presentationRequestToMap(
@@ -230,6 +239,8 @@ object Converter {
230
239
  presentationRequest.presentationDefinitionId
231
240
  )
232
241
  presentationRequestMap.putMap("deepLink", deepLinkToMap(presentationRequest.deepLink))
242
+ presentationRequestMap.putMap("didJwk", didJwkToMap(presentationRequest.didJwk))
243
+ presentationRequestMap.putMap("remoteCryptoServicesToken", tokenToMap(presentationRequest.remoteCryptoServicesToken))
233
244
  return presentationRequestMap
234
245
  }
235
246
 
@@ -427,18 +438,22 @@ object Converter {
427
438
  credentialManifestDescriptorByDeepLinkMap: ReadableMap
428
439
  ): VCLCredentialManifestDescriptorByDeepLink {
429
440
  return VCLCredentialManifestDescriptorByDeepLink(
430
- mapToDeepLink(credentialManifestDescriptorByDeepLinkMap.getMapOpt("deepLink"))
441
+ deepLink = mapToDeepLink(credentialManifestDescriptorByDeepLinkMap.getMapOpt("deepLink"))
431
442
  ?: VCLDeepLink(""),
432
- mapToIssuingType(credentialManifestDescriptorByDeepLinkMap, VCLIssuingType.Career),
433
- mapToPushDelegate(credentialManifestDescriptorByDeepLinkMap.getMapOpt("pushDelegate"))
443
+ issuingType = mapToIssuingType(credentialManifestDescriptorByDeepLinkMap, VCLIssuingType.Career),
444
+ pushDelegate = mapToPushDelegate(
445
+ credentialManifestDescriptorByDeepLinkMap.getMapOpt("pushDelegate")
446
+ ),
447
+ didJwk = mapToDidJwk(credentialManifestDescriptorByDeepLinkMap.getMapOpt("didJwk")),
448
+ remoteCryptoServicesToken = mapToToken(
449
+ credentialManifestDescriptorByDeepLinkMap.getMapOpt("remoteCryptoServicesToken")
450
+ )
434
451
  )
435
452
  }
436
453
 
437
454
  fun mapToCredentialManifestDescriptorByService(
438
455
  credentialManifestDescriptorByServiceMap: ReadableMap
439
456
  ): VCLCredentialManifestDescriptorByService {
440
- val pushDelegate =
441
- mapToPushDelegate(credentialManifestDescriptorByServiceMap.getMapOpt("pushDelegate"))
442
457
  return VCLCredentialManifestDescriptorByService(
443
458
  service = mapToServiceCredentialAgentIssuer(
444
459
  credentialManifestDescriptorByServiceMap.getMapOpt("service")
@@ -450,7 +465,13 @@ object Converter {
450
465
  credentialTypes =
451
466
  (credentialManifestDescriptorByServiceMap.getArrayOpt("credentialTypes")?.toArrayList()
452
467
  ?.toList() as? List<String>),
453
- pushDelegate = pushDelegate
468
+ pushDelegate = mapToPushDelegate(
469
+ credentialManifestDescriptorByServiceMap.getMapOpt("pushDelegate")
470
+ ),
471
+ didJwk = mapToDidJwk(credentialManifestDescriptorByServiceMap.getMapOpt("didJwk")),
472
+ remoteCryptoServicesToken = mapToToken(
473
+ credentialManifestDescriptorByServiceMap.getMapOpt("remoteCryptoServicesToken")
474
+ )
454
475
  )
455
476
  }
456
477
 
@@ -462,7 +483,11 @@ object Converter {
462
483
  credentialManifestDescriptorRefreshMap.getMapOpt("service")
463
484
  ),
464
485
  credentialIds = credentialManifestDescriptorRefreshMap.getArrayOpt("credentialIds")
465
- ?.toArrayList()?.toList() as? List<String> ?: listOf()
486
+ ?.toArrayList()?.toList() as? List<String> ?: listOf(),
487
+ didJwk = mapToDidJwk(credentialManifestDescriptorRefreshMap.getMapOpt("didJwk")),
488
+ remoteCryptoServicesToken = mapToToken(
489
+ credentialManifestDescriptorRefreshMap.getMapOpt("remoteCryptoServicesToken")
490
+ )
466
491
  )
467
492
  }
468
493
 
@@ -489,6 +514,8 @@ object Converter {
489
514
  credentialManifest.verifiedProfile.payload.toReadableMap()
490
515
  )
491
516
  credentialManifestMap.putMap("deepLink", deepLinkToMap(credentialManifest.deepLink))
517
+ credentialManifestMap.putMap("didJwk", didJwkToMap(credentialManifest.didJwk))
518
+ credentialManifestMap.putMap("remoteCryptoServicesToken", tokenToMap(credentialManifest.remoteCryptoServicesToken))
492
519
  return credentialManifestMap
493
520
  }
494
521
 
@@ -500,13 +527,18 @@ object Converter {
500
527
  val vendorOriginContext: String? = credentialManifestMap?.getStringOpt("vendorOriginContext")
501
528
  val verifiedProfileMap: ReadableMap? = credentialManifestMap?.getMapOpt("verifiedProfile")
502
529
  val deepLinkMap: ReadableMap? = credentialManifestMap?.getMapOpt("deepLink")
530
+ val didJwkMap: ReadableMap? = credentialManifestMap?.getMapOpt("didJwk")
531
+ val remoteCryptoServicesTokenMap = credentialManifestMap?.getMapOpt("remoteCryptoServicesToken")
532
+
503
533
  return VCLCredentialManifest(
504
534
  jwt = jwt,
505
535
  vendorOriginContext = vendorOriginContext,
506
536
  verifiedProfile = VCLVerifiedProfile(
507
537
  payload = verifiedProfileMap?.toJsonObject() ?: JSONObject()
508
538
  ),
509
- deepLink = mapToDeepLink(deepLinkMap)
539
+ deepLink = mapToDeepLink(deepLinkMap),
540
+ didJwk = mapToDidJwk(didJwkMap),
541
+ remoteCryptoServicesToken = mapToToken(remoteCryptoServicesTokenMap)
510
542
  )
511
543
  }
512
544
 
@@ -677,12 +709,12 @@ object Converter {
677
709
  return didJwkMap
678
710
  }
679
711
 
680
- fun mapToDidJwk(didJwkMap: ReadableMap): VCLDidJwk {
712
+ fun mapToDidJwk(didJwkMap: ReadableMap?): VCLDidJwk {
681
713
  return VCLDidJwk(
682
- did = didJwkMap.getStringOpt("did") ?: "",
683
- publicJwk = mapToPublicJwk(didJwkMap.getMap("publicJwk")),
684
- kid = didJwkMap.getStringOpt("kid") ?: "",
685
- keyId = didJwkMap.getStringOpt("keyId") ?: ""
714
+ did = didJwkMap?.getStringOpt("did") ?: "",
715
+ publicJwk = mapToPublicJwk(didJwkMap?.getMap("publicJwk")),
716
+ kid = didJwkMap?.getStringOpt("kid") ?: "",
717
+ keyId = didJwkMap?.getStringOpt("keyId") ?: ""
686
718
  )
687
719
  }
688
720
  }
@@ -165,7 +165,11 @@ func dictionaryTopPresentationRequestDescriptor(
165
165
  ) -> VCLPresentationRequestDescriptor {
166
166
  return VCLPresentationRequestDescriptor(
167
167
  deepLink: dictionaryToDeepLink(presentationRequestDescriptorLinkDictionary["deepLink"] as? [String: Any]) ?? VCLDeepLink(value: ""),
168
- pushDelegate: dictionaryToPushDelegate(presentationRequestDescriptorLinkDictionary["pushDelegate"] as? [String: Any])
168
+ pushDelegate: dictionaryToPushDelegate(presentationRequestDescriptorLinkDictionary["pushDelegate"] as? [String: Any]),
169
+ didJwk: dictionaryToDidJwk(presentationRequestDescriptorLinkDictionary["didJwk"] as? [String: Any]),
170
+ remoteCryptoServicesToken: dictionaryToToken(
171
+ presentationRequestDescriptorLinkDictionary["remoteCryptoServicesToken"] as? [String: Any]
172
+ )
169
173
  )
170
174
  }
171
175
 
@@ -187,10 +191,10 @@ func dictionaryToToken(_ tokenDictionary: [String: Any]?) -> VCLToken {
187
191
  return VCLToken(value: tokenDictionary?["value"] as? String ?? "")
188
192
  }
189
193
 
190
- func tokenToDictionary(_ token: VCLToken) -> [String: Any] {
194
+ func tokenToDictionary(_ token: VCLToken?) -> [String: Any] {
191
195
  var retVal = [String: Any]()
192
- retVal["value"] = token.value
193
- if let expiresIn = token.expiresIn {
196
+ retVal["value"] = token?.value
197
+ if let expiresIn = token?.expiresIn {
194
198
  retVal["expiresIn"] = expiresIn
195
199
  }
196
200
  return retVal
@@ -212,7 +216,10 @@ func dictionaryToPresentationRequest(
212
216
  return VCLPresentationRequest(
213
217
  jwt: dictionaryToJwt(presentationRequestDictionary?["jwt"] as? [String : Any]),
214
218
  publicJwk: dictionaryToPublicJwk(presentationRequestDictionary?["publicJwk"] as? [String: Any]),
215
- deepLink: dictionaryToDeepLink(presentationRequestDictionary?["deepLink"] as? [String : Any]) ?? VCLDeepLink(value: "")
219
+ deepLink: dictionaryToDeepLink(presentationRequestDictionary?["deepLink"] as? [String : Any]) ?? VCLDeepLink(value: ""),
220
+ pushDelegate: dictionaryToPushDelegate(presentationRequestDictionary?["pushDelegate"] as? [String : Any]),
221
+ didJwk: dictionaryToDidJwk(presentationRequestDictionary?["didJwk"] as? [String : Any]),
222
+ remoteCryptoServicesToken: dictionaryToToken(presentationRequestDictionary?["remoteCryptoServicesToken"] as? [String : Any])
216
223
  )
217
224
  }
218
225
 
@@ -228,6 +235,8 @@ func presentationRequestToDictionary(
228
235
  presentationRequestDictionary["exchangeId"] = presentationRequest.exchangeId
229
236
  presentationRequestDictionary["presentationDefinitionId"] = presentationRequest.presentationDefinitionId
230
237
  presentationRequestDictionary["deepLink"] = deepLinkToDictionary(presentationRequest.deepLink)
238
+ presentationRequestDictionary["didJwk"] = didJwkToDictionary(presentationRequest.didJwk)
239
+ presentationRequestDictionary["remoteCryptoServicesToken"] = tokenToDictionary(presentationRequest.remoteCryptoServicesToken)
231
240
  return presentationRequestDictionary
232
241
  }
233
242
 
@@ -408,15 +417,17 @@ func dictionaryToCredentialManifestDescriptorByDeepLink(
408
417
  issuingTypeDictionary: credentialManifestDescriptorByDeepLinkDictionary,
409
418
  defaultIssuingType: VCLIssuingType.Career
410
419
  ),
411
- pushDelegate: dictionaryToPushDelegate(credentialManifestDescriptorByDeepLinkDictionary["pushDelegate"] as? [String: Any])
420
+ pushDelegate: dictionaryToPushDelegate(credentialManifestDescriptorByDeepLinkDictionary["pushDelegate"] as? [String: Any]),
421
+ didJwk: dictionaryToDidJwk(credentialManifestDescriptorByDeepLinkDictionary["didJwk"] as? [String: Any]),
422
+ remoteCryptoServicesToken: dictionaryToToken(
423
+ credentialManifestDescriptorByDeepLinkDictionary["remoteCryptoServicesToken"] as? [String: Any]
424
+ )
412
425
  )
413
426
  }
414
427
 
415
428
  func dictionaryToCredentialManifestDescriptorByService(
416
429
  _ credentialManifestDescriptorByServiceDictionary: [String: Any]
417
430
  ) -> VCLCredentialManifestDescriptorByService {
418
- let pushDelegateDictionary = credentialManifestDescriptorByServiceDictionary["pushDelegate"] as? [String: Any]
419
- let pushDelegate = dictionaryToPushDelegate(pushDelegateDictionary)
420
431
  return VCLCredentialManifestDescriptorByService(
421
432
  service: dictionaryToServiceCredentialAgentIssuer(
422
433
  credentialManifestDescriptorByServiceDictionary["service"] as? [String : Any]
@@ -426,7 +437,13 @@ func dictionaryToCredentialManifestDescriptorByService(
426
437
  defaultIssuingType: VCLIssuingType.Career
427
438
  ),
428
439
  credentialTypes: credentialManifestDescriptorByServiceDictionary["credentialTypes"] as? [String],
429
- pushDelegate: pushDelegate
440
+ pushDelegate: dictionaryToPushDelegate(
441
+ credentialManifestDescriptorByServiceDictionary["pushDelegate"] as? [String: Any]
442
+ ),
443
+ didJwk: dictionaryToDidJwk(credentialManifestDescriptorByServiceDictionary["didJwk"] as? [String: Any]),
444
+ remoteCryptoServicesToken: dictionaryToToken(
445
+ credentialManifestDescriptorByServiceDictionary["remoteCryptoServicesToken"] as? [String: Any]
446
+ )
430
447
  )
431
448
  }
432
449
 
@@ -437,14 +454,18 @@ func dictionaryToCredentialManifestDescriptorRefresh(
437
454
  service: dictionaryToServiceCredentialAgentIssuer(
438
455
  credentialManifestDescriptorRefreshDictionary["service"] as? [String : Any]
439
456
  ),
440
- credentialIds: credentialManifestDescriptorRefreshDictionary["credentialIds"] as? [String] ?? [String]()
457
+ credentialIds: credentialManifestDescriptorRefreshDictionary["credentialIds"] as? [String] ?? [],
458
+ didJwk: dictionaryToDidJwk(credentialManifestDescriptorRefreshDictionary["didJwk"] as? [String: Any]),
459
+ remoteCryptoServicesToken: dictionaryToToken(
460
+ credentialManifestDescriptorRefreshDictionary["remoteCryptoServicesToken"] as? [String: Any]
461
+ )
441
462
  )
442
463
  }
443
464
 
444
465
  func dictionaryToServiceCredentialAgentIssuer(
445
466
  _ serviceDictionary: [String: Any]?
446
467
  ) -> VCLServiceCredentialAgentIssuer {
447
- return VCLServiceCredentialAgentIssuer(payload: serviceDictionary?["payload"] as? [String : Any] ?? [String: Any]())
468
+ return VCLServiceCredentialAgentIssuer(payload: serviceDictionary?["payload"] as? [String : Any] ?? [:])
448
469
  }
449
470
 
450
471
  func credentialManifestToDictionary(
@@ -458,21 +479,28 @@ func credentialManifestToDictionary(
458
479
  credentialManifestDictinary["vendorOriginContext"] = credentialManifest.vendorOriginContext
459
480
  credentialManifestDictinary["verifiedProfile"] = credentialManifest.verifiedProfile.payload
460
481
  credentialManifestDictinary["deepLink"] = deepLinkToDictionary(credentialManifest.deepLink)
482
+ credentialManifestDictinary["didJwk"] = didJwkToDictionary(credentialManifest.didJwk)
483
+ credentialManifestDictinary["remoteCryptoServicesToken"] = tokenToDictionary(credentialManifest.remoteCryptoServicesToken)
461
484
  return credentialManifestDictinary
462
485
  }
463
486
 
464
487
  func dictionaryToCredentialManifest(
465
488
  _ credentialManifestDictionary: [String: Any]?
466
489
  ) -> VCLCredentialManifest {
467
- let jwt: VCLJwt = VCLJwt(encodedJwt: (credentialManifestDictionary?["jwt"] as? [String: Any])?["encodedJwt"] as? String ?? "")
468
- let vendorOriginContext: String? = credentialManifestDictionary?["vendorOriginContext"] as? String
469
- let verifiedProfileDictionary: [String: Any]? = credentialManifestDictionary?["verifiedProfile"] as? [String: Any]
470
- let deepLink: VCLDeepLink? = dictionaryToDeepLink(credentialManifestDictionary?["deepLink"] as? [String: Any])
490
+ let jwt = VCLJwt(encodedJwt: (credentialManifestDictionary?["jwt"] as? [String: Any])?["encodedJwt"] as? String ?? "")
491
+ let vendorOriginContext = credentialManifestDictionary?["vendorOriginContext"] as? String
492
+ let verifiedProfileDictionary = credentialManifestDictionary?["verifiedProfile"] as? [String: Any]
493
+ let deepLink = dictionaryToDeepLink(credentialManifestDictionary?["deepLink"] as? [String: Any])
494
+ let didJwk = dictionaryToDidJwk(credentialManifestDictionary?["didJwk"] as? [String: Any])
495
+ let remoteCryptoServicesToken = dictionaryToToken(credentialManifestDictionary?["remoteCryptoServicesToken"] as? [String: Any])
496
+
471
497
  return VCLCredentialManifest(
472
498
  jwt: jwt,
473
499
  vendorOriginContext: vendorOriginContext,
474
500
  verifiedProfile: VCLVerifiedProfile(payload: verifiedProfileDictionary ?? [:]),
475
- deepLink: deepLink
501
+ deepLink: deepLink,
502
+ didJwk: didJwk,
503
+ remoteCryptoServicesToken: remoteCryptoServicesToken
476
504
  )
477
505
  }
478
506
 
@@ -636,11 +664,11 @@ func didJwkToDictionary(_ didJwk: VCLDidJwk) -> [String: Any] {
636
664
  ]
637
665
  }
638
666
 
639
- func dictionaryToJwk(_ didJwkDictionary: [String: Any]) -> VCLDidJwk {
667
+ func dictionaryToDidJwk(_ didJwkDictionary: [String: Any]?) -> VCLDidJwk {
640
668
  return VCLDidJwk(
641
- did: didJwkDictionary["did"] as? String ?? "",
642
- publicJwk: dictionaryToPublicJwk(didJwkDictionary["publicJwk"] as? [String : Any]),
643
- kid: didJwkDictionary["kid"] as? String ?? "",
644
- keyId: didJwkDictionary["keyId"] as? String ?? ""
669
+ did: didJwkDictionary?["did"] as? String ?? "",
670
+ publicJwk: dictionaryToPublicJwk(didJwkDictionary?["publicJwk"] as? [String : Any]),
671
+ kid: didJwkDictionary?["kid"] as? String ?? "",
672
+ keyId: didJwkDictionary?["keyId"] as? String ?? ""
645
673
  )
646
674
  }
@@ -22,13 +22,10 @@ RCT_EXTERN_METHOD(getCredentialTypes:(RCTPromiseResolveBlock)resolve
22
22
  withRejecter:(RCTPromiseRejectBlock)reject)
23
23
 
24
24
  RCT_EXTERN_METHOD(getPresentationRequest:(NSDictionary*)presentationRequestDescriptorDictionary
25
- withRemoteCryptoServicesTokenDictionary:(NSDictionary*)remoteCryptoServicesTokenDictionary
26
25
  withResolver:(RCTPromiseResolveBlock)resolve
27
26
  withRejecter:(RCTPromiseRejectBlock)reject)
28
27
 
29
28
  RCT_EXTERN_METHOD(submitPresentation:(NSDictionary*)presentationSubmissionDictionary
30
- withDidJwkDictionary:(NSDictionary*)didJwkDictionary
31
- withRemoteCryptoServicesTokenDictionary:(NSDictionary*)remoteCryptoServicesTokenDictionary
32
29
  withResolver:(RCTPromiseResolveBlock)resolve
33
30
  withRejecter:(RCTPromiseRejectBlock)reject)
34
31
 
@@ -41,13 +38,10 @@ RCT_EXTERN_METHOD(searchForOrganizations:(NSDictionary*)organizationsSearchDescr
41
38
  withRejecter:(RCTPromiseRejectBlock)reject)
42
39
 
43
40
  RCT_EXTERN_METHOD(getCredentialManifest:(NSDictionary*)credentialManifestDescriptorDictionary
44
- withRemoteCryptoServicesTokenDictionary:(NSDictionary*)remoteCryptoServicesTokenDictionary
45
41
  withResolver:(RCTPromiseResolveBlock)resolve
46
42
  withRejecter:(RCTPromiseRejectBlock)reject)
47
43
 
48
44
  RCT_EXTERN_METHOD(generateOffers:(NSDictionary*)generateOffersDescriptorDictionary
49
- withDidJwkDictionary:(NSDictionary*)didJwkDictionary
50
- withRemoteCryptoServicesTokenDictionary:(NSDictionary*)remoteCryptoServicesTokenDictionary
51
45
  withResolver:(RCTPromiseResolveBlock)resolve
52
46
  withRejecter:(RCTPromiseRejectBlock)reject)
53
47
 
@@ -57,9 +51,7 @@ RCT_EXTERN_METHOD(checkForOffers:(NSDictionary*)generateOffersDescriptorDictiona
57
51
  withRejecter:(RCTPromiseRejectBlock)reject)
58
52
 
59
53
  RCT_EXTERN_METHOD(finalizeOffers:(NSDictionary*)finalizeOffersDescriptorDictionary
60
- withDidJwkDictionary:(NSDictionary*)didJwkDictionary
61
54
  withSessionTokenDictionary:(NSDictionary*)sessionTokenDictionary
62
- withRemoteCryptoServicesTokenDictionary:(NSDictionary*)remoteCryptoServicesTokenDictionary
63
55
  withResolver:(RCTPromiseResolveBlock)resolve
64
56
  withRejecter:(RCTPromiseRejectBlock)reject)
65
57
 
@@ -77,8 +69,8 @@ RCT_EXTERN_METHOD(verifyJwt:(NSDictionary*)jwtDictionary
77
69
  withResolver:(RCTPromiseResolveBlock)resolve
78
70
  withRejecter:(RCTPromiseRejectBlock)reject)
79
71
 
80
- RCT_EXTERN_METHOD(generateSignedJwt:(NSDictionary*)didJwkDictionary
81
- withJwtDescriptorDictionary:(NSDictionary*)jwtDescriptorDictionary
72
+ RCT_EXTERN_METHOD(generateSignedJwt:(NSDictionary*)jwtDescriptorDictionary
73
+ withDidJwkDictionary:(NSDictionary*)didJwkDictionary
82
74
  withRemoteCryptoServicesTokenDictionary:(NSDictionary*)remoteCryptoServicesTokenDictionary
83
75
  withResolver:(RCTPromiseResolveBlock)resolve
84
76
  withRejecter:(RCTPromiseRejectBlock)reject)
@@ -71,15 +71,13 @@ class VclReactNative: NSObject {
71
71
  }
72
72
  }
73
73
 
74
- @objc(getPresentationRequest:withRemoteCryptoServicesTokenDictionary:withResolver:withRejecter:)
74
+ @objc(getPresentationRequest:withResolver:withRejecter:)
75
75
  func getPresentationRequest(
76
76
  presentationRequestDescriptorDictionary: [String: Any],
77
- remoteCryptoServicesTokenDictionary: [String: Any]? = nil,
78
77
  resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock
79
78
  ) {
80
79
  vcl.getPresentationRequest(
81
80
  presentationRequestDescriptor: dictionaryTopPresentationRequestDescriptor(presentationRequestDescriptorDictionary),
82
- remoteCryptoServicesToken: dictionaryToToken(remoteCryptoServicesTokenDictionary),
83
81
  successHandler: {
84
82
  resolve(presentationRequestToDictionary($0))
85
83
  },
@@ -89,19 +87,15 @@ class VclReactNative: NSObject {
89
87
  )
90
88
  }
91
89
 
92
- @objc(submitPresentation:withDidJwkDictionary:withRemoteCryptoServicesTokenDictionary:withResolver:withRejecter:)
90
+ @objc(submitPresentation:withResolver:withRejecter:)
93
91
  func submitPresentation(
94
92
  presentationSubmissionDictionary: [String: Any],
95
- didJwkDictionary: [String: Any],
96
- remoteCryptoServicesTokenDictionary: [String: Any]? = nil,
97
93
  resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock
98
94
  ) {
99
95
  vcl.submitPresentation(
100
96
  presentationSubmission: dictionaryToPresentationSubmission(
101
97
  presentationSubmissionDictionary
102
98
  ),
103
- didJwk: dictionaryToJwk(didJwkDictionary),
104
- remoteCryptoServicesToken: dictionaryToToken(remoteCryptoServicesTokenDictionary),
105
99
  successHandler: {
106
100
  resolve(presentationSubmissionResultToDictionary($0))
107
101
  },
@@ -140,10 +134,9 @@ class VclReactNative: NSObject {
140
134
  })
141
135
  }
142
136
 
143
- @objc(getCredentialManifest:withRemoteCryptoServicesTokenDictionary:withResolver:withRejecter:)
137
+ @objc(getCredentialManifest:withResolver:withRejecter:)
144
138
  func getCredentialManifest(
145
139
  credentialManifestDescriptorDictionary: [String: Any],
146
- remoteCryptoServicesTokenDictionary: [String: Any],
147
140
  resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock
148
141
  ) {
149
142
  VCLLog.d("credentialManifestDescriptorDictionary dictionary: \(credentialManifestDescriptorDictionary)")
@@ -151,7 +144,6 @@ class VclReactNative: NSObject {
151
144
  VCLLog.d("credentialManifestDescriptor VCL entity: \(credentialManifestDescriptor.toPropsString())")
152
145
  vcl.getCredentialManifest(
153
146
  credentialManifestDescriptor: credentialManifestDescriptor,
154
- remoteCryptoServicesToken: dictionaryToToken(remoteCryptoServicesTokenDictionary),
155
147
  successHandler: {
156
148
  resolve(credentialManifestToDictionary($0))
157
149
  },
@@ -163,17 +155,13 @@ class VclReactNative: NSObject {
163
155
  }
164
156
  }
165
157
 
166
- @objc(generateOffers:withDidJwkDictionary:withRemoteCryptoServicesTokenDictionary:withResolver:withRejecter:)
158
+ @objc(generateOffers:withResolver:withRejecter:)
167
159
  func generateOffers(
168
160
  generateOffersDescriptorDictionary: [String: Any],
169
- didJwkDictionary: [String: Any],
170
- remoteCryptoServicesTokenDictionary: [String: Any]? = nil,
171
161
  resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock
172
162
  ) {
173
163
  vcl.generateOffers(
174
164
  generateOffersDescriptor: dictionaryToGenerateOffersDescriptor(generateOffersDescriptorDictionary),
175
- didJwk: dictionaryToJwk(didJwkDictionary),
176
- remoteCryptoServicesToken: dictionaryToToken(remoteCryptoServicesTokenDictionary),
177
165
  successHandler: {
178
166
  resolve(offersToDictionary($0))
179
167
  },
@@ -199,19 +187,15 @@ class VclReactNative: NSObject {
199
187
  })
200
188
  }
201
189
 
202
- @objc(finalizeOffers:withDidJwkDictionary:withSessionTokenDictionary:withRemoteCryptoServicesTokenDictionary:withResolver:withRejecter:)
190
+ @objc(finalizeOffers:withSessionTokenDictionary:withResolver:withRejecter:)
203
191
  func finalizeOffers(
204
192
  finalizeOffersDescriptorDictionary: [String: Any],
205
- didJwkDictionary: [String: Any],
206
193
  sessionTokenDictionary: [String: Any],
207
- remoteCryptoServicesTokenDictionary: [String: Any]? = nil,
208
194
  resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock
209
195
  ) {
210
196
  vcl.finalizeOffers(
211
197
  finalizeOffersDescriptor: dictionaryToFinalizedOffersDescriptor(finalizeOffersDescriptorDictionary),
212
- didJwk: dictionaryToJwk(didJwkDictionary),
213
198
  sessionToken: dictionaryToToken(sessionTokenDictionary),
214
- remoteCryptoServicesToken: dictionaryToToken(remoteCryptoServicesTokenDictionary),
215
199
  successHandler: {
216
200
  resolve(jwtVerifiableCredentialsToDictionary($0))
217
201
  },
@@ -270,16 +254,16 @@ class VclReactNative: NSObject {
270
254
  })
271
255
  }
272
256
 
273
- @objc(generateSignedJwt:withJwtDescriptorDictionary:withRemoteCryptoServicesTokenDictionary:withResolver:withRejecter:)
257
+ @objc(generateSignedJwt:withDidJwkDictionary:withRemoteCryptoServicesTokenDictionary:withResolver:withRejecter:)
274
258
  func generateSignedJwt(
275
- didJwkDictionary: [String: Any],
276
259
  jwtDescriptorDictionary: [String: Any],
260
+ didJwkDictionary: [String: Any],
277
261
  remoteCryptoServicesTokenDictionary: [String: Any]? = nil,
278
262
  resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock
279
263
  ) {
280
264
  vcl.generateSignedJwt(
281
- didJwk: dictionaryToJwk(didJwkDictionary),
282
265
  jwtDescriptor: dictionaryToJwtDescriptor(jwtDescriptorDictionary),
266
+ didJwk: dictionaryToDidJwk(didJwkDictionary),
283
267
  remoteCryptoServicesToken: dictionaryToToken(remoteCryptoServicesTokenDictionary),
284
268
  successHandler: {
285
269
  resolve(jwtToReadableMap($0))
@@ -45,16 +45,16 @@ const VclApi = exports.VclApi = {
45
45
  throw new _VCLError.VCLError(e);
46
46
  }
47
47
  },
48
- getPresentationRequest: async (presentationRequestDescriptor, remoteCryptoServicesToken) => {
48
+ getPresentationRequest: async presentationRequestDescriptor => {
49
49
  try {
50
- return await VclReactNative.getPresentationRequest(presentationRequestDescriptor, remoteCryptoServicesToken);
50
+ return await VclReactNative.getPresentationRequest(presentationRequestDescriptor);
51
51
  } catch (e) {
52
52
  throw new _VCLError.VCLError(e);
53
53
  }
54
54
  },
55
- submitPresentation: async (presentationSubmission, didJwk, remoteCryptoServicesToken) => {
55
+ submitPresentation: async presentationSubmission => {
56
56
  try {
57
- return await VclReactNative.submitPresentation(presentationSubmission, didJwk, remoteCryptoServicesToken);
57
+ return await VclReactNative.submitPresentation(presentationSubmission);
58
58
  } catch (e) {
59
59
  throw new _VCLError.VCLError(e);
60
60
  }
@@ -73,16 +73,16 @@ const VclApi = exports.VclApi = {
73
73
  throw new _VCLError.VCLError(e);
74
74
  }
75
75
  },
76
- getCredentialManifest: async (credentialManifestDescriptor, remoteCryptoServicesToken) => {
76
+ getCredentialManifest: async credentialManifestDescriptor => {
77
77
  try {
78
- return await VclReactNative.getCredentialManifest(credentialManifestDescriptor, remoteCryptoServicesToken);
78
+ return await VclReactNative.getCredentialManifest(credentialManifestDescriptor);
79
79
  } catch (e) {
80
80
  throw new _VCLError.VCLError(e);
81
81
  }
82
82
  },
83
- generateOffers: async (generateOffersDescriptor, didJwk, remoteCryptoServicesToken) => {
83
+ generateOffers: async generateOffersDescriptor => {
84
84
  try {
85
- return await VclReactNative.generateOffers(generateOffersDescriptor, didJwk, remoteCryptoServicesToken);
85
+ return await VclReactNative.generateOffers(generateOffersDescriptor);
86
86
  } catch (e) {
87
87
  throw new _VCLError.VCLError(e);
88
88
  }
@@ -94,9 +94,9 @@ const VclApi = exports.VclApi = {
94
94
  throw new _VCLError.VCLError(e);
95
95
  }
96
96
  },
97
- finalizeOffers: async (finalizeOffersDescriptor, sessionToken, didJwk, remoteCryptoServicesToken) => {
97
+ finalizeOffers: async (finalizeOffersDescriptor, sessionToken) => {
98
98
  try {
99
- return await VclReactNative.finalizeOffers(finalizeOffersDescriptor, didJwk, sessionToken, remoteCryptoServicesToken);
99
+ return await VclReactNative.finalizeOffers(finalizeOffersDescriptor, sessionToken);
100
100
  } catch (e) {
101
101
  throw new _VCLError.VCLError(e);
102
102
  }
@@ -122,9 +122,9 @@ const VclApi = exports.VclApi = {
122
122
  throw new _VCLError.VCLError(e);
123
123
  }
124
124
  },
125
- generateSignedJwt: async (didJwk, jwtDescriptor, remoteCryptoServicesToken) => {
125
+ generateSignedJwt: async (jwtDescriptor, didJwk, remoteCryptoServicesToken) => {
126
126
  try {
127
- return await VclReactNative.generateSignedJwt(didJwk, jwtDescriptor, remoteCryptoServicesToken);
127
+ return await VclReactNative.generateSignedJwt(jwtDescriptor, didJwk, remoteCryptoServicesToken);
128
128
  } catch (e) {
129
129
  throw new _VCLError.VCLError(e);
130
130
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_VCLError","VclReactNative","NativeModules","VclApi","exports","initialize","initializationDescriptor","e","VCLError","getCountries","getCredentialTypes","getCredentialTypeSchemas","getPresentationRequest","presentationRequestDescriptor","remoteCryptoServicesToken","submitPresentation","presentationSubmission","didJwk","getExchangeProgress","exchangeDescriptor","searchForOrganizations","organizationsSearchDescriptor","getCredentialManifest","credentialManifestDescriptor","generateOffers","generateOffersDescriptor","checkForOffers","sessionToken","finalizeOffers","finalizeOffersDescriptor","getCredentialTypesUIFormSchema","credentialTypesUIFormSchemaDescriptor","getVerifiedProfile","verifiedProfileDescriptor","verifyJwt","jwt","jwkPublic","generateSignedJwt","jwtDescriptor","generateDidJwk"],"sourceRoot":"../../../src","sources":["api/VCLApi.ts"],"mappings":";;;;;;AAmCA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AApCA;AACA;AACA;AACA;AACA;AACA;;AAgCA,MAAM;EAAEE;AAAe,CAAC,GAAGC,0BAAa;AAEjC,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EACpBE,UAAU,EAAE,MACVC,wBAAqD,IACnC;IAClB,IAAI;MACF,OAAO,MAAML,cAAc,CAACI,UAAU,CAACC,wBAAwB,CAAC;IAClE,CAAC,CAAC,OAAOC,CAAC,EAAE;MACV,MAAM,IAAIC,kBAAQ,CAACD,CAAC,CAAC;IACvB;EACF,CAAC;EAEDE,YAAY,EAAE,MAAAA,CAAA,KAAmC;IAC/C,IAAI;MACF,OAAO,MAAMR,cAAc,CAACQ,YAAY,CAAC,CAAC;IAC5C,CAAC,CAAC,OAAOF,CAAC,EAAE;MACV,MAAM,IAAIC,kBAAQ,CAACD,CAAC,CAAC;IACvB;EACF,CAAC;EAEDG,kBAAkB,EAAE,MAAAA,CAAA,KAAyC;IAC3D,IAAI;MACF,OAAO,MAAMT,cAAc,CAACS,kBAAkB,CAAC,CAAC;IAClD,CAAC,CAAC,OAAOH,CAAC,EAAE;MACV,MAAM,IAAIC,kBAAQ,CAACD,CAAC,CAAC;IACvB;EACF,CAAC;EAEDI,wBAAwB,EAAE,MAAAA,CAAA,KAA+C;IACvE,IAAI;MACF,OAAO,MAAMV,cAAc,CAACU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CAACC,yBAAyB,CAAC;IAC3E,CAAC,CAAC,OAAO1B,CAAC,EAAE;MACV,MAAM,IAAIC,kBAAQ,CAACD,CAAC,CAAC;IACvB;EACF,CAAC;EAED2B,SAAS,EAAE,MAAAA,CACTC,GAAW,EACXC,SAAuB,EACvBtB,yBAAoC,KACf;IACrB,IAAI;MACF,OAAO,MAAMb,cAAc,CAACiC,SAAS,CACnCC,GAAG,EACHC,SAAS,EACTtB,yBACF,CAAC;IACH,CAAC,CAAC,OAAOP,CAAC,EAAE;MACV,MAAM,IAAIC,kBAAQ,CAACD,CAAC,CAAC;IACvB;EACF,CAAC;EAED8B,iBAAiB,EAAE,MAAAA,CACjBpB,MAAiB,EACjBqB,aAA+B,EAC/BxB,yBAAoC,KAChB;IACpB,IAAI;MACF,OAAO,MAAMb,cAAc,CAACoC,iBAAiB,CAC3CpB,MAAM,EACNqB,aAAa,EACbxB,yBACF,CAAC;IACH,CAAC,CAAC,OAAOP,CAAC,EAAE;MACV,MAAM,IAAIC,kBAAQ,CAACD,CAAC,CAAC;IACvB;EACF,CAAC;EAEDgC,cAAc,EAAE,MACdzB,yBAAoC,IACb;IACvB,IAAI;MACF,OAAO,MAAMb,cAAc,CAACsC,cAAc,CAACzB,yBAAyB,CAAC;IACvE,CAAC,CAAC,OAAOP,CAAC,EAAE;MACV,MAAM,IAAIC,kBAAQ,CAACD,CAAC,CAAC;IACvB;EACF;AACF,CAAC"}
1
+ {"version":3,"names":["_reactNative","require","_VCLError","VclReactNative","NativeModules","VclApi","exports","initialize","initializationDescriptor","e","VCLError","getCountries","getCredentialTypes","getCredentialTypeSchemas","getPresentationRequest","presentationRequestDescriptor","submitPresentation","presentationSubmission","getExchangeProgress","exchangeDescriptor","searchForOrganizations","organizationsSearchDescriptor","getCredentialManifest","credentialManifestDescriptor","generateOffers","generateOffersDescriptor","checkForOffers","sessionToken","finalizeOffers","finalizeOffersDescriptor","getCredentialTypesUIFormSchema","credentialTypesUIFormSchemaDescriptor","getVerifiedProfile","verifiedProfileDescriptor","verifyJwt","jwt","jwkPublic","remoteCryptoServicesToken","generateSignedJwt","jwtDescriptor","didJwk","generateDidJwk"],"sourceRoot":"../../../src","sources":["api/VCLApi.ts"],"mappings":";;;;;;AAmCA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AApCA;AACA;AACA;AACA;AACA;AACA;;AAgCA,MAAM;EAAEE;AAAe,CAAC,GAAGC,0BAAa;AAEjC,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EACpBE,UAAU,EAAE,MACVC,wBAAqD,IACnC;IAClB,IAAI;MACF,OAAO,MAAML,cAAc,CAACI,UAAU,CAACC,wBAAwB,CAAC;IAClE,CAAC,CAAC,OAAOC,CAAC,EAAE;MACV,MAAM,IAAIC,kBAAQ,CAACD,CAAC,CAAC;IACvB;EACF,CAAC;EAEDE,YAAY,EAAE,MAAAA,CAAA,KAAmC;IAC/C,IAAI;MACF,OAAO,MAAMR,cAAc,CAACQ,YAAY,CAAC,CAAC;IAC5C,CAAC,CAAC,OAAOF,CAAC,EAAE;MACV,MAAM,IAAIC,kBAAQ,CAACD,CAAC,CAAC;IACvB;EACF,CAAC;EAEDG,kBAAkB,EAAE,MAAAA,CAAA,KAAyC;IAC3D,IAAI;MACF,OAAO,MAAMT,cAAc,CAACS,kBAAkB,CAAC,CAAC;IAClD,CAAC,CAAC,OAAOH,CAAC,EAAE;MACV,MAAM,IAAIC,kBAAQ,CAACD,CAAC,CAAC;IACvB;EACF,CAAC;EAEDI,wBAAwB,EAAE,MAAAA,CAAA,KAA+C;IACvE,IAAI;MACF,OAAO,MAAMV,cAAc,CAACU,wBAAwB,CAAC,CAAC;IACxD,CAAC,CAAC,OAAOJ,CAAC,EAAE;MACV,MAAM,IAAIC,kBAAQ,CAACD,CAAC,CAAC;IACvB;EACF,CAAC;EAEDK,sBAAsB,EAAE,MACtBC,6BAA+D,IAC3B;IACpC,IAAI;MACF,OAAO,MAAMZ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jBH,yBAAoC,KAChB;IACpB,IAAI;MACF,OAAO,MAAMlC,cAAc,CAACmC,iBAAiB,CAC3CC,aAAa,EACbC,MAAM,EACNH,yBACF,CAAC;IACH,CAAC,CAAC,OAAO5B,CAAC,EAAE;MACV,MAAM,IAAIC,kBAAQ,CAACD,CAAC,CAAC;IACvB;EACF,CAAC;EAEDgC,cAAc,EAAE,MACdJ,yBAAoC,IACb;IACvB,IAAI;MACF,OAAO,MAAMlC,cAAc,CAACsC,cAAc,CAACJ,yBAAyB,CAAC;IACvE,CAAC,CAAC,OAAO5B,CAAC,EAAE;MACV,MAAM,IAAIC,kBAAQ,CAACD,CAAC,CAAC;IACvB;EACF;AACF,CAAC"}
@@ -39,16 +39,16 @@ export const VclApi = {
39
39
  throw new VCLError(e);
40
40
  }
41
41
  },
42
- getPresentationRequest: async (presentationRequestDescriptor, remoteCryptoServicesToken) => {
42
+ getPresentationRequest: async presentationRequestDescriptor => {
43
43
  try {
44
- return await VclReactNative.getPresentationRequest(presentationRequestDescriptor, remoteCryptoServicesToken);
44
+ return await VclReactNative.getPresentationRequest(presentationRequestDescriptor);
45
45
  } catch (e) {
46
46
  throw new VCLError(e);
47
47
  }
48
48
  },
49
- submitPresentation: async (presentationSubmission, didJwk, remoteCryptoServicesToken) => {
49
+ submitPresentation: async presentationSubmission => {
50
50
  try {
51
- return await VclReactNative.submitPresentation(presentationSubmission, didJwk, remoteCryptoServicesToken);
51
+ return await VclReactNative.submitPresentation(presentationSubmission);
52
52
  } catch (e) {
53
53
  throw new VCLError(e);
54
54
  }
@@ -67,16 +67,16 @@ export const VclApi = {
67
67
  throw new VCLError(e);
68
68
  }
69
69
  },
70
- getCredentialManifest: async (credentialManifestDescriptor, remoteCryptoServicesToken) => {
70
+ getCredentialManifest: async credentialManifestDescriptor => {
71
71
  try {
72
- return await VclReactNative.getCredentialManifest(credentialManifestDescriptor, remoteCryptoServicesToken);
72
+ return await VclReactNative.getCredentialManifest(credentialManifestDescriptor);
73
73
  } catch (e) {
74
74
  throw new VCLError(e);
75
75
  }
76
76
  },
77
- generateOffers: async (generateOffersDescriptor, didJwk, remoteCryptoServicesToken) => {
77
+ generateOffers: async generateOffersDescriptor => {
78
78
  try {
79
- return await VclReactNative.generateOffers(generateOffersDescriptor, didJwk, remoteCryptoServicesToken);
79
+ return await VclReactNative.generateOffers(generateOffersDescriptor);
80
80
  } catch (e) {
81
81
  throw new VCLError(e);
82
82
  }
@@ -88,9 +88,9 @@ export const VclApi = {
88
88
  throw new VCLError(e);
89
89
  }
90
90
  },
91
- finalizeOffers: async (finalizeOffersDescriptor, sessionToken, didJwk, remoteCryptoServicesToken) => {
91
+ finalizeOffers: async (finalizeOffersDescriptor, sessionToken) => {
92
92
  try {
93
- return await VclReactNative.finalizeOffers(finalizeOffersDescriptor, didJwk, sessionToken, remoteCryptoServicesToken);
93
+ return await VclReactNative.finalizeOffers(finalizeOffersDescriptor, sessionToken);
94
94
  } catch (e) {
95
95
  throw new VCLError(e);
96
96
  }
@@ -116,9 +116,9 @@ export const VclApi = {
116
116
  throw new VCLError(e);
117
117
  }
118
118
  },
119
- generateSignedJwt: async (didJwk, jwtDescriptor, remoteCryptoServicesToken) => {
119
+ generateSignedJwt: async (jwtDescriptor, didJwk, remoteCryptoServicesToken) => {
120
120
  try {
121
- return await VclReactNative.generateSignedJwt(didJwk, jwtDescriptor, remoteCryptoServicesToken);
121
+ return await VclReactNative.generateSignedJwt(jwtDescriptor, didJwk, remoteCryptoServicesToken);
122
122
  } catch (e) {
123
123
  throw new VCLError(e);
124
124
  }
@@ -1 +1 @@
1
- {"version":3,"names":["NativeModules","VCLError","VclReactNative","VclApi","initialize","initializationDescriptor","e","getCountries","getCredentialTypes","getCredentialTypeSchemas","getPresentationRequest","presentationRequestDescriptor","remoteCryptoServicesToken","submitPresentation","presentationSubmission","didJwk","getExchangeProgress","exchangeDescriptor","searchForOrganizations","organizationsSearchDescriptor","getCredentialManifest","credentialManifestDescriptor","generateOffers","generateOffersDescriptor","checkForOffers","sessionToken","finalizeOffers","finalizeOffersDescriptor","getCredentialTypesUIFormSchema","credentialTypesUIFormSchemaDescriptor","getVerifiedProfile","verifiedProfileDescriptor","verifyJwt","jwt","jwkPublic","generateSignedJwt","jwtDescriptor","generateDidJwk"],"sourceRoot":"../../../src","sources":["api/VCLApi.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AA8BA,SAASA,aAAa,QAAQ,cAAc;AAC5C,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,MAAM;EAAEC;AAAe,CAAC,GAAGF,aAAa;AAExC,OAAO,MAAMG,MAAM,GAAG;EACpBC,UAAU,EAAE,MACVC,wBAAqD,IACnC;IAClB,IAAI;MACF,OAAO,MAAMH,cAAc,CAACE,UAAU,CAACC,wBAAwB,CAAC;IAClE,CAAC,CAAC,OAAOC,CAAC,EAAE;MACV,MAAM,IAAIL,QAAQ,CAACK,CAAC,CAAC;IACvB;EACF,CAAC;EAEDC,YAAY,EAAE,MAAAA,CAAA,KAAmC;IAC/C,IAAI;MACF,OAAO,MAAML,cAAc,CAACK,YAAY,CAAC,CAAC;IAC5C,CAAC,CAAC,OAAOD,CAAC,EAAE;MACV,MAAM,IAAIL,QAAQ,CAACK,CAAC,CAAC;IACvB;EACF,CAAC;EAEDE,kBAAkB,EAAE,MAAAA,CAAA,KAAyC;IAC3D,IAAI;MACF,OAAO,MAAMN,cAAc,CAACM,kBAAkB,CAAC,CAAC;IAClD,CAAC,CAAC,OAAOF,CAAC,EAAE;MACV,MAAM,IAAIL,QAAQ,CAACK,CAAC,CAAC;IACvB;EACF,CAAC;EAEDG,wBAAwB,EAAE,MAAAA,CAAA,KAA+C;IACvE,IAAI;MACF,OAAO,MAAMP,cAAc,CAACO,wBAAwB,CAAC,CAAC;IACxD,CAAC,CAAC,OAAOH,CAAC,EAAE;MACV,MAAM,IAAIL,QAAQ,CAACK,CAAC,CAAC;IACvB;EACF,CAAC;EAEDI,sBAAsB,EAAE,MAAAA,CACtBC,6B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BAAoC,KACf;IACrB,IAAI;MACF,OAAO,MAAMV,cAAc,CAAC8B,SAAS,CACnCC,GAAG,EACHC,SAAS,EACTtB,yBACF,CAAC;IACH,CAAC,CAAC,OAAON,CAAC,EAAE;MACV,MAAM,IAAIL,QAAQ,CAACK,CAAC,CAAC;IACvB;EACF,CAAC;EAED6B,iBAAiB,EAAE,MAAAA,CACjBpB,MAAiB,EACjBqB,aAA+B,EAC/BxB,yBAAoC,KAChB;IACpB,IAAI;MACF,OAAO,MAAMV,cAAc,CAACiC,iBAAiB,CAC3CpB,MAAM,EACNqB,aAAa,EACbxB,yBACF,CAAC;IACH,CAAC,CAAC,OAAON,CAAC,EAAE;MACV,MAAM,IAAIL,QAAQ,CAACK,CAAC,CAAC;IACvB;EACF,CAAC;EAED+B,cAAc,EAAE,MACdzB,yBAAoC,IACb;IACvB,IAAI;MACF,OAAO,MAAMV,cAAc,CAACmC,cAAc,CAACzB,yBAAyB,CAAC;IACvE,CAAC,CAAC,OAAON,CAAC,EAAE;MACV,MAAM,IAAIL,QAAQ,CAACK,CAAC,CAAC;IACvB;EACF;AACF,CAAC"}
1
+ {"version":3,"names":["NativeModules","VCLError","VclReactNative","VclApi","initialize","initializationDescriptor","e","getCountries","getCredentialTypes","getCredentialTypeSchemas","getPresentationRequest","presentationRequestDescriptor","submitPresentation","presentationSubmission","getExchangeProgress","exchangeDescriptor","searchForOrganizations","organizationsSearchDescriptor","getCredentialManifest","credentialManifestDescriptor","generateOffers","generateOffersDescriptor","checkForOffers","sessionToken","finalizeOffers","finalizeOffersDescriptor","getCredentialTypesUIFormSchema","credentialTypesUIFormSchemaDescriptor","getVerifiedProfile","verifiedProfileDescriptor","verifyJwt","jwt","jwkPublic","remoteCryptoServicesToken","generateSignedJwt","jwtDescriptor","didJwk","generateDidJwk"],"sourceRoot":"../../../src","sources":["api/VCLApi.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AA8BA,SAASA,aAAa,QAAQ,cAAc;AAC5C,S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AI;MACF,OAAO,MAAM/B,cAAc,CAACmC,cAAc,CAACJ,yBAAyB,CAAC;IACvE,CAAC,CAAC,OAAO3B,CAAC,EAAE;MACV,MAAM,IAAIL,QAAQ,CAACK,CAAC,CAAC;IACvB;EACF;AACF,CAAC"}
@@ -36,18 +36,18 @@ export declare const VclApi: {
36
36
  getCountries: () => Promise<VCLCountries>;
37
37
  getCredentialTypes: () => Promise<VCLCredentialTypes>;
38
38
  getCredentialTypeSchemas: () => Promise<VCLCredentialTypeSchemas>;
39
- getPresentationRequest: (presentationRequestDescriptor: VCLPresentationRequestDescriptor, remoteCryptoServicesToken?: VCLToken) => Promise<VCLPresentationRequest>;
40
- submitPresentation: (presentationSubmission: VCLPresentationSubmission, didJwk: VCLDidJwk, remoteCryptoServicesToken?: VCLToken) => Promise<VCLSubmissionResult>;
39
+ getPresentationRequest: (presentationRequestDescriptor: VCLPresentationRequestDescriptor) => Promise<VCLPresentationRequest>;
40
+ submitPresentation: (presentationSubmission: VCLPresentationSubmission) => Promise<VCLSubmissionResult>;
41
41
  getExchangeProgress: (exchangeDescriptor: VCLExchangeDescriptor) => Promise<VCLExchange>;
42
42
  searchForOrganizations: (organizationsSearchDescriptor: VCLOrganizationsSearchDescriptor) => Promise<VCLOrganizations>;
43
- getCredentialManifest: (credentialManifestDescriptor: VCLCredentialManifestDescriptor, remoteCryptoServicesToken?: VCLToken) => Promise<VCLCredentialManifest>;
44
- generateOffers: (generateOffersDescriptor: VCLGenerateOffersDescriptor, didJwk: VCLDidJwk, remoteCryptoServicesToken?: VCLToken) => Promise<VCLOffers>;
43
+ getCredentialManifest: (credentialManifestDescriptor: VCLCredentialManifestDescriptor) => Promise<VCLCredentialManifest>;
44
+ generateOffers: (generateOffersDescriptor: VCLGenerateOffersDescriptor) => Promise<VCLOffers>;
45
45
  checkForOffers: (generateOffersDescriptor: VCLGenerateOffersDescriptor, sessionToken: VCLToken) => Promise<VCLOffers>;
46
- finalizeOffers: (finalizeOffersDescriptor: VCLFinalizeOffersDescriptor, sessionToken: VCLToken, didJwk: VCLDidJwk, remoteCryptoServicesToken?: VCLToken) => Promise<VCLJwtVerifiableCredentials>;
46
+ finalizeOffers: (finalizeOffersDescriptor: VCLFinalizeOffersDescriptor, sessionToken: VCLToken) => Promise<VCLJwtVerifiableCredentials>;
47
47
  getCredentialTypesUIFormSchema: (credentialTypesUIFormSchemaDescriptor: VCLCredentialTypesUIFormSchemaDescriptor) => Promise<VCLCredentialTypesUIFormSchema>;
48
48
  getVerifiedProfile: (verifiedProfileDescriptor: VCLVerifiedProfileDescriptor) => Promise<VCLVerifiedProfile>;
49
49
  verifyJwt: (jwt: VCLJwt, jwkPublic: VCLPublicJwk, remoteCryptoServicesToken?: VCLToken) => Promise<boolean>;
50
- generateSignedJwt: (didJwk: VCLDidJwk, jwtDescriptor: VCLJwtDescriptor, remoteCryptoServicesToken?: VCLToken) => Promise<VCLJwt>;
50
+ generateSignedJwt: (jwtDescriptor: VCLJwtDescriptor, didJwk: VCLDidJwk, remoteCryptoServicesToken?: VCLToken) => Promise<VCLJwt>;
51
51
  generateDidJwk: (remoteCryptoServicesToken?: VCLToken) => Promise<VCLDidJwk>;
52
52
  };
53
53
  //# sourceMappingURL=VCLApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VCLApi.d.ts","sourceRoot":"","sources":["../../../src/api/VCLApi.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAChG,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,qDAAqD,CAAC;AACpH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;A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AAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAMxE,eAAO,MAAM,MAAM;2CAEW,2BAA2B,KACpD,QAAQ,IAAI,CAAC;wBAQQ,QAAQ,YAAY,CAAC;8BAQf,QAAQ,kBAAkB,CAAC;oCAQrB,QAAQ,wBAAwB,CAAC;4DASpC,gCAAgC,KAC9D,QAAQ,sBAAsB,CAAC;iDAWR,yBAAyB,KAChD,QAAQ,mBAAmB,CAAC;8CAST,qBAAqB,KACxC,QAAQ,WAAW,CAAC;4DASU,gCAAgC,KAC9D,QAAQ,gBAAgB,CAAC;0DAWI,+BAA+B,KAC5D,QAAQ,qBAAqB,CAAC;+CAWL,2BAA2B,KACpD,QAAQ,SAAS,CAAC;+CASO,2BAA2B,gBACvC,QAAQ,KACrB,QAAQ,SAAS,CAAC;+CAYO,2BAA2B,gBACvC,QAAQ,KACrB,QAAQ,2BAA2B,CAAC;4EAYE,wCAAwC,KAC9E,QAAQ,8BAA8B,CAAC;oDAWb,4BAA4B,KACtD,QAAQ,kBAAkB,CAAC;qBASvB,MAAM,aACA,YAAY,8BACK,QAAQ,KACnC,QAAQ,OAAO,CAAC;uCAaF,gBAAgB,UACvB,SAAS,8BACW,QAAQ,KACnC,QAAQ,MAAM,CAAC;iDAaY,QAAQ,KACnC,QAAQ,SAAS,CAAC;CAOtB,CAAC"}
@@ -5,7 +5,9 @@
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
  import type { VCLDeepLink } from './VCLDeepLink';
8
+ import type { VCLDidJwk } from './VCLDidJwk';
8
9
  import type { VCLJwt } from './VCLJwt';
10
+ import type { VCLToken } from './VCLToken';
9
11
  import type { VCLVerifiedProfile } from './VCLVerifiedProfile';
10
12
  export interface VCLCredentialManifest {
11
13
  jwt: VCLJwt;
@@ -16,5 +18,7 @@ export interface VCLCredentialManifest {
16
18
  did: string;
17
19
  exchangeId: string;
18
20
  presentationDefinitionId: string;
21
+ didJwk: VCLDidJwk;
22
+ remoteCryptoServicesToken?: VCLToken;
19
23
  }
20
24
  //# sourceMappingURL=VCLCredentialManifest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VCLCredentialManifest.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/VCLCredentialManifest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,wBAAwB,EAAE,MAAM,CAAC;CAClC"}
1
+ {"version":3,"file":"VCLCredentialManifest.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/VCLCredentialManifest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,wBAAwB,EAAE,MAAM,CAAC;IACjC,MAAM,EAAE,SAAS,CAAC;IAClB,yBAAyB,CAAC,EAAE,QAAQ,CAAC;CACtC"}
@@ -6,9 +6,13 @@
6
6
  */
7
7
  import type { VCLPushDelegate } from './VCLPushDelegate';
8
8
  import type { VCLIssuingType } from './VCLIssuingType';
9
+ import type { VCLDidJwk } from './VCLDidJwk';
10
+ import type { VCLToken } from './VCLToken';
9
11
  export interface VCLCredentialManifestDescriptor {
10
12
  issuingType?: VCLIssuingType;
11
13
  credentialTypes?: string[];
12
14
  pushDelegate?: VCLPushDelegate;
15
+ didJwk: VCLDidJwk;
16
+ remoteCryptoServicesToken?: VCLToken;
13
17
  }
14
18
  //# sourceMappingURL=VCLCredentialManifestDescriptor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VCLCredentialManifestDescriptor.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/VCLCredentialManifestDescriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,WAAW,+BAA+B;IAC9C,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC"}
1
+ {"version":3,"file":"VCLCredentialManifestDescriptor.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/VCLCredentialManifestDescriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,+BAA+B;IAC9C,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,MAAM,EAAE,SAAS,CAAC;IAClB,yBAAyB,CAAC,EAAE,QAAQ,CAAC;CACtC"}
@@ -4,8 +4,10 @@
4
4
  * Copyright 2022 Velocity Career Labs inc.
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
+ import type { VCLDidJwk } from './VCLDidJwk';
7
8
  import type { VCLJwt } from './VCLJwt';
8
9
  import type { VCLPublicJwk } from './VCLPublicJwk';
10
+ import type { VCLToken } from './VCLToken';
9
11
  export interface VCLPresentationRequest {
10
12
  exchangeId: string;
11
13
  jwt: VCLJwt;
@@ -13,5 +15,7 @@ export interface VCLPresentationRequest {
13
15
  keyID: string;
14
16
  presentationDefinitionId: string;
15
17
  iss: string;
18
+ didJwk: VCLDidJwk;
19
+ remoteCryptoServicesToken?: VCLToken;
16
20
  }
17
21
  //# sourceMappingURL=VCLPresentationRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VCLPresentationRequest.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/VCLPresentationRequest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,YAAY,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB,EAAE,MAAM,CAAC;IACjC,GAAG,EAAE,MAAM,CAAC;CACb"}
1
+ {"version":3,"file":"VCLPresentationRequest.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/VCLPresentationRequest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,YAAY,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB,EAAE,MAAM,CAAC;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,SAAS,CAAC;IAClB,yBAAyB,CAAC,EAAE,QAAQ,CAAC;CACtC"}
@@ -5,9 +5,13 @@
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
  import type { VCLDeepLink } from './VCLDeepLink';
8
+ import type { VCLDidJwk } from './VCLDidJwk';
8
9
  import type { VCLPushDelegate } from './VCLPushDelegate';
10
+ import type { VCLToken } from './VCLToken';
9
11
  export interface VCLPresentationRequestDescriptor {
10
12
  deepLink: VCLDeepLink;
11
13
  pushDelegate?: VCLPushDelegate;
14
+ didJwk: VCLDidJwk;
15
+ remoteCryptoServicesToken?: VCLToken;
12
16
  }
13
17
  //# sourceMappingURL=VCLPresentationRequestDescriptor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VCLPresentationRequestDescriptor.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/VCLPresentationRequestDescriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,WAAW,CAAC;IACtB,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC"}
1
+ {"version":3,"file":"VCLPresentationRequestDescriptor.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/VCLPresentationRequestDescriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,WAAW,CAAC;IACtB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,MAAM,EAAE,SAAS,CAAC;IAClB,yBAAyB,CAAC,EAAE,QAAQ,CAAC;CACtC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velocitycareerlabs/vcl-react-native",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "Velocity Career Labs React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
package/src/api/VCLApi.ts CHANGED
@@ -73,13 +73,11 @@ export const VclApi = {
73
73
  },
74
74
 
75
75
  getPresentationRequest: async (
76
- presentationRequestDescriptor: VCLPresentationRequestDescriptor,
77
- remoteCryptoServicesToken?: VCLToken
76
+ presentationRequestDescriptor: VCLPresentationRequestDescriptor
78
77
  ): Promise<VCLPresentationRequest> => {
79
78
  try {
80
79
  return await VclReactNative.getPresentationRequest(
81
- presentationRequestDescriptor,
82
- remoteCryptoServicesToken
80
+ presentationRequestDescriptor
83
81
  );
84
82
  } catch (e) {
85
83
  throw new VCLError(e);
@@ -87,16 +85,10 @@ export const VclApi = {
87
85
  },
88
86
 
89
87
  submitPresentation: async (
90
- presentationSubmission: VCLPresentationSubmission,
91
- didJwk: VCLDidJwk,
92
- remoteCryptoServicesToken?: VCLToken
88
+ presentationSubmission: VCLPresentationSubmission
93
89
  ): Promise<VCLSubmissionResult> => {
94
90
  try {
95
- return await VclReactNative.submitPresentation(
96
- presentationSubmission,
97
- didJwk,
98
- remoteCryptoServicesToken
99
- );
91
+ return await VclReactNative.submitPresentation(presentationSubmission);
100
92
  } catch (e) {
101
93
  throw new VCLError(e);
102
94
  }
@@ -125,13 +117,11 @@ export const VclApi = {
125
117
  },
126
118
 
127
119
  getCredentialManifest: async (
128
- credentialManifestDescriptor: VCLCredentialManifestDescriptor,
129
- remoteCryptoServicesToken?: VCLToken
120
+ credentialManifestDescriptor: VCLCredentialManifestDescriptor
130
121
  ): Promise<VCLCredentialManifest> => {
131
122
  try {
132
123
  return await VclReactNative.getCredentialManifest(
133
- credentialManifestDescriptor,
134
- remoteCryptoServicesToken
124
+ credentialManifestDescriptor
135
125
  );
136
126
  } catch (e) {
137
127
  throw new VCLError(e);
@@ -139,16 +129,10 @@ export const VclApi = {
139
129
  },
140
130
 
141
131
  generateOffers: async (
142
- generateOffersDescriptor: VCLGenerateOffersDescriptor,
143
- didJwk: VCLDidJwk,
144
- remoteCryptoServicesToken?: VCLToken
132
+ generateOffersDescriptor: VCLGenerateOffersDescriptor
145
133
  ): Promise<VCLOffers> => {
146
134
  try {
147
- return await VclReactNative.generateOffers(
148
- generateOffersDescriptor,
149
- didJwk,
150
- remoteCryptoServicesToken
151
- );
135
+ return await VclReactNative.generateOffers(generateOffersDescriptor);
152
136
  } catch (e) {
153
137
  throw new VCLError(e);
154
138
  }
@@ -170,16 +154,12 @@ export const VclApi = {
170
154
 
171
155
  finalizeOffers: async (
172
156
  finalizeOffersDescriptor: VCLFinalizeOffersDescriptor,
173
- sessionToken: VCLToken,
174
- didJwk: VCLDidJwk,
175
- remoteCryptoServicesToken?: VCLToken
157
+ sessionToken: VCLToken
176
158
  ): Promise<VCLJwtVerifiableCredentials> => {
177
159
  try {
178
160
  return await VclReactNative.finalizeOffers(
179
161
  finalizeOffersDescriptor,
180
- didJwk,
181
- sessionToken,
182
- remoteCryptoServicesToken
162
+ sessionToken
183
163
  );
184
164
  } catch (e) {
185
165
  throw new VCLError(e);
@@ -225,14 +205,14 @@ export const VclApi = {
225
205
  },
226
206
 
227
207
  generateSignedJwt: async (
228
- didJwk: VCLDidJwk,
229
208
  jwtDescriptor: VCLJwtDescriptor,
209
+ didJwk: VCLDidJwk,
230
210
  remoteCryptoServicesToken?: VCLToken
231
211
  ): Promise<VCLJwt> => {
232
212
  try {
233
213
  return await VclReactNative.generateSignedJwt(
234
- didJwk,
235
214
  jwtDescriptor,
215
+ didJwk,
236
216
  remoteCryptoServicesToken
237
217
  );
238
218
  } catch (e) {
@@ -6,7 +6,9 @@
6
6
  */
7
7
 
8
8
  import type { VCLDeepLink } from './VCLDeepLink';
9
+ import type { VCLDidJwk } from './VCLDidJwk';
9
10
  import type { VCLJwt } from './VCLJwt';
11
+ import type { VCLToken } from './VCLToken';
10
12
  import type { VCLVerifiedProfile } from './VCLVerifiedProfile';
11
13
 
12
14
  export interface VCLCredentialManifest {
@@ -18,4 +20,6 @@ export interface VCLCredentialManifest {
18
20
  did: string;
19
21
  exchangeId: string;
20
22
  presentationDefinitionId: string;
23
+ didJwk: VCLDidJwk;
24
+ remoteCryptoServicesToken?: VCLToken;
21
25
  }
@@ -7,9 +7,13 @@
7
7
 
8
8
  import type { VCLPushDelegate } from './VCLPushDelegate';
9
9
  import type { VCLIssuingType } from './VCLIssuingType';
10
+ import type { VCLDidJwk } from './VCLDidJwk';
11
+ import type { VCLToken } from './VCLToken';
10
12
 
11
13
  export interface VCLCredentialManifestDescriptor {
12
14
  issuingType?: VCLIssuingType;
13
15
  credentialTypes?: string[];
14
16
  pushDelegate?: VCLPushDelegate;
17
+ didJwk: VCLDidJwk;
18
+ remoteCryptoServicesToken?: VCLToken;
15
19
  }
@@ -5,8 +5,10 @@
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
 
8
+ import type { VCLDidJwk } from './VCLDidJwk';
8
9
  import type { VCLJwt } from './VCLJwt';
9
10
  import type { VCLPublicJwk } from './VCLPublicJwk';
11
+ import type { VCLToken } from './VCLToken';
10
12
 
11
13
  export interface VCLPresentationRequest {
12
14
  exchangeId: string;
@@ -15,4 +17,6 @@ export interface VCLPresentationRequest {
15
17
  keyID: string;
16
18
  presentationDefinitionId: string;
17
19
  iss: string;
20
+ didJwk: VCLDidJwk;
21
+ remoteCryptoServicesToken?: VCLToken;
18
22
  }
@@ -6,9 +6,13 @@
6
6
  */
7
7
 
8
8
  import type { VCLDeepLink } from './VCLDeepLink';
9
+ import type { VCLDidJwk } from './VCLDidJwk';
9
10
  import type { VCLPushDelegate } from './VCLPushDelegate';
11
+ import type { VCLToken } from './VCLToken';
10
12
 
11
13
  export interface VCLPresentationRequestDescriptor {
12
14
  deepLink: VCLDeepLink;
13
15
  pushDelegate?: VCLPushDelegate;
16
+ didJwk: VCLDidJwk;
17
+ remoteCryptoServicesToken?: VCLToken;
14
18
  }
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
19
19
  # https://github.com/CocoaPods/CocoaPods/issues/7234#issuecomment-346136322
20
20
  # s.static_framework = true
21
21
 
22
- s.dependency "VCL", "2.0.0"
22
+ s.dependency "VCL", "2.1.0"
23
23
 
24
24
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
25
25
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.