@sanctum-key/react-native-sdk 1.0.51 → 1.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/xml_file_paths.xml.flat +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -2
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +1 -1
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +1 -1
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +1 -1
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +1 -1
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +41 -41
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +52 -52
- package/build/package.json +1 -1
- package/build/src/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/src/components/KYCElements/IDCardCapture.js +73 -66
- package/build/src/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/src/components/TemplateKYCExample.d.ts +2 -1
- package/build/src/components/TemplateKYCExample.d.ts.map +1 -1
- package/build/src/components/TemplateKYCExample.js +2 -2
- package/build/src/components/TemplateKYCExample.js.map +1 -1
- package/build/src/components/TemplateKYCFlowRefactored.d.ts +1 -0
- package/build/src/components/TemplateKYCFlowRefactored.d.ts.map +1 -1
- package/build/src/components/TemplateKYCFlowRefactored.js +20 -14
- package/build/src/components/TemplateKYCFlowRefactored.js.map +1 -1
- package/build/src/config/KYCConfig.d.ts.map +1 -1
- package/build/src/config/KYCConfig.js +4 -2
- package/build/src/config/KYCConfig.js.map +1 -1
- package/build/src/hooks/useTemplateKYCFlow.d.ts +1 -0
- package/build/src/hooks/useTemplateKYCFlow.d.ts.map +1 -1
- package/build/src/hooks/useTemplateKYCFlow.js.map +1 -1
- package/build/src/modules/api/CardAuthentification.d.ts +0 -23
- package/build/src/modules/api/CardAuthentification.d.ts.map +1 -1
- package/build/src/modules/api/CardAuthentification.js +46 -83
- package/build/src/modules/api/CardAuthentification.js.map +1 -1
- package/build/src/modules/api/KYCService.d.ts.map +1 -1
- package/build/src/modules/api/KYCService.js +96 -38
- package/build/src/modules/api/KYCService.js.map +1 -1
- package/build/src/modules/api/SelfieVerification.d.ts.map +1 -1
- package/build/src/modules/api/SelfieVerification.js +12 -19
- package/build/src/modules/api/SelfieVerification.js.map +1 -1
- package/package.json +1 -1
- package/src/components/KYCElements/IDCardCapture.tsx +192 -191
- package/src/components/TemplateKYCExample.tsx +3 -0
- package/src/components/TemplateKYCFlowRefactored.tsx +31 -25
- package/src/config/KYCConfig.ts +7 -5
- package/src/hooks/useTemplateKYCFlow.tsx +1 -0
- package/src/modules/api/CardAuthentification.ts +409 -445
- package/src/modules/api/KYCService.ts +599 -449
- package/src/modules/api/SelfieVerification.ts +22 -29
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
import kycService, { authentification, SelfieVideoResponse } from "./KYCService";
|
|
1
|
+
import kycService, { authentification, SelfieVideoResponse } from "./KYCService";
|
|
2
|
+
import { KycEnvironment } from "../../types/env.types";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
error: ""
|
|
19
|
-
}];
|
|
20
|
-
return mockResponse;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// PRODUCTION mode: perform actual AI verification
|
|
24
|
-
const token = await authentification();
|
|
25
|
-
const response = await kycService.processSelfieOrientationPicture(selfieImage, token);
|
|
26
|
-
console.log("selfieVerification response", JSON.stringify(response, null, 2));
|
|
4
|
+
const selfieVerification = async (
|
|
5
|
+
selfieImage: string,
|
|
6
|
+
env: KycEnvironment = 'PRODUCTION'
|
|
7
|
+
): Promise<SelfieVideoResponse[]> => {
|
|
8
|
+
|
|
9
|
+
try {
|
|
10
|
+
const token = await authentification();
|
|
11
|
+
|
|
12
|
+
// Perform actual AI verification against the API
|
|
13
|
+
// (Note: if your KYCService method accepts the env parameter for URL switching
|
|
14
|
+
// like the document endpoints do, you can add it here as the 3rd argument: `(selfieImage, token, env)`)
|
|
15
|
+
const response = await kycService.processSelfieOrientationPicture(selfieImage, token);
|
|
16
|
+
|
|
17
|
+
console.log("selfieVerification response", JSON.stringify(response, null, 2));
|
|
18
|
+
|
|
27
19
|
return response;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
} catch (error: any) {
|
|
21
|
+
console.error("Error in selfieVerification:", error?.message || error);
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
32
25
|
|
|
33
26
|
export default selfieVerification;
|