@sanctum-key/react-native-sdk 1.0.6 → 1.0.8
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 +3 -3
- package/android/build/.transforms/{f62cb96b2d1f78ca96ab35932dd530dc → c9d62bb333688ab562f51958998d5a48}/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/kyc/{transfergratis → SanctumKey}/com/BuildConfig.java +2 -2
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +1 -1
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +1 -1
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -2
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/SanctumKey/com/BuildConfig.class +0 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +1 -1
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +1 -1
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -1
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- 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 +1 -1
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$1$5$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$1$5$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule.class → SanctumKey/com/SanctumKeySdkModule.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkView.class → SanctumKey/com/SanctumKeySdkView.class} +0 -0
- package/android/build.gradle +2 -2
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkModule.kt +6 -6
- package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkView.kt +2 -2
- package/build/package.json +9 -7
- package/build/src/App.d.ts +2 -2
- package/build/src/App.d.ts.map +1 -1
- package/build/src/App.js +2 -2
- package/build/src/App.js.map +1 -1
- package/build/src/{TransfergratisSdk.types.d.ts → SanctumKeySdk.types.d.ts} +3 -3
- package/build/src/SanctumKeySdk.types.d.ts.map +1 -0
- package/build/src/SanctumKeySdk.types.js +2 -0
- package/build/src/SanctumKeySdk.types.js.map +1 -0
- package/build/src/{TransfergratisSdkModule.d.ts → SanctumKeySdkModule.d.ts} +4 -4
- package/build/src/SanctumKeySdkModule.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkModule.js → SanctumKeySdkModule.js} +2 -2
- package/build/src/SanctumKeySdkModule.js.map +1 -0
- package/build/src/{TransfergratisSdkModule.web.d.ts → SanctumKeySdkModule.web.d.ts} +4 -4
- package/build/src/SanctumKeySdkModule.web.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkModule.web.js → SanctumKeySdkModule.web.js} +3 -3
- package/build/src/SanctumKeySdkModule.web.js.map +1 -0
- package/build/src/SanctumKeySdkView.d.ts +4 -0
- package/build/src/SanctumKeySdkView.d.ts.map +1 -0
- package/build/src/SanctumKeySdkView.js +7 -0
- package/build/src/SanctumKeySdkView.js.map +1 -0
- package/build/src/SanctumKeySdkView.web.d.ts +4 -0
- package/build/src/SanctumKeySdkView.web.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkView.web.js → SanctumKeySdkView.web.js} +2 -2
- package/build/src/SanctumKeySdkView.web.js.map +1 -0
- package/build/src/api/axios.js +2 -2
- package/build/src/api/axios.js.map +1 -1
- package/build/src/components/EnhancedCameraView.d.ts.map +1 -1
- package/build/src/components/EnhancedCameraView.js +107 -330
- package/build/src/components/EnhancedCameraView.js.map +1 -1
- package/build/src/components/KYCElements/EmailVerificationTemplate.d.ts.map +1 -1
- package/build/src/components/KYCElements/EmailVerificationTemplate.js +114 -15
- package/build/src/components/KYCElements/EmailVerificationTemplate.js.map +1 -1
- package/build/src/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/src/components/KYCElements/IDCardCapture.js +166 -695
- package/build/src/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/src/components/KYCElements/PhoneVerificationTemplate.d.ts.map +1 -1
- package/build/src/components/KYCElements/PhoneVerificationTemplate.js +282 -40
- package/build/src/components/KYCElements/PhoneVerificationTemplate.js.map +1 -1
- package/build/src/components/KYCElements/SelfieCapture.d.ts +1 -1
- package/build/src/components/KYCElements/SelfieCapture.d.ts.map +1 -1
- package/build/src/components/KYCElements/SelfieCapture.js +130 -192
- package/build/src/components/KYCElements/SelfieCapture.js.map +1 -1
- package/build/src/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -1
- package/build/src/components/KYCElements/SelfieCaptureTemplate.js +131 -433
- package/build/src/components/KYCElements/SelfieCaptureTemplate.js.map +1 -1
- package/build/src/components/NativeCameraView.js +1 -1
- package/build/src/components/NativeCameraView.js.map +1 -1
- package/build/src/components/OverLay/IdCard.d.ts +3 -2
- package/build/src/components/OverLay/IdCard.d.ts.map +1 -1
- package/build/src/components/OverLay/IdCard.js +149 -141
- package/build/src/components/OverLay/IdCard.js.map +1 -1
- package/build/src/components/OverLay/SelfieOverlay.d.ts +2 -1
- package/build/src/components/OverLay/SelfieOverlay.d.ts.map +1 -1
- package/build/src/components/OverLay/SelfieOverlay.js +37 -95
- package/build/src/components/OverLay/SelfieOverlay.js.map +1 -1
- package/build/src/components/OverLay/type.d.ts +1 -0
- package/build/src/components/OverLay/type.d.ts.map +1 -1
- package/build/src/components/OverLay/type.js.map +1 -1
- package/build/src/components/Svgs/scanningLine.d.ts +2 -1
- package/build/src/components/Svgs/scanningLine.d.ts.map +1 -1
- package/build/src/components/Svgs/scanningLine.js +55 -51
- package/build/src/components/Svgs/scanningLine.js.map +1 -1
- package/build/src/config/KYCConfig.js +1 -1
- package/build/src/config/KYCConfig.js.map +1 -1
- package/build/src/config/allowedDomains.js +6 -6
- package/build/src/config/allowedDomains.js.map +1 -1
- package/build/src/hooks/useTemplateKYCFlow.d.ts.map +1 -1
- package/build/src/hooks/useTemplateKYCFlow.js +37 -38
- package/build/src/hooks/useTemplateKYCFlow.js.map +1 -1
- package/build/src/index.d.ts +3 -3
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +3 -3
- package/build/src/index.js.map +1 -1
- package/build/src/modules/api/CardAuthentification.d.ts +0 -5
- package/build/src/modules/api/CardAuthentification.d.ts.map +1 -1
- package/build/src/modules/api/CardAuthentification.js +114 -116
- package/build/src/modules/api/CardAuthentification.js.map +1 -1
- package/build/src/modules/api/KYCService.d.ts +12 -1
- package/build/src/modules/api/KYCService.d.ts.map +1 -1
- package/build/src/modules/api/KYCService.js +102 -38
- package/build/src/modules/api/KYCService.js.map +1 -1
- package/build/src/modules/camera/NativeCameraModule.js +17 -17
- package/build/src/modules/camera/NativeCameraModule.js.map +1 -1
- package/expo-module.config.json +2 -2
- package/ios/TransfergratisSdk.podspec +2 -2
- package/ios/TransfergratisSdkModule.swift +12 -12
- package/package.json +9 -7
- package/src/App.tsx +2 -2
- package/src/{TransfergratisSdk.types.ts → SanctumKeySdk.types.ts} +2 -2
- package/src/{TransfergratisSdkModule.ts → SanctumKeySdkModule.ts} +3 -3
- package/src/{TransfergratisSdkModule.web.ts → SanctumKeySdkModule.web.ts} +3 -3
- package/src/SanctumKeySdkView.tsx +11 -0
- package/src/{TransfergratisSdkView.web.tsx → SanctumKeySdkView.web.tsx} +2 -2
- package/src/api/axios.ts +2 -2
- package/src/components/EnhancedCameraView.tsx +131 -385
- package/src/components/KYCElements/EmailVerificationTemplate.tsx +141 -26
- package/src/components/KYCElements/IDCardCapture.tsx +228 -868
- package/src/components/KYCElements/PhoneVerificationTemplate.tsx +342 -60
- package/src/components/KYCElements/SelfieCapture.tsx +184 -213
- package/src/components/KYCElements/SelfieCaptureTemplate.tsx +330 -662
- package/src/components/NativeCameraView.tsx +1 -1
- package/src/components/OverLay/IdCard.tsx +218 -217
- package/src/components/OverLay/SelfieOverlay.tsx +56 -134
- package/src/components/OverLay/type.ts +1 -0
- package/src/components/Svgs/scanningLine.tsx +71 -72
- package/src/config/KYCConfig.ts +1 -1
- package/src/config/allowedDomains.ts +6 -6
- package/src/hooks/useTemplateKYCFlow.tsx +45 -39
- package/src/i18n/README.md +1 -1
- package/src/index.ts +3 -3
- package/src/modules/api/CardAuthentification.ts +202 -200
- package/src/modules/api/KYCService.ts +169 -53
- package/src/modules/camera/NativeCameraModule.ts +17 -17
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
- package/build/src/TransfergratisSdk.types.d.ts.map +0 -1
- package/build/src/TransfergratisSdk.types.js +0 -2
- package/build/src/TransfergratisSdk.types.js.map +0 -1
- package/build/src/TransfergratisSdkModule.d.ts.map +0 -1
- package/build/src/TransfergratisSdkModule.js.map +0 -1
- package/build/src/TransfergratisSdkModule.web.d.ts.map +0 -1
- package/build/src/TransfergratisSdkModule.web.js.map +0 -1
- package/build/src/TransfergratisSdkView.d.ts +0 -4
- package/build/src/TransfergratisSdkView.d.ts.map +0 -1
- package/build/src/TransfergratisSdkView.js +0 -7
- package/build/src/TransfergratisSdkView.js.map +0 -1
- package/build/src/TransfergratisSdkView.web.d.ts +0 -4
- package/build/src/TransfergratisSdkView.web.d.ts.map +0 -1
- package/build/src/TransfergratisSdkView.web.js.map +0 -1
- package/src/TransfergratisSdkView.tsx +0 -11
- /package/android/build/.transforms/{532c0e65d82f446633d0a7dab2772198 → ab90740579f5bd05b27b4343ada2d1c9}/results.bin +0 -0
- /package/android/build/.transforms/{532c0e65d82f446633d0a7dab2772198 → ab90740579f5bd05b27b4343ada2d1c9}/transformed/classes/classes_dex/classes.dex +0 -0
- /package/android/build/.transforms/{f62cb96b2d1f78ca96ab35932dd530dc → c9d62bb333688ab562f51958998d5a48}/results.bin +0 -0
- /package/android/build/{intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/transfergratis/com/BuildConfig.class → tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/BuildConfig.class.uniqueId0} +0 -0
|
@@ -17,6 +17,9 @@ const appendFileToFormData = async (formData: FormData, key: string, uri: string
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
let cachedToken: string | null = null;
|
|
21
|
+
let tokenExpiryTime: number | null = null;
|
|
22
|
+
let activeAuthRequest: Promise<string> | null = null;
|
|
20
23
|
|
|
21
24
|
export interface KYCRequest {
|
|
22
25
|
userId: string;
|
|
@@ -57,10 +60,10 @@ export class KYCService {
|
|
|
57
60
|
private baseURL: string;
|
|
58
61
|
private apiKey: string;
|
|
59
62
|
// Additional service base URLs (fixed as per current infra)
|
|
60
|
-
private faceServiceURL = 'https://kyc-engine.
|
|
61
|
-
private textExtractionServiceURL = 'https://kyc-engine.
|
|
62
|
-
private mrzServiceURL = 'https://kyc-engine.
|
|
63
|
-
private barcodeServiceURL = 'https://kyc-engine.
|
|
63
|
+
private faceServiceURL = 'https://kyc-engine.SanctumKey.net:8000';
|
|
64
|
+
private textExtractionServiceURL = 'https://kyc-engine.SanctumKey.net:8006';
|
|
65
|
+
private mrzServiceURL = 'https://kyc-engine.SanctumKey.net:8002';
|
|
66
|
+
private barcodeServiceURL = 'https://kyc-engine.SanctumKey.net:8000';
|
|
64
67
|
private orientationServiceURL = 'http://18.188.180.154:8080';
|
|
65
68
|
|
|
66
69
|
constructor(baseURL: string, apiKey: string) {
|
|
@@ -131,6 +134,7 @@ export class KYCService {
|
|
|
131
134
|
}
|
|
132
135
|
|
|
133
136
|
async processSelfieOrientationPicture(videoFile: string, token: string): Promise<SelfieVideoResponse[]> {
|
|
137
|
+
|
|
134
138
|
try {
|
|
135
139
|
const formData = new FormData();
|
|
136
140
|
await appendFileToFormData(formData, 'file', videoFile, 'selfie_picture.jpg', 'image/jpeg');
|
|
@@ -215,38 +219,57 @@ export class KYCService {
|
|
|
215
219
|
}
|
|
216
220
|
|
|
217
221
|
// STEP 1 - ID CARD VALIDATION
|
|
218
|
-
async detectFaceOnId(
|
|
222
|
+
async detectFaceOnId(
|
|
223
|
+
idCardImageUri: string,
|
|
224
|
+
token: string,
|
|
225
|
+
docType: string,
|
|
226
|
+
env: KycEnvironment = 'PRODUCTION'
|
|
227
|
+
): Promise<{ result: boolean; detail: any[]; card_obb?: any }> { // Added card_obb to signature
|
|
228
|
+
|
|
219
229
|
// SANDBOX mode
|
|
220
230
|
if (env === 'SANDBOX') {
|
|
221
|
-
console.log("SANDBOX mode: Skipping AI face detection on ID");
|
|
222
231
|
logger.log("SANDBOX mode: Returning mock face detection response");
|
|
223
232
|
return {
|
|
224
233
|
result: true,
|
|
225
234
|
detail: [{ confidence: 0.95, bbox: [50, 50, 200, 200] }],
|
|
226
235
|
card_obb: { x: 50, y: 50, width: 200, height: 200 }
|
|
227
|
-
}
|
|
236
|
+
};
|
|
228
237
|
}
|
|
229
|
-
|
|
238
|
+
|
|
230
239
|
const formData = new FormData();
|
|
231
|
-
// Defaulting to photo since we don't pass postfix here currently, but making the name generic
|
|
232
240
|
await appendFileToFormData(formData, 'file', idCardImageUri, 'id_card_photo.jpg', 'image/jpeg');
|
|
233
|
-
|
|
234
|
-
logger.log('detectFaceOnId formData', JSON.stringify(formData, null, 2));
|
|
235
|
-
|
|
241
|
+
|
|
236
242
|
const docTypeShorted = GovernmentDocumentTypeShorted[docType as GovernmentDocumentType];
|
|
237
|
-
|
|
243
|
+
|
|
244
|
+
// Log metadata, NOT the FormData object
|
|
245
|
+
logger.log('detectFaceOnId Request:', { docTypeShorted, imageUri: idCardImageUri });
|
|
246
|
+
|
|
238
247
|
try {
|
|
239
|
-
const res = await axios.post(
|
|
248
|
+
const res = await axios.post(
|
|
249
|
+
`${this.faceServiceURL}/detect_face/?doc_type=${docTypeShorted}`,
|
|
250
|
+
formData,
|
|
240
251
|
{
|
|
241
|
-
headers: {
|
|
242
|
-
|
|
243
|
-
|
|
252
|
+
headers: {
|
|
253
|
+
'Content-Type': 'multipart/form-data',
|
|
254
|
+
'Authorization': `Bearer ${token}`
|
|
255
|
+
},
|
|
256
|
+
timeout: 20000 // 20 seconds is good, but ensure the image is compressed before this step!
|
|
257
|
+
}
|
|
258
|
+
);
|
|
259
|
+
|
|
260
|
+
// It's safe to stringify res.data if the backend returns a clean JSON object
|
|
244
261
|
logger.log('detectFaceOnId res', JSON.stringify(res.data, null, 2));
|
|
245
|
-
|
|
246
|
-
if (res.data?.result)
|
|
262
|
+
|
|
263
|
+
if (res.data?.result) {
|
|
264
|
+
return res.data;
|
|
265
|
+
}
|
|
266
|
+
|
|
247
267
|
throw new Error(res.data?.detail || 'detect_face failed');
|
|
248
|
-
|
|
249
|
-
|
|
268
|
+
|
|
269
|
+
} catch (error: any) {
|
|
270
|
+
// Use your safe error extractor, avoid JSON.stringify on raw Axios errors
|
|
271
|
+
const safeError = errorMessage(error) || error.message;
|
|
272
|
+
logger.error('Error detecting face on id:', safeError);
|
|
250
273
|
throw error;
|
|
251
274
|
}
|
|
252
275
|
}
|
|
@@ -596,6 +619,70 @@ export class KYCService {
|
|
|
596
619
|
throw error;
|
|
597
620
|
}
|
|
598
621
|
}
|
|
622
|
+
|
|
623
|
+
/** Send WhatsApp verification code. */
|
|
624
|
+
async sendWhatsAppVerificationCode(
|
|
625
|
+
sessionId: string,
|
|
626
|
+
phoneNumber: string,
|
|
627
|
+
auth?: { apiKey?: string; token?: string }
|
|
628
|
+
): Promise<unknown> {
|
|
629
|
+
const url = `${KYCConfig.getBackendUrl()}/accounts/send-whatsapp-verification/`;
|
|
630
|
+
const token = auth?.apiKey ? undefined : (auth?.token ?? await authentification());
|
|
631
|
+
|
|
632
|
+
// 🚨 FORMATTING FIX: Strips the "+" sign (e.g., "+254712345" becomes "254712345")
|
|
633
|
+
const formattedPhone = phoneNumber.replace(/[^0-9]/g, '');
|
|
634
|
+
|
|
635
|
+
const res = await axios.post(
|
|
636
|
+
url,
|
|
637
|
+
{
|
|
638
|
+
session_id: sessionId,
|
|
639
|
+
phone_number: formattedPhone
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
headers: {
|
|
643
|
+
'Content-Type': 'application/json',
|
|
644
|
+
'Referer': KYCConfig.getBackendUrl(), // CSRF Protection
|
|
645
|
+
...(auth?.apiKey ? { 'Authorization': `ApiKey ${auth.apiKey}` } : { 'Authorization': `Bearer ${token}` }),
|
|
646
|
+
},
|
|
647
|
+
}
|
|
648
|
+
);
|
|
649
|
+
return res.data;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/** Verify WhatsApp code with OTP. */
|
|
653
|
+
async verifyWhatsAppCode(
|
|
654
|
+
sessionId: string,
|
|
655
|
+
otp: string,
|
|
656
|
+
phoneNumber: string,
|
|
657
|
+
auth?: { apiKey?: string; token?: string }
|
|
658
|
+
): Promise<unknown> {
|
|
659
|
+
const url = `${KYCConfig.getBackendUrl()}/accounts/verify-whatsapp-code/`;
|
|
660
|
+
const token = auth?.apiKey ? undefined : (auth?.token ?? await authentification());
|
|
661
|
+
|
|
662
|
+
const formattedPhone = phoneNumber.replace(/[^0-9]/g, '');
|
|
663
|
+
const cleanOtp = otp.replace(/[^0-9]/g, '');
|
|
664
|
+
|
|
665
|
+
try {
|
|
666
|
+
const res = await axios.post(
|
|
667
|
+
url,
|
|
668
|
+
{
|
|
669
|
+
session_id: sessionId,
|
|
670
|
+
phone_number: formattedPhone,
|
|
671
|
+
verification_code: cleanOtp
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
headers: {
|
|
675
|
+
'Content-Type': 'application/json',
|
|
676
|
+
...(auth?.apiKey ? { 'Authorization': `ApiKey ${auth.apiKey}` } : { 'Authorization': `Bearer ${token}` }),
|
|
677
|
+
},
|
|
678
|
+
}
|
|
679
|
+
);
|
|
680
|
+
return res.data;
|
|
681
|
+
} catch (error: any) {
|
|
682
|
+
console.error("WhatsApp Verify API Error: ", error.response?.data || error.message);
|
|
683
|
+
throw error;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
599
686
|
}
|
|
600
687
|
|
|
601
688
|
const kycService = new KYCService("", "");
|
|
@@ -620,41 +707,70 @@ export function truncateFields(obj: any, maxLength = 420): any {
|
|
|
620
707
|
return truncated;
|
|
621
708
|
}
|
|
622
709
|
|
|
623
|
-
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
// Strictly define the return type as Promise<string>
|
|
714
|
+
export const authentification = async (): Promise<string> => {
|
|
624
715
|
try {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
params.append('client_secret', 'QhgAmvKgmwODzsEp98dnA4PeUEMMaFHd');
|
|
629
|
-
params.append('grant_type', 'client_credentials');
|
|
630
|
-
const res = await axios.post(`https://keycloak.transfergratis.net/realms/kyc/protocol/openid-connect/token`,
|
|
631
|
-
params,
|
|
632
|
-
{
|
|
633
|
-
headers: {
|
|
634
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
635
|
-
},
|
|
636
|
-
}
|
|
637
|
-
);
|
|
638
|
-
logger.log('authentification res', JSON.stringify(truncateFields(res.data)));
|
|
639
|
-
return res.data.access_token;
|
|
640
|
-
} catch (error: any) {
|
|
641
|
-
logger.error('Error authentifying:', {
|
|
642
|
-
message: error.message,
|
|
643
|
-
status: error.response?.status,
|
|
644
|
-
statusText: error.response?.statusText,
|
|
645
|
-
data: error.response?.data,
|
|
646
|
-
url: error.config?.url,
|
|
647
|
-
method: error.config?.method
|
|
648
|
-
});
|
|
649
|
-
|
|
650
|
-
const backendMessage = errorMessage(error);
|
|
651
|
-
|
|
652
|
-
if (backendMessage) {
|
|
653
|
-
logger.error('Backend authentication error:', JSON.stringify(truncateFields(backendMessage), null, 2));
|
|
654
|
-
throw new Error(`Authentication failed: ${JSON.stringify(truncateFields(backendMessage))}`);
|
|
716
|
+
// 1. If we have a valid token (with 10 seconds of breathing room), return it immediately
|
|
717
|
+
if (cachedToken && tokenExpiryTime && Date.now() < tokenExpiryTime - 10000) {
|
|
718
|
+
return cachedToken;
|
|
655
719
|
}
|
|
656
720
|
|
|
657
|
-
|
|
721
|
+
// 2. RACE CONDITION PREVENTION
|
|
722
|
+
if (activeAuthRequest) {
|
|
723
|
+
return activeAuthRequest;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
// 3. Create the request and lock it
|
|
727
|
+
activeAuthRequest = (async () => {
|
|
728
|
+
logger.log('Authenticating: Fetching new Keycloak token...');
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
const params = 'client_id=kyc_frontend&client_secret=QhgAmvKgmwODzsEp98dnA4PeUEMMaFHd&grant_type=client_credentials';
|
|
732
|
+
|
|
733
|
+
const res = await axios.post(
|
|
734
|
+
`https://keycloak.SanctumKey.net/realms/kyc/protocol/openid-connect/token`,
|
|
735
|
+
params,
|
|
736
|
+
{
|
|
737
|
+
headers: {
|
|
738
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
739
|
+
},
|
|
740
|
+
}
|
|
741
|
+
);
|
|
742
|
+
|
|
743
|
+
cachedToken = res.data.access_token;
|
|
744
|
+
|
|
745
|
+
if (!cachedToken) {
|
|
746
|
+
throw new Error("Keycloak returned a success response but no access_token was found.");
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
// Calculate exact expiry timestamp (expires_in is usually in seconds)
|
|
750
|
+
const expiresInMs = (res.data.expires_in || 300) * 1000;
|
|
751
|
+
tokenExpiryTime = Date.now() + expiresInMs;
|
|
752
|
+
|
|
753
|
+
return cachedToken;
|
|
754
|
+
})();
|
|
755
|
+
|
|
756
|
+
const finalToken = await activeAuthRequest;
|
|
757
|
+
return finalToken;
|
|
758
|
+
|
|
759
|
+
} catch (error: any) {
|
|
760
|
+
cachedToken = null; // Clear bad cache
|
|
761
|
+
|
|
762
|
+
const safeErrorMessage =
|
|
763
|
+
error?.response?.data?.error_description ||
|
|
764
|
+
error?.response?.data?.error ||
|
|
765
|
+
error?.message ||
|
|
766
|
+
'Unknown network error';
|
|
767
|
+
|
|
768
|
+
logger.error('Error authentifying:', safeErrorMessage);
|
|
769
|
+
throw new Error(`Échec de l'authentification: ${safeErrorMessage}`);
|
|
770
|
+
|
|
771
|
+
} finally {
|
|
772
|
+
// 4. Always clear the lock when the request finishes
|
|
773
|
+
activeAuthRequest = null;
|
|
658
774
|
}
|
|
659
775
|
}
|
|
660
776
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NativeEventEmitter, Platform } from "react-native";
|
|
2
|
-
import
|
|
2
|
+
import SanctumKeySdkModule from "../../SanctumKeySdkModule";
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
export interface CameraCaptureResult {
|
|
@@ -23,11 +23,11 @@ export class NativeCameraModule {
|
|
|
23
23
|
*/
|
|
24
24
|
async testModule(): Promise<string> {
|
|
25
25
|
try {
|
|
26
|
-
if (!
|
|
27
|
-
console.warn('
|
|
26
|
+
if (!SanctumKeySdkModule) {
|
|
27
|
+
console.warn('SanctumKeySdk native module not available');
|
|
28
28
|
return 'Module not available';
|
|
29
29
|
}
|
|
30
|
-
return await
|
|
30
|
+
return await SanctumKeySdkModule.testModule();
|
|
31
31
|
} catch (error) {
|
|
32
32
|
console.error('Error testing module:', error);
|
|
33
33
|
return 'Test failed';
|
|
@@ -39,17 +39,17 @@ export class NativeCameraModule {
|
|
|
39
39
|
console.log('Platform:', Platform.OS);
|
|
40
40
|
|
|
41
41
|
// Vérifier que le module natif est disponible
|
|
42
|
-
if (
|
|
43
|
-
console.log('
|
|
42
|
+
if (SanctumKeySdkModule) {
|
|
43
|
+
console.log('SanctumKeySdk module found, creating event emitter');
|
|
44
44
|
try {
|
|
45
|
-
// this.eventEmitter = new NativeEventEmitter(
|
|
45
|
+
// this.eventEmitter = new NativeEventEmitter(SanctumKeySdkModule as unknown as NativeModule);
|
|
46
46
|
console.log('Event emitter created successfully');
|
|
47
47
|
} catch (error) {
|
|
48
48
|
console.error('Error creating event emitter:', error);
|
|
49
49
|
this.eventEmitter = null;
|
|
50
50
|
}
|
|
51
51
|
} else {
|
|
52
|
-
console.warn('
|
|
52
|
+
console.warn('SanctumKeySdk native module not available');
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -60,11 +60,11 @@ export class NativeCameraModule {
|
|
|
60
60
|
console.log('requestCameraPermission');
|
|
61
61
|
|
|
62
62
|
try {
|
|
63
|
-
if (!
|
|
64
|
-
console.warn('
|
|
63
|
+
if (!SanctumKeySdkModule) {
|
|
64
|
+
console.warn('SanctumKeySdk native module not available');
|
|
65
65
|
return false;
|
|
66
66
|
}
|
|
67
|
-
return await
|
|
67
|
+
return await SanctumKeySdkModule.requestCameraPermission();
|
|
68
68
|
} catch (error) {
|
|
69
69
|
console.error('Error requesting camera permission:', error);
|
|
70
70
|
return false;
|
|
@@ -76,8 +76,8 @@ export class NativeCameraModule {
|
|
|
76
76
|
*/
|
|
77
77
|
async openCameraWithInstructions(instructions: string): Promise<CameraCaptureResult> {
|
|
78
78
|
try {
|
|
79
|
-
if (!
|
|
80
|
-
console.warn('
|
|
79
|
+
if (!SanctumKeySdkModule) {
|
|
80
|
+
console.warn('SanctumKeySdk native module not available');
|
|
81
81
|
return {
|
|
82
82
|
success: false,
|
|
83
83
|
error: 'Native module not available'
|
|
@@ -92,7 +92,7 @@ export class NativeCameraModule {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
const result = await
|
|
95
|
+
const result = await SanctumKeySdkModule.openCameraWithInstructions(instructions);
|
|
96
96
|
return {
|
|
97
97
|
success: result.success,
|
|
98
98
|
path: result.path
|
|
@@ -111,14 +111,14 @@ export class NativeCameraModule {
|
|
|
111
111
|
*/
|
|
112
112
|
async openFilePicker(allowedTypes: string[] = ['*/*']): Promise<FilePickerResult> {
|
|
113
113
|
try {
|
|
114
|
-
if (!
|
|
115
|
-
console.warn('
|
|
114
|
+
if (!SanctumKeySdkModule) {
|
|
115
|
+
console.warn('SanctumKeySdk native module not available');
|
|
116
116
|
return {
|
|
117
117
|
success: false,
|
|
118
118
|
error: 'Native module not available'
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
const result = await
|
|
121
|
+
const result = await SanctumKeySdkModule.openFilePicker(allowedTypes);
|
|
122
122
|
return {
|
|
123
123
|
success: result.success,
|
|
124
124
|
uri: result.uri,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdk.types.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdk.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,eAAe,EAAE,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAC7D,cAAc,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC3D,OAAO,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE;YAAE,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAA;SAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/E,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,iBAAiB,CAAA;KAAE,KAAK,IAAI,CAAC;IAC9D,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdk.types.js","sourceRoot":"","sources":["../../src/TransfergratisSdk.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\n\nexport type CameraCaptureEventPayload = {\n instructions?: string;\n status: 'opened' | 'captured';\n path?: string;\n};\n\nexport type FileSelectedEventPayload = {\n uri: string;\n path: string;\n};\n\nexport type ErrorEventPayload = {\n message: string;\n};\n\nexport type TransfergratisSdkModuleEvents = {\n onCameraCapture: (params: CameraCaptureEventPayload) => void;\n onFileSelected: (params: FileSelectedEventPayload) => void;\n onError: (params: ErrorEventPayload) => void;\n};\n\nexport type TransfergratisSdkViewProps = {\n instructions: string;\n showCamera: boolean;\n onCapture?: (event: { nativeEvent: { action: 'capture' | 'retake' } }) => void;\n onError?: (event: { nativeEvent: ErrorEventPayload }) => void;\n style?: StyleProp<ViewStyle>;\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkModule.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdkModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAE1E,OAAO,OAAO,uBAAwB,SAAQ,YAAY,CAAC,6BAA6B,CAAC;IACvF,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAC7B,uBAAuB,IAAI,OAAO,CAAC,OAAO,CAAC;IAC3C,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9G,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACnH;;AAGD,wBAAiF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkModule.js","sourceRoot":"","sources":["../../src/TransfergratisSdkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAcxD,yDAAyD;AACzD,eAAe,mBAAmB,CAA0B,mBAAmB,CAAC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nimport { NativeModule } from 'expo';\n\nimport { TransfergratisSdkModuleEvents } from './TransfergratisSdk.types';\n\ndeclare class TransfergratisSdkModule extends NativeModule<TransfergratisSdkModuleEvents> {\n PI: number;\n testModule(): Promise<string>;\n requestCameraPermission(): Promise<boolean>;\n openCameraWithInstructions(instructions: string): Promise<{ success: boolean; path?: string; error?: string }>;\n openFilePicker(allowedTypes: string[]): Promise<{ success: boolean; uri?: string; path?: string; error?: string }>;\n}\n\n// This call loads the native module object from the JSI.\nexport default requireNativeModule<TransfergratisSdkModule>('TransfergratisSdk');\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkModule.web.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdkModule.web.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAE1E,cAAM,uBAAwB,SAAQ,YAAY,CAAC,6BAA6B,CAAC;IAC/E,EAAE,SAAW;IAEP,uBAAuB,IAAI,OAAO,CAAC,OAAO,CAAC;IAK3C,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAQ9G,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAOzH;;AAED,wBAAqF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkModule.web.js","sourceRoot":"","sources":["../../src/TransfergratisSdkModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIpC,MAAM,uBAAwB,SAAQ,YAA2C;IAC/E,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;IAEb,KAAK,CAAC,uBAAuB;QAC3B,OAAO,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;QACvD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,0BAA0B,CAAC,YAAoB;QACnD,OAAO,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;QAC5C,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,sCAAsC;SAC9C,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,YAAsB;QACzC,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;QACjD,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,2CAA2C;SACnD,CAAC;IACJ,CAAC;CACF;AAED,eAAe,iBAAiB,CAAC,uBAAuB,EAAE,yBAAyB,CAAC,CAAC","sourcesContent":["import { registerWebModule } from 'expo-modules-core';\nimport { NativeModule } from 'expo';\n\nimport { TransfergratisSdkModuleEvents } from './TransfergratisSdk.types';\n\nclass TransfergratisSdkModule extends NativeModule<TransfergratisSdkModuleEvents> {\n PI = Math.PI;\n \n async requestCameraPermission(): Promise<boolean> {\n console.warn('Camera permission not available on web');\n return false;\n }\n \n async openCameraWithInstructions(instructions: string): Promise<{ success: boolean; path?: string; error?: string }> {\n console.warn('Camera not available on web');\n return {\n success: false,\n error: 'Camera not available on web platform'\n };\n }\n \n async openFilePicker(allowedTypes: string[]): Promise<{ success: boolean; uri?: string; path?: string; error?: string }> {\n console.warn('File picker not available on web');\n return {\n success: false,\n error: 'File picker not available on web platform'\n };\n }\n}\n\nexport default registerWebModule(TransfergratisSdkModule, 'TransfergratisSdkModule');\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkView.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdkView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAKvE,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBAE9E"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { requireNativeView } from 'expo';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
const NativeView = requireNativeView('TransfergratisSdk');
|
|
4
|
-
export default function TransfergratisSdkView(props) {
|
|
5
|
-
return <NativeView {...props}/>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=TransfergratisSdkView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkView.js","sourceRoot":"","sources":["../../src/TransfergratisSdkView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,UAAU,GACd,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAiC;IAC7E,OAAO,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACnC,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport * as React from 'react';\n\nimport { TransfergratisSdkViewProps } from './TransfergratisSdk.types';\n\nconst NativeView: React.ComponentType<TransfergratisSdkViewProps> =\n requireNativeView('TransfergratisSdk');\n\nexport default function TransfergratisSdkView(props: TransfergratisSdkViewProps) {\n return <NativeView {...props} />;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkView.web.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdkView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBAU9E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkView.web.js","sourceRoot":"","sources":["../../src/TransfergratisSdkView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAiC;IAC7E,OAAO,CACL,CAAC,GAAG,CACF;MAAA,CAAC;;;;aAII,CACP;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC","sourcesContent":["import * as React from 'react';\n\nimport { TransfergratisSdkViewProps } from './TransfergratisSdk.types';\n\nexport default function TransfergratisSdkView(props: TransfergratisSdkViewProps) {\n return (\n <div>\n {/* <iframe\n style={{ flex: 1 }}\n src={props.url}\n onLoad={() => props.onLoad({ nativeEvent: { url: props.url } })}\n /> */}\n </div>\n );\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { requireNativeView } from 'expo';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import { TransfergratisSdkViewProps } from './TransfergratisSdk.types';
|
|
5
|
-
|
|
6
|
-
const NativeView: React.ComponentType<TransfergratisSdkViewProps> =
|
|
7
|
-
requireNativeView('TransfergratisSdk');
|
|
8
|
-
|
|
9
|
-
export default function TransfergratisSdkView(props: TransfergratisSdkViewProps) {
|
|
10
|
-
return <NativeView {...props} />;
|
|
11
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|