@finos_sdk/sdk-ekyc 0.0.42 → 0.0.44
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 +354 -75
- package/android/SDKeKYC/finos/sdk/ekyc/c06/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/ekyc/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/ekycui/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/faceservice/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/liveness/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/nfc/1.2.0/nfc-1.2.0-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/nfc/1.2.0/nfc-1.2.0.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/nfc/1.2.0/nfc-1.2.0.module +15 -15
- package/android/SDKeKYC/finos/sdk/ekyc/nfc/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/ocr/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/qrcode/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0.module +10 -10
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/maven-metadata-local.xml +1 -1
- package/android/build.gradle +3 -3
- package/android/src/main/build.gradle +6 -14
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -5,28 +5,32 @@
|
|
|
5
5
|
|
|
6
6
|
React Native SDK for eKYC (electronic Know Your Customer) - Vietnamese CCCD NFC reading, OCR, Liveness detection, Face matching, and C06 residence verification.
|
|
7
7
|
|
|
8
|
+
**Version**: 0.0.44
|
|
9
|
+
|
|
8
10
|
## 🚀 Features
|
|
9
11
|
|
|
12
|
+
- **Unified eKYC Flow** - Complete verification flow with single method call
|
|
10
13
|
- **NFC Reading** - Read Vietnamese CCCD cards with NFC chips
|
|
11
14
|
- **OCR Processing** - Extract data from ID card images
|
|
12
15
|
- **Liveness Detection** - Verify user presence with selfie
|
|
13
16
|
- **Face Matching** - Compare selfie with ID card photo
|
|
14
17
|
- **C06 Verification** - Residence information verification
|
|
18
|
+
- **Flexible Configuration** - Custom styling and retry options
|
|
15
19
|
- **TypeScript Support** - Full type definitions included
|
|
16
20
|
|
|
17
21
|
## 📱 Requirements
|
|
18
22
|
|
|
19
|
-
- React Native 0.
|
|
20
|
-
- Android
|
|
23
|
+
- React Native 0.76+
|
|
24
|
+
- Android 24+ / API Level 24+ (Android platform only)
|
|
21
25
|
- NFC and/or Camera hardware depending on modules used
|
|
22
26
|
- Runtime permissions for Camera and/or NFC
|
|
23
27
|
|
|
24
28
|
## 🛠️ Installation
|
|
25
29
|
|
|
26
30
|
```bash
|
|
27
|
-
npm install @finos_sdk/sdk-ekyc
|
|
31
|
+
npm install @finos_sdk/sdk-ekyc@0.0.44
|
|
28
32
|
# or
|
|
29
|
-
yarn add @finos_sdk/sdk-ekyc
|
|
33
|
+
yarn add @finos_sdk/sdk-ekyc@0.0.44
|
|
30
34
|
```
|
|
31
35
|
|
|
32
36
|
## 📖 Quick Start
|
|
@@ -34,52 +38,89 @@ yarn add @finos_sdk/sdk-ekyc
|
|
|
34
38
|
### 1. Import the SDK
|
|
35
39
|
|
|
36
40
|
```typescript
|
|
37
|
-
import
|
|
38
|
-
import type {
|
|
41
|
+
import { FinosEKYC } from '@finos_sdk/sdk-ekyc';
|
|
42
|
+
import type {
|
|
43
|
+
NfcConfig,
|
|
44
|
+
C06Config,
|
|
45
|
+
OcrConfig,
|
|
46
|
+
LivenessConfig,
|
|
47
|
+
FaceServiceConfig
|
|
48
|
+
} from '@finos_sdk/sdk-ekyc';
|
|
39
49
|
```
|
|
40
50
|
|
|
41
|
-
### 2.
|
|
51
|
+
### 2. Complete eKYC Flow (Recommended)
|
|
52
|
+
|
|
53
|
+
The SDK provides a unified method to handle the complete eKYC flow:
|
|
42
54
|
|
|
43
55
|
```typescript
|
|
44
|
-
import React, {
|
|
56
|
+
import React, { useState } from 'react';
|
|
45
57
|
import { View, Button, Alert } from 'react-native';
|
|
46
|
-
import
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
});
|
|
58
|
+
import { FinosEKYC } from '@finos_sdk/sdk-ekyc';
|
|
59
|
+
|
|
60
|
+
// Configure your app keys
|
|
61
|
+
const AppKey = {
|
|
62
|
+
appKey: 'your-main-app-key',
|
|
63
|
+
appKeyNfc: 'your-nfc-app-key',
|
|
64
|
+
appKeyC06: 'your-c06-app-key',
|
|
65
|
+
appKeyOcr: 'your-ocr-app-key',
|
|
66
|
+
appKeyLiveness: 'your-liveness-app-key',
|
|
67
|
+
appKeyFaceService: 'your-face-service-app-key',
|
|
68
|
+
};
|
|
58
69
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
nfcErrorListener?.remove();
|
|
62
|
-
};
|
|
63
|
-
}, []);
|
|
70
|
+
const EKYCExample = () => {
|
|
71
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
64
72
|
|
|
65
|
-
const
|
|
73
|
+
const handleEkycFlow = async () => {
|
|
66
74
|
try {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
setIsLoading(true);
|
|
76
|
+
|
|
77
|
+
// Initialize SDK first
|
|
78
|
+
await FinosEKYC.initialize();
|
|
79
|
+
|
|
80
|
+
// Start complete eKYC flow
|
|
81
|
+
const result = await FinosEKYC.startEkycUI(
|
|
82
|
+
AppKey.appKey, // Main app key
|
|
83
|
+
['OCR', 'NFC', 'LIVENESS'], // Flow steps
|
|
84
|
+
'vi', // Language ('vi' | 'en')
|
|
85
|
+
'test-transaction-123', // Transaction ID
|
|
86
|
+
AppKey, // All app keys
|
|
87
|
+
{ countMaxRetry: 3 }, // Option config
|
|
88
|
+
{ // Style config
|
|
89
|
+
textSize: 14,
|
|
90
|
+
textColor: 0xff000000,
|
|
91
|
+
toolbarStyle: {
|
|
92
|
+
textSize: 26,
|
|
93
|
+
textColor: 0xff007AFF,
|
|
94
|
+
},
|
|
95
|
+
titleStyle: {
|
|
96
|
+
textSize: 26,
|
|
97
|
+
textColor: 0xff34C759,
|
|
98
|
+
},
|
|
99
|
+
instructionStyle: {
|
|
100
|
+
textSize: 24,
|
|
101
|
+
textColor: 0xffFF6B35,
|
|
102
|
+
},
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
console.log('eKYC Result:', result);
|
|
107
|
+
Alert.alert('Success', 'eKYC completed successfully!');
|
|
108
|
+
|
|
75
109
|
} catch (error) {
|
|
76
|
-
|
|
110
|
+
console.error('eKYC Error:', error);
|
|
111
|
+
Alert.alert('Error', `eKYC failed: ${error}`);
|
|
112
|
+
} finally {
|
|
113
|
+
setIsLoading(false);
|
|
77
114
|
}
|
|
78
115
|
};
|
|
79
116
|
|
|
80
117
|
return (
|
|
81
118
|
<View style={{ padding: 20 }}>
|
|
82
|
-
<Button
|
|
119
|
+
<Button
|
|
120
|
+
title={isLoading ? 'Processing...' : 'Start eKYC Flow'}
|
|
121
|
+
onPress={handleEkycFlow}
|
|
122
|
+
disabled={isLoading}
|
|
123
|
+
/>
|
|
83
124
|
</View>
|
|
84
125
|
);
|
|
85
126
|
};
|
|
@@ -87,6 +128,8 @@ const NFCExample = () => {
|
|
|
87
128
|
|
|
88
129
|
### 3. Android Setup
|
|
89
130
|
|
|
131
|
+
#### 3.1. Add Permissions
|
|
132
|
+
|
|
90
133
|
Add permissions to `android/app/src/main/AndroidManifest.xml`:
|
|
91
134
|
|
|
92
135
|
```xml
|
|
@@ -100,7 +143,47 @@ Add permissions to `android/app/src/main/AndroidManifest.xml`:
|
|
|
100
143
|
android:required="false" />
|
|
101
144
|
```
|
|
102
145
|
|
|
103
|
-
|
|
146
|
+
#### 3.2. Configure Gradle
|
|
147
|
+
|
|
148
|
+
Add the SDK repository to `android/build.gradle`:
|
|
149
|
+
|
|
150
|
+
```gradle
|
|
151
|
+
buildscript {
|
|
152
|
+
ext {
|
|
153
|
+
buildToolsVersion = "35.0.0"
|
|
154
|
+
minSdkVersion = 24
|
|
155
|
+
compileSdkVersion = 35
|
|
156
|
+
targetSdkVersion = 34
|
|
157
|
+
ndkVersion = "26.1.10909125"
|
|
158
|
+
kotlinVersion = "1.9.25"
|
|
159
|
+
}
|
|
160
|
+
repositories {
|
|
161
|
+
google()
|
|
162
|
+
mavenCentral()
|
|
163
|
+
maven { url "https://www.jitpack.io" }
|
|
164
|
+
}
|
|
165
|
+
dependencies {
|
|
166
|
+
classpath("com.android.tools.build:gradle")
|
|
167
|
+
classpath("com.facebook.react:react-native-gradle-plugin")
|
|
168
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Add this section
|
|
173
|
+
allprojects {
|
|
174
|
+
repositories {
|
|
175
|
+
google()
|
|
176
|
+
mavenCentral()
|
|
177
|
+
mavenLocal()
|
|
178
|
+
// Add Finos SDK local repository
|
|
179
|
+
maven {
|
|
180
|
+
url uri("file://${rootProject.projectDir}/../node_modules/@finos_sdk/sdk-ekyc/android/SDKeKYC")
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### 3.3. Clean and Build
|
|
104
187
|
|
|
105
188
|
```bash
|
|
106
189
|
cd android
|
|
@@ -113,11 +196,43 @@ npx react-native run-android
|
|
|
113
196
|
|
|
114
197
|
For complete documentation, examples, and API reference, see:
|
|
115
198
|
|
|
116
|
-
- [📖 Full Integration Guide](./Document/
|
|
117
|
-
- [🔧
|
|
199
|
+
- [📖 Full UI Integration Guide](./Document/DOC_eKYC_SDK_UI_ReactNative_Integration.md) - Complete eKYC flow
|
|
200
|
+
- [🔧 Individual Module Guide](./Document/DOC_eKYC_SDK_ReactNative_Integration.md) - Event-based API
|
|
118
201
|
- [📋 Event Types](./Document/DOC_eKYC_SDK_ReactNative_Integration.md#event-types-and-callbacks)
|
|
119
202
|
|
|
120
|
-
## 🎯
|
|
203
|
+
## 🎯 Flexible Module Configuration
|
|
204
|
+
|
|
205
|
+
You can customize which modules to use in the eKYC flow:
|
|
206
|
+
|
|
207
|
+
### Single Module
|
|
208
|
+
|
|
209
|
+
```typescript
|
|
210
|
+
// OCR only
|
|
211
|
+
await FinosEKYC.startEkycUI(AppKey.appKey, ['OCR'], 'vi', transactionId, AppKey, optionConfig, styleConfig);
|
|
212
|
+
|
|
213
|
+
// NFC only
|
|
214
|
+
await FinosEKYC.startEkycUI(AppKey.appKey, ['NFC'], 'vi', transactionId, AppKey, optionConfig, styleConfig);
|
|
215
|
+
|
|
216
|
+
// Liveness only
|
|
217
|
+
await FinosEKYC.startEkycUI(AppKey.appKey, ['LIVENESS'], 'vi', transactionId, AppKey, optionConfig, styleConfig);
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Multiple Modules
|
|
221
|
+
|
|
222
|
+
```typescript
|
|
223
|
+
// OCR + NFC
|
|
224
|
+
await FinosEKYC.startEkycUI(AppKey.appKey, ['OCR', 'NFC'], 'vi', transactionId, AppKey, optionConfig, styleConfig);
|
|
225
|
+
|
|
226
|
+
// NFC + Liveness
|
|
227
|
+
await FinosEKYC.startEkycUI(AppKey.appKey, ['NFC', 'LIVENESS'], 'vi', transactionId, AppKey, optionConfig, styleConfig);
|
|
228
|
+
|
|
229
|
+
// All modules
|
|
230
|
+
await FinosEKYC.startEkycUI(AppKey.appKey, ['OCR', 'NFC', 'LIVENESS'], 'vi', transactionId, AppKey, optionConfig, styleConfig);
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Note**: The modules execute in the order you specify in the array.
|
|
234
|
+
|
|
235
|
+
## 🎯 Individual Module APIs (Advanced)
|
|
121
236
|
|
|
122
237
|
### NFC Scanning
|
|
123
238
|
```typescript
|
|
@@ -177,9 +292,60 @@ const config: C06Config = {
|
|
|
177
292
|
await SdkEkyc.checkC06(config);
|
|
178
293
|
```
|
|
179
294
|
|
|
180
|
-
##
|
|
295
|
+
## ⚙️ Configuration Options
|
|
296
|
+
|
|
297
|
+
### Option Configuration
|
|
298
|
+
|
|
299
|
+
```typescript
|
|
300
|
+
const optionConfig = {
|
|
301
|
+
countMaxRetry: 3 // Maximum retry attempts for each module
|
|
302
|
+
};
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### Style Configuration
|
|
306
|
+
|
|
307
|
+
Customize the UI appearance:
|
|
308
|
+
|
|
309
|
+
```typescript
|
|
310
|
+
const styleConfig = {
|
|
311
|
+
textSize: 14,
|
|
312
|
+
textFont: "",
|
|
313
|
+
textColor: 0xff000000, // Black text
|
|
314
|
+
statusBarBackground: 0,
|
|
315
|
+
backIcon: 0,
|
|
316
|
+
toolbarStyle: {
|
|
317
|
+
textSize: 26,
|
|
318
|
+
textColor: 0xff007AFF, // Blue toolbar
|
|
319
|
+
},
|
|
320
|
+
titleStyle: {
|
|
321
|
+
textSize: 26,
|
|
322
|
+
textColor: 0xff34C759, // Green titles
|
|
323
|
+
},
|
|
324
|
+
instructionStyle: {
|
|
325
|
+
textSize: 24,
|
|
326
|
+
textColor: 0xffFF6B35, // Orange instructions
|
|
327
|
+
},
|
|
328
|
+
};
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
**Color Format**: Use hexadecimal ARGB format (e.g., `0xff000000` for black, `0xffFFFFFF` for white)
|
|
332
|
+
|
|
333
|
+
### App Key Configuration
|
|
334
|
+
|
|
335
|
+
```typescript
|
|
336
|
+
const AppKey = {
|
|
337
|
+
appKey: "your-main-app-key",
|
|
338
|
+
appKeyNfc: "your-nfc-app-key",
|
|
339
|
+
appKeyC06: "your-c06-app-key",
|
|
340
|
+
appKeyOcr: "your-ocr-app-key",
|
|
341
|
+
appKeyLiveness: "your-liveness-app-key",
|
|
342
|
+
appKeyFaceService: "your-face-service-app-key"
|
|
343
|
+
};
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
## 🔧 Event Handling (Advanced)
|
|
181
347
|
|
|
182
|
-
|
|
348
|
+
For event-based individual module control:
|
|
183
349
|
|
|
184
350
|
```typescript
|
|
185
351
|
// Success events
|
|
@@ -193,6 +359,8 @@ SdkEkyc.onOcrError((error) => { /* handle error */ });
|
|
|
193
359
|
SdkEkyc.onLivenessError((error) => { /* handle error */ });
|
|
194
360
|
```
|
|
195
361
|
|
|
362
|
+
**Recommendation**: Use the unified `startEkycUI` method for most use cases instead of individual event-based modules.
|
|
363
|
+
|
|
196
364
|
## 🧪 TypeScript Support
|
|
197
365
|
|
|
198
366
|
Full TypeScript support with comprehensive type definitions:
|
|
@@ -209,47 +377,104 @@ import type {
|
|
|
209
377
|
} from '@finos_sdk/sdk-ekyc';
|
|
210
378
|
```
|
|
211
379
|
|
|
212
|
-
##
|
|
380
|
+
## 🎨 Best Practices
|
|
213
381
|
|
|
214
|
-
|
|
382
|
+
### 1. Initialize SDK First
|
|
215
383
|
|
|
216
|
-
|
|
217
|
-
import { AppState } from 'react-native';
|
|
218
|
-
|
|
219
|
-
useEffect(() => {
|
|
220
|
-
const handleAppStateChange = (nextAppState: string) => {
|
|
221
|
-
if (nextAppState === 'active') {
|
|
222
|
-
SdkEkyc.onResume();
|
|
223
|
-
} else if (nextAppState === 'background') {
|
|
224
|
-
SdkEkyc.onPause();
|
|
225
|
-
}
|
|
226
|
-
};
|
|
384
|
+
Always initialize the SDK before using any modules:
|
|
227
385
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
};
|
|
233
|
-
}, []);
|
|
386
|
+
```typescript
|
|
387
|
+
await FinosEKYC.initialize();
|
|
388
|
+
const sdkInfo = await FinosEKYC.getSDKInfo();
|
|
389
|
+
console.log('SDK Version:', sdkInfo.version);
|
|
234
390
|
```
|
|
235
391
|
|
|
236
|
-
|
|
392
|
+
### 2. Error Handling
|
|
237
393
|
|
|
238
|
-
|
|
394
|
+
Implement comprehensive error handling:
|
|
239
395
|
|
|
240
396
|
```typescript
|
|
241
397
|
try {
|
|
242
|
-
const result = await
|
|
398
|
+
const result = await FinosEKYC.startEkycUI(
|
|
399
|
+
AppKey.appKey,
|
|
400
|
+
['OCR', 'NFC', 'LIVENESS'],
|
|
401
|
+
'vi',
|
|
402
|
+
transactionId,
|
|
403
|
+
AppKey,
|
|
404
|
+
optionConfig,
|
|
405
|
+
styleConfig
|
|
406
|
+
);
|
|
243
407
|
// Handle success
|
|
408
|
+
console.log('eKYC Result:', result);
|
|
244
409
|
} catch (error) {
|
|
245
|
-
console.error('
|
|
246
|
-
|
|
410
|
+
console.error('eKYC Error:', error);
|
|
411
|
+
Alert.alert('Error', `eKYC failed: ${error}`);
|
|
247
412
|
}
|
|
248
413
|
```
|
|
249
414
|
|
|
415
|
+
### 3. Permission Management
|
|
416
|
+
|
|
417
|
+
Request permissions before starting eKYC flow:
|
|
418
|
+
|
|
419
|
+
```typescript
|
|
420
|
+
import { PermissionsAndroid, Platform } from 'react-native';
|
|
421
|
+
|
|
422
|
+
const requestPermissions = async () => {
|
|
423
|
+
if (Platform.OS === 'android') {
|
|
424
|
+
const permissions = [
|
|
425
|
+
PermissionsAndroid.PERMISSIONS.CAMERA,
|
|
426
|
+
PermissionsAndroid.PERMISSIONS.NFC,
|
|
427
|
+
];
|
|
428
|
+
|
|
429
|
+
const granted = await PermissionsAndroid.requestMultiple(permissions);
|
|
430
|
+
return Object.values(granted).every(status => status === 'granted');
|
|
431
|
+
}
|
|
432
|
+
return true;
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
// Use before starting eKYC
|
|
436
|
+
const permissionsGranted = await requestPermissions();
|
|
437
|
+
if (permissionsGranted) {
|
|
438
|
+
await FinosEKYC.startEkycUI(...);
|
|
439
|
+
}
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
### 4. Configuration Management
|
|
443
|
+
|
|
444
|
+
Store configurations in separate files or environment variables:
|
|
445
|
+
|
|
446
|
+
```typescript
|
|
447
|
+
// config.ts
|
|
448
|
+
export const AppKey = {
|
|
449
|
+
appKey: process.env.EKYC_APP_KEY || "your-main-app-key",
|
|
450
|
+
appKeyNfc: process.env.EKYC_NFC_KEY || "your-nfc-app-key",
|
|
451
|
+
// ... other keys
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
export const defaultStyleConfig = {
|
|
455
|
+
textSize: 14,
|
|
456
|
+
textColor: 0xff000000,
|
|
457
|
+
// ... other styles
|
|
458
|
+
};
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### 5. Language Support
|
|
462
|
+
|
|
463
|
+
Support both Vietnamese and English:
|
|
464
|
+
|
|
465
|
+
```typescript
|
|
466
|
+
const [language, setLanguage] = useState<'vi' | 'en'>('vi');
|
|
467
|
+
|
|
468
|
+
// Toggle language
|
|
469
|
+
const toggleLanguage = () => {
|
|
470
|
+
setLanguage(prev => prev === 'vi' ? 'en' : 'vi');
|
|
471
|
+
};
|
|
472
|
+
```
|
|
473
|
+
|
|
250
474
|
## 📞 Support
|
|
251
475
|
|
|
252
|
-
- **
|
|
476
|
+
- **UI Integration Guide**: [Complete eKYC Flow Guide](./Document/DOC_eKYC_SDK_UI_ReactNative_Integration.md)
|
|
477
|
+
- **Module Guide**: [Individual Module Integration](./Document/DOC_eKYC_SDK_ReactNative_Integration.md)
|
|
253
478
|
- **Issues**: [GitHub Issues](https://github.com/finos/sdk-ekyc/issues)
|
|
254
479
|
- **Contact**: SDK provider for app key registration and support
|
|
255
480
|
|
|
@@ -257,20 +482,74 @@ try {
|
|
|
257
482
|
|
|
258
483
|
MIT License - see [LICENSE](LICENSE) file for details.
|
|
259
484
|
|
|
260
|
-
## 🔄 Migration
|
|
485
|
+
## 🔄 Migration Guide
|
|
486
|
+
|
|
487
|
+
### From Version 0.0.30 to 0.0.44
|
|
488
|
+
|
|
489
|
+
**New Features:**
|
|
490
|
+
- Unified `FinosEKYC.startEkycUI()` method for complete flows
|
|
491
|
+
- Flexible module configuration
|
|
492
|
+
- Enhanced styling options
|
|
493
|
+
- Better error handling
|
|
494
|
+
|
|
495
|
+
**Migration Steps:**
|
|
496
|
+
1. Update installation to version 0.0.44
|
|
497
|
+
2. Add Gradle repository configuration (see Android Setup)
|
|
498
|
+
3. Update import statement to use `FinosEKYC` class
|
|
499
|
+
4. Consider using `startEkycUI` instead of individual modules
|
|
500
|
+
5. Update React Native requirement to 0.76+
|
|
501
|
+
|
|
502
|
+
**Before (0.0.30):**
|
|
503
|
+
```typescript
|
|
504
|
+
import SdkEkyc from '@finos_sdk/sdk-ekyc';
|
|
505
|
+
|
|
506
|
+
// Individual module calls with events
|
|
507
|
+
SdkEkyc.onNfcScanSuccess((data) => { ... });
|
|
508
|
+
await SdkEkyc.startNfcScan(config);
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
**After (0.0.44):**
|
|
512
|
+
```typescript
|
|
513
|
+
import { FinosEKYC } from '@finos_sdk/sdk-ekyc';
|
|
514
|
+
|
|
515
|
+
// Unified flow
|
|
516
|
+
const result = await FinosEKYC.startEkycUI(
|
|
517
|
+
AppKey.appKey,
|
|
518
|
+
['OCR', 'NFC', 'LIVENESS'],
|
|
519
|
+
'vi',
|
|
520
|
+
transactionId,
|
|
521
|
+
AppKey,
|
|
522
|
+
optionConfig,
|
|
523
|
+
styleConfig
|
|
524
|
+
);
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
### From Native Android SDK
|
|
261
528
|
|
|
262
529
|
If migrating from the native Android SDK:
|
|
263
530
|
|
|
264
|
-
1. Replace native method calls with
|
|
531
|
+
1. Replace native method calls with `FinosEKYC.startEkycUI()`
|
|
265
532
|
2. Convert callback-based APIs to Promise-based APIs
|
|
266
|
-
3. Use
|
|
267
|
-
4.
|
|
268
|
-
5.
|
|
533
|
+
3. Use React Native's permission system
|
|
534
|
+
4. Configure all modules in a single flow array
|
|
535
|
+
5. Apply styling through `styleConfig` object
|
|
269
536
|
|
|
270
537
|
## 📦 Package Information
|
|
271
538
|
|
|
272
539
|
- **Package**: `@finos_sdk/sdk-ekyc`
|
|
273
|
-
- **Version**: 0.0.
|
|
540
|
+
- **Version**: 0.0.44
|
|
274
541
|
- **Platform**: Android (iOS support planned)
|
|
275
|
-
- **React Native**: 0.
|
|
276
|
-
- **License**: MIT
|
|
542
|
+
- **React Native**: 0.76+
|
|
543
|
+
- **License**: MIT
|
|
544
|
+
- **Repository**: [GitHub](https://github.com/finos/sdk-ekyc)
|
|
545
|
+
|
|
546
|
+
## 🆕 What's New in v0.0.44
|
|
547
|
+
|
|
548
|
+
- ✨ Unified `startEkycUI` method for complete eKYC flows
|
|
549
|
+
- 🎨 Enhanced UI customization with `styleConfig`
|
|
550
|
+
- ⚙️ Flexible module configuration (single or multiple modules)
|
|
551
|
+
- 🔧 Improved error handling and debugging
|
|
552
|
+
- 📦 Better dependency management with local repository support
|
|
553
|
+
- 🏗️ Updated Android build configuration for React Native 0.76+
|
|
554
|
+
- 🌐 Multi-language support (Vietnamese & English)
|
|
555
|
+
- 🔄 Configurable retry options
|
|
Binary file
|
|
Binary file
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
{
|
|
36
36
|
"name": "nfc-1.2.0.aar",
|
|
37
37
|
"url": "nfc-1.2.0.aar",
|
|
38
|
-
"size":
|
|
39
|
-
"sha512": "
|
|
40
|
-
"sha256": "
|
|
41
|
-
"sha1": "
|
|
42
|
-
"md5": "
|
|
38
|
+
"size": 39727,
|
|
39
|
+
"sha512": "eaba6d3632f3349436db6b17d6ce279e1cdce58a559cbddebd75b5ecbaef0a40808e4a2b929f9ffbaddd8b2524cedd5cba1609cf1f4ef653dd87a4a9af934bf2",
|
|
40
|
+
"sha256": "7df880866685c7837a094a433ccd3e0786e6e1172b023146ad8ba0d7ffe7aa18",
|
|
41
|
+
"sha1": "98843c424a9b19a2baca31663601dc13514b252d",
|
|
42
|
+
"md5": "6038fc700234d4ce5b2b5a2f6a01a32d"
|
|
43
43
|
}
|
|
44
44
|
]
|
|
45
45
|
},
|
|
@@ -99,11 +99,11 @@
|
|
|
99
99
|
{
|
|
100
100
|
"name": "nfc-1.2.0.aar",
|
|
101
101
|
"url": "nfc-1.2.0.aar",
|
|
102
|
-
"size":
|
|
103
|
-
"sha512": "
|
|
104
|
-
"sha256": "
|
|
105
|
-
"sha1": "
|
|
106
|
-
"md5": "
|
|
102
|
+
"size": 39727,
|
|
103
|
+
"sha512": "eaba6d3632f3349436db6b17d6ce279e1cdce58a559cbddebd75b5ecbaef0a40808e4a2b929f9ffbaddd8b2524cedd5cba1609cf1f4ef653dd87a4a9af934bf2",
|
|
104
|
+
"sha256": "7df880866685c7837a094a433ccd3e0786e6e1172b023146ad8ba0d7ffe7aa18",
|
|
105
|
+
"sha1": "98843c424a9b19a2baca31663601dc13514b252d",
|
|
106
|
+
"md5": "6038fc700234d4ce5b2b5a2f6a01a32d"
|
|
107
107
|
}
|
|
108
108
|
]
|
|
109
109
|
},
|
|
@@ -119,11 +119,11 @@
|
|
|
119
119
|
{
|
|
120
120
|
"name": "nfc-1.2.0-sources.jar",
|
|
121
121
|
"url": "nfc-1.2.0-sources.jar",
|
|
122
|
-
"size":
|
|
123
|
-
"sha512": "
|
|
124
|
-
"sha256": "
|
|
125
|
-
"sha1": "
|
|
126
|
-
"md5": "
|
|
122
|
+
"size": 7881,
|
|
123
|
+
"sha512": "7e9f928b8a6aff52691c93df5874ebb74246c62185f09b15077b60fe94747aa74e7cad4604016add30b4b01286123c75fb035f24ddf6c88e28a9fe515859535b",
|
|
124
|
+
"sha256": "a92b3608162f3ca009d985b54a391fe404210e26da540affaecb7d8ef599c18f",
|
|
125
|
+
"sha1": "21f7f829b33c097d1076c5a5bae8800441bf9bdb",
|
|
126
|
+
"md5": "07a7f4929b87435f625341325a85bf92"
|
|
127
127
|
}
|
|
128
128
|
]
|
|
129
129
|
},
|
|
Binary file
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
{
|
|
57
57
|
"name": "sdkui-1.2.0.aar",
|
|
58
58
|
"url": "sdkui-1.2.0.aar",
|
|
59
|
-
"size":
|
|
60
|
-
"sha512": "
|
|
61
|
-
"sha256": "
|
|
62
|
-
"sha1": "
|
|
63
|
-
"md5": "
|
|
59
|
+
"size": 1024576,
|
|
60
|
+
"sha512": "cf296fab77ed85ab7feb88b2042c51b805f11e5e358088f1fa08c0f1f2aaa122a3364ce7c2f3730d487cbe55dcd919c0043564bfb586999a86680fb7e4ddd5ec",
|
|
61
|
+
"sha256": "f432a7a87829da060b5ae4ffb0daad92b49929b027c2b92dd6fa4ed490c2096b",
|
|
62
|
+
"sha1": "ced4f430494756f0da61495d1aa16c27aece73fd",
|
|
63
|
+
"md5": "67d7bcd833c2054cd16082bd3914d065"
|
|
64
64
|
}
|
|
65
65
|
]
|
|
66
66
|
},
|
|
@@ -176,11 +176,11 @@
|
|
|
176
176
|
{
|
|
177
177
|
"name": "sdkui-1.2.0.aar",
|
|
178
178
|
"url": "sdkui-1.2.0.aar",
|
|
179
|
-
"size":
|
|
180
|
-
"sha512": "
|
|
181
|
-
"sha256": "
|
|
182
|
-
"sha1": "
|
|
183
|
-
"md5": "
|
|
179
|
+
"size": 1024576,
|
|
180
|
+
"sha512": "cf296fab77ed85ab7feb88b2042c51b805f11e5e358088f1fa08c0f1f2aaa122a3364ce7c2f3730d487cbe55dcd919c0043564bfb586999a86680fb7e4ddd5ec",
|
|
181
|
+
"sha256": "f432a7a87829da060b5ae4ffb0daad92b49929b027c2b92dd6fa4ed490c2096b",
|
|
182
|
+
"sha1": "ced4f430494756f0da61495d1aa16c27aece73fd",
|
|
183
|
+
"md5": "67d7bcd833c2054cd16082bd3914d065"
|
|
184
184
|
}
|
|
185
185
|
]
|
|
186
186
|
},
|
package/android/build.gradle
CHANGED
|
@@ -7,11 +7,11 @@ plugins {
|
|
|
7
7
|
|
|
8
8
|
android {
|
|
9
9
|
namespace 'finos.sdk.ekyc'
|
|
10
|
-
compileSdk
|
|
10
|
+
compileSdk 35
|
|
11
11
|
|
|
12
12
|
defaultConfig {
|
|
13
|
-
minSdkVersion
|
|
14
|
-
targetSdkVersion
|
|
13
|
+
minSdkVersion 24
|
|
14
|
+
targetSdkVersion 34
|
|
15
15
|
consumerProguardFiles 'consumer-rules.pro'
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -5,11 +5,11 @@ plugins {
|
|
|
5
5
|
|
|
6
6
|
android {
|
|
7
7
|
namespace 'finos.sdk.ekyc'
|
|
8
|
-
compileSdk
|
|
8
|
+
compileSdk 35
|
|
9
9
|
|
|
10
10
|
defaultConfig {
|
|
11
|
-
minSdkVersion
|
|
12
|
-
targetSdkVersion
|
|
11
|
+
minSdkVersion 24
|
|
12
|
+
targetSdkVersion 34
|
|
13
13
|
consumerProguardFiles 'consumer-rules.pro'
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -23,17 +23,9 @@ android {
|
|
|
23
23
|
|
|
24
24
|
dependencies {
|
|
25
25
|
implementation 'com.facebook.react:react-android'
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
implementation(
|
|
29
|
-
implementation("finos.sdk.ekyc:ocr:1.2.0")
|
|
30
|
-
implementation("finos.sdk.ekyc:liveness:1.2.0")
|
|
31
|
-
implementation("finos.sdk.ekyc:faceservice:1.2.0")
|
|
32
|
-
implementation("finos.sdk.ekyc:c06:1.2.0")
|
|
33
|
-
implementation("finos.sdk.ekyc:sdkcore:1.2.0")
|
|
34
|
-
implementation("finos.sdk.ekyc:sdkcorecamera:1.2.0")
|
|
35
|
-
implementation("finos.sdk.ekyc:sdkui:1.2.0")
|
|
36
|
-
implementation("finos.sdk.ekyc:qrcode:1.2.0")
|
|
26
|
+
|
|
27
|
+
// Include all Finos SDK AAR files directly
|
|
28
|
+
implementation fileTree(dir: '../SDKeKYC', include: ['**/*.aar'])
|
|
37
29
|
}
|
|
38
30
|
|
|
39
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos_sdk/sdk-ekyc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.44",
|
|
4
4
|
"description": "React Native SDK for eKYC - Vietnamese CCCD NFC reading, OCR, Liveness detection, Face matching, and C06 residence verification",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -49,8 +49,9 @@
|
|
|
49
49
|
"npm-install": "npm install",
|
|
50
50
|
"build": "tsc",
|
|
51
51
|
"prepare": "npm run build",
|
|
52
|
-
"publish-sdk-local": "npm
|
|
53
|
-
"publish-sdk": "npm run build && npm
|
|
52
|
+
"publish-sdk-local": "npm pack",
|
|
53
|
+
"publish-sdk": "npm run build && npm publish --access public",
|
|
54
|
+
"publish-sdk-version": "npm run build && npm version patch --force && npm publish --access public",
|
|
54
55
|
"prepublishOnly": "npm run build"
|
|
55
56
|
},
|
|
56
57
|
"dependencies": {
|