@reclaimprotocol/inapp-rn-sdk 0.29.0 → 0.36.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.
- package/InappRnSdk.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/reclaimprotocol/inapprnsdk/InappRnSdkModule.kt +4 -1
- package/expo-plugin/build/android/index.js +2 -7
- package/expo-plugin/build/android/withReclaimAndroidManifest.js +10 -16
- package/expo-plugin/build/android/withReclaimProjectBuildGradle.js +12 -52
- package/expo-plugin/build/index.js +7 -9
- package/expo-plugin/tsconfig.json +2 -1
- package/ios/InappRnSdk.mm +16 -1
- package/ios/inapp_rn_sdk/Api.swift +14 -2
- package/lib/module/NativeInappRnSdk.js +6 -6
- package/lib/module/NativeInappRnSdk.js.map +1 -1
- package/lib/module/index.js +37 -5
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/NativeInappRnSdk.d.ts +19 -7
- package/lib/typescript/src/NativeInappRnSdk.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +14 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +26 -20
- package/src/NativeInappRnSdk.ts +44 -29
- package/src/index.tsx +148 -47
- package/lib/typescript/expo-plugin/src/android/index.d.ts +0 -3
- package/lib/typescript/expo-plugin/src/android/index.d.ts.map +0 -1
- package/lib/typescript/expo-plugin/src/android/withReclaimAndroidManifest.d.ts +0 -3
- package/lib/typescript/expo-plugin/src/android/withReclaimAndroidManifest.d.ts.map +0 -1
- package/lib/typescript/expo-plugin/src/android/withReclaimProjectBuildGradle.d.ts +0 -3
- package/lib/typescript/expo-plugin/src/android/withReclaimProjectBuildGradle.d.ts.map +0 -1
- package/lib/typescript/expo-plugin/src/index.d.ts +0 -4
- package/lib/typescript/expo-plugin/src/index.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],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IAAI,CAAC;IAahB,MAAM,CAAC,cAAc,EAAE,MAAM,CAC3B,MAAM,mBAAmB,CAAC,aAAa,CAAC,QAAQ,EAChD,MAAM,CACP,CAEC;IAEO,gBAAgB,CACvB,CAAC,SAAS,MAAM,mBAAmB,CAAC,aAAa,CAAC,QAAQ,EAE1D,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,mBAAmB,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,GAC3D,mBAAmB,CAAC,aAAa,CAAC,uBAAuB;CAoC7D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reclaimprotocol/inapp-rn-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "Reclaim Protocol's InApp React Native SDK for ZK proof generations for requests with an in-app experience of web verification",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -40,6 +40,9 @@
|
|
|
40
40
|
"prepare": "bob build && npm run build:expo:plugin",
|
|
41
41
|
"typecheck": "tsc",
|
|
42
42
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
43
|
+
"format": "prettier --write \"**/*.{js,jsx,ts,tsx}\"",
|
|
44
|
+
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx}\"",
|
|
45
|
+
"check": "yarn lint && yarn format:check",
|
|
43
46
|
"release": "release-it --only-version",
|
|
44
47
|
"build:expo:plugin": "tsc -p ./expo-plugin/tsconfig.json",
|
|
45
48
|
"gen:ios": "(cd user-workspace/ios; bundle install; bundle exec pod install;)",
|
|
@@ -67,28 +70,31 @@
|
|
|
67
70
|
"registry": "https://registry.npmjs.org/"
|
|
68
71
|
},
|
|
69
72
|
"devDependencies": {
|
|
70
|
-
"@eslint/compat": "^
|
|
71
|
-
"@eslint/eslintrc": "^3.3.
|
|
72
|
-
"@eslint/js": "^
|
|
73
|
+
"@eslint/compat": "^2.0.3",
|
|
74
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
75
|
+
"@eslint/js": "^10.0.1",
|
|
73
76
|
"@expo/config-plugins": "^54.0.2",
|
|
77
|
+
"@jest/globals": "^30.0.0",
|
|
74
78
|
"@react-native-community/cli": "20.0.1",
|
|
75
|
-
"@react-native/babel-preset": "0.
|
|
76
|
-
"@react-native/eslint-config": "
|
|
77
|
-
"@release-it/conventional-changelog": "^10.0.
|
|
78
|
-
"@types/jest": "^
|
|
79
|
-
"@types/
|
|
80
|
-
"
|
|
81
|
-
"
|
|
79
|
+
"@react-native/babel-preset": "0.83.0",
|
|
80
|
+
"@react-native/eslint-config": "0.83.0",
|
|
81
|
+
"@release-it/conventional-changelog": "^10.0.6",
|
|
82
|
+
"@types/jest": "^30.0.0",
|
|
83
|
+
"@types/node": "^25.5.2",
|
|
84
|
+
"@types/react": "^19.2.0",
|
|
85
|
+
"del-cli": "^7.0.0",
|
|
86
|
+
"eslint": "^9.39.4",
|
|
82
87
|
"eslint-config-prettier": "^10.1.8",
|
|
83
|
-
"eslint-plugin-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
88
|
+
"eslint-plugin-ft-flow": "^3.0.11",
|
|
89
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
90
|
+
"jest": "^30.3.0",
|
|
91
|
+
"prettier": "^3.8.1",
|
|
86
92
|
"react": "19.1.0",
|
|
87
|
-
"react-native": "0.
|
|
88
|
-
"react-native-builder-bob": "^0.
|
|
89
|
-
"release-it": "^19.
|
|
90
|
-
"turbo": "^2.
|
|
91
|
-
"typescript": "^
|
|
93
|
+
"react-native": "0.83.0",
|
|
94
|
+
"react-native-builder-bob": "^0.41.0",
|
|
95
|
+
"release-it": "^19.2.4",
|
|
96
|
+
"turbo": "^2.8.21",
|
|
97
|
+
"typescript": "^6.0.2"
|
|
92
98
|
},
|
|
93
99
|
"peerDependencies": {
|
|
94
100
|
"react": "*",
|
|
@@ -165,6 +171,6 @@
|
|
|
165
171
|
"release-it",
|
|
166
172
|
"jest"
|
|
167
173
|
],
|
|
168
|
-
"version": "0.
|
|
174
|
+
"version": "0.59.0"
|
|
169
175
|
}
|
|
170
176
|
}
|
package/src/NativeInappRnSdk.ts
CHANGED
|
@@ -25,23 +25,23 @@ export interface SessionInformation {
|
|
|
25
25
|
signature: string;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
* Represents a request for a verification attempt.
|
|
29
|
+
*
|
|
30
|
+
* You can create a request using the [ReclaimVerification.Request] constructor or the [ReclaimVerification.Request.fromManifestMetaData] factory method.
|
|
31
|
+
*/
|
|
32
32
|
export interface Request {
|
|
33
33
|
/**
|
|
34
34
|
* The Reclaim application ID for the verification process.
|
|
35
35
|
* If not provided, the appId will be fetched from:
|
|
36
36
|
* - the `AndroidManifest.xml` metadata along with secret on android:
|
|
37
|
-
*
|
|
37
|
+
*
|
|
38
38
|
* ```xml
|
|
39
39
|
* <meta-data android:name="org.reclaimprotocol.inapp_sdk.APP_ID"
|
|
40
40
|
* android:value="YOUR_RECLAIM_APP_ID" />
|
|
41
41
|
* ```
|
|
42
|
-
*
|
|
42
|
+
*
|
|
43
43
|
* - the `ReclaimInAppSDKParam.ReclaimAppId` in Info.plist along with secret on iOS:
|
|
44
|
-
*
|
|
44
|
+
*
|
|
45
45
|
* ```xml
|
|
46
46
|
* <key>ReclaimInAppSDKParam</key>
|
|
47
47
|
* <dict>
|
|
@@ -58,14 +58,14 @@ export interface Request {
|
|
|
58
58
|
* The Reclaim application secret for the verification process.
|
|
59
59
|
* If not provided, the secret will be fetched from:
|
|
60
60
|
* - the `AndroidManifest.xml` metadata along with appId on android:
|
|
61
|
-
*
|
|
61
|
+
*
|
|
62
62
|
* ```xml
|
|
63
63
|
* <meta-data android:name="org.reclaimprotocol.inapp_sdk.APP_SECRET"
|
|
64
64
|
* android:value="YOUR_RECLAIM_APP_SECRET" />
|
|
65
65
|
* ```
|
|
66
|
-
*
|
|
66
|
+
*
|
|
67
67
|
* - the `ReclaimInAppSDKParam.ReclaimAppSecret` in Info.plist along with appId on iOS:
|
|
68
|
-
*
|
|
68
|
+
*
|
|
69
69
|
* ```xml
|
|
70
70
|
* <key>ReclaimInAppSDKParam</key>
|
|
71
71
|
* <dict>
|
|
@@ -136,8 +136,8 @@ export interface ProviderInformation {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
|
-
* Interface representing Feature Options.
|
|
140
|
-
*/
|
|
139
|
+
* Interface representing Feature Options.
|
|
140
|
+
*/
|
|
141
141
|
export interface FeatureOptions {
|
|
142
142
|
/**
|
|
143
143
|
* Whether to persist a cookie.
|
|
@@ -172,7 +172,7 @@ export interface FeatureOptions {
|
|
|
172
172
|
/**
|
|
173
173
|
* Whether AI flow is enabled.
|
|
174
174
|
* Optional, defaults to null.
|
|
175
|
-
*
|
|
175
|
+
*
|
|
176
176
|
* @deprecated Removed.
|
|
177
177
|
*/
|
|
178
178
|
isAIFlowEnabled?: boolean | null;
|
|
@@ -213,7 +213,22 @@ export interface FeatureOptions {
|
|
|
213
213
|
/**
|
|
214
214
|
* Hosted TEE services Url that participate in Reclaim's TEE+MPC protocol
|
|
215
215
|
*/
|
|
216
|
-
teeUrls?: string | null
|
|
216
|
+
teeUrls?: string | null;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Privacy policy url
|
|
220
|
+
*/
|
|
221
|
+
privacyPolicyUrl?: string | null;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Terms of service url
|
|
225
|
+
*/
|
|
226
|
+
termsOfServiceUrl?: string | null;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Potential failure reasons url
|
|
230
|
+
*/
|
|
231
|
+
potentialFailureReasonsUrl?: string | null;
|
|
217
232
|
}
|
|
218
233
|
|
|
219
234
|
export interface LogConsumer {
|
|
@@ -266,7 +281,7 @@ export interface SessionManagement {
|
|
|
266
281
|
/**
|
|
267
282
|
* Whether to enable SDK session management.
|
|
268
283
|
* Optional, defaults to true.
|
|
269
|
-
*
|
|
284
|
+
*
|
|
270
285
|
* When false, a handler must be provided. We'll not let SDK manage sessions in this case.
|
|
271
286
|
*/
|
|
272
287
|
enableSdkSessionManagement?: boolean;
|
|
@@ -333,7 +348,7 @@ export interface SessionCreateRequestEvent {
|
|
|
333
348
|
export interface SessionUpdateRequestEvent {
|
|
334
349
|
/**
|
|
335
350
|
* The session ID for the verification attempt
|
|
336
|
-
|
|
351
|
+
*/
|
|
337
352
|
sessionId: string;
|
|
338
353
|
/**
|
|
339
354
|
* The status type of this session event
|
|
@@ -350,11 +365,11 @@ export interface SessionUpdateRequestEvent {
|
|
|
350
365
|
}
|
|
351
366
|
|
|
352
367
|
export interface Overrides {
|
|
353
|
-
provider?: ProviderInformation | null
|
|
354
|
-
featureOptions?: FeatureOptions | null
|
|
355
|
-
logConsumer?: LogConsumer | null
|
|
356
|
-
sessionManagement?: SessionManagement | null
|
|
357
|
-
appInfo?: ReclaimAppInfo | null
|
|
368
|
+
provider?: ProviderInformation | null;
|
|
369
|
+
featureOptions?: FeatureOptions | null;
|
|
370
|
+
logConsumer?: LogConsumer | null;
|
|
371
|
+
sessionManagement?: SessionManagement | null;
|
|
372
|
+
appInfo?: ReclaimAppInfo | null;
|
|
358
373
|
capabilityAccessToken?: string | null;
|
|
359
374
|
}
|
|
360
375
|
|
|
@@ -416,7 +431,7 @@ export interface VerificationOptionsOptional {
|
|
|
416
431
|
}
|
|
417
432
|
|
|
418
433
|
export interface SetConsoleLoggingOptions {
|
|
419
|
-
enabled: boolean
|
|
434
|
+
enabled: boolean;
|
|
420
435
|
}
|
|
421
436
|
|
|
422
437
|
export interface ReclaimAttestorAuthRequest {
|
|
@@ -441,14 +456,14 @@ export interface Spec extends TurboModule {
|
|
|
441
456
|
removeEventSubscription(event: string): void;
|
|
442
457
|
ping(): Promise<boolean>;
|
|
443
458
|
|
|
444
|
-
readonly onLogs: CodegenTypes.EventEmitter<string
|
|
445
|
-
readonly onSessionLogs: CodegenTypes.EventEmitter<SessionLogEvent
|
|
446
|
-
readonly onSessionCreateRequest: CodegenTypes.EventEmitter<SessionCreateRequestEvent
|
|
447
|
-
readonly onSessionUpdateRequest: CodegenTypes.EventEmitter<SessionUpdateRequestEvent
|
|
448
|
-
readonly onProviderInformationRequest: CodegenTypes.EventEmitter<ProviderInformationRequest
|
|
449
|
-
readonly onReclaimAttestorAuthRequest: CodegenTypes.EventEmitter<ReclaimAttestorAuthRequest
|
|
459
|
+
readonly onLogs: CodegenTypes.EventEmitter<string>;
|
|
460
|
+
readonly onSessionLogs: CodegenTypes.EventEmitter<SessionLogEvent>;
|
|
461
|
+
readonly onSessionCreateRequest: CodegenTypes.EventEmitter<SessionCreateRequestEvent>;
|
|
462
|
+
readonly onSessionUpdateRequest: CodegenTypes.EventEmitter<SessionUpdateRequestEvent>;
|
|
463
|
+
readonly onProviderInformationRequest: CodegenTypes.EventEmitter<ProviderInformationRequest>;
|
|
464
|
+
readonly onReclaimAttestorAuthRequest: CodegenTypes.EventEmitter<ReclaimAttestorAuthRequest>;
|
|
450
465
|
// unimplemented
|
|
451
|
-
readonly onSessionIdentityUpdate: CodegenTypes.EventEmitter<ReclaimSessionIdentityUpdate
|
|
466
|
+
readonly onSessionIdentityUpdate: CodegenTypes.EventEmitter<ReclaimSessionIdentityUpdate>;
|
|
452
467
|
}
|
|
453
468
|
|
|
454
469
|
export default TurboModuleRegistry.getEnforcing<Spec>('InappRnSdk');
|
package/src/index.tsx
CHANGED
|
@@ -13,6 +13,11 @@ export class ReclaimVerification {
|
|
|
13
13
|
public platform: ReclaimVerification.Platform;
|
|
14
14
|
|
|
15
15
|
private static defaultPlatform: ReclaimVerification.Platform | null = null;
|
|
16
|
+
private static isStrictConfigCheckEnabled: boolean = false;
|
|
17
|
+
private static lastOverrides: ReclaimVerification.OverrideConfig | null =
|
|
18
|
+
null;
|
|
19
|
+
private static lastVerificationOptions: ReclaimVerification.VerificationOptions | null =
|
|
20
|
+
null;
|
|
16
21
|
|
|
17
22
|
public constructor(platform?: ReclaimVerification.Platform) {
|
|
18
23
|
if (platform) {
|
|
@@ -25,21 +30,36 @@ export class ReclaimVerification {
|
|
|
25
30
|
}
|
|
26
31
|
}
|
|
27
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Enables or disables strict configuration checks. When enabled,
|
|
35
|
+
* [startVerification], [startVerificationFromUrl], and [startVerificationFromJson]
|
|
36
|
+
* will throw if any field of [OverrideConfig] was not provided via [setOverrides],
|
|
37
|
+
* or if any option of [VerificationOptions] was not provided via [setVerificationOptions].
|
|
38
|
+
*
|
|
39
|
+
* Disabled by default.
|
|
40
|
+
*/
|
|
41
|
+
public setStrictConfigCheck(enabled: boolean) {
|
|
42
|
+
ReclaimVerification.isStrictConfigCheckEnabled = enabled === true;
|
|
43
|
+
}
|
|
44
|
+
|
|
28
45
|
public async startVerification(
|
|
29
46
|
request: ReclaimVerification.Request
|
|
30
47
|
): Promise<ReclaimVerification.Response> {
|
|
48
|
+
ReclaimVerification.assertStrictConfig();
|
|
31
49
|
return this.platform.startVerification(request);
|
|
32
50
|
}
|
|
33
51
|
|
|
34
52
|
public async startVerificationFromUrl(
|
|
35
53
|
requestUrl: string
|
|
36
54
|
): Promise<ReclaimVerification.Response> {
|
|
55
|
+
ReclaimVerification.assertStrictConfig();
|
|
37
56
|
return this.platform.startVerificationFromUrl(requestUrl);
|
|
38
57
|
}
|
|
39
58
|
|
|
40
59
|
public async startVerificationFromJson(
|
|
41
60
|
template: Record<string, any>
|
|
42
61
|
): Promise<ReclaimVerification.Response> {
|
|
62
|
+
ReclaimVerification.assertStrictConfig();
|
|
43
63
|
return this.platform.startVerificationFromJson(template);
|
|
44
64
|
}
|
|
45
65
|
|
|
@@ -48,16 +68,19 @@ export class ReclaimVerification {
|
|
|
48
68
|
}
|
|
49
69
|
|
|
50
70
|
public setOverrides(overrides: ReclaimVerification.OverrideConfig) {
|
|
71
|
+
ReclaimVerification.lastOverrides = overrides;
|
|
51
72
|
return this.platform.setOverrides(overrides);
|
|
52
73
|
}
|
|
53
74
|
|
|
54
75
|
public clearAllOverrides() {
|
|
76
|
+
ReclaimVerification.lastOverrides = null;
|
|
55
77
|
return this.platform.clearAllOverrides();
|
|
56
78
|
}
|
|
57
79
|
|
|
58
80
|
public setVerificationOptions(
|
|
59
81
|
options?: ReclaimVerification.VerificationOptions | null
|
|
60
82
|
) {
|
|
83
|
+
ReclaimVerification.lastVerificationOptions = options ?? null;
|
|
61
84
|
return this.platform.setVerificationOptions(options);
|
|
62
85
|
}
|
|
63
86
|
|
|
@@ -65,17 +88,61 @@ export class ReclaimVerification {
|
|
|
65
88
|
return this.platform.parseLog(log);
|
|
66
89
|
}
|
|
67
90
|
|
|
68
|
-
public setConsoleLogging(
|
|
69
|
-
enabled: boolean
|
|
70
|
-
) {
|
|
91
|
+
public setConsoleLogging(enabled: boolean) {
|
|
71
92
|
return this.platform.setConsoleLogging({
|
|
72
93
|
enabled: enabled == true,
|
|
73
94
|
});
|
|
74
95
|
}
|
|
75
96
|
|
|
76
|
-
public addEventListener<
|
|
97
|
+
public addEventListener<
|
|
98
|
+
T extends keyof ReclaimVerification.EventListener.EventMap,
|
|
99
|
+
>(
|
|
100
|
+
type: T,
|
|
101
|
+
listener: ReclaimVerification.EventListener.EventListener<T>
|
|
102
|
+
): ReclaimVerification.EventListener.CancelEventSubscription {
|
|
77
103
|
return this.platform.addEventListener(type, listener);
|
|
78
104
|
}
|
|
105
|
+
|
|
106
|
+
private static assertStrictConfig() {
|
|
107
|
+
if (!ReclaimVerification.isStrictConfigCheckEnabled) return;
|
|
108
|
+
|
|
109
|
+
const overrides = ReclaimVerification.lastOverrides;
|
|
110
|
+
const overrideKeys: (keyof ReclaimVerification.OverrideConfig)[] = [
|
|
111
|
+
'provider',
|
|
112
|
+
'featureOptions',
|
|
113
|
+
'logConsumer',
|
|
114
|
+
'sessionManagement',
|
|
115
|
+
'appInfo',
|
|
116
|
+
'capabilityAccessToken',
|
|
117
|
+
];
|
|
118
|
+
const missingOverrides = overrides
|
|
119
|
+
? overrideKeys.filter((k) => overrides[k] === undefined)
|
|
120
|
+
: overrideKeys;
|
|
121
|
+
if (missingOverrides.length > 0) {
|
|
122
|
+
throw new Error(
|
|
123
|
+
`[ReclaimVerification] Strict config check failed: setOverrides was ${overrides ? 'called without' : 'not called with'} the following fields: ${missingOverrides.join(', ')}. Provide values for every field or disable strict mode via setStrictConfigCheck(false).`
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const options = ReclaimVerification.lastVerificationOptions;
|
|
128
|
+
const optionKeys: (keyof ReclaimVerification.VerificationOptions)[] = [
|
|
129
|
+
'canDeleteCookiesBeforeVerificationStarts',
|
|
130
|
+
'fetchAttestorAuthenticationRequest',
|
|
131
|
+
'claimCreationType',
|
|
132
|
+
'canAutoSubmit',
|
|
133
|
+
'isCloseButtonVisible',
|
|
134
|
+
'locale',
|
|
135
|
+
'useTeeOperator',
|
|
136
|
+
];
|
|
137
|
+
const missingOptions = options
|
|
138
|
+
? optionKeys.filter((k) => options[k] === undefined)
|
|
139
|
+
: optionKeys;
|
|
140
|
+
if (missingOptions.length > 0) {
|
|
141
|
+
throw new Error(
|
|
142
|
+
`[ReclaimVerification] Strict config check failed: setVerificationOptions was ${options ? 'called without' : 'not called with'} the following options: ${missingOptions.join(', ')}. Provide values for every option or disable strict mode via setStrictConfigCheck(false).`
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
79
146
|
}
|
|
80
147
|
|
|
81
148
|
/**
|
|
@@ -95,9 +162,13 @@ export namespace ReclaimVerification {
|
|
|
95
162
|
*
|
|
96
163
|
* You can create a request using the [ReclaimVerification.Request] constructor or the [ReclaimVerification.Request.fromManifestMetaData] factory method.
|
|
97
164
|
*/
|
|
98
|
-
export type Request = NativeReclaimInappModuleTypes.Request & {
|
|
165
|
+
export type Request = NativeReclaimInappModuleTypes.Request & {
|
|
166
|
+
providerVersion?: ProviderVersion;
|
|
167
|
+
};
|
|
99
168
|
|
|
100
|
-
export class ProviderVersion
|
|
169
|
+
export class ProviderVersion
|
|
170
|
+
implements NativeReclaimInappModuleTypes.ProviderVersion
|
|
171
|
+
{
|
|
101
172
|
resolvedVersion: string;
|
|
102
173
|
versionExpression: string;
|
|
103
174
|
|
|
@@ -106,8 +177,14 @@ export namespace ReclaimVerification {
|
|
|
106
177
|
this.versionExpression = versionExpression;
|
|
107
178
|
}
|
|
108
179
|
|
|
109
|
-
static resolved(
|
|
110
|
-
|
|
180
|
+
static resolved(
|
|
181
|
+
exactVersion: string,
|
|
182
|
+
versionExpression?: string
|
|
183
|
+
): ProviderVersion {
|
|
184
|
+
return new ProviderVersion(
|
|
185
|
+
exactVersion,
|
|
186
|
+
versionExpression ?? exactVersion
|
|
187
|
+
);
|
|
111
188
|
}
|
|
112
189
|
|
|
113
190
|
static from(versionExpression: string = ''): ProviderVersion {
|
|
@@ -260,19 +337,22 @@ export namespace ReclaimVerification {
|
|
|
260
337
|
}
|
|
261
338
|
|
|
262
339
|
export interface SessionInitResponse {
|
|
263
|
-
sessionId: string
|
|
264
|
-
resolvedProviderVersion: string
|
|
340
|
+
sessionId: string;
|
|
341
|
+
resolvedProviderVersion: string;
|
|
265
342
|
}
|
|
266
343
|
|
|
267
344
|
export type ReclaimAppInfo = NativeReclaimInappModuleTypes.ReclaimAppInfo;
|
|
268
345
|
}
|
|
269
346
|
|
|
270
347
|
export namespace EventListener {
|
|
271
|
-
export type SessionIdentityUpdate =
|
|
348
|
+
export type SessionIdentityUpdate =
|
|
349
|
+
NativeReclaimInappModuleTypes.ReclaimSessionIdentityUpdate;
|
|
272
350
|
export interface EventMap {
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
export type EventListener<T extends keyof EventMap> = (
|
|
351
|
+
sessionIdentityUpdate: SessionIdentityUpdate;
|
|
352
|
+
}
|
|
353
|
+
export type EventListener<T extends keyof EventMap> = (
|
|
354
|
+
event: EventMap[T]
|
|
355
|
+
) => void | Promise<void>;
|
|
276
356
|
export type CancelEventSubscription = () => void;
|
|
277
357
|
}
|
|
278
358
|
|
|
@@ -460,7 +540,7 @@ export namespace ReclaimVerification {
|
|
|
460
540
|
* Log event
|
|
461
541
|
*/
|
|
462
542
|
eventType?: keyof typeof LogEventType | '';
|
|
463
|
-
}
|
|
543
|
+
};
|
|
464
544
|
|
|
465
545
|
export enum ExceptionType {
|
|
466
546
|
Cancelled = 'Cancelled',
|
|
@@ -608,7 +688,12 @@ export namespace ReclaimVerification {
|
|
|
608
688
|
options?: ReclaimVerification.SetConsoleLoggingOptions | null
|
|
609
689
|
): Promise<void>;
|
|
610
690
|
|
|
611
|
-
abstract addEventListener<
|
|
691
|
+
abstract addEventListener<
|
|
692
|
+
T extends keyof ReclaimVerification.EventListener.EventMap,
|
|
693
|
+
>(
|
|
694
|
+
type: T,
|
|
695
|
+
listener: ReclaimVerification.EventListener.EventListener<T>
|
|
696
|
+
): ReclaimVerification.EventListener.CancelEventSubscription;
|
|
612
697
|
}
|
|
613
698
|
}
|
|
614
699
|
|
|
@@ -661,10 +746,13 @@ export class PlatformImpl extends ReclaimVerification.Platform {
|
|
|
661
746
|
}
|
|
662
747
|
}
|
|
663
748
|
|
|
664
|
-
override async startVerificationFromJson(
|
|
749
|
+
override async startVerificationFromJson(
|
|
750
|
+
template: Record<string, any>
|
|
751
|
+
): Promise<ReclaimVerification.Response> {
|
|
665
752
|
try {
|
|
666
|
-
const response =
|
|
667
|
-
|
|
753
|
+
const response = await NativeReclaimInappModule.startVerificationFromJson(
|
|
754
|
+
JSON.stringify(template)
|
|
755
|
+
);
|
|
668
756
|
return {
|
|
669
757
|
...response,
|
|
670
758
|
proofs: ReclaimVerification.ReclaimResult.asProofs(response.proofs),
|
|
@@ -723,10 +811,10 @@ export class PlatformImpl extends ReclaimVerification.Platform {
|
|
|
723
811
|
let providerOverride = !provider
|
|
724
812
|
? null
|
|
725
813
|
: {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
814
|
+
url: provider?.url,
|
|
815
|
+
jsonString: provider?.jsonString,
|
|
816
|
+
canFetchProviderInformationFromHost: !!providerCallback,
|
|
817
|
+
};
|
|
730
818
|
if (providerCallback) {
|
|
731
819
|
this.disposeProviderRequestListener();
|
|
732
820
|
let providerRequestSubscription =
|
|
@@ -749,10 +837,10 @@ export class PlatformImpl extends ReclaimVerification.Platform {
|
|
|
749
837
|
let logConsumerRequest = !logConsumer
|
|
750
838
|
? undefined
|
|
751
839
|
: {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
840
|
+
enableLogHandler: !!onLogsListener,
|
|
841
|
+
canSdkCollectTelemetry: logConsumer?.canSdkCollectTelemetry,
|
|
842
|
+
canSdkPrintLogs: logConsumer?.canSdkPrintLogs,
|
|
843
|
+
};
|
|
756
844
|
if (onLogsListener) {
|
|
757
845
|
this.disposeLogListener();
|
|
758
846
|
const cancel = () => {
|
|
@@ -767,9 +855,9 @@ export class PlatformImpl extends ReclaimVerification.Platform {
|
|
|
767
855
|
let sessionManagementRequest = !sessionManagement
|
|
768
856
|
? undefined
|
|
769
857
|
: {
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
858
|
+
// A handler is provided, so we don't let SDK manage sessions
|
|
859
|
+
enableSdkSessionManagement: false,
|
|
860
|
+
};
|
|
773
861
|
if (sessionManagement) {
|
|
774
862
|
this.disposeSessionManagement();
|
|
775
863
|
let sessionCreateSubscription =
|
|
@@ -777,7 +865,10 @@ export class PlatformImpl extends ReclaimVerification.Platform {
|
|
|
777
865
|
const replyId = event.replyId;
|
|
778
866
|
try {
|
|
779
867
|
let result = await sessionManagement.onSessionCreateRequest(event);
|
|
780
|
-
NativeReclaimInappModule.replyWithString(
|
|
868
|
+
NativeReclaimInappModule.replyWithString(
|
|
869
|
+
replyId,
|
|
870
|
+
JSON.stringify(result)
|
|
871
|
+
);
|
|
781
872
|
} catch (error) {
|
|
782
873
|
console.error(error);
|
|
783
874
|
// Send an empty string to indicate failure
|
|
@@ -850,7 +941,8 @@ export class PlatformImpl extends ReclaimVerification.Platform {
|
|
|
850
941
|
): Promise<void> {
|
|
851
942
|
let args: NativeReclaimInappModuleTypes.VerificationOptions | null = null;
|
|
852
943
|
if (options) {
|
|
853
|
-
let canUseAttestorAuthenticationRequest =
|
|
944
|
+
let canUseAttestorAuthenticationRequest =
|
|
945
|
+
!!options.fetchAttestorAuthenticationRequest;
|
|
854
946
|
args = {
|
|
855
947
|
canDeleteCookiesBeforeVerificationStarts:
|
|
856
948
|
options.canDeleteCookiesBeforeVerificationStarts ?? true,
|
|
@@ -912,9 +1004,7 @@ export class PlatformImpl extends ReclaimVerification.Platform {
|
|
|
912
1004
|
}
|
|
913
1005
|
}
|
|
914
1006
|
|
|
915
|
-
override parseLog(
|
|
916
|
-
log: string
|
|
917
|
-
): ReclaimVerification.LogEntry {
|
|
1007
|
+
override parseLog(log: string): ReclaimVerification.LogEntry {
|
|
918
1008
|
let data = JSON.parse(log) as ReclaimVerification.LogEntry;
|
|
919
1009
|
if (data.ts) {
|
|
920
1010
|
data.datetime = this.fromTimeStampToDate(data.ts);
|
|
@@ -937,23 +1027,34 @@ export class PlatformImpl extends ReclaimVerification.Platform {
|
|
|
937
1027
|
}
|
|
938
1028
|
}
|
|
939
1029
|
|
|
940
|
-
static listenersCount: Record<
|
|
941
|
-
|
|
942
|
-
|
|
1030
|
+
static listenersCount: Record<
|
|
1031
|
+
keyof ReclaimVerification.EventListener.EventMap,
|
|
1032
|
+
number
|
|
1033
|
+
> = {
|
|
1034
|
+
sessionIdentityUpdate: 0,
|
|
1035
|
+
};
|
|
943
1036
|
|
|
944
|
-
override addEventListener<
|
|
1037
|
+
override addEventListener<
|
|
1038
|
+
T extends keyof ReclaimVerification.EventListener.EventMap,
|
|
1039
|
+
>(
|
|
1040
|
+
type: T,
|
|
1041
|
+
listener: ReclaimVerification.EventListener.EventListener<T>
|
|
1042
|
+
): ReclaimVerification.EventListener.CancelEventSubscription {
|
|
945
1043
|
let subscription: EventSubscription;
|
|
946
1044
|
switch (type) {
|
|
947
1045
|
case 'sessionIdentityUpdate':
|
|
948
|
-
subscription = NativeReclaimInappModule.onSessionIdentityUpdate(
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
1046
|
+
subscription = NativeReclaimInappModule.onSessionIdentityUpdate(
|
|
1047
|
+
(param) => {
|
|
1048
|
+
try {
|
|
1049
|
+
listener(param);
|
|
1050
|
+
} catch (_) {
|
|
1051
|
+
// ignore listener errors
|
|
1052
|
+
}
|
|
953
1053
|
}
|
|
954
|
-
|
|
1054
|
+
);
|
|
955
1055
|
NativeReclaimInappModule.startEventSubscription(type);
|
|
956
|
-
PlatformImpl.listenersCount[type] =
|
|
1056
|
+
PlatformImpl.listenersCount[type] =
|
|
1057
|
+
PlatformImpl.listenersCount[type] + 1;
|
|
957
1058
|
break;
|
|
958
1059
|
default:
|
|
959
1060
|
throw new Error('Tried to subscribe to an unknown event');
|
|
@@ -970,7 +1071,7 @@ export class PlatformImpl extends ReclaimVerification.Platform {
|
|
|
970
1071
|
// ignore subscription removal errors
|
|
971
1072
|
}
|
|
972
1073
|
}
|
|
973
|
-
}
|
|
1074
|
+
};
|
|
974
1075
|
|
|
975
1076
|
return cancelSubscription;
|
|
976
1077
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../expo-plugin/src/android/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withReclaimAndroidManifest.d.ts","sourceRoot":"","sources":["../../../../../expo-plugin/src/android/withReclaimAndroidManifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,sBAAsB,CAAC;AAE9E,eAAO,MAAM,0BAA0B,EAAE,YAyCxC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withReclaimProjectBuildGradle.d.ts","sourceRoot":"","sources":["../../../../../expo-plugin/src/android/withReclaimProjectBuildGradle.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,YAAY,EAEpB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,6BAA6B,EAAE,YAgB3C,CAAC"}
|