@velocitycareerlabs/vcl-react-native 2.5.7 → 2.6.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.
@@ -92,8 +92,8 @@ dependencies {
92
92
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
93
93
 
94
94
  //--------- Must: be added:
95
- implementation "io.velocitycareerlabs:vcl:2.5.7"
96
- implementation 'com.nimbusds:nimbus-jose-jwt:9.40'
95
+ implementation "io.velocitycareerlabs:vcl:2.6.0"
96
+ implementation 'com.nimbusds:nimbus-jose-jwt:9.41.2'
97
97
  implementation "androidx.security:security-crypto:1.1.0-alpha06"
98
98
  //-------------------------
99
99
  }
@@ -230,7 +230,10 @@ object Converter {
230
230
  val jwtMap = Arguments.createMap()
231
231
  jwtMap.putString("encodedJwt", presentationRequest.jwt.encodedJwt)
232
232
  presentationRequestMap.putMap("jwt", jwtMap)
233
- presentationRequestMap.putMap("verifiedProfile", verifiedProfileToMap(presentationRequest.verifiedProfile))
233
+ presentationRequestMap.putMap(
234
+ "verifiedProfile",
235
+ verifiedProfileToMap(presentationRequest.verifiedProfile)
236
+ )
234
237
  presentationRequestMap.putString("iss", presentationRequest.iss)
235
238
  presentationRequestMap.putString("exchangeId", presentationRequest.exchangeId)
236
239
  presentationRequestMap.putString(
@@ -460,7 +463,7 @@ object Converter {
460
463
  credentialManifestDescriptorByServiceMap: ReadableMap
461
464
  ): VCLCredentialManifestDescriptorByService {
462
465
  return VCLCredentialManifestDescriptorByService(
463
- service = mapToServiceCredentialAgentIssuer(
466
+ service = mapToService(
464
467
  credentialManifestDescriptorByServiceMap.getMapOpt("service")
465
468
  ),
466
469
  issuingType = mapToIssuingType(
@@ -484,7 +487,7 @@ object Converter {
484
487
  credentialManifestDescriptorRefreshMap: ReadableMap
485
488
  ): VCLCredentialManifestDescriptor {
486
489
  return VCLCredentialManifestDescriptorRefresh(
487
- service = mapToServiceCredentialAgentIssuer(
490
+ service = mapToService(
488
491
  credentialManifestDescriptorRefreshMap.getMapOpt("service")
489
492
  ),
490
493
  credentialIds = credentialManifestDescriptorRefreshMap.getArrayOpt("credentialIds")
@@ -496,10 +499,10 @@ object Converter {
496
499
  )
497
500
  }
498
501
 
499
- fun mapToServiceCredentialAgentIssuer(
502
+ fun mapToService(
500
503
  serviceMap: ReadableMap?
501
- ): VCLServiceCredentialAgentIssuer =
502
- VCLServiceCredentialAgentIssuer(
504
+ ): VCLService =
505
+ VCLService(
503
506
  payload = serviceMap?.getMapOpt("payload")?.toJsonObject() ?: JSONObject()
504
507
  )
505
508
 
@@ -706,7 +709,9 @@ object Converter {
706
709
  fun mapToVerifiedProfile(
707
710
  verifiedProfileMap: ReadableMap?
708
711
  ): VCLVerifiedProfile {
709
- return VCLVerifiedProfile(payload = verifiedProfileMap?.getMapOpt("payload")?.toJsonObject() ?: JSONObject("{}"))
712
+ return VCLVerifiedProfile(
713
+ payload = verifiedProfileMap?.getMapOpt("payload")?.toJsonObject() ?: JSONObject("{}")
714
+ )
710
715
  }
711
716
 
712
717
  fun mapToJwtDescriptor(
@@ -8,12 +8,12 @@
8
8
  import Foundation
9
9
 
10
10
  extension Dictionary {
11
- func toJsonString() -> String? {
12
- do {
13
- let jsonData = try JSONSerialization.data(withJSONObject: self, options: [])
14
- return String(data: jsonData, encoding: .utf8)
15
- } catch {
16
- return nil
17
- }
11
+ func toJsonString() -> String? {
12
+ do {
13
+ let jsonData = try JSONSerialization.data(withJSONObject: self, options: [])
14
+ return String(data: jsonData, encoding: .utf8)
15
+ } catch {
16
+ return nil
18
17
  }
18
+ }
19
19
  }
@@ -11,13 +11,13 @@
11
11
  import Foundation
12
12
 
13
13
  extension String {
14
- func toDictionary() -> [String: Any]? {
15
- if let data = self.data(using: .utf8) {
16
- do {
17
- return try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any]
18
- } catch {
19
- }
20
- }
21
- return nil
14
+ func toDictionary() -> [String: Sendable]? {
15
+ if let data = self.data(using: .utf8) {
16
+ do {
17
+ return try JSONSerialization.jsonObject(with: data, options: []) as? [String: Sendable]
18
+ } catch {
19
+ }
22
20
  }
21
+ return nil
22
+ }
23
23
  }
@@ -11,12 +11,12 @@ import Foundation
11
11
  import VCL
12
12
 
13
13
  struct GlobalConfig {
14
-
15
- static var CurrentEnvironment = VCLEnvironment.Prod
16
-
17
- static var IsDebugOn = false
18
-
19
- static let LogTagPrefix = "VCL RN iOS "
20
-
21
- static var IsLoggerOn: Bool { get { CurrentEnvironment != VCLEnvironment.Prod || GlobalConfig.IsDebugOn } }
14
+
15
+ static var CurrentEnvironment = VCLEnvironment.Prod
16
+
17
+ static var IsDebugOn = false
18
+
19
+ static let LogTagPrefix = "VCL RN iOS "
20
+
21
+ static var IsLoggerOn: Bool { get { CurrentEnvironment != VCLEnvironment.Prod || GlobalConfig.IsDebugOn } }
22
22
  }