@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.
Files changed (206) hide show
  1. package/README.md +3 -3
  2. package/android/build/.transforms/{f62cb96b2d1f78ca96ab35932dd530dc → c9d62bb333688ab562f51958998d5a48}/transformed/classes/classes_dex/classes.dex +0 -0
  3. package/android/build/generated/source/buildConfig/debug/kyc/{transfergratis → SanctumKey}/com/BuildConfig.java +2 -2
  4. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +1 -1
  5. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +1 -1
  6. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  7. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  8. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -2
  9. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/SanctumKey/com/BuildConfig.class +0 -0
  10. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +1 -1
  11. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +1 -1
  12. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  13. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -1
  14. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  15. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  16. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  17. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  18. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  19. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  20. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  21. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  22. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  23. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  24. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  25. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  26. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  27. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  28. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  29. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  30. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  31. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  32. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  33. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  34. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  35. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  36. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  37. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  38. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  39. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  40. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  41. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  42. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  43. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  44. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  45. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  46. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  47. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  48. package/android/build/outputs/logs/manifest-merger-debug-report.txt +1 -1
  49. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  50. package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$1$5$1.class +0 -0
  51. package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$1$5$2.class +0 -0
  52. 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
  53. 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
  54. 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
  55. 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
  56. 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
  57. 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
  58. 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
  59. 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
  60. 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
  61. 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
  62. package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
  63. 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
  64. 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
  65. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule.class → SanctumKey/com/SanctumKeySdkModule.class} +0 -0
  66. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkView.class → SanctumKey/com/SanctumKeySdkView.class} +0 -0
  67. package/android/build.gradle +2 -2
  68. package/android/src/main/AndroidManifest.xml +1 -1
  69. package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkModule.kt +6 -6
  70. package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkView.kt +2 -2
  71. package/build/package.json +9 -7
  72. package/build/src/App.d.ts +2 -2
  73. package/build/src/App.d.ts.map +1 -1
  74. package/build/src/App.js +2 -2
  75. package/build/src/App.js.map +1 -1
  76. package/build/src/{TransfergratisSdk.types.d.ts → SanctumKeySdk.types.d.ts} +3 -3
  77. package/build/src/SanctumKeySdk.types.d.ts.map +1 -0
  78. package/build/src/SanctumKeySdk.types.js +2 -0
  79. package/build/src/SanctumKeySdk.types.js.map +1 -0
  80. package/build/src/{TransfergratisSdkModule.d.ts → SanctumKeySdkModule.d.ts} +4 -4
  81. package/build/src/SanctumKeySdkModule.d.ts.map +1 -0
  82. package/build/src/{TransfergratisSdkModule.js → SanctumKeySdkModule.js} +2 -2
  83. package/build/src/SanctumKeySdkModule.js.map +1 -0
  84. package/build/src/{TransfergratisSdkModule.web.d.ts → SanctumKeySdkModule.web.d.ts} +4 -4
  85. package/build/src/SanctumKeySdkModule.web.d.ts.map +1 -0
  86. package/build/src/{TransfergratisSdkModule.web.js → SanctumKeySdkModule.web.js} +3 -3
  87. package/build/src/SanctumKeySdkModule.web.js.map +1 -0
  88. package/build/src/SanctumKeySdkView.d.ts +4 -0
  89. package/build/src/SanctumKeySdkView.d.ts.map +1 -0
  90. package/build/src/SanctumKeySdkView.js +7 -0
  91. package/build/src/SanctumKeySdkView.js.map +1 -0
  92. package/build/src/SanctumKeySdkView.web.d.ts +4 -0
  93. package/build/src/SanctumKeySdkView.web.d.ts.map +1 -0
  94. package/build/src/{TransfergratisSdkView.web.js → SanctumKeySdkView.web.js} +2 -2
  95. package/build/src/SanctumKeySdkView.web.js.map +1 -0
  96. package/build/src/api/axios.js +2 -2
  97. package/build/src/api/axios.js.map +1 -1
  98. package/build/src/components/EnhancedCameraView.d.ts.map +1 -1
  99. package/build/src/components/EnhancedCameraView.js +107 -330
  100. package/build/src/components/EnhancedCameraView.js.map +1 -1
  101. package/build/src/components/KYCElements/EmailVerificationTemplate.d.ts.map +1 -1
  102. package/build/src/components/KYCElements/EmailVerificationTemplate.js +114 -15
  103. package/build/src/components/KYCElements/EmailVerificationTemplate.js.map +1 -1
  104. package/build/src/components/KYCElements/IDCardCapture.d.ts.map +1 -1
  105. package/build/src/components/KYCElements/IDCardCapture.js +166 -695
  106. package/build/src/components/KYCElements/IDCardCapture.js.map +1 -1
  107. package/build/src/components/KYCElements/PhoneVerificationTemplate.d.ts.map +1 -1
  108. package/build/src/components/KYCElements/PhoneVerificationTemplate.js +282 -40
  109. package/build/src/components/KYCElements/PhoneVerificationTemplate.js.map +1 -1
  110. package/build/src/components/KYCElements/SelfieCapture.d.ts +1 -1
  111. package/build/src/components/KYCElements/SelfieCapture.d.ts.map +1 -1
  112. package/build/src/components/KYCElements/SelfieCapture.js +130 -192
  113. package/build/src/components/KYCElements/SelfieCapture.js.map +1 -1
  114. package/build/src/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -1
  115. package/build/src/components/KYCElements/SelfieCaptureTemplate.js +131 -433
  116. package/build/src/components/KYCElements/SelfieCaptureTemplate.js.map +1 -1
  117. package/build/src/components/NativeCameraView.js +1 -1
  118. package/build/src/components/NativeCameraView.js.map +1 -1
  119. package/build/src/components/OverLay/IdCard.d.ts +3 -2
  120. package/build/src/components/OverLay/IdCard.d.ts.map +1 -1
  121. package/build/src/components/OverLay/IdCard.js +149 -141
  122. package/build/src/components/OverLay/IdCard.js.map +1 -1
  123. package/build/src/components/OverLay/SelfieOverlay.d.ts +2 -1
  124. package/build/src/components/OverLay/SelfieOverlay.d.ts.map +1 -1
  125. package/build/src/components/OverLay/SelfieOverlay.js +37 -95
  126. package/build/src/components/OverLay/SelfieOverlay.js.map +1 -1
  127. package/build/src/components/OverLay/type.d.ts +1 -0
  128. package/build/src/components/OverLay/type.d.ts.map +1 -1
  129. package/build/src/components/OverLay/type.js.map +1 -1
  130. package/build/src/components/Svgs/scanningLine.d.ts +2 -1
  131. package/build/src/components/Svgs/scanningLine.d.ts.map +1 -1
  132. package/build/src/components/Svgs/scanningLine.js +55 -51
  133. package/build/src/components/Svgs/scanningLine.js.map +1 -1
  134. package/build/src/config/KYCConfig.js +1 -1
  135. package/build/src/config/KYCConfig.js.map +1 -1
  136. package/build/src/config/allowedDomains.js +6 -6
  137. package/build/src/config/allowedDomains.js.map +1 -1
  138. package/build/src/hooks/useTemplateKYCFlow.d.ts.map +1 -1
  139. package/build/src/hooks/useTemplateKYCFlow.js +37 -38
  140. package/build/src/hooks/useTemplateKYCFlow.js.map +1 -1
  141. package/build/src/index.d.ts +3 -3
  142. package/build/src/index.d.ts.map +1 -1
  143. package/build/src/index.js +3 -3
  144. package/build/src/index.js.map +1 -1
  145. package/build/src/modules/api/CardAuthentification.d.ts +0 -5
  146. package/build/src/modules/api/CardAuthentification.d.ts.map +1 -1
  147. package/build/src/modules/api/CardAuthentification.js +114 -116
  148. package/build/src/modules/api/CardAuthentification.js.map +1 -1
  149. package/build/src/modules/api/KYCService.d.ts +12 -1
  150. package/build/src/modules/api/KYCService.d.ts.map +1 -1
  151. package/build/src/modules/api/KYCService.js +102 -38
  152. package/build/src/modules/api/KYCService.js.map +1 -1
  153. package/build/src/modules/camera/NativeCameraModule.js +17 -17
  154. package/build/src/modules/camera/NativeCameraModule.js.map +1 -1
  155. package/expo-module.config.json +2 -2
  156. package/ios/TransfergratisSdk.podspec +2 -2
  157. package/ios/TransfergratisSdkModule.swift +12 -12
  158. package/package.json +9 -7
  159. package/src/App.tsx +2 -2
  160. package/src/{TransfergratisSdk.types.ts → SanctumKeySdk.types.ts} +2 -2
  161. package/src/{TransfergratisSdkModule.ts → SanctumKeySdkModule.ts} +3 -3
  162. package/src/{TransfergratisSdkModule.web.ts → SanctumKeySdkModule.web.ts} +3 -3
  163. package/src/SanctumKeySdkView.tsx +11 -0
  164. package/src/{TransfergratisSdkView.web.tsx → SanctumKeySdkView.web.tsx} +2 -2
  165. package/src/api/axios.ts +2 -2
  166. package/src/components/EnhancedCameraView.tsx +131 -385
  167. package/src/components/KYCElements/EmailVerificationTemplate.tsx +141 -26
  168. package/src/components/KYCElements/IDCardCapture.tsx +228 -868
  169. package/src/components/KYCElements/PhoneVerificationTemplate.tsx +342 -60
  170. package/src/components/KYCElements/SelfieCapture.tsx +184 -213
  171. package/src/components/KYCElements/SelfieCaptureTemplate.tsx +330 -662
  172. package/src/components/NativeCameraView.tsx +1 -1
  173. package/src/components/OverLay/IdCard.tsx +218 -217
  174. package/src/components/OverLay/SelfieOverlay.tsx +56 -134
  175. package/src/components/OverLay/type.ts +1 -0
  176. package/src/components/Svgs/scanningLine.tsx +71 -72
  177. package/src/config/KYCConfig.ts +1 -1
  178. package/src/config/allowedDomains.ts +6 -6
  179. package/src/hooks/useTemplateKYCFlow.tsx +45 -39
  180. package/src/i18n/README.md +1 -1
  181. package/src/index.ts +3 -3
  182. package/src/modules/api/CardAuthentification.ts +202 -200
  183. package/src/modules/api/KYCService.ts +169 -53
  184. package/src/modules/camera/NativeCameraModule.ts +17 -17
  185. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$1.class +0 -0
  186. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$2.class +0 -0
  187. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
  188. package/build/src/TransfergratisSdk.types.d.ts.map +0 -1
  189. package/build/src/TransfergratisSdk.types.js +0 -2
  190. package/build/src/TransfergratisSdk.types.js.map +0 -1
  191. package/build/src/TransfergratisSdkModule.d.ts.map +0 -1
  192. package/build/src/TransfergratisSdkModule.js.map +0 -1
  193. package/build/src/TransfergratisSdkModule.web.d.ts.map +0 -1
  194. package/build/src/TransfergratisSdkModule.web.js.map +0 -1
  195. package/build/src/TransfergratisSdkView.d.ts +0 -4
  196. package/build/src/TransfergratisSdkView.d.ts.map +0 -1
  197. package/build/src/TransfergratisSdkView.js +0 -7
  198. package/build/src/TransfergratisSdkView.js.map +0 -1
  199. package/build/src/TransfergratisSdkView.web.d.ts +0 -4
  200. package/build/src/TransfergratisSdkView.web.d.ts.map +0 -1
  201. package/build/src/TransfergratisSdkView.web.js.map +0 -1
  202. package/src/TransfergratisSdkView.tsx +0 -11
  203. /package/android/build/.transforms/{532c0e65d82f446633d0a7dab2772198 → ab90740579f5bd05b27b4343ada2d1c9}/results.bin +0 -0
  204. /package/android/build/.transforms/{532c0e65d82f446633d0a7dab2772198 → ab90740579f5bd05b27b4343ada2d1c9}/transformed/classes/classes_dex/classes.dex +0 -0
  205. /package/android/build/.transforms/{f62cb96b2d1f78ca96ab35932dd530dc → c9d62bb333688ab562f51958998d5a48}/results.bin +0 -0
  206. /package/android/build/{intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/transfergratis/com/BuildConfig.class → tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/BuildConfig.class.uniqueId0} +0 -0
