@velocitycareerlabs/vcl-react-native 2.4.3 → 2.4.5
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.
- package/README.md +10 -6
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt +9 -5
- package/ios/Utils/Converter.swift +8 -4
- package/lib/typescript/src/api/Dictionary.d.ts +1 -3
- package/lib/typescript/src/api/Dictionary.d.ts.map +1 -1
- package/lib/typescript/src/api/entities/VCLCredentialManifest.d.ts +1 -1
- package/lib/typescript/src/api/entities/VCLCredentialTypes.d.ts +2 -2
- package/lib/typescript/src/api/entities/VCLCredentialTypes.d.ts.map +1 -1
- package/lib/typescript/src/api/entities/VCLJwtDescriptor.d.ts +1 -1
- package/lib/typescript/src/api/entities/VCLPresentationRequest.d.ts +2 -2
- package/lib/typescript/src/api/entities/VCLPresentationRequest.d.ts.map +1 -1
- package/lib/typescript/src/api/entities/VCLToken.d.ts +1 -1
- package/package.json +7 -2
- package/src/api/Dictionary.ts +1 -3
- package/src/api/entities/VCLCredentialManifest.ts +1 -1
- package/src/api/entities/VCLCredentialTypes.ts +2 -2
- package/src/api/entities/VCLJwtDescriptor.ts +1 -1
- package/src/api/entities/VCLPresentationRequest.ts +2 -2
- package/src/api/entities/VCLToken.ts +1 -1
- package/velocitycareerlabs-vcl-react-native.podspec +1 -1
package/README.md
CHANGED
|
@@ -5,11 +5,13 @@ Velocity Career Labs React Native SDK
|
|
|
5
5
|
|
|
6
6
|
Android:
|
|
7
7
|
|
|
8
|
-
kotlin version: 1.
|
|
8
|
+
kotlin version: 1.8.0
|
|
9
9
|
|
|
10
|
-
minSdkVersion 24
|
|
10
|
+
minSdkVersion: 24
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
compileSdkVersion: 34
|
|
13
|
+
|
|
14
|
+
targetSdkVersion: 34
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
iOS:
|
|
@@ -23,13 +25,13 @@ React Native:
|
|
|
23
25
|
|
|
24
26
|
react version 18.2.0
|
|
25
27
|
|
|
26
|
-
react native version 0.
|
|
28
|
+
react native version 0.73.6
|
|
27
29
|
|
|
28
30
|
# React Native SDK
|
|
29
31
|
|
|
30
32
|
The React Native SDK is a wrapper of iOS and Android SDKs.
|
|
31
|
-
The minimum supported Android API is
|
|
32
|
-
The iOS target deployment API is
|
|
33
|
+
The minimum supported Android API is 24.
|
|
34
|
+
The iOS target deployment API is 13.0.
|
|
33
35
|
|
|
34
36
|
## Installation
|
|
35
37
|
- Add the path to the Velocity specs to the head of the Pod file in the iOS folder
|
|
@@ -61,3 +63,5 @@ vcl.initialize(initializationDescriptor).then(
|
|
|
61
63
|
}
|
|
62
64
|
);
|
|
63
65
|
```
|
|
66
|
+
|
|
67
|
+
More details can be found [HERE](https://www.velocitynetwork.foundation/main/career-wallets-velocity-sdks#react-native)
|
package/android/build.gradle
CHANGED
|
@@ -186,7 +186,7 @@ object Converter {
|
|
|
186
186
|
fun deepLinkToMap(deepLink: VCLDeepLink?): ReadableMap? {
|
|
187
187
|
deepLink?.value?.let {
|
|
188
188
|
val retVal = Arguments.createMap()
|
|
189
|
-
retVal.putString("value", deepLink
|
|
189
|
+
retVal.putString("value", deepLink.value)
|
|
190
190
|
return retVal
|
|
191
191
|
}
|
|
192
192
|
return null
|
|
@@ -216,7 +216,7 @@ object Converter {
|
|
|
216
216
|
presentationRequestMap: ReadableMap?
|
|
217
217
|
) = VCLPresentationRequest(
|
|
218
218
|
jwt = mapToJwt(presentationRequestMap?.getMapOpt("jwt")),
|
|
219
|
-
|
|
219
|
+
verifiedProfile = mapToVerifiedProfile(presentationRequestMap?.getMapOpt("verifiedProfile")),
|
|
220
220
|
deepLink = mapToDeepLink(presentationRequestMap?.getMapOpt("deepLink")) ?: VCLDeepLink(""),
|
|
221
221
|
pushDelegate = mapToPushDelegate(presentationRequestMap?.getMapOpt("pushDelegate")),
|
|
222
222
|
didJwk = mapToDidJwk(presentationRequestMap?.getMapOpt("didJwk")),
|
|
@@ -230,9 +230,7 @@ object Converter {
|
|
|
230
230
|
val jwtMap = Arguments.createMap()
|
|
231
231
|
jwtMap.putString("encodedJwt", presentationRequest.jwt.encodedJwt)
|
|
232
232
|
presentationRequestMap.putMap("jwt", jwtMap)
|
|
233
|
-
|
|
234
|
-
jwkMap.putString("valueStr", presentationRequest.publicJwk.valueStr)
|
|
235
|
-
presentationRequestMap.putMap("publicJwk", jwkMap)
|
|
233
|
+
presentationRequestMap.putMap("verifiedProfile", verifiedProfileToMap(presentationRequest.verifiedProfile))
|
|
236
234
|
presentationRequestMap.putString("iss", presentationRequest.iss)
|
|
237
235
|
presentationRequestMap.putString("exchangeId", presentationRequest.exchangeId)
|
|
238
236
|
presentationRequestMap.putString(
|
|
@@ -702,6 +700,12 @@ object Converter {
|
|
|
702
700
|
return verifiedProfileMap
|
|
703
701
|
}
|
|
704
702
|
|
|
703
|
+
fun mapToVerifiedProfile(
|
|
704
|
+
verifiedProfileMap: ReadableMap?
|
|
705
|
+
): VCLVerifiedProfile {
|
|
706
|
+
return VCLVerifiedProfile(payload = verifiedProfileMap?.getMapOpt("payload")?.toJsonObject() ?: JSONObject("{}"))
|
|
707
|
+
}
|
|
708
|
+
|
|
705
709
|
fun mapToJwtDescriptor(
|
|
706
710
|
jwtDescriptorDictionary: ReadableMap
|
|
707
711
|
) = VCLJwtDescriptor(
|
|
@@ -215,7 +215,7 @@ func dictionaryToPresentationRequest(
|
|
|
215
215
|
) -> VCLPresentationRequest {
|
|
216
216
|
return VCLPresentationRequest(
|
|
217
217
|
jwt: dictionaryToJwt(presentationRequestDictionary?["jwt"] as? [String : Any]),
|
|
218
|
-
|
|
218
|
+
verifiedProfile: dictionaryToVerifiedProfile(presentationRequestDictionary?["verifiedProfile"] as? [String: Any]),
|
|
219
219
|
deepLink: dictionaryToDeepLink(presentationRequestDictionary?["deepLink"] as? [String : Any]) ?? VCLDeepLink(value: ""),
|
|
220
220
|
pushDelegate: dictionaryToPushDelegate(presentationRequestDictionary?["pushDelegate"] as? [String : Any]),
|
|
221
221
|
didJwk: dictionaryToDidJwk(presentationRequestDictionary?["didJwk"] as? [String : Any]),
|
|
@@ -228,9 +228,7 @@ func presentationRequestToDictionary(
|
|
|
228
228
|
) -> [String: Any] {
|
|
229
229
|
var presentationRequestDictionary = [String: Any]()
|
|
230
230
|
presentationRequestDictionary["jwt"] = ["encodedJwt": presentationRequest.jwt.encodedJwt]
|
|
231
|
-
|
|
232
|
-
publicJwkDictionary["valueStr"] = presentationRequest.publicJwk.valueStr
|
|
233
|
-
presentationRequestDictionary["publicJwk"] = publicJwkDictionary
|
|
231
|
+
presentationRequestDictionary["verifiedProfile"] = verifiedProfileToDictionary(presentationRequest.verifiedProfile)
|
|
234
232
|
presentationRequestDictionary["iss"] = presentationRequest.iss
|
|
235
233
|
presentationRequestDictionary["exchangeId"] = presentationRequest.exchangeId
|
|
236
234
|
presentationRequestDictionary["presentationDefinitionId"] = presentationRequest.presentationDefinitionId
|
|
@@ -645,6 +643,12 @@ func verifiedProfileToDictionary(
|
|
|
645
643
|
return verifiedProfileDictionary
|
|
646
644
|
}
|
|
647
645
|
|
|
646
|
+
func dictionaryToVerifiedProfile(
|
|
647
|
+
_ verifiedProfileDictionary: [String: Any]?
|
|
648
|
+
) -> VCLVerifiedProfile {
|
|
649
|
+
return VCLVerifiedProfile(payload: verifiedProfileDictionary?["payload"] as? [String : Any] ?? [String : Any]())
|
|
650
|
+
}
|
|
651
|
+
|
|
648
652
|
func dictionaryToJwtDescriptor(
|
|
649
653
|
_ jwtDescriptorDictionary: [String: Any]
|
|
650
654
|
) -> VCLJwtDescriptor {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dictionary.d.ts","sourceRoot":"","sources":["../../../../src/api/Dictionary.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI
|
|
1
|
+
{"version":3,"file":"Dictionary.d.ts","sourceRoot":"","sources":["../../../../src/api/Dictionary.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -11,7 +11,7 @@ import type { VCLToken } from './VCLToken';
|
|
|
11
11
|
import type { VCLVerifiedProfile } from './VCLVerifiedProfile';
|
|
12
12
|
export interface VCLCredentialManifest {
|
|
13
13
|
jwt: VCLJwt;
|
|
14
|
-
vendorOriginContext?:
|
|
14
|
+
vendorOriginContext?: string;
|
|
15
15
|
verifiedProfile: VCLVerifiedProfile;
|
|
16
16
|
deepLink?: VCLDeepLink;
|
|
17
17
|
iss: string;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { Dictionary } from '../Dictionary';
|
|
8
8
|
export interface VCLCredentialTypes {
|
|
9
|
-
all: Dictionary<string
|
|
10
|
-
recommendedTypes: Dictionary<string
|
|
9
|
+
all: Array<Dictionary<string>>;
|
|
10
|
+
recommendedTypes: Array<Dictionary<string>>;
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=VCLCredentialTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VCLCredentialTypes.d.ts","sourceRoot":"","sources":["../../../../../src/api/entities/VCLCredentialTypes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,UAAU,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"VCLCredentialTypes.d.ts","sourceRoot":"","sources":["../../../../../src/api/entities/VCLCredentialTypes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/B,gBAAgB,EAAE,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;CAC7C"}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { VCLDidJwk } from './VCLDidJwk';
|
|
8
8
|
import type { VCLJwt } from './VCLJwt';
|
|
9
|
-
import type { VCLPublicJwk } from './VCLPublicJwk';
|
|
10
9
|
import type { VCLToken } from './VCLToken';
|
|
10
|
+
import type { VCLVerifiedProfile } from './VCLVerifiedProfile';
|
|
11
11
|
export interface VCLPresentationRequest {
|
|
12
12
|
exchangeId: string;
|
|
13
13
|
jwt: VCLJwt;
|
|
14
|
-
|
|
14
|
+
verifiedProfile: VCLVerifiedProfile;
|
|
15
15
|
keyID: string;
|
|
16
16
|
presentationDefinitionId: string;
|
|
17
17
|
iss: string;
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,kBAAkB,CAAC;IACpC,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velocitycareerlabs/vcl-react-native",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.5",
|
|
4
4
|
"description": "Velocity Career Labs React Native SDK",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -59,11 +59,16 @@
|
|
|
59
59
|
"@release-it/conventional-changelog": "^8.0.1",
|
|
60
60
|
"@types/jest": "^29.5.5",
|
|
61
61
|
"@types/react": "^18.2.44",
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
|
62
63
|
"commitlint": "^19.1.0",
|
|
63
64
|
"del-cli": "^5.1.0",
|
|
64
|
-
"eslint": "^8.
|
|
65
|
+
"eslint": "^8.0.1",
|
|
65
66
|
"eslint-config-prettier": "^9.0.0",
|
|
67
|
+
"eslint-plugin-import": "^2.25.2",
|
|
68
|
+
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
|
|
66
69
|
"eslint-plugin-prettier": "^5.0.1",
|
|
70
|
+
"eslint-plugin-react": "^7.34.1",
|
|
71
|
+
"eslint-plugin-react-native": "^4.1.0",
|
|
67
72
|
"jest": "^29.7.0",
|
|
68
73
|
"prettier": "^3.0.3",
|
|
69
74
|
"react": "18.2.0",
|
package/src/api/Dictionary.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type { VCLVerifiedProfile } from './VCLVerifiedProfile';
|
|
|
13
13
|
|
|
14
14
|
export interface VCLCredentialManifest {
|
|
15
15
|
jwt: VCLJwt;
|
|
16
|
-
vendorOriginContext?:
|
|
16
|
+
vendorOriginContext?: string;
|
|
17
17
|
verifiedProfile: VCLVerifiedProfile;
|
|
18
18
|
deepLink?: VCLDeepLink;
|
|
19
19
|
iss: string;
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
import type { VCLDidJwk } from './VCLDidJwk';
|
|
9
9
|
import type { VCLJwt } from './VCLJwt';
|
|
10
|
-
import type { VCLPublicJwk } from './VCLPublicJwk';
|
|
11
10
|
import type { VCLToken } from './VCLToken';
|
|
11
|
+
import type { VCLVerifiedProfile } from './VCLVerifiedProfile';
|
|
12
12
|
|
|
13
13
|
export interface VCLPresentationRequest {
|
|
14
14
|
exchangeId: string;
|
|
15
15
|
jwt: VCLJwt;
|
|
16
|
-
|
|
16
|
+
verifiedProfile: VCLVerifiedProfile;
|
|
17
17
|
keyID: string;
|
|
18
18
|
presentationDefinitionId: string;
|
|
19
19
|
iss: string;
|
|
@@ -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.4.
|
|
22
|
+
s.dependency "VCL", "2.4.5"
|
|
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.
|