@velocitycareerlabs/vcl-react-native 1.20.1 → 1.21.1

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 (35) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/io/velocitycareerlabs/reactnative/VclReactNativeModule.kt +2 -1
  3. package/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt +46 -23
  4. package/ios/Utils/Converter.swift +31 -12
  5. package/lib/commonjs/api/entities/VCLOffer.js +6 -0
  6. package/lib/commonjs/api/entities/VCLOffer.js.map +1 -0
  7. package/lib/commonjs/api/entities/error/VCLErrorCode.js +4 -0
  8. package/lib/commonjs/api/entities/error/VCLErrorCode.js.map +1 -1
  9. package/lib/commonjs/index.js.map +1 -1
  10. package/lib/module/api/entities/VCLOffer.js +2 -0
  11. package/lib/module/api/entities/VCLOffer.js.map +1 -0
  12. package/lib/module/api/entities/error/VCLErrorCode.js +4 -0
  13. package/lib/module/api/entities/error/VCLErrorCode.js.map +1 -1
  14. package/lib/module/index.js.map +1 -1
  15. package/lib/typescript/api/entities/VCLCredentialManifest.d.ts +2 -0
  16. package/lib/typescript/api/entities/VCLCredentialManifest.d.ts.map +1 -1
  17. package/lib/typescript/api/entities/VCLOffer.d.ts +12 -0
  18. package/lib/typescript/api/entities/VCLOffer.d.ts.map +1 -0
  19. package/lib/typescript/api/entities/VCLOffers.d.ts +2 -1
  20. package/lib/typescript/api/entities/VCLOffers.d.ts.map +1 -1
  21. package/lib/typescript/api/entities/error/VCLErrorCode.d.ts +5 -1
  22. package/lib/typescript/api/entities/error/VCLErrorCode.d.ts.map +1 -1
  23. package/lib/typescript/index.d.ts +2 -1
  24. package/lib/typescript/index.d.ts.map +1 -1
  25. package/package.json +1 -1
  26. package/src/api/entities/VCLCredentialManifest.ts +2 -0
  27. package/src/api/entities/VCLOffer.ts +13 -0
  28. package/src/api/entities/VCLOffers.ts +2 -1
  29. package/src/api/entities/error/VCLErrorCode.ts +5 -0
  30. package/src/index.tsx +2 -0
  31. package/velocitycareerlabs-vcl-react-native.podspec +1 -1
  32. package/ios/VclReactNative.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
  33. package/ios/VclReactNative.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  34. package/ios/VclReactNative.xcodeproj/project.xcworkspace/xcuserdata/michaelavoyan.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  35. package/ios/VclReactNative.xcodeproj/xcuserdata/michaelavoyan.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
@@ -100,7 +100,7 @@ dependencies {
100
100
 
101
101
  // VCL:
102
102
  implementation "com.nimbusds:nimbus-jose-jwt:9.35"
103
- implementation "io.velocitycareerlabs:vcl:1.20.1"
103
+ implementation "io.velocitycareerlabs:vcl:1.21.1"
104
104
  }
105
105
 
