@finos_sdk/sdk-ekyc 0.0.31 โ†’ 0.0.33

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.
Files changed (56) hide show
  1. package/android/SDKeKYC/finos/sdk/ekyc/c06/maven-metadata-local.xml +1 -1
  2. package/android/SDKeKYC/finos/sdk/ekyc/ekyc/maven-metadata-local.xml +1 -1
  3. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0-javadoc.jar +0 -0
  4. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0-sources.jar +0 -0
  5. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0.aar +0 -0
  6. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0.module +151 -0
  7. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0.pom +43 -0
  8. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/maven-metadata-local.xml +13 -0
  9. package/android/SDKeKYC/finos/sdk/ekyc/faceservice/maven-metadata-local.xml +1 -1
  10. package/android/SDKeKYC/finos/sdk/ekyc/liveness/maven-metadata-local.xml +1 -1
  11. package/android/SDKeKYC/finos/sdk/ekyc/nfc/maven-metadata-local.xml +1 -1
  12. package/android/SDKeKYC/finos/sdk/ekyc/ocr/maven-metadata-local.xml +1 -1
  13. package/android/SDKeKYC/finos/sdk/ekyc/qrcode/maven-metadata-local.xml +1 -1
  14. package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/maven-metadata-local.xml +1 -1
  15. package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/maven-metadata-local.xml +1 -1
  16. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0-javadoc.jar +0 -0
  17. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0-sources.jar +0 -0
  18. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0.aar +0 -0
  19. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0.module +228 -0
  20. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0.pom +103 -0
  21. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/maven-metadata-local.xml +13 -0
  22. package/android/src/main/build/generated/source/buildConfig/debug/com/sdkekycrn/BuildConfig.java +10 -0
  23. package/android/src/main/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
  24. package/android/src/main/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  25. package/android/src/main/build/intermediates/aar_main_jar/debug/syncDebugLibJars/classes.jar +0 -0
  26. package/android/src/main/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  27. package/android/src/main/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  28. package/android/src/main/build/intermediates/annotations_typedef_file/debug/extractDebugAnnotations/typedefs.txt +0 -0
  29. package/android/src/main/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  30. package/android/src/main/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  31. package/android/src/main/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  32. package/android/src/main/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  33. package/android/src/main/build/intermediates/incremental/debug-mergeJavaRes/merge-state +0 -0
  34. package/android/src/main/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  35. package/android/src/main/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  36. package/android/src/main/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  37. package/android/src/main/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/sdkekycrn/BuildConfig.class +0 -0
  38. package/android/src/main/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
  39. package/android/src/main/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
  40. package/android/src/main/build/intermediates/merged_java_res/debug/mergeDebugJavaResource/feature-main.jar +0 -0
  41. package/android/src/main/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
  42. package/android/src/main/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  43. package/android/src/main/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
  44. package/android/src/main/build/outputs/aar/main-debug.aar +0 -0
  45. package/android/src/main/build/outputs/logs/manifest-merger-debug-report.txt +16 -0
  46. package/android/src/main/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  47. package/dist/App.js +481 -12
  48. package/dist/EKYCModule.d.ts +60 -0
  49. package/dist/EKYCModule.js +140 -9
  50. package/dist/index.d.ts +4 -1
  51. package/dist/index.js +7 -2
  52. package/dist/src/modules/FinosEKYCModule.d.ts +206 -0
  53. package/dist/src/modules/FinosEKYCModule.js +352 -0
  54. package/package.json +2 -2
  55. package/src/modules/FinosEKYCModule.ts +450 -0
  56. package/src/modules/README.md +347 -0
