@reclaimprotocol/inapp-rn-sdk 0.18.0 → 0.24.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 +4 -27
- package/android/build.gradle +8 -59
- package/android/src/main/AndroidManifest.xml +1 -2
- package/android/src/main/java/com/reclaimprotocol/{inapp_rn_sdk → inapprnsdk}/InappRnSdkModule.kt +21 -1
- package/android/src/main/java/com/reclaimprotocol/{inapp_rn_sdk → inapprnsdk}/InappRnSdkPackage.kt +1 -1
- package/android/src/main/java/com/reclaimprotocol/{inapp_rn_sdk → inapprnsdk}/JsonExtension.kt +1 -1
- package/expo-plugin/src/index.ts +1 -1
- package/ios/InappRnSdk-Bridging-Header.h +0 -1
- package/ios/InappRnSdk.h +2 -13
- package/ios/InappRnSdk.mm +22 -3
- package/ios/inapp_rn_sdk/Api.swift +7 -0
- package/lib/module/NativeInappRnSdk.js.map +1 -0
- package/lib/module/index.js +16 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/expo-plugin/src/android/index.d.ts +3 -0
- package/lib/typescript/expo-plugin/src/android/index.d.ts.map +1 -0
- package/lib/typescript/expo-plugin/src/android/withReclaimAndroidManifest.d.ts +3 -0
- package/lib/typescript/expo-plugin/src/android/withReclaimAndroidManifest.d.ts.map +1 -0
- package/lib/typescript/expo-plugin/src/android/withReclaimProjectBuildGradle.d.ts +3 -0
- package/lib/typescript/expo-plugin/src/android/withReclaimProjectBuildGradle.d.ts.map +1 -0
- package/lib/typescript/expo-plugin/src/index.d.ts +4 -0
- package/lib/typescript/expo-plugin/src/index.d.ts.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/{commonjs/src/specs → src}/NativeInappRnSdk.d.ts +16 -9
- package/lib/typescript/src/NativeInappRnSdk.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → src}/index.d.ts +5 -1
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +83 -129
- package/src/{specs/NativeInappRnSdk.ts → NativeInappRnSdk.ts} +17 -9
- package/src/{index.ts → index.tsx} +32 -1
- package/android/generated/java/com/reclaimprotocol/inapp_rn_sdk/NativeInappRnSdkSpec.java +0 -99
- package/android/generated/jni/CMakeLists.txt +0 -36
- package/android/generated/jni/RNInappRnSdkSpec-generated.cpp +0 -88
- package/android/generated/jni/RNInappRnSdkSpec.h +0 -31
- package/android/generated/jni/react/renderer/components/RNInappRnSdkSpec/RNInappRnSdkSpecJSI-generated.cpp +0 -85
- package/android/generated/jni/react/renderer/components/RNInappRnSdkSpec/RNInappRnSdkSpecJSI.h +0 -1348
- package/android/src/main/AndroidManifestNew.xml +0 -2
- package/ios/generated/RNInappRnSdkSpec/RNInappRnSdkSpec-generated.mm +0 -197
- package/ios/generated/RNInappRnSdkSpec/RNInappRnSdkSpec.h +0 -494
- package/ios/generated/RNInappRnSdkSpecJSI-generated.cpp +0 -85
- package/ios/generated/RNInappRnSdkSpecJSI.h +0 -1348
- package/lib/commonjs/index.js +0 -389
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/specs/NativeInappRnSdk.js +0 -24
- package/lib/commonjs/specs/NativeInappRnSdk.js.map +0 -1
- package/lib/module/specs/NativeInappRnSdk.js.map +0 -1
- package/lib/typescript/commonjs/package.json +0 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/specs/NativeInappRnSdk.d.ts.map +0 -1
- package/lib/typescript/module/src/index.d.ts +0 -192
- package/lib/typescript/module/src/index.d.ts.map +0 -1
- package/lib/typescript/module/src/specs/NativeInappRnSdk.d.ts +0 -345
- package/lib/typescript/module/src/specs/NativeInappRnSdk.d.ts.map +0 -1
- package/react-native.config.js +0 -12
- /package/lib/module/{specs/NativeInappRnSdk.js → NativeInappRnSdk.js} +0 -0
- /package/lib/{typescript/module → module}/package.json +0 -0
package/package.json
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reclaimprotocol/inapp-rn-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.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
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"module": "./lib/module/index.js",
|
|
8
|
-
"types": "./lib/typescript/module/src/index.d.ts",
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
9
7
|
"exports": {
|
|
10
8
|
".": {
|
|
11
|
-
"source": "./src/index.
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
"default": "./lib/module/index.js"
|
|
15
|
-
},
|
|
16
|
-
"require": {
|
|
17
|
-
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
18
|
-
"default": "./lib/commonjs/index.js"
|
|
19
|
-
}
|
|
9
|
+
"source": "./src/index.tsx",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
20
12
|
},
|
|
21
13
|
"./app.plugin.js": "./app.plugin.js",
|
|
22
14
|
"./package.json": "./package.json"
|
|
@@ -43,18 +35,16 @@
|
|
|
43
35
|
"!**/.*"
|
|
44
36
|
],
|
|
45
37
|
"scripts": {
|
|
46
|
-
"user-workspace": "yarn workspace @reclaimprotocol/inapp-rn-sdk-
|
|
47
|
-
"test": "jest",
|
|
48
|
-
"typecheck": "tsc",
|
|
49
|
-
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
50
|
-
"android:gen:specs": "cd user-workspace/android && ./gradlew :app:invokeLibraryCodegen",
|
|
51
|
-
"ios:gen:specs": "cd user-workspace/ios && bundle install && bundle exec pod install",
|
|
52
|
-
"gen:specs": "npx react-native codegen",
|
|
38
|
+
"user-workspace": "yarn workspace @reclaimprotocol/inapp-rn-sdk-example",
|
|
53
39
|
"clean": "del-cli android/build user-workspace/android/build user-workspace/android/app/build user-workspace/ios/build lib",
|
|
54
40
|
"prepare": "bob build && npm run build:expo:plugin",
|
|
55
|
-
"
|
|
41
|
+
"typecheck": "tsc",
|
|
42
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
43
|
+
"release": "release-it --only-version",
|
|
56
44
|
"build:expo:plugin": "tsc -p ./expo-plugin/tsconfig.json",
|
|
57
|
-
"
|
|
45
|
+
"gen:ios": "(cd user-workspace/ios; bundle install; bundle exec pod install;)",
|
|
46
|
+
"gen:android": "(cd user-workspace/android; ./gradlew generateCodegenArtifactsFromSchema;)",
|
|
47
|
+
"test": "jest"
|
|
58
48
|
},
|
|
59
49
|
"keywords": [
|
|
60
50
|
"react-native",
|
|
@@ -63,42 +53,40 @@
|
|
|
63
53
|
],
|
|
64
54
|
"repository": {
|
|
65
55
|
"type": "git",
|
|
66
|
-
"url": "git+https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk.git
|
|
56
|
+
"url": "git+https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk.git"
|
|
67
57
|
},
|
|
68
58
|
"author": "Reclaim Protocol (https://reclaimprotocol.org)",
|
|
69
59
|
"license": "MIT",
|
|
70
60
|
"bugs": {
|
|
71
|
-
"url": "https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk
|
|
61
|
+
"url": "https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/issues"
|
|
72
62
|
},
|
|
73
|
-
"homepage": "https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk
|
|
63
|
+
"homepage": "https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk#readme",
|
|
74
64
|
"publishConfig": {
|
|
75
65
|
"registry": "https://registry.npmjs.org/"
|
|
76
66
|
},
|
|
77
67
|
"devDependencies": {
|
|
78
|
-
"@
|
|
79
|
-
"@
|
|
80
|
-
"@
|
|
81
|
-
"@
|
|
82
|
-
"@react-native/
|
|
83
|
-
"@
|
|
84
|
-
"@
|
|
85
|
-
"@
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"eslint
|
|
90
|
-
"eslint-
|
|
68
|
+
"@eslint/compat": "^1.3.2",
|
|
69
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
70
|
+
"@eslint/js": "^9.35.0",
|
|
71
|
+
"@expo/config-plugins": "^54.0.2",
|
|
72
|
+
"@react-native-community/cli": "20.0.1",
|
|
73
|
+
"@react-native/babel-preset": "0.81.1",
|
|
74
|
+
"@react-native/eslint-config": "^0.81.1",
|
|
75
|
+
"@release-it/conventional-changelog": "^10.0.1",
|
|
76
|
+
"@types/jest": "^29.5.14",
|
|
77
|
+
"@types/react": "^19.1.0",
|
|
78
|
+
"del-cli": "^6.0.0",
|
|
79
|
+
"eslint": "^9.35.0",
|
|
80
|
+
"eslint-config-prettier": "^10.1.8",
|
|
81
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
91
82
|
"jest": "^29.7.0",
|
|
92
|
-
"prettier": "^
|
|
93
|
-
"react": "
|
|
94
|
-
"react-native": "0.
|
|
95
|
-
"react-native-builder-bob": "^0.
|
|
96
|
-
"release-it": "^
|
|
97
|
-
"turbo": "^
|
|
98
|
-
"typescript": "^5.
|
|
99
|
-
},
|
|
100
|
-
"resolutions": {
|
|
101
|
-
"@types/react": "^18.2.44"
|
|
83
|
+
"prettier": "^2.8.8",
|
|
84
|
+
"react": "19.1.0",
|
|
85
|
+
"react-native": "0.81.1",
|
|
86
|
+
"react-native-builder-bob": "^0.40.15",
|
|
87
|
+
"release-it": "^19.0.4",
|
|
88
|
+
"turbo": "^2.5.6",
|
|
89
|
+
"typescript": "^5.9.2"
|
|
102
90
|
},
|
|
103
91
|
"peerDependencies": {
|
|
104
92
|
"react": "*",
|
|
@@ -107,77 +95,11 @@
|
|
|
107
95
|
"workspaces": [
|
|
108
96
|
"user-workspace"
|
|
109
97
|
],
|
|
110
|
-
"packageManager": "yarn@
|
|
111
|
-
"jest": {
|
|
112
|
-
"preset": "react-native",
|
|
113
|
-
"modulePathIgnorePatterns": [
|
|
114
|
-
"<rootDir>/user-workspace/node_modules",
|
|
115
|
-
"<rootDir>/samples/",
|
|
116
|
-
"<rootDir>/lib/"
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
"commitlint": {
|
|
120
|
-
"extends": [
|
|
121
|
-
"@commitlint/config-conventional"
|
|
122
|
-
]
|
|
123
|
-
},
|
|
124
|
-
"release-it": {
|
|
125
|
-
"git": {
|
|
126
|
-
"commitMessage": "chore: release ${version}",
|
|
127
|
-
"tagName": "v${version}"
|
|
128
|
-
},
|
|
129
|
-
"npm": {
|
|
130
|
-
"publish": true
|
|
131
|
-
},
|
|
132
|
-
"github": {
|
|
133
|
-
"release": true
|
|
134
|
-
},
|
|
135
|
-
"plugins": {
|
|
136
|
-
"@release-it/conventional-changelog": {}
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
"eslintConfig": {
|
|
140
|
-
"root": true,
|
|
141
|
-
"extends": [
|
|
142
|
-
"@react-native",
|
|
143
|
-
"prettier"
|
|
144
|
-
],
|
|
145
|
-
"rules": {
|
|
146
|
-
"react/react-in-jsx-scope": "off",
|
|
147
|
-
"prettier/prettier": [
|
|
148
|
-
"error",
|
|
149
|
-
{
|
|
150
|
-
"quoteProps": "consistent",
|
|
151
|
-
"singleQuote": true,
|
|
152
|
-
"tabWidth": 2,
|
|
153
|
-
"trailingComma": "es5",
|
|
154
|
-
"useTabs": false
|
|
155
|
-
}
|
|
156
|
-
]
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
"eslintIgnore": [
|
|
160
|
-
"node_modules/",
|
|
161
|
-
"lib/"
|
|
162
|
-
],
|
|
163
|
-
"prettier": {
|
|
164
|
-
"quoteProps": "consistent",
|
|
165
|
-
"singleQuote": true,
|
|
166
|
-
"tabWidth": 2,
|
|
167
|
-
"trailingComma": "es5",
|
|
168
|
-
"useTabs": false
|
|
169
|
-
},
|
|
98
|
+
"packageManager": "yarn@4.11.0",
|
|
170
99
|
"react-native-builder-bob": {
|
|
171
100
|
"source": "src",
|
|
172
101
|
"output": "lib",
|
|
173
102
|
"targets": [
|
|
174
|
-
"codegen",
|
|
175
|
-
[
|
|
176
|
-
"commonjs",
|
|
177
|
-
{
|
|
178
|
-
"esm": true
|
|
179
|
-
}
|
|
180
|
-
],
|
|
181
103
|
[
|
|
182
104
|
"module",
|
|
183
105
|
{
|
|
@@ -187,28 +109,60 @@
|
|
|
187
109
|
[
|
|
188
110
|
"typescript",
|
|
189
111
|
{
|
|
190
|
-
"project": "tsconfig.build.json"
|
|
191
|
-
"esm": true
|
|
112
|
+
"project": "tsconfig.build.json"
|
|
192
113
|
}
|
|
193
114
|
]
|
|
194
115
|
]
|
|
195
116
|
},
|
|
196
117
|
"codegenConfig": {
|
|
197
|
-
"name": "
|
|
118
|
+
"name": "InappRnSdkSpec",
|
|
198
119
|
"type": "modules",
|
|
199
|
-
"jsSrcsDir": "src
|
|
200
|
-
"outputDir": {
|
|
201
|
-
"ios": "ios/generated",
|
|
202
|
-
"android": "android/generated"
|
|
203
|
-
},
|
|
120
|
+
"jsSrcsDir": "src",
|
|
204
121
|
"android": {
|
|
205
|
-
"javaPackageName": "com.reclaimprotocol.
|
|
122
|
+
"javaPackageName": "com.reclaimprotocol.inapprnsdk"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"prettier": {
|
|
126
|
+
"quoteProps": "consistent",
|
|
127
|
+
"singleQuote": true,
|
|
128
|
+
"tabWidth": 2,
|
|
129
|
+
"trailingComma": "es5",
|
|
130
|
+
"useTabs": false
|
|
131
|
+
},
|
|
132
|
+
"release-it": {
|
|
133
|
+
"git": {
|
|
134
|
+
"commitMessage": "chore: release ${version}",
|
|
135
|
+
"tagName": "v${version}"
|
|
206
136
|
},
|
|
207
|
-
"
|
|
137
|
+
"npm": {
|
|
138
|
+
"publish": true
|
|
139
|
+
},
|
|
140
|
+
"github": {
|
|
141
|
+
"release": true
|
|
142
|
+
},
|
|
143
|
+
"plugins": {
|
|
144
|
+
"@release-it/conventional-changelog": {
|
|
145
|
+
"preset": {
|
|
146
|
+
"name": "angular"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"jest": {
|
|
152
|
+
"preset": "react-native",
|
|
153
|
+
"modulePathIgnorePatterns": [
|
|
154
|
+
"<rootDir>/user-workspace/node_modules",
|
|
155
|
+
"<rootDir>/lib/"
|
|
156
|
+
]
|
|
208
157
|
},
|
|
209
158
|
"create-react-native-library": {
|
|
210
|
-
"type": "turbo-module",
|
|
211
159
|
"languages": "kotlin-objc",
|
|
212
|
-
"
|
|
160
|
+
"type": "turbo-module",
|
|
161
|
+
"tools": [
|
|
162
|
+
"eslint",
|
|
163
|
+
"release-it",
|
|
164
|
+
"jest"
|
|
165
|
+
],
|
|
166
|
+
"version": "0.55.0"
|
|
213
167
|
}
|
|
214
|
-
}
|
|
168
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { TurboModule } from 'react-native';
|
|
1
|
+
import type { TurboModule, CodegenTypes } from 'react-native';
|
|
2
2
|
import { TurboModuleRegistry } from 'react-native';
|
|
3
|
-
import type { EventEmitter } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
3
|
|
|
5
4
|
export interface SessionInformation {
|
|
6
5
|
/**
|
|
@@ -307,6 +306,10 @@ export interface SessionUpdateRequestEvent {
|
|
|
307
306
|
* The status type of this session event
|
|
308
307
|
*/
|
|
309
308
|
status: string;
|
|
309
|
+
/**
|
|
310
|
+
* session update metadata as JSON string
|
|
311
|
+
*/
|
|
312
|
+
metadata: string;
|
|
310
313
|
/**
|
|
311
314
|
* internal
|
|
312
315
|
*/
|
|
@@ -359,6 +362,10 @@ export interface VerificationOptionsOptional {
|
|
|
359
362
|
options?: VerificationOptions | null;
|
|
360
363
|
}
|
|
361
364
|
|
|
365
|
+
export interface SetConsoleLoggingOptions {
|
|
366
|
+
enabled: boolean
|
|
367
|
+
}
|
|
368
|
+
|
|
362
369
|
export interface ReclaimAttestorAuthRequest {
|
|
363
370
|
reclaimHttpProviderJsonString: string;
|
|
364
371
|
/**
|
|
@@ -374,18 +381,19 @@ export interface Spec extends TurboModule {
|
|
|
374
381
|
setOverrides(overrides: Overrides): Promise<void>;
|
|
375
382
|
clearAllOverrides(): Promise<void>;
|
|
376
383
|
setVerificationOptions(args: VerificationOptionsOptional): Promise<void>;
|
|
384
|
+
setConsoleLogging(args: SetConsoleLoggingOptions): Promise<void>;
|
|
377
385
|
reply(replyId: string, reply: boolean): void;
|
|
378
386
|
replyWithString(replyId: string, value: string): void;
|
|
379
387
|
ping(): Promise<boolean>;
|
|
380
388
|
|
|
381
|
-
readonly onLogs: EventEmitter<string>
|
|
382
|
-
readonly onSessionLogs: EventEmitter<SessionLogEvent>
|
|
383
|
-
readonly onSessionCreateRequest: EventEmitter<SessionCreateRequestEvent>
|
|
384
|
-
readonly onSessionUpdateRequest: EventEmitter<SessionUpdateRequestEvent>
|
|
385
|
-
readonly onProviderInformationRequest: EventEmitter<ProviderInformationRequest>
|
|
386
|
-
readonly onReclaimAttestorAuthRequest: EventEmitter<ReclaimAttestorAuthRequest>
|
|
389
|
+
readonly onLogs: CodegenTypes.EventEmitter<string>
|
|
390
|
+
readonly onSessionLogs: CodegenTypes.EventEmitter<SessionLogEvent>
|
|
391
|
+
readonly onSessionCreateRequest: CodegenTypes.EventEmitter<SessionCreateRequestEvent>
|
|
392
|
+
readonly onSessionUpdateRequest: CodegenTypes.EventEmitter<SessionUpdateRequestEvent>
|
|
393
|
+
readonly onProviderInformationRequest: CodegenTypes.EventEmitter<ProviderInformationRequest>
|
|
394
|
+
readonly onReclaimAttestorAuthRequest: CodegenTypes.EventEmitter<ReclaimAttestorAuthRequest>
|
|
387
395
|
// unimplemented
|
|
388
|
-
readonly onSessionIdentityUpdate: EventEmitter<ReclaimSessionIdentityUpdate>
|
|
396
|
+
readonly onSessionIdentityUpdate: CodegenTypes.EventEmitter<ReclaimSessionIdentityUpdate>
|
|
389
397
|
}
|
|
390
398
|
|
|
391
399
|
export default TurboModuleRegistry.getEnforcing<Spec>('InappRnSdk');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { EventSubscription } from 'react-native';
|
|
2
|
-
import NativeReclaimInappModule, * as NativeReclaimInappModuleTypes from './
|
|
2
|
+
import NativeReclaimInappModule, * as NativeReclaimInappModuleTypes from './NativeInappRnSdk';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* [ReclaimVerification] is the main class for interacting with the Reclaim verification system.
|
|
5
6
|
* It provides methods to start verification processes, manage platform configurations,
|
|
@@ -59,6 +60,14 @@ export class ReclaimVerification {
|
|
|
59
60
|
) {
|
|
60
61
|
return this.platform.setVerificationOptions(options);
|
|
61
62
|
}
|
|
63
|
+
|
|
64
|
+
public setConsoleLogging(
|
|
65
|
+
enabled: boolean
|
|
66
|
+
) {
|
|
67
|
+
return this.platform.setConsoleLogging({
|
|
68
|
+
enabled: enabled == true,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
62
71
|
}
|
|
63
72
|
|
|
64
73
|
/**
|
|
@@ -167,6 +176,9 @@ export namespace ReclaimVerification {
|
|
|
167
176
|
isCloseButtonVisible?: boolean; // Optional
|
|
168
177
|
}
|
|
169
178
|
|
|
179
|
+
export type SetConsoleLoggingOptions =
|
|
180
|
+
NativeReclaimInappModuleTypes.SetConsoleLoggingOptions;
|
|
181
|
+
|
|
170
182
|
export namespace Overrides {
|
|
171
183
|
export interface ProviderInformation {
|
|
172
184
|
url?: string;
|
|
@@ -365,6 +377,10 @@ export namespace ReclaimVerification {
|
|
|
365
377
|
abstract setVerificationOptions(
|
|
366
378
|
options?: ReclaimVerification.VerificationOptions | null
|
|
367
379
|
): Promise<void>;
|
|
380
|
+
|
|
381
|
+
abstract setConsoleLogging(
|
|
382
|
+
options?: ReclaimVerification.SetConsoleLoggingOptions | null
|
|
383
|
+
): Promise<void>;
|
|
368
384
|
}
|
|
369
385
|
}
|
|
370
386
|
|
|
@@ -645,4 +661,19 @@ export class PlatformImpl extends ReclaimVerification.Platform {
|
|
|
645
661
|
);
|
|
646
662
|
}
|
|
647
663
|
}
|
|
664
|
+
|
|
665
|
+
override async setConsoleLogging(
|
|
666
|
+
options?: ReclaimVerification.SetConsoleLoggingOptions | null
|
|
667
|
+
): Promise<void> {
|
|
668
|
+
try {
|
|
669
|
+
return await NativeReclaimInappModule.setConsoleLogging({
|
|
670
|
+
enabled: options?.enabled == true,
|
|
671
|
+
});
|
|
672
|
+
} catch (error) {
|
|
673
|
+
throw new ReclaimVerification.ReclaimPlatformException(
|
|
674
|
+
'Failed to set console logging',
|
|
675
|
+
error as Error
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
648
679
|
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJavaSpec.js
|
|
9
|
-
*
|
|
10
|
-
* @nolint
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
package com.reclaimprotocol.inapp_rn_sdk;
|
|
14
|
-
|
|
15
|
-
import com.facebook.proguard.annotations.DoNotStrip;
|
|
16
|
-
import com.facebook.react.bridge.Promise;
|
|
17
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
18
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
19
|
-
import com.facebook.react.bridge.ReactMethod;
|
|
20
|
-
import com.facebook.react.bridge.ReadableMap;
|
|
21
|
-
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
|
|
22
|
-
import javax.annotation.Nonnull;
|
|
23
|
-
|
|
24
|
-
public abstract class NativeInappRnSdkSpec extends ReactContextBaseJavaModule implements TurboModule {
|
|
25
|
-
public static final String NAME = "InappRnSdk";
|
|
26
|
-
|
|
27
|
-
public NativeInappRnSdkSpec(ReactApplicationContext reactContext) {
|
|
28
|
-
super(reactContext);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@Override
|
|
32
|
-
public @Nonnull String getName() {
|
|
33
|
-
return NAME;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
protected final void emitOnLogs(String value) {
|
|
37
|
-
mEventEmitterCallback.invoke("onLogs", value);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
protected final void emitOnSessionLogs(ReadableMap value) {
|
|
41
|
-
mEventEmitterCallback.invoke("onSessionLogs", value);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
protected final void emitOnSessionCreateRequest(ReadableMap value) {
|
|
45
|
-
mEventEmitterCallback.invoke("onSessionCreateRequest", value);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
protected final void emitOnSessionUpdateRequest(ReadableMap value) {
|
|
49
|
-
mEventEmitterCallback.invoke("onSessionUpdateRequest", value);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
protected final void emitOnProviderInformationRequest(ReadableMap value) {
|
|
53
|
-
mEventEmitterCallback.invoke("onProviderInformationRequest", value);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
protected final void emitOnReclaimAttestorAuthRequest(ReadableMap value) {
|
|
57
|
-
mEventEmitterCallback.invoke("onReclaimAttestorAuthRequest", value);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
protected final void emitOnSessionIdentityUpdate(ReadableMap value) {
|
|
61
|
-
mEventEmitterCallback.invoke("onSessionIdentityUpdate", value);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
@ReactMethod
|
|
65
|
-
@DoNotStrip
|
|
66
|
-
public abstract void startVerification(ReadableMap request, Promise promise);
|
|
67
|
-
|
|
68
|
-
@ReactMethod
|
|
69
|
-
@DoNotStrip
|
|
70
|
-
public abstract void startVerificationFromUrl(String requestUrl, Promise promise);
|
|
71
|
-
|
|
72
|
-
@ReactMethod
|
|
73
|
-
@DoNotStrip
|
|
74
|
-
public abstract void startVerificationFromJson(String templateJsonString, Promise promise);
|
|
75
|
-
|
|
76
|
-
@ReactMethod
|
|
77
|
-
@DoNotStrip
|
|
78
|
-
public abstract void setOverrides(ReadableMap overrides, Promise promise);
|
|
79
|
-
|
|
80
|
-
@ReactMethod
|
|
81
|
-
@DoNotStrip
|
|
82
|
-
public abstract void clearAllOverrides(Promise promise);
|
|
83
|
-
|
|
84
|
-
@ReactMethod
|
|
85
|
-
@DoNotStrip
|
|
86
|
-
public abstract void setVerificationOptions(ReadableMap args, Promise promise);
|
|
87
|
-
|
|
88
|
-
@ReactMethod
|
|
89
|
-
@DoNotStrip
|
|
90
|
-
public abstract void reply(String replyId, boolean reply);
|
|
91
|
-
|
|
92
|
-
@ReactMethod
|
|
93
|
-
@DoNotStrip
|
|
94
|
-
public abstract void replyWithString(String replyId, String value);
|
|
95
|
-
|
|
96
|
-
@ReactMethod
|
|
97
|
-
@DoNotStrip
|
|
98
|
-
public abstract void ping(Promise promise);
|
|
99
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
#
|
|
3
|
-
# This source code is licensed under the MIT license found in the
|
|
4
|
-
# LICENSE file in the root directory of this source tree.
|
|
5
|
-
|
|
6
|
-
cmake_minimum_required(VERSION 3.13)
|
|
7
|
-
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
8
|
-
|
|
9
|
-
file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNInappRnSdkSpec/*.cpp)
|
|
10
|
-
|
|
11
|
-
add_library(
|
|
12
|
-
react_codegen_RNInappRnSdkSpec
|
|
13
|
-
OBJECT
|
|
14
|
-
${react_codegen_SRCS}
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
target_include_directories(react_codegen_RNInappRnSdkSpec PUBLIC . react/renderer/components/RNInappRnSdkSpec)
|
|
18
|
-
|
|
19
|
-
target_link_libraries(
|
|
20
|
-
react_codegen_RNInappRnSdkSpec
|
|
21
|
-
fbjni
|
|
22
|
-
jsi
|
|
23
|
-
# We need to link different libraries based on whether we are building rncore or not, that's necessary
|
|
24
|
-
# because we want to break a circular dependency between react_codegen_rncore and reactnative
|
|
25
|
-
reactnative
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
target_compile_options(
|
|
29
|
-
react_codegen_RNInappRnSdkSpec
|
|
30
|
-
PRIVATE
|
|
31
|
-
-DLOG_TAG=\"ReactNative\"
|
|
32
|
-
-fexceptions
|
|
33
|
-
-frtti
|
|
34
|
-
-std=c++20
|
|
35
|
-
-Wall
|
|
36
|
-
)
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJniCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "RNInappRnSdkSpec.h"
|
|
12
|
-
|
|
13
|
-
namespace facebook::react {
|
|
14
|
-
|
|
15
|
-
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_startVerification(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
16
|
-
static jmethodID cachedMethodId = nullptr;
|
|
17
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "startVerification", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_startVerificationFromUrl(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
21
|
-
static jmethodID cachedMethodId = nullptr;
|
|
22
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "startVerificationFromUrl", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_startVerificationFromJson(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
26
|
-
static jmethodID cachedMethodId = nullptr;
|
|
27
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "startVerificationFromJson", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_setOverrides(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
31
|
-
static jmethodID cachedMethodId = nullptr;
|
|
32
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setOverrides", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_clearAllOverrides(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
36
|
-
static jmethodID cachedMethodId = nullptr;
|
|
37
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "clearAllOverrides", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_setVerificationOptions(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
41
|
-
static jmethodID cachedMethodId = nullptr;
|
|
42
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setVerificationOptions", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_reply(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
46
|
-
static jmethodID cachedMethodId = nullptr;
|
|
47
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "reply", "(Ljava/lang/String;Z)V", args, count, cachedMethodId);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_replyWithString(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
51
|
-
static jmethodID cachedMethodId = nullptr;
|
|
52
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "replyWithString", "(Ljava/lang/String;Ljava/lang/String;)V", args, count, cachedMethodId);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_ping(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
56
|
-
static jmethodID cachedMethodId = nullptr;
|
|
57
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "ping", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
NativeInappRnSdkSpecJSI::NativeInappRnSdkSpecJSI(const JavaTurboModule::InitParams ¶ms)
|
|
61
|
-
: JavaTurboModule(params) {
|
|
62
|
-
methodMap_["startVerification"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkSpecJSI_startVerification};
|
|
63
|
-
methodMap_["startVerificationFromUrl"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkSpecJSI_startVerificationFromUrl};
|
|
64
|
-
methodMap_["startVerificationFromJson"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkSpecJSI_startVerificationFromJson};
|
|
65
|
-
methodMap_["setOverrides"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkSpecJSI_setOverrides};
|
|
66
|
-
methodMap_["clearAllOverrides"] = MethodMetadata {0, __hostFunction_NativeInappRnSdkSpecJSI_clearAllOverrides};
|
|
67
|
-
methodMap_["setVerificationOptions"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkSpecJSI_setVerificationOptions};
|
|
68
|
-
methodMap_["reply"] = MethodMetadata {2, __hostFunction_NativeInappRnSdkSpecJSI_reply};
|
|
69
|
-
methodMap_["replyWithString"] = MethodMetadata {2, __hostFunction_NativeInappRnSdkSpecJSI_replyWithString};
|
|
70
|
-
methodMap_["ping"] = MethodMetadata {0, __hostFunction_NativeInappRnSdkSpecJSI_ping};
|
|
71
|
-
eventEmitterMap_["onLogs"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
|
|
72
|
-
eventEmitterMap_["onSessionLogs"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
|
|
73
|
-
eventEmitterMap_["onSessionCreateRequest"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
|
|
74
|
-
eventEmitterMap_["onSessionUpdateRequest"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
|
|
75
|
-
eventEmitterMap_["onProviderInformationRequest"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
|
|
76
|
-
eventEmitterMap_["onReclaimAttestorAuthRequest"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
|
|
77
|
-
eventEmitterMap_["onSessionIdentityUpdate"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
|
|
78
|
-
setEventEmitterCallback(params.instance);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
std::shared_ptr<TurboModule> RNInappRnSdkSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) {
|
|
82
|
-
if (moduleName == "InappRnSdk") {
|
|
83
|
-
return std::make_shared<NativeInappRnSdkSpecJSI>(params);
|
|
84
|
-
}
|
|
85
|
-
return nullptr;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
} // namespace facebook::react
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJniH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include <ReactCommon/JavaTurboModule.h>
|
|
14
|
-
#include <ReactCommon/TurboModule.h>
|
|
15
|
-
#include <jsi/jsi.h>
|
|
16
|
-
|
|
17
|
-
namespace facebook::react {
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* JNI C++ class for module 'NativeInappRnSdk'
|
|
21
|
-
*/
|
|
22
|
-
class JSI_EXPORT NativeInappRnSdkSpecJSI : public JavaTurboModule {
|
|
23
|
-
public:
|
|
24
|
-
NativeInappRnSdkSpecJSI(const JavaTurboModule::InitParams ¶ms);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
JSI_EXPORT
|
|
29
|
-
std::shared_ptr<TurboModule> RNInappRnSdkSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms);
|
|
30
|
-
|
|
31
|
-
} // namespace facebook::react
|