@@ -1,4 +1,5 @@
1
- import { Dimensions, Image, StyleSheet, Text, View } from "react-native";
1
+ import React from "react";
2
+ import { Dimensions, StyleSheet, Text, View, Image } from "react-native";
2
3
  import { IdCardOverlayProps } from "./type";
3
4
  import Svg, { Rect, Path, Mask, Defs } from 'react-native-svg';
4
5
  import ScanningLine from "../Svgs/scanningLine";
@@ -10,80 +11,50 @@ const SelfieOverlay = ({ xMin, yMin, xMax, yMax, cornerOpacity, instructions, co
10
11
  const screenWidth = Dimensions.get('window').width;
11
12
  const screenHeight = Dimensions.get('window').height;
12
13
 
13
- // Dimensions de l'icône FrontSelfieIcon (240x285 selon le viewBox)
14
14
  const iconWidth = 240;
15
15
  const iconHeight = 285;
16
16
 
17
- // Calculer la position pour centrer l'icône
18
17
  const iconX = (screenWidth - iconWidth) / 2;
19
18
  const iconY = (screenHeight - iconHeight) / 3;
20
19
 
21
- // Position du centre pour le masque (doit correspondre au centre de l'icône)
22
20
  const maskCenterX = iconX + iconWidth / 2;
23
21
  const maskCenterY = iconY + iconHeight / 2;
24
22
 
25
- // Zone pour ScanningLine (basée sur la zone de l'icône)
26
23
  const scanningYMin = iconY;
27
24
  const scanningYMax = iconY + iconHeight;
28
25
 
29
26
  return (
30
- <View style={StyleSheet.absoluteFill}>
27
+ <View style={StyleSheet.absoluteFill} pointerEvents="none">
31
28
  {stepperProps ? (
32
29
  <StepOverlay {...stepperProps} />
33
30
  ) : null}
34
31
 
35
- <Svg
36
- height="100%"
37
- width="100%"
38
- style={[StyleSheet.absoluteFill]}
39
- >
32
+ <Svg height="100%" width="100%" style={[StyleSheet.absoluteFill]}>
40
33
  <Defs>
41
34
  <Mask id="faceMask">
42
- {/* Fond blanc - zone visible (extérieur) */}
43
- <Rect
44
- x="0"
45
- y="0"
46
- width="100%"
47
- height="100%"
48
- fill="white"
49
- />
50
- {/* Zone noire - zone masquée (forme du visage) - exactement alignée avec l'icône */}
35
+ <Rect x="0" y="0" width="100%" height="100%" fill="white" />
51
36
  <Path
52
- d="M35.4198 48.9242C38.2153 41.9014 42.5851 35.6693 48.3859 30.8232C61.3601 19.9842 88.1543 1.5 120 1.5C151.846 1.5 178.64 19.9842 191.614 30.8232C197.415 35.6693 201.785 41.9014 204.58 48.9242C210.484 63.7564 220 93.0114 220 127.5C220 168.082 204.19 212.617 198.234 227.954C196.792 231.667 194.971 235.196 192.628 238.417C183.46 251.021 156.313 283.5 120 283.5C83.6867 283.5 56.5401 251.021 47.3723 238.417C45.0294 235.196 43.2081 231.667 41.7663 227.954C35.8102 212.617 20 168.082 20 127.5C20 93.0114 29.5157 63.7564 35.4198 48.9242Z"
37
+ d="M35.4198 48.9242C38.2153 41.9014 42.5851 30.8232 48.3859 30.8232C61.3601 19.9842 88.1543 1.5 120 1.5C151.846 1.5 178.64 19.9842 191.614 30.8232C197.415 35.6693 201.785 41.9014 204.58 48.9242C210.484 63.7564 220 93.0114 220 127.5C220 168.082 204.19 212.617 198.234 227.954C196.792 231.667 194.971 235.196 192.628 238.417C183.46 251.021 156.313 283.5 120 283.5C83.6867 283.5 56.5401 251.021 47.3723 238.417C45.0294 235.196 43.2081 231.667 41.7663 227.954C35.8102 212.617 20 168.082 20 127.5C20 93.0114 29.5157 63.7564 35.4198 48.9242Z"
53
38
  fill="black"
54
39
  transform={`translate(${maskCenterX}, ${maskCenterY}) translate(-120, -142.5)`}
55
40
  />
56
41
  </Mask>
57
42
  </Defs>
58
43
 
59
- {/* Overlay semi-transparent avec masque */}
60
- <Rect
61
- x="0"
62
- y="0"
63
- width="100%"
64
- height="100%"
65
- fill="rgba(0, 0, 0, 0.5)"
66
- mask="url(#faceMask)"
67
- />
44
+ <Rect x="0" y="0" width="100%" height="100%" fill="rgba(0, 0, 0, 0.65)" mask="url(#faceMask)" />
68
45
  {isSuccess ? null : <ScanningLine yMin={scanningYMin} screenWidth={screenWidth} height={screenHeight} yMax={scanningYMax} />}
69
46
  </Svg>
70
47
 
71
- {/* Container de l'icône - centré automatiquement */}
72
- <View style={[styles.iconContainer, {
73
- left: iconX,
74
- top: iconY,
75
- width: iconWidth,
76
- height: iconHeight,
77
- }]}>
48
+ <View style={[styles.iconContainer, { left: iconX, top: iconY, width: iconWidth, height: iconHeight }]}>
78
49
  {orientation === "center" ? <FrontSelfieIcon /> : <SideSelfieIcon />}
79
50
  </View>
80
51
 
81
- {/* Flèche directionnelle pour les orientations latérales */}
82
- {orientation !== "center" ? (
52
+ {/* 🚨 REVERTED TO USE YOUR GIF FILE */}
53
+ {orientation && orientation !== "center" ? (
83
54
  <View style={[
84
55
  styles.arrowContainer,
85
56
  {
86
- top: iconY + iconHeight / 2 - 50, // Centré verticalement par rapport à l'icône
57
+ top: iconY + iconHeight / 2 - 50,
87
58
  left: orientation === "left" ? iconX - 72 : 'auto',
88
59
  right: orientation === "right" ? iconX - 75 : 'auto'
89
60
  }
@@ -93,119 +64,70 @@ const SelfieOverlay = ({ xMin, yMin, xMax, yMax, cornerOpacity, instructions, co
93
64
  resizeMode="contain"
94
65
  style={[
95
66
  styles.arrowImage,
67
+ // If the orientation is right, we flip the image horizontally
96
68
  { transform: orientation === "right" ? [{ scaleX: -1 }] : [] }
97
69
  ]}
98
70
  />
99
71
  </View>
100
72
  ) : null}
101
73
 
102
-
74
+ {/* UPGRADED INSTRUCTIONS UI */}
103
75
  <View style={styles.bottomIntruction}>
104
- <Text style={styles.bottomTitle}>
105
- {instructionsTile}
106
- </Text>
107
- <Text style={styles.bottomSubtitle}>
108
- {instructionsSubtitle}
109
- </Text>
76
+ <Text style={styles.bottomTitle}>{instructionsTile}</Text>
77
+ <Text style={styles.bottomSubtitle}>{instructionsSubtitle}</Text>
110
78
  </View>
111
79
  </View>
112
- )
113
- }
80
+ );
81
+ };
114
82
 
115
83
  export default SelfieOverlay;
116
84
 
117
-
118
85
  const styles = StyleSheet.create({
119
- overlay: {
120
- position: 'absolute',
121
- top: 0,
122
- left: 0,
123
- width: '100%',
124
- height: '50%',
125
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
126
- },
127
- svg: {
128
- position: 'absolute',
129
- top: 0,
130
- left: 0,
131
- width: '100%',
132
- height: '100%',
133
- },
134
- topIntruction: {
135
- zIndex: 1000,
136
- flexDirection: 'row',
86
+ bottomIntruction: {
87
+ position: 'absolute',
88
+ bottom: 50,
89
+ left: 0,
90
+ right: 0,
91
+ width: '100%',
92
+ paddingHorizontal: 24,
137
93
  alignItems: 'center',
138
- justifyContent: 'center',
139
- paddingVertical: 20,
140
- paddingHorizontal: 10,
141
- marginHorizontal: 20,
142
- marginTop: 10,
143
- backgroundColor: "#FDE04730",
144
- borderColor: "#FDE047",
145
- borderWidth: 1,
146
- borderRadius: 10,
147
- gap: 10,
148
94
  },
149
- topIntructionText: {
150
- color: '#FDE047',
151
- fontSize: 14,
152
- fontWeight: 'bold',
95
+ bottomTitle: {
96
+ color: '#FFFFFF',
97
+ fontSize: 24,
98
+ fontWeight: 'bold',
153
99
  textAlign: 'center',
100
+ textShadowColor: 'rgba(0, 0, 0, 0.8)',
101
+ textShadowOffset: { width: 0, height: 2 },
102
+ textShadowRadius: 4,
154
103
  },
155
- bottomIntruction: {
156
- position: 'absolute',
157
- bottom: 0,
158
- left: 0,
159
- width: '100%',
160
- height: '35%',
104
+ bottomSubtitle: {
105
+ color: '#FFFFFF',
106
+ marginTop: 12,
107
+ fontSize: 15,
108
+ fontWeight: '600',
109
+ textAlign: 'center',
110
+ lineHeight: 22,
111
+ backgroundColor: 'rgba(0,0,0,0.6)',
112
+ paddingVertical: 10,
161
113
  paddingHorizontal: 20,
114
+ borderRadius: 20,
115
+ overflow: 'hidden',
162
116
  },
163
- bottomIntructionTextBold: {
164
- color: 'white',
165
- fontSize: 16,
166
- fontWeight: 'bold',
167
- textAlign: 'center',
117
+ iconContainer: {
118
+ position: 'absolute',
119
+ justifyContent: 'center',
120
+ alignItems: 'center'
168
121
  },
169
- bottomIntructionText: {
170
- color: 'white',
171
- fontSize: 14,
172
- fontWeight: 'bold',
173
- textAlign: 'center',
174
- },
175
- bottomTitle: {
176
- color: 'white',
177
- fontSize: 25,
178
- fontWeight: 'bold',
179
- textAlign: 'center',
180
- },
181
- bottomSubtitle: {
182
- color: 'white',
183
- marginTop: 15,
184
- fontSize: 14,
185
- fontWeight: '500',
186
- textAlign: 'center',
187
- },
188
-
189
-
190
- image: {
191
- position: 'absolute',
192
- borderRadius: 10,
193
- },
194
- iconContainer: {
195
- position: 'absolute',
196
- justifyContent: 'center',
197
- alignItems: 'center',
198
- },
199
- arrowContainer: {
200
- position: 'absolute',
201
- width: 100,
202
- height: 100,
203
- justifyContent: 'center',
204
- alignItems: 'center',
122
+ arrowContainer: {
123
+ position: 'absolute',
124
+ width: 100,
125
+ height: 100,
126
+ justifyContent: 'center',
127
+ alignItems: 'center'
205
128
  },
206
129
  arrowImage: {
207
- width: 100,
208
- height: 100,
209
- objectFit: 'contain',
210
- },
211
- })
130
+ width: 80,
131
+ height: 80,
132
+ }
133
+ });
@@ -65,6 +65,7 @@ export interface EnhancedCameraViewProps {
65
65
  showCaptureButton?: boolean;
66
66
  showSwitchCamera?: boolean;
67
67
  overlayComponent?: React.ReactNode;
68
+ isProcessing?: boolean;
68
69
  bbox?: {
69
70
  xMin: number;
70
71
  yMin: number;
@@ -1,88 +1,87 @@
1
- import { useEffect, useState } from "react";
2
- import { StyleSheet } from "react-native";
3
- import Svg, { Defs, LinearGradient, Rect, Stop } from "react-native-svg"
1
+ import React, { useEffect, useRef } from 'react';
2
+ import { Animated, Easing, StyleSheet } from 'react-native';
3
+ import Svg, { LinearGradient, Rect, Stop, Defs } from 'react-native-svg';
4
4
 
5
5
  interface ScanningLineProps {
6
- yMin: number,
7
- yMax: number
8
- screenWidth: number,
9
- height: number
6
+ yMin: number;
7
+ yMax: number;
8
+ screenWidth: number;
9
+ height: number;
10
10
  }
11
- const ScanningLine = ({ yMin, screenWidth, height, yMax }: ScanningLineProps) => {
12
11
 
13
- const [scanLineX, setScanLineX] = useState<{
14
- val: number,
15
- direction: 'up' | 'down'
16
- }>({
17
- val: yMin - (40 + 280),
18
- direction: 'down'
19
- });
20
-
21
- useEffect(() => {
22
- const interval = setInterval(() => {
23
- setScanLineX(prev => {
24
-
25
- const newX = prev.val + (prev.direction === 'up' ? -1 : 1) * Math.round(Math.random() * 2); // Vitesse de déplacement horizontal
26
- if (prev.direction === "down") {
27
- if (newX > yMax - (280 - 40)) {
28
- return { val: yMax + (40), direction: 'up' }
29
- } else {
30
- return { val: newX, direction: 'down' }
31
- }
32
- } else {
33
- if (newX < yMin - (40)) {
34
- return { val: yMin - (40 + 280), direction: 'down' }
35
- } else {
36
- return { val: newX, direction: 'up' }
37
- }
38
- }
39
-
40
- });
41
- }, 2);
12
+ const ScanningLine = ({ yMin, yMax, screenWidth, height }: ScanningLineProps): React.ReactElement => {
13
+ const animatedValue = useRef(new Animated.Value(0)).current;
42
14
 
43
- return () => clearInterval(interval);
44
- }, []);
45
-
46
-
47
-
48
- return <Svg width={screenWidth} height={height} style={styles.svg}>
49
- <Defs>
50
- <LinearGradient id="grad-rect" x1="0%"
51
- y1={scanLineX.direction === 'up' ? "100%" : "0%"} x2="0%"
52
- y2={scanLineX.direction === 'up' ? "0%" : "100%"}>
53
- <Stop offset="30%" stopColor="#2DBD60" stopOpacity="0" />
54
- <Stop offset="40%" stopColor="#2DBD60" stopOpacity="0" />
55
- <Stop offset="50%" stopColor="#2DBD60" stopOpacity="0" />
56
- <Stop offset="60%" stopColor="#2DBD60" stopOpacity="0" />
57
- <Stop offset="70%" stopColor="#2DBD60" stopOpacity="0.02" />
58
- <Stop offset="88%" stopColor="#2DBD60" stopOpacity="0.09" />
59
- <Stop offset="90%" stopColor="#2DBD60" stopOpacity="0.42" />
60
- <Stop offset="100%" stopColor="#2DBD60" stopOpacity="1" />
61
- </LinearGradient>
62
- </Defs>
15
+ const boxHeight = yMax - yMin;
63
16
 
17
+ useEffect(() => {
18
+ const startAnimation = () => {
19
+ animatedValue.setValue(0);
20
+ Animated.loop(
21
+ Animated.timing(animatedValue, {
22
+ toValue: 1,
23
+ duration: 2500,
24
+ easing: Easing.linear,
25
+ useNativeDriver: true,
26
+ })
27
+ ).start();
28
+ };
64
29
 
65
- <Rect x="0"
66
- y={scanLineX.val}
67
- width={screenWidth}
68
- height="280"
69
- rx="0"
70
- ry="0"
71
- fill="url(#grad-rect)"
30
+ startAnimation();
31
+
32
+ return () => {
33
+ animatedValue.stopAnimation();
34
+ };
35
+ }, [animatedValue, boxHeight]);
72
36
 
73
- />
74
- </Svg>
37
+ const translateY = animatedValue.interpolate({
38
+ inputRange: [0, 0.5, 1],
39
+ outputRange: [yMin, yMax, yMin],
40
+ });
75
41
 
76
- }
42
+ return (
43
+ <Animated.View
44
+ style={[
45
+ styles.container,
46
+ {
47
+ width: screenWidth,
48
+ height: height,
49
+ transform: [{ translateY }],
50
+ },
51
+ ]}
52
+ pointerEvents="none"
53
+ >
54
+ <Svg height="4" width={screenWidth}>
55
+ <Defs>
56
+ <LinearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="0%">
57
+ <Stop offset="0%" stopColor="transparent" stopOpacity="0" />
58
+ <Stop offset="50%" stopColor="#22C55E" stopOpacity="1" />
59
+ <Stop offset="100%" stopColor="transparent" stopOpacity="0" />
60
+ </LinearGradient>
61
+ </Defs>
62
+ <Rect x="0" y="0" width={screenWidth} height="4" fill="url(#grad)" />
63
+ </Svg>
64
+
65
+ <Svg height="40" width={screenWidth} style={{ marginTop: -2 }}>
66
+ <Defs>
67
+ <LinearGradient id="glow" x1="0%" y1="0%" x2="0%" y2="100%">
68
+ <Stop offset="0%" stopColor="#22C55E" stopOpacity="0.4" />
69
+ <Stop offset="100%" stopColor="#22C55E" stopOpacity="0" />
70
+ </LinearGradient>
71
+ </Defs>
72
+ <Rect x="0" y="0" width={screenWidth} height="40" fill="url(#glow)" />
73
+ </Svg>
74
+ </Animated.View>
75
+ );
76
+ };
77
77
 
78
78
  const styles = StyleSheet.create({
79
- svg: {
79
+ container: {
80
80
  position: 'absolute',
81
81
  top: 0,
82
82
  left: 0,
83
- width: '100%',
84
- height: '100%',
83
+ zIndex: 10,
85
84
  },
86
- })
85
+ });
87
86
 
88
- export default ScanningLine
87
+ export default ScanningLine;
@@ -6,7 +6,7 @@ class KYCConfig {
6
6
 
7
7
  private backendUrls: Record<BackendEnvironment, string> = {
8
8
  PRODUCTION: 'https://service.sanctumkey.com/api/v1',
9
- TEST: 'https://kyc-backend.transfergratis.net/api/v1', // Placeholder URL
9
+ TEST: 'https://kyc-backend.SanctumKey.net/api/v1',
10
10
  };
11
11
 
12
12
  private constructor() { }
@@ -12,11 +12,11 @@ export interface AllowedDomainConfig {
12
12
  // Default configuration - can be overridden via environment variables
13
13
  const DEFAULT_CONFIG: AllowedDomainConfig = {
14
14
  domains: [
15
- 'transfergratis.com',
16
- 'www.transfergratis.com',
17
- 'admin.transfergratis.com',
18
- 'dashboard.transfergratis.com',
19
- 'preweb.transfergratis.net',
15
+ 'SanctumKey.com',
16
+ 'www.SanctumKey.com',
17
+ 'admin.SanctumKey.com',
18
+ 'dashboard.SanctumKey.com',
19
+ 'preweb.SanctumKey.net',
20
20
  // Add other trusted domains here
21
21
  ],
22
22
  enforceHttps: true,
@@ -59,7 +59,7 @@ export const isDomainAllowed = (domain: string): boolean => {
59
59
  return true;
60
60
  }
61
61
 
62
- // Subdomain match (e.g., app.transfergratis.com matches transfergratis.com)
62
+ // Subdomain match (e.g., app.SanctumKey.com matches SanctumKey.com)
63
63
  if (domain.endsWith('.' + allowedDomain)) {
64
64
  return true;
65
65
  }
@@ -671,71 +671,77 @@ export const useTemplateKYCFlow = (
671
671
  logger.log('Initializing session');
672
672
 
673
673
  const token = apiKey ? undefined : await authentification();
674
- console.log('token in initializeSession', { token, apiKey },);
674
+ console.log('token in initializeSession', { token, apiKey });
675
675
 
676
- // Check if we already have a session ID from URL params (passed via state or prop)
677
- let session;
678
- const existingSessionId = state.session.session_id; // This might be set from initial props if we add logic for it
676
+ if (!token && !apiKey) {
677
+ throw new Error("Cannot proceed: Authentication token and API key are both missing.");
678
+ }
679
+
680
+ let resolvedSessionId = state.session.session_id;
679
681
 
680
- if (existingSessionId && existingSessionId.length > 0) {
681
- logger.log('Resuming existing session:', existingSessionId);
682
- // Verify existence/validity if needed, for now trust the ID and just fetch/use it
683
- session = { session_id: existingSessionId };
682
+ if (resolvedSessionId && resolvedSessionId.length > 0) {
683
+ logger.log('Resuming existing session:', resolvedSessionId);
684
684
  } else {
685
- session = await kycService.newSession({ token, apiKey });
685
+ const newSessionRes = await kycService.newSession({ token, apiKey });
686
+ resolvedSessionId = newSessionRes?.session_id;
687
+
688
+ if (!resolvedSessionId) {
689
+ throw new Error("Backend response did not contain a valid session_id.");
690
+ }
686
691
  }
687
692
 
688
- // Notify session creation/resume as soon as we have an ID.
689
- // This makes save_session webhook calls more reliable on all runtimes.
690
- if (onSessionSave && !hasSavedSessionRef.current && session?.session_id) {
693
+ if (onSessionSave && !hasSavedSessionRef.current && resolvedSessionId) {
691
694
  hasSavedSessionRef.current = true;
692
- onSessionSave(session.session_id);
695
+ onSessionSave(resolvedSessionId);
693
696
  }
694
697
 
695
- // Align backend flow from step 0 with initialize_session
696
- try {
697
- const templateId = chooseTemplateId(templateWithReviewAndVerification);
698
- await kycService.verificationSession({
699
- session_id: session.session_id,
700
- step: 0,
701
- data: {
702
- template_id: templateId,
703
- metadata: {
704
- language: initialLanguage,
705
- ...(referenceId ? { reference_id: referenceId } : {}),
706
- },
698
+ const templateId = chooseTemplateId(templateWithReviewAndVerification);
699
+
700
+ // This is the API call that we know succeeds
701
+ await kycService.verificationSession({
702
+ session_id: resolvedSessionId,
703
+ step: 0,
704
+ data: {
705
+ template_id: templateId,
706
+ metadata: {
707
+ language: initialLanguage,
708
+ ...(referenceId ? { reference_id: referenceId } : {}),
707
709
  },
708
- templateId: templateId,
709
- token: token,
710
- action: 'initialize_session',
711
- apiKey: apiKey,
712
- });
713
- } catch (e) {
714
- logger.error('Error initializing session:', JSON.stringify(e, null, 2));
715
- // Non-fatal: we will surface errors via state below if needed
716
- }
710
+ },
711
+ templateId: templateId,
712
+ token: token ?? "",
713
+ action: 'initialize_session',
714
+ apiKey: apiKey,
715
+ });
716
+
717
717
 
718
718
  setState(prev => ({
719
719
  ...prev,
720
720
  session: {
721
721
  ...prev.session,
722
- session_id: session.session_id,
723
- token: token,
722
+ session_id: resolvedSessionId,
723
+ token: token ?? "",
724
724
  isInitialized: true,
725
725
  isProcessing: false,
726
726
  error: null,
727
727
  }
728
728
  }));
729
- } catch (error) {
730
729
 
731
- logger.error('Error initializing session:', JSON.stringify(error, null, 2));
730
+ } catch (error: any) {
731
+ // ✅ FIX: Extract the actual message so it doesn't log as {}
732
+ const errorMessage = error?.response?.data?.message
733
+ || error?.message
734
+ || "Erreur lors de l'initialisation de la session";
735
+
736
+ logger.error('Error initializing sessionnnn:', errorMessage);
737
+
732
738
  setState(prev => ({
733
739
  ...prev,
734
740
  session: {
735
741
  ...prev.session,
736
742
  isInitialized: false,
737
743
  isProcessing: false,
738
- error: "Erreur lors de l'initialisation de la session",
744
+ error: errorMessage,
739
745
  },
740
746
  }));
741
747
  }
@@ -1,4 +1,4 @@
1
- # 🌍 Système d'Internationalisation (i18n) - Transfergratis SDK
1
+ # 🌍 Système d'Internationalisation (i18n) - SanctumKey SDK
2
2
 
3
3
  Ce système d'internationalisation permet de traduire facilement votre application KYC en plusieurs langues.
4
4
 
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './TransfergratisSdk.types';
1
+ export * from './SanctumKeySdk.types';
2
2
 
3
3
 
4
4
  // Export KYC types
@@ -8,9 +8,9 @@ export * from './types/KYC.types';
8
8
  export * from './types/env.types';
9
9
 
10
10
 
11
- export { TemplateKYCExample as LaunchTransferGratisKYC } from './components/TemplateKYCExample';
11
+ export { TemplateKYCExample as LaunchSanctumKeyKYC } from './components/TemplateKYCExample';
12
12
  // Backward compatibility for existing integrations using the typo.
13
- export { TemplateKYCExample as LauchTransferGratisKYC } from './components/TemplateKYCExample';
13
+ export { TemplateKYCExample as LauchSanctumKeyKYC } from './components/TemplateKYCExample';
14
14
 
15
15
  // Export Template Flow Components
16
16
  export { TemplateKYCFlow } from './components/TemplateKYCFlowRefactored';