@velocitycareerlabs/vcl-react-native 2.6.12 → 2.7.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.
- package/android/build.gradle +2 -2
- package/android/src/main/java/io/velocitycareerlabs/reactnative/VclReactNativeModule.kt +24 -0
- package/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt +43 -2
- package/ios/Utils/Converter.swift +37 -0
- package/ios/VclReactNative.mm +5 -0
- package/ios/VclReactNative.swift +17 -1
- package/lib/commonjs/api/VCLApi.js +27 -20
- package/lib/commonjs/api/VCLApi.js.map +1 -1
- package/lib/commonjs/api/entities/VCLAuthToken.js +6 -0
- package/lib/commonjs/api/entities/VCLAuthToken.js.map +1 -0
- package/lib/commonjs/api/entities/VCLAuthTokenDescriptor.js +6 -0
- package/lib/commonjs/api/entities/VCLAuthTokenDescriptor.js.map +1 -0
- package/lib/commonjs/api/entities/VCLServiceType.js +1 -0
- package/lib/commonjs/api/entities/VCLServiceType.js.map +1 -1
- package/lib/commonjs/api/entities/error/VCLErrorCode.js +3 -0
- package/lib/commonjs/api/entities/error/VCLErrorCode.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/module/api/Dictionary.js +1 -1
- package/lib/module/api/VCLApi.js +12 -3
- package/lib/module/api/VCLApi.js.map +1 -1
- package/lib/module/api/VCLCryptoServiceType.js +2 -0
- package/lib/module/api/VCLCryptoServiceType.js.map +1 -1
- package/lib/module/api/VCLEnvironment.js +2 -0
- package/lib/module/api/VCLEnvironment.js.map +1 -1
- package/lib/module/api/VCLSignatureAlgorithm.js +2 -0
- package/lib/module/api/VCLSignatureAlgorithm.js.map +1 -1
- package/lib/module/api/VCLXVnfProtocolVersion.js +2 -0
- package/lib/module/api/VCLXVnfProtocolVersion.js.map +1 -1
- package/lib/module/api/entities/VCLAuthToken.js +4 -0
- package/lib/module/api/entities/VCLAuthToken.js.map +1 -0
- package/lib/module/api/entities/VCLAuthTokenDescriptor.js +4 -0
- package/lib/module/api/entities/VCLAuthTokenDescriptor.js.map +1 -0
- package/lib/module/api/entities/VCLCountries.js +2 -0
- package/lib/module/api/entities/VCLCountries.js.map +1 -1
- package/lib/module/api/entities/VCLCountry.js +2 -0
- package/lib/module/api/entities/VCLCredentialManifest.js +2 -0
- package/lib/module/api/entities/VCLCredentialManifestDescriptor.js +2 -0
- package/lib/module/api/entities/VCLCredentialManifestDescriptorByDeepLink.js +2 -0
- package/lib/module/api/entities/VCLCredentialManifestDescriptorByService.js +2 -0
- package/lib/module/api/entities/VCLCredentialManifestDescriptorRefresh.js +2 -0
- package/lib/module/api/entities/VCLCredentialType.js +2 -0
- package/lib/module/api/entities/VCLCredentialTypeSchema.js +2 -0
- package/lib/module/api/entities/VCLCredentialTypeSchemas.js +2 -0
- package/lib/module/api/entities/VCLCredentialTypes.js +2 -0
- package/lib/module/api/entities/VCLCredentialTypesUIFormSchema.js +2 -0
- package/lib/module/api/entities/VCLCredentialTypesUIFormSchemaDescriptor.js +1 -1
- package/lib/module/api/entities/VCLDeepLink.js +1 -1
- package/lib/module/api/entities/VCLDidJwk.js +2 -0
- package/lib/module/api/entities/VCLDidJwkDescriptor.js +2 -0
- package/lib/module/api/entities/VCLExchange.js +1 -1
- package/lib/module/api/entities/VCLExchangeDescriptor.js +2 -0
- package/lib/module/api/entities/VCLFilter.js +2 -0
- package/lib/module/api/entities/VCLFinalizeOffersDescriptor.js +2 -0
- package/lib/module/api/entities/VCLGenerateOffersDescriptor.js +2 -0
- package/lib/module/api/entities/VCLIssuingType.js +2 -0
- package/lib/module/api/entities/VCLIssuingType.js.map +1 -1
- package/lib/module/api/entities/VCLJwt.js +2 -0
- package/lib/module/api/entities/VCLJwtDescriptor.js +2 -0
- package/lib/module/api/entities/VCLJwtVerifiableCredentials.js +2 -0
- package/lib/module/api/entities/VCLOffer.js +2 -0
- package/lib/module/api/entities/VCLOffers.js +2 -0
- package/lib/module/api/entities/VCLOrganization.js +2 -0
- package/lib/module/api/entities/VCLOrganizations.js +2 -0
- package/lib/module/api/entities/VCLOrganizationsSearchDescriptor.js +2 -0
- package/lib/module/api/entities/VCLPage.js +1 -1
- package/lib/module/api/entities/VCLPresentationRequest.js +2 -0
- package/lib/module/api/entities/VCLPresentationRequestDescriptor.js +2 -0
- package/lib/module/api/entities/VCLPresentationSubmission.js +2 -0
- package/lib/module/api/entities/VCLPublicJwk.js +1 -1
- package/lib/module/api/entities/VCLPushDelegate.js +1 -1
- package/lib/module/api/entities/VCLRegion.js +2 -0
- package/lib/module/api/entities/VCLRegions.js +2 -0
- package/lib/module/api/entities/VCLService.js +2 -0
- package/lib/module/api/entities/VCLServiceType.js +3 -0
- package/lib/module/api/entities/VCLServiceType.js.map +1 -1
- package/lib/module/api/entities/VCLServiceTypes.js +2 -0
- package/lib/module/api/entities/VCLSubmissionResult.js +2 -0
- package/lib/module/api/entities/VCLToken.js +1 -1
- package/lib/module/api/entities/VCLVerifiableCredential.js +1 -1
- package/lib/module/api/entities/VCLVerifiedProfile.js +2 -0
- package/lib/module/api/entities/VCLVerifiedProfileDescriptor.js +1 -1
- package/lib/module/api/entities/error/VCLError.js +2 -0
- package/lib/module/api/entities/error/VCLError.js.map +1 -1
- package/lib/module/api/entities/error/VCLErrorCode.js +5 -0
- package/lib/module/api/entities/error/VCLErrorCode.js.map +1 -1
- package/lib/module/api/entities/error/VCLStatusCode.js +2 -0
- package/lib/module/api/entities/error/VCLStatusCode.js.map +1 -1
- package/lib/module/api/entities/initialization/VCLCryptoServicesDescriptor.js +2 -0
- package/lib/module/api/entities/initialization/VCLInitializationDescriptor.js +2 -0
- package/lib/module/api/entities/initialization/VCLJwtServiceUrls.js +1 -1
- package/lib/module/api/entities/initialization/VCLKeyServiceUrls.js +1 -1
- package/lib/module/api/entities/initialization/VCLRemoteCryptoServicesUrlsDescriptor.js +2 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/api/VCLApi.d.ts +3 -29
- package/lib/typescript/src/api/VCLApi.d.ts.map +1 -1
- package/lib/typescript/src/api/entities/VCLAuthToken.d.ts +17 -0
- package/lib/typescript/src/api/entities/VCLAuthToken.d.ts.map +1 -0
- package/lib/typescript/src/api/entities/VCLAuthTokenDescriptor.d.ts +16 -0
- package/lib/typescript/src/api/entities/VCLAuthTokenDescriptor.d.ts.map +1 -0
- package/lib/typescript/src/api/entities/VCLPresentationRequest.d.ts +1 -0
- package/lib/typescript/src/api/entities/VCLPresentationRequest.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +17 -12
- package/src/api/VCLApi.ts +46 -32
- package/src/api/entities/VCLAuthToken.ts +17 -0
- package/src/api/entities/VCLAuthTokenDescriptor.ts +16 -0
- package/src/api/entities/VCLPresentationRequest.ts +1 -0
- package/src/index.tsx +4 -0
- package/velocitycareerlabs-vcl-react-native.podspec +7 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velocitycareerlabs/vcl-react-native",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "Velocity Career Labs React Native SDK",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"!**/.*"
|
|
27
27
|
],
|
|
28
28
|
"scripts": {
|
|
29
|
+
"check-licenses": "yarn licenses list --production --json | grep table | ./scripts/check-license.js",
|
|
29
30
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
30
31
|
"lint:affected": "nx affected --target=lint",
|
|
31
32
|
"lint:fix": "nx run-many --target=lint:fix --all",
|
|
@@ -55,13 +56,21 @@
|
|
|
55
56
|
"publishConfig": {
|
|
56
57
|
"registry": "https://registry.npmjs.org/"
|
|
57
58
|
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"license-checker": "^25.0.1"
|
|
61
|
+
},
|
|
58
62
|
"devDependencies": {
|
|
63
|
+
"@babel/core": "7.26.0",
|
|
64
|
+
"@babel/preset-env": "7.26.0",
|
|
65
|
+
"@babel/preset-typescript": "7.26.0",
|
|
59
66
|
"@commitlint/config-conventional": "^19.1.0",
|
|
60
67
|
"@evilmartians/lefthook": "^1.5.0",
|
|
68
|
+
"@react-native/babel-preset": "^0.77.0",
|
|
69
|
+
"@react-native/community-cli-plugin": "^0.77.0",
|
|
61
70
|
"@react-native/eslint-config": "^0.74.75",
|
|
62
71
|
"@release-it/conventional-changelog": "^8.0.1",
|
|
63
|
-
"@types/jest": "^29.5.
|
|
64
|
-
"@types/react": "^18.
|
|
72
|
+
"@types/jest": "^29.5.14",
|
|
73
|
+
"@types/react": "^18.3.12",
|
|
65
74
|
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
|
66
75
|
"commitlint": "^19.1.0",
|
|
67
76
|
"del-cli": "^5.1.0",
|
|
@@ -72,10 +81,11 @@
|
|
|
72
81
|
"eslint-config-react-app": "^7.0.1",
|
|
73
82
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
74
83
|
"eslint-plugin-autofix": "^1.1.0",
|
|
84
|
+
"eslint-plugin-ft-flow": "^3.0.11",
|
|
75
85
|
"eslint-plugin-import": "^2.29.1",
|
|
76
86
|
"eslint-plugin-jest": "^28.2.0",
|
|
77
87
|
"eslint-plugin-jsx-a11y": "^6.8.0 ",
|
|
78
|
-
"eslint-plugin-prefer-arrow
|
|
88
|
+
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
79
89
|
"eslint-plugin-prettier": "^5.1.3",
|
|
80
90
|
"eslint-plugin-react": "^7.34.1",
|
|
81
91
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
@@ -84,14 +94,14 @@
|
|
|
84
94
|
"jest": "^29.7.0",
|
|
85
95
|
"prettier": "^3.0.3",
|
|
86
96
|
"react": "18.3.1",
|
|
87
|
-
"react-native": "0.73.
|
|
88
|
-
"react-native-builder-bob": "^0.
|
|
97
|
+
"react-native": "0.73.10",
|
|
98
|
+
"react-native-builder-bob": "^0.40.6",
|
|
89
99
|
"release-it": "^15.0.0",
|
|
90
100
|
"turbo": "^1.10.7",
|
|
91
101
|
"typescript": "^5.2.2"
|
|
92
102
|
},
|
|
93
103
|
"resolutions": {
|
|
94
|
-
"@types/react": "^18.
|
|
104
|
+
"@types/react": "^18.3.12"
|
|
95
105
|
},
|
|
96
106
|
"peerDependencies": {
|
|
97
107
|
"react": "*",
|
|
@@ -122,11 +132,6 @@
|
|
|
122
132
|
},
|
|
123
133
|
"github": {
|
|
124
134
|
"release": true
|
|
125
|
-
},
|
|
126
|
-
"plugins": {
|
|
127
|
-
"@release-it/conventional-changelog": {
|
|
128
|
-
"preset": "angular"
|
|
129
|
-
}
|
|
130
135
|
}
|
|
131
136
|
},
|
|
132
137
|
"eslintConfig": {
|
package/src/api/VCLApi.ts
CHANGED
|
@@ -6,36 +6,39 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { NativeModules } from 'react-native';
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
9
|
+
import {
|
|
10
|
+
type VCLAuthToken,
|
|
11
|
+
type VCLAuthTokenDescriptor,
|
|
12
|
+
type VCLCredentialManifest,
|
|
13
|
+
type VCLCredentialManifestDescriptor,
|
|
14
|
+
type VCLCredentialTypeSchemas,
|
|
15
|
+
type VCLCredentialTypesUIFormSchema,
|
|
16
|
+
type VCLCredentialTypesUIFormSchemaDescriptor,
|
|
17
|
+
type VCLExchange,
|
|
18
|
+
type VCLExchangeDescriptor,
|
|
19
|
+
type VCLFinalizeOffersDescriptor,
|
|
20
|
+
type VCLGenerateOffersDescriptor,
|
|
21
|
+
type VCLJwt,
|
|
22
|
+
type VCLJwtVerifiableCredentials,
|
|
23
|
+
type VCLOffers,
|
|
24
|
+
type VCLOrganizations,
|
|
25
|
+
type VCLOrganizationsSearchDescriptor,
|
|
26
|
+
type VCLPresentationRequest,
|
|
27
|
+
type VCLPresentationSubmission,
|
|
28
|
+
type VCLPublicJwk,
|
|
29
|
+
type VCLToken,
|
|
30
|
+
type VCLVerifiedProfile,
|
|
31
|
+
type VCLVerifiedProfileDescriptor,
|
|
32
|
+
type VCLCountries,
|
|
33
|
+
type VCLInitializationDescriptor,
|
|
34
|
+
type VCLSubmissionResult,
|
|
35
|
+
type VCLPresentationRequestDescriptor,
|
|
36
|
+
type VCLJwtDescriptor,
|
|
37
|
+
type VCLDidJwk,
|
|
38
|
+
type VCLCredentialTypes,
|
|
39
|
+
type VCLDidJwkDescriptor,
|
|
40
|
+
VCLError,
|
|
41
|
+
} from '@velocitycareerlabs/vcl-react-native';
|
|
39
42
|
|
|
40
43
|
const { VclReactNative } = NativeModules;
|
|
41
44
|
|
|
@@ -87,10 +90,11 @@ export const VclApi = {
|
|
|
87
90
|
},
|
|
88
91
|
|
|
89
92
|
submitPresentation: async (
|
|
90
|
-
presentationSubmission: VCLPresentationSubmission
|
|
93
|
+
presentationSubmission: VCLPresentationSubmission,
|
|
94
|
+
authToken?: VCLAuthToken
|
|
91
95
|
): Promise<VCLSubmissionResult> => {
|
|
92
96
|
try {
|
|
93
|
-
return await VclReactNative.submitPresentation(presentationSubmission);
|
|
97
|
+
return await VclReactNative.submitPresentation(presentationSubmission, authToken);
|
|
94
98
|
} catch (e) {
|
|
95
99
|
throw new VCLError(e);
|
|
96
100
|
}
|
|
@@ -168,6 +172,16 @@ export const VclApi = {
|
|
|
168
172
|
}
|
|
169
173
|
},
|
|
170
174
|
|
|
175
|
+
getAuthToken: async (
|
|
176
|
+
authTokenDescriptor: VCLAuthTokenDescriptor,
|
|
177
|
+
): Promise<VCLAuthToken> => {
|
|
178
|
+
try {
|
|
179
|
+
return await VclReactNative.getAuthToken(authTokenDescriptor);
|
|
180
|
+
} catch (e) {
|
|
181
|
+
throw new VCLError(e);
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
|
|
171
185
|
getCredentialTypesUIFormSchema: async (
|
|
172
186
|
credentialTypesUIFormSchemaDescriptor: VCLCredentialTypesUIFormSchemaDescriptor
|
|
173
187
|
): Promise<VCLCredentialTypesUIFormSchema> => {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Michael Avoyan on 17/04/2025.
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2022 Velocity Career Labs inc.
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
import type { Dictionary, VCLToken } from '@velocitycareerlabs/vcl-react-native';
|
|
8
|
+
|
|
9
|
+
export interface VCLAuthToken {
|
|
10
|
+
payload: Dictionary<any>,
|
|
11
|
+
authTokenUri?: string
|
|
12
|
+
walletDid?: string
|
|
13
|
+
relyingPartyDid?: string
|
|
14
|
+
accessToken: VCLToken
|
|
15
|
+
refreshToken: VCLToken
|
|
16
|
+
tokenType: string
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Michael Avoyan on 17/04/2025.
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2022 Velocity Career Labs inc.
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
import type { VCLPresentationRequest, VCLToken } from '@velocitycareerlabs/vcl-react-native';
|
|
8
|
+
|
|
9
|
+
export interface VCLAuthTokenDescriptor {
|
|
10
|
+
authTokenUri?: string
|
|
11
|
+
presentationRequest?: VCLPresentationRequest
|
|
12
|
+
refreshToken?: VCLToken
|
|
13
|
+
walletDid?: string
|
|
14
|
+
relyingPartyDid?: string
|
|
15
|
+
vendorOriginContext?: string
|
|
16
|
+
}
|
package/src/index.tsx
CHANGED
|
@@ -66,6 +66,8 @@ import type { VCLDidJwk } from './api/entities/VCLDidJwk';
|
|
|
66
66
|
import { VCLError } from './api/entities/error/VCLError';
|
|
67
67
|
import { VCLStatusCode } from './api/entities/error/VCLStatusCode';
|
|
68
68
|
import { VCLErrorCode } from './api/entities/error/VCLErrorCode';
|
|
69
|
+
import type { VCLAuthToken } from './api/entities/VCLAuthToken';
|
|
70
|
+
import type { VCLAuthTokenDescriptor } from './api/entities/VCLAuthTokenDescriptor';
|
|
69
71
|
|
|
70
72
|
export default VclApi;
|
|
71
73
|
export {
|
|
@@ -131,4 +133,6 @@ export type {
|
|
|
131
133
|
VCLJwtServiceUrls,
|
|
132
134
|
VCLKeyServiceUrls,
|
|
133
135
|
VCLRemoteCryptoServicesUrlsDescriptor,
|
|
136
|
+
VCLAuthToken,
|
|
137
|
+
VCLAuthTokenDescriptor,
|
|
134
138
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
require "json"
|
|
2
2
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
-
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
4
|
|
|
6
5
|
Pod::Spec.new do |s|
|
|
7
6
|
s.name = "velocitycareerlabs-vcl-react-native"
|
|
@@ -16,33 +15,13 @@ Pod::Spec.new do |s|
|
|
|
16
15
|
|
|
17
16
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
# s.static_framework = true
|
|
18
|
+
s.dependency "VCL", "2.7.1"
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
28
|
-
if respond_to?(:install_modules_dependencies, true)
|
|
29
|
-
install_modules_dependencies(s)
|
|
30
|
-
else
|
|
20
|
+
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
21
|
+
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
22
|
+
if respond_to?(:install_modules_dependencies, true)
|
|
23
|
+
install_modules_dependencies(s)
|
|
24
|
+
else
|
|
31
25
|
s.dependency "React-Core"
|
|
32
|
-
|
|
33
|
-
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
34
|
-
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
35
|
-
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
36
|
-
s.pod_target_xcconfig = {
|
|
37
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
38
|
-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
39
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
40
|
-
}
|
|
41
|
-
s.dependency "React-Codegen"
|
|
42
|
-
s.dependency "RCT-Folly"
|
|
43
|
-
s.dependency "RCTRequired"
|
|
44
|
-
s.dependency "RCTTypeSafety"
|
|
45
|
-
s.dependency "ReactCommon/turbomodule/core"
|
|
46
|
-
end
|
|
47
|
-
end
|
|
26
|
+
end
|
|
48
27
|
end
|