@@ -0,0 +1,347 @@
1
+ # Finos eKYC SDK Module v0.0.31
2
+
3
+ A comprehensive React Native module for electronic Know Your Customer (eKYC) operations including Vietnamese CCCD NFC reading, OCR, Liveness detection, Face matching, and C06 residence verification.
4
+
5
+ ## ๐Ÿš€ Features
6
+
7
+ - **๐Ÿ“ก NFC Scanning** - Vietnamese CCCD NFC reading
8
+ - **๐Ÿ  C06 Verification** - Residence verification
9
+ - **๐Ÿ“„ OCR Processing** - Document text recognition
10
+ - **๐Ÿ‘๏ธ Liveness Detection** - Anti-spoofing face verification
11
+ - **๐Ÿ‘ค Face Comparison** - Identity verification through face matching
12
+ - **๐Ÿ”ง SDK Management** - Initialization and lifecycle management
13
+ - **๐Ÿ“ฑ Cross-platform** - Android support with iOS compatibility layer
14
+
15
+ ## ๐Ÿ“ฆ Installation
16
+
17
+ ```bash
18
+ npm install @finos_sdk/sdk-ekyc@0.0.31
19
+ ```
20
+
21
+ ## ๐Ÿ› ๏ธ Setup
22
+
23
+ ### Android Configuration
24
+
25
+ 1. Add permissions to `android/app/src/main/AndroidManifest.xml`:
26
+
27
+ ```xml
28
+ <uses-permission android:name="android.permission.NFC" />
29
+ <uses-permission android:name="android.permission.CAMERA" />
30
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
31
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
32
+ ```
33
+
34
+ 2. Add NFC intent filters:
35
+
36
+ ```xml
37
+ <intent-filter>
38
+ <action android:name="android.nfc.action.TAG_DISCOVERED" />
39
+ <category android:name="android.intent.category.DEFAULT" />
40
+ </intent-filter>
41
+ ```
42
+
43
+ ## ๐Ÿ“– Usage
44
+
45
+ ### Basic Setup
46
+
47
+ ```typescript
48
+ import { finosEKYC } from '@finos_sdk/sdk-ekyc';
49
+
50
+ // Initialize SDK
51
+ await finosEKYC.initialize();
52
+
53
+ // Get SDK info
54
+ const sdkInfo = await finosEKYC.getSDKInfo();
55
+ console.log('SDK Version:', sdkInfo.version);
56
+ ```
57
+
58
+ ### NFC Scanning
59
+
60
+ ```typescript
61
+ import { finosEKYC, NfcConfig } from '@finos_sdk/sdk-ekyc';
62
+
63
+ const nfcConfig: NfcConfig = {
64
+ appKey: 'your-app-key',
65
+ documentNumber: '123456789',
66
+ birthDate: '1990-01-01',
67
+ expireDate: '2030-01-01',
68
+ transactionId: 'txn-123',
69
+ facePathStorage: '/storage/emulated/0/Download'
70
+ };
71
+
72
+ try {
73
+ const result = await finosEKYC.startNfcScan(nfcConfig);
74
+ console.log('NFC Result:', result.event, result.data);
75
+ } catch (error) {
76
+ console.error('NFC Error:', error);
77
+ }
78
+ ```
79
+
80
+ ### OCR Processing
81
+
82
+ ```typescript
83
+ import { finosEKYC, OcrConfig } from '@finos_sdk/sdk-ekyc';
84
+
85
+ const ocrConfig: OcrConfig = {
86
+ appKey: 'your-app-key',
87
+ idImagePath: 'base64-image-data',
88
+ expectedDocumentSide: 'front',
89
+ transactionId: 'txn-123'
90
+ };
91
+
92
+ try {
93
+ const result = await finosEKYC.startOCR(ocrConfig);
94
+ console.log('OCR Result:', result.event, result.data);
95
+ } catch (error) {
96
+ console.error('OCR Error:', error);
97
+ }
98
+ ```
99
+
100
+ ### Liveness Detection
101
+
102
+ ```typescript
103
+ import { finosEKYC, LivenessConfig } from '@finos_sdk/sdk-ekyc';
104
+
105
+ const livenessConfig: LivenessConfig = {
106
+ appKey: 'your-app-key',
107
+ selfieImage: 'base64-selfie-data',
108
+ usingRandomAction: true,
109
+ transactionId: 'txn-123',
110
+ isStraight: true
111
+ };
112
+
113
+ try {
114
+ const result = await finosEKYC.startLiveness(livenessConfig);
115
+ console.log('Liveness Result:', result.event, result.data);
116
+ } catch (error) {
117
+ console.error('Liveness Error:', error);
118
+ }
119
+ ```
120
+
121
+ ### Face Comparison
122
+
123
+ ```typescript
124
+ import { finosEKYC, FaceServiceConfig } from '@finos_sdk/sdk-ekyc';
125
+
126
+ const faceConfig: FaceServiceConfig = {
127
+ appKey: 'your-app-key',
128
+ transactionId: 'txn-123',
129
+ selfieImage: 'base64-selfie-data',
130
+ idImage: 'base64-id-image-data'
131
+ };
132
+
133
+ try {
134
+ const result = await finosEKYC.startFaceCompare(faceConfig);
135
+ console.log('Face Compare Result:', result.event, result.data);
136
+ } catch (error) {
137
+ console.error('Face Compare Error:', error);
138
+ }
139
+ ```
140
+
141
+ ### C06 Residence Verification
142
+
143
+ ```typescript
144
+ import { finosEKYC, C06Config } from '@finos_sdk/sdk-ekyc';
145
+
146
+ const c06Config: C06Config = {
147
+ appKey: 'your-app-key',
148
+ sod: 'sample-sod-data',
149
+ idCardNumber: '123456789',
150
+ recentLocation: 'Ho Chi Minh City',
151
+ transactionId: 'txn-123'
152
+ };
153
+
154
+ try {
155
+ const result = await finosEKYC.checkC06(c06Config);
156
+ console.log('C06 Result:', result.event, result.data);
157
+ } catch (error) {
158
+ console.error('C06 Error:', error);
159
+ }
160
+ ```
161
+
162
+ ## ๐ŸŽง Event Listeners
163
+
164
+ ```typescript
165
+ // NFC Events
166
+ finosEKYC.onNfcScanStart((data) => {
167
+ console.log('NFC scan started:', data);
168
+ });
169
+
170
+ finosEKYC.onNfcScanSuccess((data) => {
171
+ console.log('NFC scan success:', data);
172
+ });
173
+
174
+ finosEKYC.onNfcError((error) => {
175
+ console.error('NFC error:', error);
176
+ });
177
+
178
+ // OCR Events
179
+ finosEKYC.onOCRSuccess((data) => {
180
+ console.log('OCR success:', data);
181
+ });
182
+
183
+ finosEKYC.onOCRError((error) => {
184
+ console.error('OCR error:', error);
185
+ });
186
+
187
+ // Liveness Events
188
+ finosEKYC.onLivenessSuccess((data) => {
189
+ console.log('Liveness success:', data);
190
+ });
191
+
192
+ finosEKYC.onLivenessError((error) => {
193
+ console.error('Liveness error:', error);
194
+ });
195
+
196
+ // Face Compare Events
197
+ finosEKYC.onFaceCompareSuccess((data) => {
198
+ console.log('Face compare success:', data);
199
+ });
200
+
201
+ finosEKYC.onFaceCompareError((error) => {
202
+ console.error('Face compare error:', error);
203
+ });
204
+
205
+ // C06 Events
206
+ finosEKYC.onC06Success((data) => {
207
+ console.log('C06 success:', data);
208
+ });
209
+
210
+ finosEKYC.onC06Error((error) => {
211
+ console.error('C06 error:', error);
212
+ });
213
+ ```
214
+
215
+ ## ๐Ÿ”„ Lifecycle Management
216
+
217
+ ```typescript
218
+ import { AppState } from 'react-native';
219
+
220
+ // Handle app lifecycle
221
+ AppState.addEventListener('change', (nextAppState) => {
222
+ if (nextAppState === 'active') {
223
+ finosEKYC.onResume();
224
+ } else if (nextAppState === 'background') {
225
+ finosEKYC.onPause();
226
+ }
227
+ });
228
+
229
+ // Handle new intent (Android)
230
+ finosEKYC.handleNewIntent();
231
+ ```
232
+
233
+ ## ๐Ÿงน Cleanup
234
+
235
+ ```typescript
236
+ // Remove all event listeners
237
+ finosEKYC.removeAllListeners();
238
+ ```
239
+
240
+ ## ๐Ÿ“‹ Configuration Types
241
+
242
+ ### NfcConfig
243
+ ```typescript
244
+ interface NfcConfig {
245
+ appKey: string;
246
+ documentNumber: string;
247
+ birthDate: string;
248
+ expireDate: string;
249
+ transactionId?: string;
250
+ facePathStorage?: string;
251
+ }
252
+ ```
253
+
254
+ ### OcrConfig
255
+ ```typescript
256
+ interface OcrConfig {
257
+ appKey: string;
258
+ idImagePath: string;
259
+ expectedDocumentSide: string;
260
+ transactionId: string;
261
+ }
262
+ ```
263
+
264
+ ### LivenessConfig
265
+ ```typescript
266
+ interface LivenessConfig {
267
+ appKey: string;
268
+ selfieImage: string;
269
+ usingRandomAction: boolean;
270
+ transactionId: string;
271
+ isStraight: boolean;
272
+ }
273
+ ```
274
+
275
+ ### FaceServiceConfig
276
+ ```typescript
277
+ interface FaceServiceConfig {
278
+ appKey: string;
279
+ transactionId: string;
280
+ selfieImage: string;
281
+ idImage: string;
282
+ }
283
+ ```
284
+
285
+ ### C06Config
286
+ ```typescript
287
+ interface C06Config {
288
+ appKey: string;
289
+ sod: string;
290
+ idCardNumber: string;
291
+ recentLocation: string;
292
+ transactionId?: string;
293
+ }
294
+ ```
295
+
296
+ ## ๐Ÿšจ Error Handling
297
+
298
+ The module provides comprehensive error handling with detailed error messages:
299
+
300
+ ```typescript
301
+ try {
302
+ await finosEKYC.startNfcScan(config);
303
+ } catch (error) {
304
+ if (error.message.includes('SDK is not initialized')) {
305
+ // Initialize SDK first
306
+ await finosEKYC.initialize();
307
+ } else if (error.message.includes('Required field')) {
308
+ // Check configuration
309
+ console.error('Configuration error:', error.message);
310
+ } else {
311
+ // Handle other errors
312
+ console.error('Unexpected error:', error);
313
+ }
314
+ }
315
+ ```
316
+
317
+ ## ๐Ÿ“ฑ Platform Support
318
+
319
+ - **Android**: Full support for all features
320
+ - **iOS**: Compatibility layer (some features may be limited)
321
+
322
+ ## ๐Ÿ”ง Requirements
323
+
324
+ - React Native 0.76.9+
325
+ - Android API Level 24+
326
+ - NFC-capable device for NFC features
327
+ - Camera permission for OCR and Liveness features
328
+
329
+ ## ๐Ÿ“„ License
330
+
331
+ MIT License - see LICENSE file for details.
332
+
333
+ ## ๐Ÿค Support
334
+
335
+ For support and questions:
336
+ - GitHub Issues: https://github.com/finos/sdk-ekyc/issues
337
+ - Documentation: https://github.com/finos/sdk-ekyc#readme
338
+
339
+ ## ๐Ÿ”„ Version History
340
+
341
+ ### v0.0.31
342
+ - โœ… Enhanced error handling and validation
343
+ - โœ… Improved SDK initialization
344
+ - โœ… Better TypeScript support
345
+ - โœ… Comprehensive event listeners
346
+ - โœ… Platform-specific optimizations
347
+ - โœ… Updated documentation and examples