106
106
  if (isNewArchitectureEnabled()) {
@@ -34,6 +34,7 @@ import io.velocitycareerlabs.reactnative.utlis.Converter.mapToToken
34
34
  import io.velocitycareerlabs.reactnative.utlis.Converter.mapToVerifiedProfileDescriptor
35
35
  import io.velocitycareerlabs.reactnative.utlis.Converter.verifiedProfileToMap
36
36
  import io.velocitycareerlabs.api.VCLProvider
37
+ import io.velocitycareerlabs.api.entities.VCLDidJwk
37
38
  import io.velocitycareerlabs.api.entities.error.VCLError
38
39
  import io.velocitycareerlabs.api.entities.initialization.VCLInitializationDescriptor
39
40
  import io.velocitycareerlabs.reactnative.extensions.toThrowable
@@ -42,7 +43,7 @@ import io.velocitycareerlabs.reactnative.utlis.Converter.mapToDidJwk
42
43
  import io.velocitycareerlabs.reactnative.utlis.Converter.mapToInitializationDescriptor
43
44
  import io.velocitycareerlabs.reactnative.utlis.Converter.mapToJwtDescriptor
44
45
  import io.velocitycareerlabs.reactnative.utlis.VCLLog
45
- import java.lang.Exception
46
+ import kotlin.Exception
46
47
 
47
48
  class VclReactNativeModule(private val reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
48
49
 
@@ -4,7 +4,6 @@
4
4
  * Copyright 2022 Velocity Career Labs inc.
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
-
8
7
  package io.velocitycareerlabs.reactnative.utlis
9
8
 
10
9
  import com.facebook.react.bridge.*
@@ -16,9 +15,7 @@ import io.velocitycareerlabs.api.entities.initialization.VCLJwtServiceUrls
16
15
  import io.velocitycareerlabs.api.entities.initialization.VCLKeyServiceUrls
17
16
  import io.velocitycareerlabs.api.entities.initialization.VCLRemoteCryptoServicesUrlsDescriptor
18
17
  import io.velocitycareerlabs.reactnative.extensions.*
19
- import org.json.JSONArray
20
18
  import org.json.JSONObject
21
- import java.lang.Exception
22
19
 
23
20
  object Converter {
24
21
 
@@ -167,17 +164,25 @@ object Converter {
167
164
 
168
165
  fun mapTopPresentationRequestDescriptor(presentationRequestDescriptorLinkMap: ReadableMap) =
169
166
  VCLPresentationRequestDescriptor(
170
- deepLink = mapToDeepLink(presentationRequestDescriptorLinkMap.getMapOpt("deepLink")),
167
+ deepLink = mapToDeepLink(presentationRequestDescriptorLinkMap.getMapOpt("deepLink"))
168
+ ?: VCLDeepLink(""),
171
169
  pushDelegate = mapToPushDelegate(presentationRequestDescriptorLinkMap.getMapOpt("pushDelegate"))
172
170
  )
173
171
 
174
- fun mapToDeepLink(deepLinkMap: ReadableMap?) =
175
- VCLDeepLink(deepLinkMap?.getStringOpt("value") ?: "")
172
+ fun mapToDeepLink(deepLinkMap: ReadableMap?): VCLDeepLink? {
173
+ deepLinkMap?.getStringOpt("value")?.let {
174
+ return VCLDeepLink(it)
175
+ }
176
+ return null
177
+ }
176
178
 
177
- fun deepLinkToMap(deepLink: VCLDeepLink): ReadableMap {
178
- val retVal = Arguments.createMap()
179
- retVal.putString("value", deepLink.value)
180
- return retVal
179
+ fun deepLinkToMap(deepLink: VCLDeepLink?): ReadableMap? {
180
+ deepLink?.value?.let {
181
+ val retVal = Arguments.createMap()
182
+ retVal.putString("value", deepLink?.value)
183
+ return retVal
184
+ }
185
+ return null
181
186
  }
182
187
 
183
188
  fun mapToIssuingType(
@@ -202,7 +207,7 @@ object Converter {
202
207
  ) = VCLPresentationRequest(
203
208
  mapToJwt(presentationRequestMap?.getMapOpt("jwt")),
204
209
  mapToPublicJwk(presentationRequestMap?.getMapOpt("publicJwk")),
205
- mapToDeepLink(presentationRequestMap?.getMapOpt("deepLink"))
210
+ mapToDeepLink(presentationRequestMap?.getMapOpt("deepLink")) ?: VCLDeepLink("")
206
211
  )
207
212
 
208
213
  fun presentationRequestToMap(
@@ -419,7 +424,8 @@ object Converter {
419
424
  credentialManifestDescriptorByDeepLinkMap: ReadableMap
420
425
  ): VCLCredentialManifestDescriptorByDeepLink {
421
426
  return VCLCredentialManifestDescriptorByDeepLink(
422
- mapToDeepLink(credentialManifestDescriptorByDeepLinkMap.getMapOpt("deepLink")),
427
+ mapToDeepLink(credentialManifestDescriptorByDeepLinkMap.getMapOpt("deepLink"))
428
+ ?: VCLDeepLink(""),
423
429
  mapToIssuingType(
424
430
  credentialManifestDescriptorByDeepLinkMap,
425
431
  VCLIssuingType.Career
@@ -461,15 +467,10 @@ object Converter {
461
467
 
462
468
  fun mapToServiceCredentialAgentIssuer(
463
469
  serviceMap: ReadableMap?
464
- ): VCLServiceCredentialAgentIssuer {
465
- var payload = JSONObject()
466
- try {
470
+ ): VCLServiceCredentialAgentIssuer =
471
+ VCLServiceCredentialAgentIssuer(
467
472
  payload = serviceMap?.getMapOpt("payload")?.toJsonObject() ?: JSONObject()
468
- } catch (ex: Exception) {
469
- ex.printStackTrace()
470
- }
471
- return VCLServiceCredentialAgentIssuer(payload = payload)
472
- }
473
+ )
473
474
 
474
475
  fun credentialManifestToMap(
475
476
  credentialManifest: VCLCredentialManifest
@@ -486,6 +487,7 @@ object Converter {
486
487
  "verifiedProfile",
487
488
  credentialManifest.verifiedProfile.payload.toReadableMap()
488
489
  )
490
+ credentialManifestMap.putMap("deepLink", deepLinkToMap(credentialManifest.deepLink))
489
491
  return credentialManifestMap
490
492
  }
491
493
 
@@ -496,12 +498,14 @@ object Converter {
496
498
  VCLJwt(encodedJwt = credentialManifestMap?.getMapOpt("jwt")?.getStringOpt("encodedJwt") ?: "")
497
499
  val vendorOriginContext: String? = credentialManifestMap?.getStringOpt("vendorOriginContext")
498
500
  val verifiedProfileMap: ReadableMap? = credentialManifestMap?.getMapOpt("verifiedProfile")
501
+ val deepLinkMap: ReadableMap? = credentialManifestMap?.getMapOpt("deepLink")
499
502
  return VCLCredentialManifest(
500
503
  jwt = jwt,
501
504
  vendorOriginContext = vendorOriginContext,
502
505
  verifiedProfile = VCLVerifiedProfile(
503
506
  payload = verifiedProfileMap?.toJsonObject() ?: JSONObject()
504
- )
507
+ ),
508
+ deepLink = mapToDeepLink(deepLinkMap)
505
509
  )
506
510
  }
507
511
 
@@ -538,7 +542,7 @@ object Converter {
538
542
  ): ReadableMap {
539
543
  val generatedOffersMap = Arguments.createMap()
540
544
  generatedOffersMap.putMap("payload", offers.payload.toReadableMap())
541
- generatedOffersMap.putArray("all", offers.all.toReadableArray())
545
+ generatedOffersMap.putArray("all", allOffersToArray(offers.all))
542
546
  generatedOffersMap.putInt("responseCode", offers.responseCode)
543
547
  generatedOffersMap.putMap("sessionToken", tokenToMap(offers.sessionToken))
544
548
  generatedOffersMap.putString("challenge", offers.challenge)
@@ -548,13 +552,32 @@ object Converter {
548
552
  fun mapToOffers(offersMap: ReadableMap?): VCLOffers {
549
553
  return VCLOffers(
550
554
  payload = offersMap?.getMapOpt("payload")?.toJsonObject() ?: JSONObject(),
551
- all = offersMap?.getArrayOpt("all")?.toJsonArray() ?: JSONArray(),
555
+ all = arrayToAllOffers(offersMap?.getArrayOpt("all")),
552
556
  responseCode = offersMap?.getIntOpt("responseCode") ?: -1,
553
557
  sessionToken = mapToToken(offersMap?.getMapOpt("sessionToken")),
554
558
  challenge = offersMap?.getStringOpt("challenge") ?: ""
555
559
  )
556
560
  }
557
561
 
562
+ fun arrayToAllOffers(allOffersArray: ReadableArray?): List<VCLOffer> {
563
+ val allOffers = mutableListOf<VCLOffer>()
564
+ for (i in 0 until (allOffersArray?.size() ?: 0)) {
565
+ allOffers.add(VCLOffer(allOffersArray?.getMapOpt(i)?.toJsonObject() ?: JSONObject()))
566
+ }
567
+ return allOffers
568
+ }
569
+
570
+ fun allOffersToArray(allOffers: List<VCLOffer>?): ReadableArray {
571
+ val allOffersArr = Arguments.createArray()
572
+ for (i in 0 until (allOffers?.size ?: 0)) {
573
+ val offerMap = Arguments.createMap()
574
+ offerMap.putMap("payload", allOffers?.get(i)?.payload?.toReadableMap())
575
+ offerMap.putString("id", allOffers?.get(i)?.id)
576
+ allOffersArr.pushMap(offerMap)
577
+ }
578
+ return allOffersArr
579
+ }
580
+
558
581
  fun credentialTypesFormSchemaToMap(
559
582
  credentialTypesFormSchema: VCLCredentialTypesUIFormSchema
560
583
  ): ReadableMap {
@@ -164,17 +164,23 @@ func dictionaryTopPresentationRequestDescriptor(
164
164
  _ presentationRequestDescriptorLinkDictionary: [String: Any]
165
165
  ) -> VCLPresentationRequestDescriptor {
166
166
  return VCLPresentationRequestDescriptor(
167
- deepLink: dictionaryToDeepLink(presentationRequestDescriptorLinkDictionary["deepLink"] as? [String: Any]),
167
+ deepLink: dictionaryToDeepLink(presentationRequestDescriptorLinkDictionary["deepLink"] as? [String: Any]) ?? VCLDeepLink(value: ""),
168
168
  pushDelegate: dictionaryToPushDelegate(presentationRequestDescriptorLinkDictionary["pushDelegate"] as? [String: Any])
169
169
  )
170
170
  }
171
171
 
172
- func dictionaryToDeepLink(_ deepLinkDictionary: [String: Any]?) -> VCLDeepLink {
173
- return VCLDeepLink(value: deepLinkDictionary?["value"] as? String ?? "")
172
+ func dictionaryToDeepLink(_ deepLinkDictionary: [String: Any]?) -> VCLDeepLink? {
173
+ if let value = deepLinkDictionary?["value"] as? String {
174
+ return VCLDeepLink(value: value)
175
+ }
176
+ return nil
174
177
  }
175
178
 
176
- func deepLinkToDictionary(_ deepLink: VCLDeepLink) -> [String: Any] {
177
- return ["value": deepLink.value]
179
+ func deepLinkToDictionary(_ deepLink: VCLDeepLink?) -> [String: Any]? {
180
+ if let value = deepLink?.value {
181
+ return ["value": value]
182
+ }
183
+ return nil
178
184
  }
179
185
 
180
186
  func dictionaryToToken(_ tokenDictionary: [String: Any]?) -> VCLToken {
@@ -201,7 +207,7 @@ func dictionaryToPresentationRequest(
201
207
  return VCLPresentationRequest(
202
208
  jwt: dictionaryToJwt(presentationRequestDictionary?["jwt"] as? [String : Any]),
203
209
  publicJwk: dictionaryToPublicJwk(presentationRequestDictionary?["publicJwk"] as? [String: Any]),
204
- deepLink: dictionaryToDeepLink(presentationRequestDictionary?["deepLink"] as? [String : Any])
210
+ deepLink: dictionaryToDeepLink(presentationRequestDictionary?["deepLink"] as? [String : Any]) ?? VCLDeepLink(value: "")
205
211
  )
206
212
  }
207
213
 
@@ -320,7 +326,7 @@ func dictionaryToFilter(
320
326
  credentialTypesList?.append(credentialType)
321
327
  }
322
328
  }
323
- var serviceTypes: VCLServiceTypes? = serviceTypesList != nil ? VCLServiceTypes(all: serviceTypesList ?? [VCLServiceType]()) : nil
329
+ let serviceTypes: VCLServiceTypes? = serviceTypesList != nil ? VCLServiceTypes(all: serviceTypesList ?? [VCLServiceType]()) : nil
324
330
  return VCLFilter(did: did, serviceTypes: serviceTypes, credentialTypes: credentialTypesList)
325
331
  }
326
332
 
@@ -392,7 +398,7 @@ func dictionaryToCredentialManifestDescriptorByDeepLink(
392
398
  return VCLCredentialManifestDescriptorByDeepLink(
393
399
  deepLink: dictionaryToDeepLink(
394
400
  credentialManifestDescriptorByDeepLinkDictionary["deepLink"] as? [String : Any]
395
- ),
401
+ ) ?? VCLDeepLink(value: ""),
396
402
  issuingType: dictionaryToIssuingType(
397
403
  issuingTypeDictionary: credentialManifestDescriptorByDeepLinkDictionary,
398
404
  defaultIssuingType: VCLIssuingType.Career
@@ -445,6 +451,7 @@ func credentialManifestToDictionary(
445
451
  credentialManifestDictinary["exchangeId"] = credentialManifest.exchangeId
446
452
  credentialManifestDictinary["vendorOriginContext"] = credentialManifest.vendorOriginContext
447
453
  credentialManifestDictinary["verifiedProfile"] = credentialManifest.verifiedProfile.payload
454
+ credentialManifestDictinary["deepLink"] = deepLinkToDictionary(credentialManifest.deepLink)
448
455
  return credentialManifestDictinary
449
456
  }
450
457
 
@@ -454,11 +461,13 @@ func dictionaryToCredentialManifest(
454
461
  let jwt: VCLJwt = VCLJwt(encodedJwt: (credentialManifestDictionary?["jwt"] as? [String: Any])?["encodedJwt"] as? String ?? "")
455
462
  let vendorOriginContext: String? = credentialManifestDictionary?["vendorOriginContext"] as? String
456
463
  let verifiedProfileDictionary: [String: Any]? = credentialManifestDictionary?["verifiedProfile"] as? [String: Any]
464
+ let deepLink: VCLDeepLink? = dictionaryToDeepLink(credentialManifestDictionary?["deepLink"] as? [String: Any])
457
465
  return VCLCredentialManifest(
458
466
  jwt: jwt,
459
467
  vendorOriginContext: vendorOriginContext,
460
- verifiedProfile: VCLVerifiedProfile(payload: verifiedProfileDictionary ?? [:])
461
- )
468
+ verifiedProfile: VCLVerifiedProfile(payload: verifiedProfileDictionary ?? [:]),
469
+ deepLink: deepLink
470
+ )
462
471
  }
463
472
 
464
473
  func dictionaryToGenerateOffersDescriptor(
@@ -489,7 +498,7 @@ func dictionaryToGenerateOffersDescriptor(
489
498
  func offersToDictionary(_ offers: VCLOffers) -> [String: Any] {
490
499
  var offersDictionary = [String: Any]()
491
500
  offersDictionary["payload"] = offers.payload
492
- offersDictionary["all"] = offers.all
501
+ offersDictionary["all"] = allOffersToArray(offers.all)
493
502
  offersDictionary["responseCode"] = offers.responseCode
494
503
  offersDictionary["sessionToken"] = tokenToDictionary(offers.sessionToken)
495
504
  offersDictionary["challenge"] = offers.challenge
@@ -499,13 +508,23 @@ func offersToDictionary(_ offers: VCLOffers) -> [String: Any] {
499
508
  func dictionaryToOffers(_ offersDictionary: [String : Any]?) -> VCLOffers {
500
509
  return VCLOffers(
501
510
  payload: offersDictionary?["payload"] as? [String: Any] ?? [String: Any](),
502
- all: offersDictionary?["all"] as? [[String: Any]] ?? [[String: Any]](),
511
+ all: arrayToAllOffers(offersDictionary!["all"] as? [[String : Any]]),
503
512
  responseCode: offersDictionary?["responseCode"] as? Int ?? 0,
504
513
  sessionToken: dictionaryToToken(offersDictionary?["sessionToken"] as? [String: Any]),
505
514
  challenge: offersDictionary?["challenge"] as? String ?? ""
506
515
  )
507
516
  }
508
517
 
518
+ func arrayToAllOffers(_ allOffersArray: [[String : Any]]?) -> [VCLOffer] {
519
+ return allOffersArray?.map {
520
+ VCLOffer(payload: $0["payload"] as? [String : Any] ?? [:])
521
+ } ?? [VCLOffer(payload: [:])]
522
+ }
523
+
524
+ func allOffersToArray(_ allOffers: [VCLOffer]?) -> [[String : Any]]? {
525
+ return allOffers?.map { ["payload": $0.payload, "id": $0.id] }
526
+ }
527
+
509
528
  func credentialTypesFormSchemaToDictionary(
510
529
  _ credentialTypesFormSchema: VCLCredentialTypesUIFormSchema
511
530
  ) -> [String: Any] {
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=VCLOffer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["api/entities/VCLOffer.ts"],"mappings":""}
@@ -18,6 +18,10 @@ let VCLErrorCode = /*#__PURE__*/function (VCLErrorCode) {
18
18
  VCLErrorCode["InvalidCredentialSubjectType"] = "invalid_credential_subject_type";
19
19
  VCLErrorCode["InvalidCredentialSubjectContext"] = "invalid_credential_subject_context";
20
20
  VCLErrorCode["IssuerUnexpectedPermissionFailure"] = "issuer_unexpected_permission_failure";
21
+ VCLErrorCode["MismatchedRequestIssuerDid"] = "mismatched_request_issuer_did";
22
+ VCLErrorCode["MismatchedOfferIssuerDid"] = "mismatched_offer_issuer_did";
23
+ VCLErrorCode["MismatchedCredentialIssuerDid"] = "mismatched_credential_issuer_did";
24
+ VCLErrorCode["MismatchedPresentationRequestInspectorDid"] = "mismatched_presentation_request_inspector_did";
21
25
  return VCLErrorCode;
22
26
  }({});
23
27
  exports.VCLErrorCode = VCLErrorCode;
@@ -1 +1 @@
1
- {"version":3,"names":["VCLErrorCode","exports"],"sourceRoot":"../../../../../src","sources":["api/entities/error/VCLErrorCode.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AALA,IAOYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAAAC,OAAA,CAAAD,YAAA,GAAAA,YAAA"}
1
+ {"version":3,"names":["VCLErrorCode","exports"],"sourceRoot":"../../../../../src","sources":["api/entities/error/VCLErrorCode.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AALA,IAOYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAAAC,OAAA,CAAAD,YAAA,GAAAA,YAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["_VCLApi","require","_VCLEnvironment","_VCLXVnfProtocolVersion","_VCLCryptoServiceType","_VCLCountries","_VCLServiceType","_VCLIssuingType","_VCLError","_VCLStatusCode","_VCLErrorCode","_default","VclApi","exports","default"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AAOA,IAAAI,aAAA,GAAAJ,OAAA;AAiCA,IAAAK,eAAA,GAAAL,OAAA;AAEA,IAAAM,eAAA,GAAAN,OAAA;AAWA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AAjEA;AACA;AACA;AACA;AACA;AACA;AALA,IAAAU,QAAA,GAmEeC,cAAM;AAAAC,OAAA,CAAAC,OAAA,GAAAH,QAAA"}
1
+ {"version":3,"names":["_VCLApi","require","_VCLEnvironment","_VCLXVnfProtocolVersion","_VCLCryptoServiceType","_VCLCountries","_VCLServiceType","_VCLIssuingType","_VCLError","_VCLStatusCode","_VCLErrorCode","_default","VclApi","exports","default"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AAOA,IAAAI,aAAA,GAAAJ,OAAA;AAkCA,IAAAK,eAAA,GAAAL,OAAA;AAEA,IAAAM,eAAA,GAAAN,OAAA;AAWA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AAlEA;AACA;AACA;AACA;AACA;AACA;AALA,IAAAU,QAAA,GAoEeC,cAAM;AAAAC,OAAA,CAAAC,OAAA,GAAAH,QAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=VCLOffer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["api/entities/VCLOffer.ts"],"mappings":""}
@@ -13,6 +13,10 @@ export let VCLErrorCode = /*#__PURE__*/function (VCLErrorCode) {
13
13
  VCLErrorCode["InvalidCredentialSubjectType"] = "invalid_credential_subject_type";
14
14
  VCLErrorCode["InvalidCredentialSubjectContext"] = "invalid_credential_subject_context";
15
15
  VCLErrorCode["IssuerUnexpectedPermissionFailure"] = "issuer_unexpected_permission_failure";
16
+ VCLErrorCode["MismatchedRequestIssuerDid"] = "mismatched_request_issuer_did";
17
+ VCLErrorCode["MismatchedOfferIssuerDid"] = "mismatched_offer_issuer_did";
18
+ VCLErrorCode["MismatchedCredentialIssuerDid"] = "mismatched_credential_issuer_did";
19
+ VCLErrorCode["MismatchedPresentationRequestInspectorDid"] = "mismatched_presentation_request_inspector_did";
16
20
  return VCLErrorCode;
17
21
  }({});
18
22
  //# sourceMappingURL=VCLErrorCode.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["VCLErrorCode"],"sourceRoot":"../../../../../src","sources":["api/entities/error/VCLErrorCode.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA"}
1
+ {"version":3,"names":["VCLErrorCode"],"sourceRoot":"../../../../../src","sources":["api/entities/error/VCLErrorCode.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["VclApi","VCLEnvironment","VCLXVnfProtocolVersion","VCLCryptoServiceType","VCLCountryCodes","VCLServiceType","VCLIssuingType","VCLError","VCLStatusCode","VCLErrorCode"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,cAAc;AACrC,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,oBAAoB,QAAQ,4BAA4B;AAOjE,SAASC,eAAe,QAAQ,6BAA6B;AAiC7D,SAASC,cAAc,QAAQ,+BAA+B;AAE9D,SAASC,cAAc,QAAQ,+BAA+B;AAW9D,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,aAAa,QAAQ,oCAAoC;AAClE,SAASC,YAAY,QAAQ,mCAAmC;AAEhE,eAAeT,MAAM;AACrB,SACEC,cAAc,EACdE,oBAAoB,EACpBD,sBAAsB,EACtBE,eAAe,EACfC,cAAc,EACdC,cAAc,EACdC,QAAQ,EACRC,aAAa,EACbC,YAAY"}
1
+ {"version":3,"names":["VclApi","VCLEnvironment","VCLXVnfProtocolVersion","VCLCryptoServiceType","VCLCountryCodes","VCLServiceType","VCLIssuingType","VCLError","VCLStatusCode","VCLErrorCode"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,cAAc;AACrC,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,oBAAoB,QAAQ,4BAA4B;AAOjE,SAASC,eAAe,QAAQ,6BAA6B;AAkC7D,SAASC,cAAc,QAAQ,+BAA+B;AAE9D,SAASC,cAAc,QAAQ,+BAA+B;AAW9D,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,aAAa,QAAQ,oCAAoC;AAClE,SAASC,YAAY,QAAQ,mCAAmC;AAEhE,eAAeT,MAAM;AACrB,SACEC,cAAc,EACdE,oBAAoB,EACpBD,sBAAsB,EACtBE,eAAe,EACfC,cAAc,EACdC,cAAc,EACdC,QAAQ,EACRC,aAAa,EACbC,YAAY"}
@@ -4,12 +4,14 @@
4
4
  * Copyright 2022 Velocity Career Labs inc.
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
+ import type { VCLDeepLink } from './VCLDeepLink';
7
8
  import type { VCLJwt } from './VCLJwt';
8
9
  import type { VCLVerifiedProfile } from './VCLVerifiedProfile';
9
10
  export interface VCLCredentialManifest {
10
11
  jwt: VCLJwt;
11
12
  vendorOriginContext?: String;
12
13
  verifiedProfile: VCLVerifiedProfile;
14
+ deepLink?: VCLDeepLink;
13
15
  iss: string;
14
16
  did: string;
15
17
  exchangeId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"VCLCredentialManifest.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/VCLCredentialManifest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,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,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,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"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Created by Michael Avoyan.
3
+ *
4
+ * Copyright 2022 Velocity Career Labs inc.
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+ import type { Dictionary } from '../Dictionary';
8
+ export interface VCLOffer {
9
+ payload: Dictionary<any>;
10
+ id: string;
11
+ }
12
+ //# sourceMappingURL=VCLOffer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VCLOffer.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/VCLOffer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;CACZ"}
@@ -5,10 +5,11 @@
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
  import type { Dictionary } from '../Dictionary';
8
+ import type { VCLOffer } from './VCLOffer';
8
9
  import type { VCLToken } from './VCLToken';
9
10
  export interface VCLOffers {
10
11
  payload: Dictionary<any>;
11
- all: Dictionary<any>[];
12
+ all: [VCLOffer];
12
13
  responseCode: number;
13
14
  sessionToken: VCLToken;
14
15
  challenge: string;
@@ -1 +1 @@
1
- {"version":3,"file":"VCLOffers.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/VCLOffers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;IACzB,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,QAAQ,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"VCLOffers.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/VCLOffers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;IACzB,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,QAAQ,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -11,6 +11,10 @@ export declare enum VCLErrorCode {
11
11
  CredentialSubjectContextMissing = "credential_subject_context_missing",
12
12
  InvalidCredentialSubjectType = "invalid_credential_subject_type",
13
13
  InvalidCredentialSubjectContext = "invalid_credential_subject_context",
14
- IssuerUnexpectedPermissionFailure = "issuer_unexpected_permission_failure"
14
+ IssuerUnexpectedPermissionFailure = "issuer_unexpected_permission_failure",
15
+ MismatchedRequestIssuerDid = "mismatched_request_issuer_did",
16
+ MismatchedOfferIssuerDid = "mismatched_offer_issuer_did",
17
+ MismatchedCredentialIssuerDid = "mismatched_credential_issuer_did",
18
+ MismatchedPresentationRequestInspectorDid = "mismatched_presentation_request_inspector_did"
15
19
  }
16
20
  //# sourceMappingURL=VCLErrorCode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VCLErrorCode.d.ts","sourceRoot":"","sources":["../../../../../src/api/entities/error/VCLErrorCode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,YAAY;IAEtB,2BAA2B,mCAAmC;IAC9D,gCAAgC,wCAAwC;IACxE,8BAA8B,sCAAsC;IACpE,+BAA+B,uCAAuC;IACtE,4BAA4B,oCAAoC;IAChE,+BAA+B,uCAAuC;IACtE,iCAAiC,yCAAyC;CAC3E"}
1
+ {"version":3,"file":"VCLErrorCode.d.ts","sourceRoot":"","sources":["../../../../../src/api/entities/error/VCLErrorCode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,YAAY;IAEtB,2BAA2B,mCAAmC;IAC9D,gCAAgC,wCAAwC;IACxE,8BAA8B,sCAAsC;IACpE,+BAA+B,uCAAuC;IACtE,4BAA4B,oCAAoC;IAChE,+BAA+B,uCAAuC;IACtE,iCAAiC,yCAAyC;IAE1E,0BAA0B,kCAAkC;IAC5D,wBAAwB,gCAAgC;IACxD,6BAA6B,qCAAqC;IAClE,yCAAyC,kDAAkD;CAC5F"}
@@ -37,6 +37,7 @@ import type { VCLGenerateOffersDescriptor } from './api/entities/VCLGenerateOffe
37
37
  import type { VCLJwt } from './api/entities/VCLJwt';
38
38
  import type { VCLJwtVerifiableCredentials } from './api/entities/VCLJwtVerifiableCredentials';
39
39
  import type { VCLOffers } from './api/entities/VCLOffers';
40
+ import type { VCLOffer } from './api/entities/VCLOffer';
40
41
  import type { VCLOrganization } from './api/entities/VCLOrganization';
41
42
  import type { VCLOrganizations } from './api/entities/VCLOrganizations';
42
43
  import type { VCLOrganizationsSearchDescriptor } from './api/entities/VCLOrganizationsSearchDescriptor';
@@ -65,5 +66,5 @@ import { VCLStatusCode } from './api/entities/error/VCLStatusCode';
65
66
  import { VCLErrorCode } from './api/entities/error/VCLErrorCode';
66
67
  export default VclApi;
67
68
  export { VCLEnvironment, VCLCryptoServiceType, VCLXVnfProtocolVersion, VCLCountryCodes, VCLServiceType, VCLIssuingType, VCLError, VCLStatusCode, VCLErrorCode, };
68
- export type { Dictionary, VCLCountry, VCLCountries, VCLRegion, VCLRegions, VCLCredentialManifest, VCLCredentialManifestDescriptor, VCLCredentialManifestDescriptorByDeepLink, VCLCredentialManifestDescriptorByService, VCLCredentialType, VCLCredentialTypes, VCLCredentialTypeSchema, VCLCredentialTypeSchemas, VCLCredentialTypesUIFormSchema, VCLCredentialTypesUIFormSchemaDescriptor, VCLCredentialManifestDescriptorRefresh, VCLDeepLink, VCLExchange, VCLExchangeDescriptor, VCLFilter, VCLFinalizeOffersDescriptor, VCLGenerateOffersDescriptor, VCLJwt, VCLJwtVerifiableCredentials, VCLOffers, VCLOrganization, VCLOrganizations, VCLOrganizationsSearchDescriptor, VCLPage, VCLPresentationRequest, VCLPresentationSubmission, VCLPublicJwk, VCLPushDelegate, VCLService, VCLServiceCredentialAgentIssuer, VCLServiceTypes, VCLSubmissionResult, VCLToken, VCLVerifiableCredential, VCLVerifiedProfile, VCLVerifiedProfileDescriptor, VCLInitializationDescriptor, VCLPresentationRequestDescriptor, VCLJwtDescriptor, VCLDidJwk, VCLCryptoServicesDescriptor, VCLJwtServiceUrls, VCLKeyServiceUrls, VCLRemoteCryptoServicesUrlsDescriptor, };
69
+ export type { Dictionary, VCLCountry, VCLCountries, VCLRegion, VCLRegions, VCLCredentialManifest, VCLCredentialManifestDescriptor, VCLCredentialManifestDescriptorByDeepLink, VCLCredentialManifestDescriptorByService, VCLCredentialType, VCLCredentialTypes, VCLCredentialTypeSchema, VCLCredentialTypeSchemas, VCLCredentialTypesUIFormSchema, VCLCredentialTypesUIFormSchemaDescriptor, VCLCredentialManifestDescriptorRefresh, VCLDeepLink, VCLExchange, VCLExchangeDescriptor, VCLFilter, VCLFinalizeOffersDescriptor, VCLGenerateOffersDescriptor, VCLJwt, VCLJwtVerifiableCredentials, VCLOffers, VCLOffer, VCLOrganization, VCLOrganizations, VCLOrganizationsSearchDescriptor, VCLPage, VCLPresentationRequest, VCLPresentationSubmission, VCLPublicJwk, VCLPushDelegate, VCLService, VCLServiceCredentialAgentIssuer, VCLServiceTypes, VCLSubmissionResult, VCLToken, VCLVerifiableCredential, VCLVerifiedProfile, VCLVerifiedProfileDescriptor, VCLInitializationDescriptor, VCLPresentationRequestDescriptor, VCLJwtDescriptor, VCLDidJwk, VCLCryptoServicesDescriptor, VCLJwtServiceUrls, VCLKeyServiceUrls, VCLRemoteCryptoServicesUrlsDescriptor, };
69
70
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;AAC7G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,qEAAqE,CAAC;AACjI,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,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AO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEjE,eAAe,MAAM,CAAC;AACtB,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,cAAc,EACd,cAAc,EACd,QAAQ,EACR,aAAa,EACb,YAAY,GACb,CAAC;AACF,YAAY,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,+BAA+B,EAC/B,yCAAyC,EACzC,wCAAwC,EACxC,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,wCAAwC,EACxC,sCAAsC,EACtC,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,SAAS,EACT,2BAA2B,EAC3B,2BAA2B,EAC3B,MAAM,EACN,2BAA2B,EAC3B,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,gCAAgC,EAChC,OAAO,EACP,sBAAsB,EACtB,yBAAyB,EACzB,YAAY,EACZ,eAAe,EACf,UAAU,EACV,+BAA+B,EAC/B,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,uBAAuB,EACvB,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,gCAAgC,EAChC,gBAAgB,EAChB,SAAS,EACT,2BAA2B,EAC3B,iBAAiB,EACjB,iBAAiB,EACjB,qCAAqC,GACtC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAA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2BAA2B,EAC3B,SAAS,EACT,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,gCAAgC,EAChC,OAAO,EACP,sBAAsB,EACtB,yBAAyB,EACzB,YAAY,EACZ,eAAe,EACf,UAAU,EACV,+BAA+B,EAC/B,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,uBAAuB,EACvB,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,gCAAgC,EAChC,gBAAgB,EAChB,SAAS,EACT,2BAA2B,EAC3B,iBAAiB,EACjB,iBAAiB,EACjB,qCAAqC,GACtC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velocitycareerlabs/vcl-react-native",
3
- "version": "1.20.1",
3
+ "version": "1.21.1",
4
4
  "description": "Velocity Career Labs React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -5,6 +5,7 @@
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
 
8
+ import type { VCLDeepLink } from './VCLDeepLink';
8
9
  import type { VCLJwt } from './VCLJwt';
9
10
  import type { VCLVerifiedProfile } from './VCLVerifiedProfile';
10
11
 
@@ -12,6 +13,7 @@ export interface VCLCredentialManifest {
12
13
  jwt: VCLJwt;
13
14
  vendorOriginContext?: String;
14
15
  verifiedProfile: VCLVerifiedProfile;
16
+ deepLink?: VCLDeepLink;
15
17
  iss: string;
16
18
  did: string;
17
19
  exchangeId: string;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Created by Michael Avoyan.
3
+ *
4
+ * Copyright 2022 Velocity Career Labs inc.
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+
8
+ import type { Dictionary } from '../Dictionary';
9
+
10
+ export interface VCLOffer {
11
+ payload: Dictionary<any>;
12
+ id: string;
13
+ }
@@ -6,11 +6,12 @@
6
6
  */
7
7
 
8
8
  import type { Dictionary } from '../Dictionary';
9
+ import type { VCLOffer } from './VCLOffer';
9
10
  import type { VCLToken } from './VCLToken';
10
11
 
11
12
  export interface VCLOffers {
12
13
  payload: Dictionary<any>;
13
- all: Dictionary<any>[];
14
+ all: [VCLOffer];
14
15
  responseCode: number;
15
16
  sessionToken: VCLToken;
16
17
  challenge: string;
@@ -14,4 +14,9 @@ export enum VCLErrorCode {
14
14
  InvalidCredentialSubjectType = 'invalid_credential_subject_type',
15
15
  InvalidCredentialSubjectContext = 'invalid_credential_subject_context',
16
16
  IssuerUnexpectedPermissionFailure = 'issuer_unexpected_permission_failure',
17
+ // DID consistent with the Deep Link
18
+ MismatchedRequestIssuerDid = 'mismatched_request_issuer_did',
19
+ MismatchedOfferIssuerDid = 'mismatched_offer_issuer_did',
20
+ MismatchedCredentialIssuerDid = 'mismatched_credential_issuer_did',
21
+ MismatchedPresentationRequestInspectorDid = 'mismatched_presentation_request_inspector_did',
17
22
  }
package/src/index.tsx CHANGED
@@ -38,6 +38,7 @@ import type { VCLGenerateOffersDescriptor } from './api/entities/VCLGenerateOffe
38
38
  import type { VCLJwt } from './api/entities/VCLJwt';
39
39
  import type { VCLJwtVerifiableCredentials } from './api/entities/VCLJwtVerifiableCredentials';
40
40
  import type { VCLOffers } from './api/entities/VCLOffers';
41
+ import type { VCLOffer } from './api/entities/VCLOffer';
41
42
  import type { VCLOrganization } from './api/entities/VCLOrganization';
42
43
  import type { VCLOrganizations } from './api/entities/VCLOrganizations';
43
44
  import type { VCLOrganizationsSearchDescriptor } from './api/entities/VCLOrganizationsSearchDescriptor';
@@ -103,6 +104,7 @@ export type {
103
104
  VCLJwt,
104
105
  VCLJwtVerifiableCredentials,
105
106
  VCLOffers,
107
+ VCLOffer,
106
108
  VCLOrganization,
107
109
  VCLOrganizations,
108
110
  VCLOrganizationsSearchDescriptor,
@@ -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", "1.20.1"
22
+ s.dependency "VCL", "1.21.1"
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.
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- </Workspace>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>IDEDidComputeMac32BitWarning</key>
6
- <true/>
7
- </dict>
8
- </plist>
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>VclReactNative.xcscheme_^#shared#^_</key>
8
- <dict>
9
- <key>orderHint</key>
10
- <integer>0</integer>
11
- </dict>
12
- </dict>
13
- </dict>
14
- </plist>