@kwik-id/sdk-react-native 0.0.0-stage → 0.1.0-alpha.1

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 (269) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +312 -2
  3. package/app.plugin.js +40 -0
  4. package/lib/commonjs/api/api-client.js +213 -0
  5. package/lib/commonjs/api/api-client.js.map +1 -0
  6. package/lib/commonjs/api/api-error.js +29 -0
  7. package/lib/commonjs/api/api-error.js.map +1 -0
  8. package/lib/commonjs/api/index.js +33 -0
  9. package/lib/commonjs/api/index.js.map +1 -0
  10. package/lib/commonjs/api/upload.js +74 -0
  11. package/lib/commonjs/api/upload.js.map +1 -0
  12. package/lib/commonjs/camera/camera-view.js +227 -0
  13. package/lib/commonjs/camera/camera-view.js.map +1 -0
  14. package/lib/commonjs/camera/index.js +20 -0
  15. package/lib/commonjs/camera/index.js.map +1 -0
  16. package/lib/commonjs/camera/photo-capture.js +50 -0
  17. package/lib/commonjs/camera/photo-capture.js.map +1 -0
  18. package/lib/commonjs/crypto/fingerprint.js +43 -0
  19. package/lib/commonjs/crypto/fingerprint.js.map +1 -0
  20. package/lib/commonjs/crypto/hmac.js +150 -0
  21. package/lib/commonjs/crypto/hmac.js.map +1 -0
  22. package/lib/commonjs/crypto/index.js +39 -0
  23. package/lib/commonjs/crypto/index.js.map +1 -0
  24. package/lib/commonjs/crypto/session-manager.js +173 -0
  25. package/lib/commonjs/crypto/session-manager.js.map +1 -0
  26. package/lib/commonjs/i18n/en.js +297 -0
  27. package/lib/commonjs/i18n/en.js.map +1 -0
  28. package/lib/commonjs/i18n/fr.js +294 -0
  29. package/lib/commonjs/i18n/fr.js.map +1 -0
  30. package/lib/commonjs/i18n/index.js +34 -0
  31. package/lib/commonjs/i18n/index.js.map +1 -0
  32. package/lib/commonjs/i18n/locale.js +20 -0
  33. package/lib/commonjs/i18n/locale.js.map +1 -0
  34. package/lib/commonjs/i18n/translator.js +37 -0
  35. package/lib/commonjs/i18n/translator.js.map +1 -0
  36. package/lib/commonjs/index.js +187 -0
  37. package/lib/commonjs/index.js.map +1 -0
  38. package/lib/commonjs/lib/device-detector.js +34 -0
  39. package/lib/commonjs/lib/device-detector.js.map +1 -0
  40. package/lib/commonjs/lib/event-emitter.js +85 -0
  41. package/lib/commonjs/lib/event-emitter.js.map +1 -0
  42. package/lib/commonjs/lib/index.js +63 -0
  43. package/lib/commonjs/lib/index.js.map +1 -0
  44. package/lib/commonjs/lib/kwik-id-rn-sdk.js +156 -0
  45. package/lib/commonjs/lib/kwik-id-rn-sdk.js.map +1 -0
  46. package/lib/commonjs/lib/verification-machine.js +276 -0
  47. package/lib/commonjs/lib/verification-machine.js.map +1 -0
  48. package/lib/commonjs/package.json +1 -0
  49. package/lib/commonjs/types/events.js +6 -0
  50. package/lib/commonjs/types/events.js.map +1 -0
  51. package/lib/commonjs/types/index.js +2 -0
  52. package/lib/commonjs/types/index.js.map +1 -0
  53. package/lib/commonjs/ui/components/KwikIDVerificationModal.js +407 -0
  54. package/lib/commonjs/ui/components/KwikIDVerificationModal.js.map +1 -0
  55. package/lib/commonjs/ui/components/screens.js +338 -0
  56. package/lib/commonjs/ui/components/screens.js.map +1 -0
  57. package/lib/commonjs/ui/context/kwik-id-provider.js +52 -0
  58. package/lib/commonjs/ui/context/kwik-id-provider.js.map +1 -0
  59. package/lib/commonjs/ui/hooks/use-kwik-verification.js +77 -0
  60. package/lib/commonjs/ui/hooks/use-kwik-verification.js.map +1 -0
  61. package/lib/commonjs/ui/index.js +33 -0
  62. package/lib/commonjs/ui/index.js.map +1 -0
  63. package/lib/module/api/api-client.js +208 -0
  64. package/lib/module/api/api-client.js.map +1 -0
  65. package/lib/module/api/api-error.js +24 -0
  66. package/lib/module/api/api-error.js.map +1 -0
  67. package/lib/module/api/index.js +6 -0
  68. package/lib/module/api/index.js.map +1 -0
  69. package/lib/module/api/upload.js +68 -0
  70. package/lib/module/api/upload.js.map +1 -0
  71. package/lib/module/camera/camera-view.js +222 -0
  72. package/lib/module/camera/camera-view.js.map +1 -0
  73. package/lib/module/camera/index.js +5 -0
  74. package/lib/module/camera/index.js.map +1 -0
  75. package/lib/module/camera/photo-capture.js +45 -0
  76. package/lib/module/camera/photo-capture.js.map +1 -0
  77. package/lib/module/crypto/fingerprint.js +37 -0
  78. package/lib/module/crypto/fingerprint.js.map +1 -0
  79. package/lib/module/crypto/hmac.js +143 -0
  80. package/lib/module/crypto/hmac.js.map +1 -0
  81. package/lib/module/crypto/index.js +6 -0
  82. package/lib/module/crypto/index.js.map +1 -0
  83. package/lib/module/crypto/session-manager.js +169 -0
  84. package/lib/module/crypto/session-manager.js.map +1 -0
  85. package/lib/module/i18n/en.js +293 -0
  86. package/lib/module/i18n/en.js.map +1 -0
  87. package/lib/module/i18n/fr.js +290 -0
  88. package/lib/module/i18n/fr.js.map +1 -0
  89. package/lib/module/i18n/index.js +11 -0
  90. package/lib/module/i18n/index.js.map +1 -0
  91. package/lib/module/i18n/locale.js +15 -0
  92. package/lib/module/i18n/locale.js.map +1 -0
  93. package/lib/module/i18n/translator.js +34 -0
  94. package/lib/module/i18n/translator.js.map +1 -0
  95. package/lib/module/index.js +30 -0
  96. package/lib/module/index.js.map +1 -0
  97. package/lib/module/lib/device-detector.js +26 -0
  98. package/lib/module/lib/device-detector.js.map +1 -0
  99. package/lib/module/lib/event-emitter.js +80 -0
  100. package/lib/module/lib/event-emitter.js.map +1 -0
  101. package/lib/module/lib/index.js +6 -0
  102. package/lib/module/lib/index.js.map +1 -0
  103. package/lib/module/lib/kwik-id-rn-sdk.js +150 -0
  104. package/lib/module/lib/kwik-id-rn-sdk.js.map +1 -0
  105. package/lib/module/lib/verification-machine.js +268 -0
  106. package/lib/module/lib/verification-machine.js.map +1 -0
  107. package/lib/module/package.json +1 -0
  108. package/lib/module/types/events.js +4 -0
  109. package/lib/module/types/events.js.map +1 -0
  110. package/lib/module/types/index.js +2 -0
  111. package/lib/module/types/index.js.map +1 -0
  112. package/lib/module/ui/components/KwikIDVerificationModal.js +402 -0
  113. package/lib/module/ui/components/KwikIDVerificationModal.js.map +1 -0
  114. package/lib/module/ui/components/screens.js +328 -0
  115. package/lib/module/ui/components/screens.js.map +1 -0
  116. package/lib/module/ui/context/kwik-id-provider.js +46 -0
  117. package/lib/module/ui/context/kwik-id-provider.js.map +1 -0
  118. package/lib/module/ui/hooks/use-kwik-verification.js +72 -0
  119. package/lib/module/ui/hooks/use-kwik-verification.js.map +1 -0
  120. package/lib/module/ui/index.js +6 -0
  121. package/lib/module/ui/index.js.map +1 -0
  122. package/lib/typescript/commonjs/api/api-client.d.ts +82 -0
  123. package/lib/typescript/commonjs/api/api-client.d.ts.map +1 -0
  124. package/lib/typescript/commonjs/api/api-error.d.ts +13 -0
  125. package/lib/typescript/commonjs/api/api-error.d.ts.map +1 -0
  126. package/lib/typescript/commonjs/api/index.d.ts +6 -0
  127. package/lib/typescript/commonjs/api/index.d.ts.map +1 -0
  128. package/lib/typescript/commonjs/api/upload.d.ts +19 -0
  129. package/lib/typescript/commonjs/api/upload.d.ts.map +1 -0
  130. package/lib/typescript/commonjs/camera/camera-view.d.ts +25 -0
  131. package/lib/typescript/commonjs/camera/camera-view.d.ts.map +1 -0
  132. package/lib/typescript/commonjs/camera/index.d.ts +5 -0
  133. package/lib/typescript/commonjs/camera/index.d.ts.map +1 -0
  134. package/lib/typescript/commonjs/camera/photo-capture.d.ts +9 -0
  135. package/lib/typescript/commonjs/camera/photo-capture.d.ts.map +1 -0
  136. package/lib/typescript/commonjs/crypto/fingerprint.d.ts +3 -0
  137. package/lib/typescript/commonjs/crypto/fingerprint.d.ts.map +1 -0
  138. package/lib/typescript/commonjs/crypto/hmac.d.ts +18 -0
  139. package/lib/typescript/commonjs/crypto/hmac.d.ts.map +1 -0
  140. package/lib/typescript/commonjs/crypto/index.d.ts +4 -0
  141. package/lib/typescript/commonjs/crypto/index.d.ts.map +1 -0
  142. package/lib/typescript/commonjs/crypto/session-manager.d.ts +27 -0
  143. package/lib/typescript/commonjs/crypto/session-manager.d.ts.map +1 -0
  144. package/lib/typescript/commonjs/i18n/en.d.ts +291 -0
  145. package/lib/typescript/commonjs/i18n/en.d.ts.map +1 -0
  146. package/lib/typescript/commonjs/i18n/fr.d.ts +6 -0
  147. package/lib/typescript/commonjs/i18n/fr.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/i18n/index.d.ts +10 -0
  149. package/lib/typescript/commonjs/i18n/index.d.ts.map +1 -0
  150. package/lib/typescript/commonjs/i18n/locale.d.ts +4 -0
  151. package/lib/typescript/commonjs/i18n/locale.d.ts.map +1 -0
  152. package/lib/typescript/commonjs/i18n/translator.d.ts +15 -0
  153. package/lib/typescript/commonjs/i18n/translator.d.ts.map +1 -0
  154. package/lib/typescript/commonjs/index.d.ts +24 -0
  155. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  156. package/lib/typescript/commonjs/lib/device-detector.d.ts +5 -0
  157. package/lib/typescript/commonjs/lib/device-detector.d.ts.map +1 -0
  158. package/lib/typescript/commonjs/lib/event-emitter.d.ts +19 -0
  159. package/lib/typescript/commonjs/lib/event-emitter.d.ts.map +1 -0
  160. package/lib/typescript/commonjs/lib/index.d.ts +5 -0
  161. package/lib/typescript/commonjs/lib/index.d.ts.map +1 -0
  162. package/lib/typescript/commonjs/lib/kwik-id-rn-sdk.d.ts +43 -0
  163. package/lib/typescript/commonjs/lib/kwik-id-rn-sdk.d.ts.map +1 -0
  164. package/lib/typescript/commonjs/lib/verification-machine.d.ts +78 -0
  165. package/lib/typescript/commonjs/lib/verification-machine.d.ts.map +1 -0
  166. package/lib/typescript/commonjs/package.json +1 -0
  167. package/lib/typescript/commonjs/types/events.d.ts +94 -0
  168. package/lib/typescript/commonjs/types/events.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/types/index.d.ts +242 -0
  170. package/lib/typescript/commonjs/types/index.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/ui/components/KwikIDVerificationModal.d.ts +21 -0
  172. package/lib/typescript/commonjs/ui/components/KwikIDVerificationModal.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/ui/components/screens.d.ts +46 -0
  174. package/lib/typescript/commonjs/ui/components/screens.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/ui/context/kwik-id-provider.d.ts +19 -0
  176. package/lib/typescript/commonjs/ui/context/kwik-id-provider.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/ui/hooks/use-kwik-verification.d.ts +29 -0
  178. package/lib/typescript/commonjs/ui/hooks/use-kwik-verification.d.ts.map +1 -0
  179. package/lib/typescript/commonjs/ui/index.d.ts +7 -0
  180. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -0
  181. package/lib/typescript/module/api/api-client.d.ts +82 -0
  182. package/lib/typescript/module/api/api-client.d.ts.map +1 -0
  183. package/lib/typescript/module/api/api-error.d.ts +13 -0
  184. package/lib/typescript/module/api/api-error.d.ts.map +1 -0
  185. package/lib/typescript/module/api/index.d.ts +6 -0
  186. package/lib/typescript/module/api/index.d.ts.map +1 -0
  187. package/lib/typescript/module/api/upload.d.ts +19 -0
  188. package/lib/typescript/module/api/upload.d.ts.map +1 -0
  189. package/lib/typescript/module/camera/camera-view.d.ts +25 -0
  190. package/lib/typescript/module/camera/camera-view.d.ts.map +1 -0
  191. package/lib/typescript/module/camera/index.d.ts +5 -0
  192. package/lib/typescript/module/camera/index.d.ts.map +1 -0
  193. package/lib/typescript/module/camera/photo-capture.d.ts +9 -0
  194. package/lib/typescript/module/camera/photo-capture.d.ts.map +1 -0
  195. package/lib/typescript/module/crypto/fingerprint.d.ts +3 -0
  196. package/lib/typescript/module/crypto/fingerprint.d.ts.map +1 -0
  197. package/lib/typescript/module/crypto/hmac.d.ts +18 -0
  198. package/lib/typescript/module/crypto/hmac.d.ts.map +1 -0
  199. package/lib/typescript/module/crypto/index.d.ts +4 -0
  200. package/lib/typescript/module/crypto/index.d.ts.map +1 -0
  201. package/lib/typescript/module/crypto/session-manager.d.ts +27 -0
  202. package/lib/typescript/module/crypto/session-manager.d.ts.map +1 -0
  203. package/lib/typescript/module/i18n/en.d.ts +291 -0
  204. package/lib/typescript/module/i18n/en.d.ts.map +1 -0
  205. package/lib/typescript/module/i18n/fr.d.ts +6 -0
  206. package/lib/typescript/module/i18n/fr.d.ts.map +1 -0
  207. package/lib/typescript/module/i18n/index.d.ts +10 -0
  208. package/lib/typescript/module/i18n/index.d.ts.map +1 -0
  209. package/lib/typescript/module/i18n/locale.d.ts +4 -0
  210. package/lib/typescript/module/i18n/locale.d.ts.map +1 -0
  211. package/lib/typescript/module/i18n/translator.d.ts +15 -0
  212. package/lib/typescript/module/i18n/translator.d.ts.map +1 -0
  213. package/lib/typescript/module/index.d.ts +24 -0
  214. package/lib/typescript/module/index.d.ts.map +1 -0
  215. package/lib/typescript/module/lib/device-detector.d.ts +5 -0
  216. package/lib/typescript/module/lib/device-detector.d.ts.map +1 -0
  217. package/lib/typescript/module/lib/event-emitter.d.ts +19 -0
  218. package/lib/typescript/module/lib/event-emitter.d.ts.map +1 -0
  219. package/lib/typescript/module/lib/index.d.ts +5 -0
  220. package/lib/typescript/module/lib/index.d.ts.map +1 -0
  221. package/lib/typescript/module/lib/kwik-id-rn-sdk.d.ts +43 -0
  222. package/lib/typescript/module/lib/kwik-id-rn-sdk.d.ts.map +1 -0
  223. package/lib/typescript/module/lib/verification-machine.d.ts +78 -0
  224. package/lib/typescript/module/lib/verification-machine.d.ts.map +1 -0
  225. package/lib/typescript/module/package.json +1 -0
  226. package/lib/typescript/module/types/events.d.ts +94 -0
  227. package/lib/typescript/module/types/events.d.ts.map +1 -0
  228. package/lib/typescript/module/types/index.d.ts +242 -0
  229. package/lib/typescript/module/types/index.d.ts.map +1 -0
  230. package/lib/typescript/module/ui/components/KwikIDVerificationModal.d.ts +21 -0
  231. package/lib/typescript/module/ui/components/KwikIDVerificationModal.d.ts.map +1 -0
  232. package/lib/typescript/module/ui/components/screens.d.ts +46 -0
  233. package/lib/typescript/module/ui/components/screens.d.ts.map +1 -0
  234. package/lib/typescript/module/ui/context/kwik-id-provider.d.ts +19 -0
  235. package/lib/typescript/module/ui/context/kwik-id-provider.d.ts.map +1 -0
  236. package/lib/typescript/module/ui/hooks/use-kwik-verification.d.ts +29 -0
  237. package/lib/typescript/module/ui/hooks/use-kwik-verification.d.ts.map +1 -0
  238. package/lib/typescript/module/ui/index.d.ts +7 -0
  239. package/lib/typescript/module/ui/index.d.ts.map +1 -0
  240. package/package.json +121 -3
  241. package/src/api/api-client.ts +319 -0
  242. package/src/api/api-error.ts +28 -0
  243. package/src/api/index.ts +12 -0
  244. package/src/api/upload.ts +87 -0
  245. package/src/camera/camera-view.tsx +217 -0
  246. package/src/camera/index.ts +4 -0
  247. package/src/camera/photo-capture.ts +58 -0
  248. package/src/crypto/fingerprint.ts +46 -0
  249. package/src/crypto/hmac.ts +172 -0
  250. package/src/crypto/index.ts +3 -0
  251. package/src/crypto/session-manager.ts +200 -0
  252. package/src/i18n/en.ts +315 -0
  253. package/src/i18n/fr.ts +325 -0
  254. package/src/i18n/index.ts +9 -0
  255. package/src/i18n/locale.ts +15 -0
  256. package/src/i18n/translator.ts +37 -0
  257. package/src/index.ts +102 -0
  258. package/src/lib/device-detector.ts +32 -0
  259. package/src/lib/event-emitter.ts +90 -0
  260. package/src/lib/index.ts +15 -0
  261. package/src/lib/kwik-id-rn-sdk.ts +160 -0
  262. package/src/lib/verification-machine.ts +273 -0
  263. package/src/types/events.ts +75 -0
  264. package/src/types/index.ts +309 -0
  265. package/src/ui/components/KwikIDVerificationModal.tsx +450 -0
  266. package/src/ui/components/screens.tsx +283 -0
  267. package/src/ui/context/kwik-id-provider.tsx +72 -0
  268. package/src/ui/hooks/use-kwik-verification.ts +121 -0
  269. package/src/ui/index.ts +9 -0
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Tiny dependency-free translator for the RN KYC flow (mirrors the web SDK's).
3
+ * The host app supplies the locale via SDK config; missing keys fall back to English.
4
+ */
5
+ import type { Locale } from "../types/index.js";
6
+ import { en } from "./en.js";
7
+ /** All message keys, derived from the English catalog (the source of truth). */
8
+ export type MessageKey = keyof typeof en;
9
+ /** Interpolation values for `{placeholder}` tokens in a message. */
10
+ export type TranslateParams = Record<string, string | number>;
11
+ /** Translate a key to the active locale, interpolating any `{param}` tokens. */
12
+ export type Translate = (key: MessageKey, params?: TranslateParams) => string;
13
+ /** Build a translator bound to a locale, falling back to English then the raw key. */
14
+ export declare function createTranslator(locale?: Locale): Translate;
15
+ //# sourceMappingURL=translator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translator.d.ts","sourceRoot":"","sources":["../../../../src/i18n/translator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAU,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAM,CAAC;AAG1B,gFAAgF;AAChF,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,EAAE,CAAC;AAEzC,oEAAoE;AACpE,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAE9D,gFAAgF;AAChF,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,eAAe,KAAK,MAAM,CAAC;AAc9E,sFAAsF;AACtF,wBAAgB,gBAAgB,CAAC,MAAM,GAAE,MAAa,GAAG,SAAS,CAMjE"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @kwik-id/sdk-react-native — public API.
3
+ *
4
+ * Phase 1: on-device document + selfie capture, upload, and submit, plus the
5
+ * headless protocol foundation. On-device liveness (passive + active challenges)
6
+ * lands in Phase 2.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ export { useKwikVerification, KwikIDVerificationModal, KwikIDProvider, useKwikID } from "./ui/index.js";
11
+ export type { UseKwikVerification, UseKwikVerificationOptions, KwikIDVerificationModalProps, KwikIDProviderProps, KwikIDContextValue, } from "./ui/index.js";
12
+ export { CameraView, compressCapture } from "./camera/index.js";
13
+ export type { CameraViewProps, RawPhoto } from "./camera/index.js";
14
+ export { KwikIdRNSDK } from "./lib/kwik-id-rn-sdk.js";
15
+ export type { KwikIdRNSDKOptions } from "./lib/kwik-id-rn-sdk.js";
16
+ export { ApiClient, ApiError, DEFAULT_BASE_URL, uploadMultipart } from "./api/index.js";
17
+ export type { ApiClientConfig, UploadResponse, SubmitResponse, StatusResponse, HandoffValidateResponse, HandoffRedeemResponse, Uploader, UploadResult, } from "./api/index.js";
18
+ export { createTranslator, getDeviceLocale, en as messagesEn, fr as messagesFr } from "./i18n/index.js";
19
+ export type { MessageKey, Translate, TranslateParams } from "./i18n/index.js";
20
+ export { SessionManager, generateFingerprint, hmacSha256Hex, sha256Hex, generateNonce, } from "./crypto/index.js";
21
+ export { EventEmitter, reducer, initialState, needsBackImage, getStepProgress, computeUploadProgress, isExpoGo, assertSupportedRuntime, isRealDevice, } from "./lib/index.js";
22
+ export type { MachineState, MachineContext, MachineEvent, MachineOptions } from "./lib/index.js";
23
+ export type { KwikIdConfig, KwikIdTheme, Locale, LivenessMode, DocumentType, CaptureType, CaptureAsset, CaptureMetadata, CaptureSlot, QualityResult, QualityGuidance, QualityCheckResult, FacePose, FaceSignals, ChallengeType, Challenge, ChallengeResult, PassiveLivenessResult, LivenessResult, DeviceFingerprint, Session, SecurePayload, VerificationScores, ExtractedData, VerificationResult, VerificationOutcome, SessionInfo, VerificationSubStep, KwikIdEvents, KwikIdEventName, KwikIdEventHandler, } from "./types/index.js";
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,eAAM,CAAC;AAC/F,YAAY,EACR,mBAAmB,EACnB,0B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SAAS,EACT,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,OAAO,EACP,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,kBAAkB,GACrB,MAAM,kBAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare function isExpoGo(): boolean;
2
+ /** Throws an actionable error when running in an unsupported runtime. */
3
+ export declare function assertSupportedRuntime(): void;
4
+ export declare function isRealDevice(): boolean;
5
+ //# sourceMappingURL=device-detector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-detector.d.ts","sourceRoot":"","sources":["../../../../src/lib/device-detector.ts"],"names":[],"mappings":"AAUA,wBAAgB,QAAQ,IAAI,OAAO,CAKlC;AAED,yEAAyE;AACzE,wBAAgB,sBAAsB,IAAI,IAAI,CAQ7C;AAED,wBAAgB,YAAY,IAAI,OAAO,CAGtC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Type-safe event emitter (ported from @kwik-id/sdk-core, framework-agnostic).
3
+ */
4
+ import type { KwikIdEventHandler, KwikIdEventName, KwikIdEvents } from "../types/index.js";
5
+ type WildcardHandler = (event: KwikIdEventName, data: unknown) => void;
6
+ export declare class EventEmitter {
7
+ private listeners;
8
+ private wildcardListeners;
9
+ private onceListeners;
10
+ on<T extends KwikIdEventName>(event: T, handler: KwikIdEventHandler<T>): () => void;
11
+ once<T extends KwikIdEventName>(event: T, handler: KwikIdEventHandler<T>): () => void;
12
+ onAny(handler: WildcardHandler): () => void;
13
+ off<T extends KwikIdEventName>(event: T, handler: KwikIdEventHandler<T>): void;
14
+ emit<T extends KwikIdEventName>(event: T, data: KwikIdEvents[T]): void;
15
+ removeAllListeners(event?: KwikIdEventName): void;
16
+ listenerCount(event: KwikIdEventName): number;
17
+ }
18
+ export {};
19
+ //# sourceMappingURL=event-emitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-emitter.d.ts","sourceRoot":"","sources":["../../../../src/lib/event-emitter.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAU,CAAC;AAElF,KAAK,eAAe,GAAG,CAAC,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;AAEvE,qBAAa,YAAY;IACrB,OAAO,CAAC,SAAS,CAA6E;IAC9F,OAAO,CAAC,iBAAiB,CAAmC;IAC5D,OAAO,CAAC,aAAa,CACP;IAEd,EAAE,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IAQnF,IAAI,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IAUrF,KAAK,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,IAAI;IAK3C,GAAG,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI;IAI9E,IAAI,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI;IAiCtE,kBAAkB,CAAC,KAAK,CAAC,EAAE,eAAe,GAAG,IAAI;IAWjD,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM;CAKhD"}
@@ -0,0 +1,5 @@
1
+ export { EventEmitter } from "./event-emitter.js";
2
+ export { reducer, initialState, needsBackImage, getStepProgress, computeUploadProgress, } from "./verification-machine.js";
3
+ export type { MachineState, MachineContext, MachineEvent, MachineOptions, } from "./verification-machine.js";
4
+ export { isExpoGo, assertSupportedRuntime, isRealDevice } from "./device-detector.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAiB,CAAC;AAC/C,OAAO,EACH,OAAO,EACP,YAAY,EACZ,cAAc,EACd,eAAe,EACf,qBAAqB,GACxB,MAAM,2BAAwB,CAAC;AAChC,YAAY,EACR,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,cAAc,GACjB,MAAM,2BAAwB,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,sBAAmB,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Headless orchestrator for the RN SDK.
3
+ *
4
+ * Wraps SessionManager + ApiClient + EventEmitter so the UI (and advanced
5
+ * integrators) drive a single object. No camera/UI concerns live here.
6
+ */
7
+ import { type StatusResponse } from "../api/api-client.js";
8
+ import type { CaptureAsset, CaptureType, DocumentType, KwikIdConfig, KwikIdEventHandler, KwikIdEventName, LivenessResult, QualityResult, SessionInfo } from "../types/index.js";
9
+ export interface KwikIdRNSDKOptions extends KwikIdConfig {
10
+ /** Skip the Expo Go runtime guard (tests only). */
11
+ skipRuntimeCheck?: boolean;
12
+ }
13
+ export declare class KwikIdRNSDK {
14
+ private readonly events;
15
+ private readonly sessionManager;
16
+ private readonly api;
17
+ private readonly options;
18
+ private sessionInfo;
19
+ private initialized;
20
+ constructor(options: KwikIdRNSDKOptions);
21
+ /** Validate the runtime + session token. Returns the org/session config. */
22
+ initialize(): Promise<SessionInfo>;
23
+ /** Redeem a desktop→mobile handoff code, swapping in the mobile session token. */
24
+ redeemHandoff(code: string): Promise<void>;
25
+ uploadCapture(type: CaptureType, asset: CaptureAsset, onProgress?: (progress: number) => void): Promise<{
26
+ uploadId: string;
27
+ }>;
28
+ submit(documentType: DocumentType, analysis?: {
29
+ quality?: QualityResult;
30
+ liveness?: LivenessResult;
31
+ }): Promise<{
32
+ jobId: string;
33
+ }>;
34
+ getStatus(): Promise<StatusResponse>;
35
+ getSessionInfo(): SessionInfo | null;
36
+ /** True when the session token is within ~2 min of expiry. */
37
+ needsRefresh(): boolean;
38
+ on<E extends KwikIdEventName>(event: E, handler: KwikIdEventHandler<E>): () => void;
39
+ reset(): void;
40
+ destroy(): void;
41
+ private assertReady;
42
+ }
43
+ //# sourceMappingURL=kwik-id-rn-sdk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kwik-id-rn-sdk.d.ts","sourceRoot":"","sources":["../../../../src/lib/kwik-id-rn-sdk.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,sBAAmB,CAAC;AAEnE,OAAO,KAAK,EACR,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,aAAa,EACb,WAAW,EACd,MAAM,mBAAU,CAAC;AAIlB,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACpD,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,qBAAa,WAAW;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAC7C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAY;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,WAAW,CAAS;gBAEhB,OAAO,EAAE,kBAAkB;IAUvC,4EAA4E;IACtE,UAAU,IAAI,OAAO,CAAC,WAAW,CAAC;IAqBxC,kFAAkF;IAC5E,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAa1C,aAAa,CACf,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,YAAY,EACnB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GACxC,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAoB1B,MAAM,CACR,YAAY,EAAE,YAAY,EAC1B,QAAQ,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,aAAa,CAAC;QAAC,QAAQ,CAAC,EAAE,cAAc,CAAA;KAAE,GAClE,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAiB7B,SAAS,IAAI,OAAO,CAAC,cAAc,CAAC;IAKpC,cAAc,IAAI,WAAW,GAAG,IAAI;IAIpC,8DAA8D;IAC9D,YAAY,IAAI,OAAO;IAIvB,EAAE,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IAInF,KAAK,IAAI,IAAI;IAMb,OAAO,IAAI,IAAI;IAKf,OAAO,CAAC,WAAW;CAKtB"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Pure reducer for the RN verification flow.
3
+ *
4
+ * Adapted from the web SDK's KYCModalFlow SubStep machine. No React / no native
5
+ * dependency, so it is fully unit-testable. The selfie branch folds the web's
6
+ * `camera-selfie` into a single `liveness` step (align → passive/active → capture).
7
+ */
8
+ import type { CaptureAsset, CaptureSlot, CaptureType, DocumentType, LivenessResult, VerificationOutcome, VerificationSubStep } from "../types/index.js";
9
+ export interface MachineContext {
10
+ documentType: DocumentType | null;
11
+ front?: CaptureAsset;
12
+ back?: CaptureAsset;
13
+ selfie?: CaptureAsset;
14
+ livenessResult?: LivenessResult;
15
+ /** 0..100 upload/submit progress shown on the processing screen. */
16
+ uploadProgress: number;
17
+ uploadStage: CaptureType | "submitting" | null;
18
+ outcome?: VerificationOutcome;
19
+ error?: string;
20
+ }
21
+ export interface MachineState {
22
+ step: VerificationSubStep;
23
+ context: MachineContext;
24
+ }
25
+ export interface MachineOptions {
26
+ /** When launched as the mobile redeemer of a desktop handoff. */
27
+ hasHandoffCode?: boolean;
28
+ }
29
+ export type MachineEvent = {
30
+ t: "NEXT";
31
+ } | {
32
+ t: "BACK";
33
+ } | {
34
+ t: "SELECT_DOC";
35
+ doc: DocumentType;
36
+ } | {
37
+ t: "CAPTURED";
38
+ slot: CaptureSlot;
39
+ asset: CaptureAsset;
40
+ } | {
41
+ t: "RETAKE";
42
+ slot: CaptureSlot;
43
+ } | {
44
+ t: "HANDOFF_REDEEMED";
45
+ }
46
+ /** `result` is omitted until on-device liveness ships (Phase 2). */
47
+ | {
48
+ t: "LIVENESS_DONE";
49
+ result?: LivenessResult;
50
+ selfie: CaptureAsset;
51
+ } | {
52
+ t: "PROGRESS";
53
+ stage: MachineContext["uploadStage"];
54
+ value: number;
55
+ } | {
56
+ t: "SUBMITTED";
57
+ jobId: string;
58
+ } | {
59
+ t: "CANCEL";
60
+ } | {
61
+ t: "FAILED";
62
+ error: string;
63
+ }
64
+ /** Back to a fresh intro, e.g. when the modal closes so the next run starts clean. */
65
+ | {
66
+ t: "RESET";
67
+ };
68
+ export declare function needsBackImage(doc: DocumentType | null): boolean;
69
+ export declare function initialState(): MachineState;
70
+ /** Progress-bar percentage (0..100) for the current step. */
71
+ export declare function getStepProgress(state: MachineState): number;
72
+ /**
73
+ * Upload/submit progress banding (matches web performVerification):
74
+ * front 0–30, back 30–45, selfie 45–70 (or 30–55 without back), submit 80, done 100.
75
+ */
76
+ export declare function computeUploadProgress(stage: MachineContext["uploadStage"], pct: number, hasBack: boolean): number;
77
+ export declare function reducer(state: MachineState, event: MachineEvent, options?: MachineOptions): MachineState;
78
+ //# sourceMappingURL=verification-machine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-machine.d.ts","sourceRoot":"","sources":["../../../../src/lib/verification-machine.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACR,YAAY,EACZ,WAAW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cAAc,CAAC,aAAa,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACtE;IAAE,CAAC,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,CAAC,EAAE,QAAQ,CAAA;CAAE,GACf;IAAE,CAAC,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AAChC,sFAAsF;GACpF;IAAE,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAErB,wBAAgB,cAAc,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI,GAAG,OAAO,CAEhE;AAED,wBAAgB,YAAY,IAAI,YAAY,CAS3C;AAiBD,6DAA6D;AAC7D,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAO3D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACjC,KAAK,EAAE,cAAc,CAAC,aAAa,CAAC,EACpC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,GACjB,MAAM,CAeR;AAsBD,wBAAgB,OAAO,CACnB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,YAAY,EACnB,OAAO,GAAE,cAAmB,GAC7B,YAAY,CA+Hd"}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Event vocabulary for @kwik-id/sdk-react-native.
3
+ *
4
+ * Mirrors the portable subset of the web SDK's KwikIdEvents — DOM/Blob/MediaStream
5
+ * payloads are replaced with RN-native equivalents (CaptureAsset, FaceSignals).
6
+ */
7
+ import type { CaptureAsset, CaptureType, Challenge, ChallengeResult, FaceSignals, LivenessMode, LivenessResult, PassiveLivenessResult, Session, VerificationResult } from "./index.js";
8
+ export interface KwikIdEvents {
9
+ "session:created": Session;
10
+ "session:expired": {
11
+ sessionId: string;
12
+ };
13
+ "session:refreshed": Session;
14
+ "camera:ready": void;
15
+ "camera:error": {
16
+ error: Error;
17
+ recoverable: boolean;
18
+ };
19
+ "camera:permission_denied": {
20
+ canAskAgain: boolean;
21
+ };
22
+ "face:detected": FaceSignals;
23
+ "face:lost": void;
24
+ "face:aligned": void;
25
+ "face:misaligned": {
26
+ reason: string;
27
+ };
28
+ "liveness:starting": {
29
+ mode: LivenessMode;
30
+ };
31
+ "liveness:challenge": Challenge;
32
+ "liveness:challenge_result": ChallengeResult;
33
+ "liveness:passive_result": PassiveLivenessResult;
34
+ "liveness:complete": LivenessResult;
35
+ "liveness:failed": {
36
+ reason: string;
37
+ };
38
+ "capture:starting": {
39
+ type: CaptureType;
40
+ };
41
+ "capture:complete": {
42
+ type: CaptureType;
43
+ asset: CaptureAsset;
44
+ };
45
+ "capture:failed": {
46
+ type: CaptureType;
47
+ error: Error;
48
+ };
49
+ "upload:starting": {
50
+ type: CaptureType;
51
+ };
52
+ "upload:progress": {
53
+ type: CaptureType;
54
+ progress: number;
55
+ };
56
+ "upload:complete": {
57
+ type: CaptureType;
58
+ uploadId: string;
59
+ };
60
+ "upload:failed": {
61
+ type: CaptureType;
62
+ error: Error;
63
+ retryable: boolean;
64
+ };
65
+ "verification:submitting": void;
66
+ "verification:submitted": {
67
+ jobId: string;
68
+ };
69
+ "verification:processing": {
70
+ jobId: string;
71
+ progress?: number;
72
+ };
73
+ "verification:complete": VerificationResult;
74
+ "verification:failed": {
75
+ error: Error;
76
+ jobId?: string;
77
+ };
78
+ "handoff:redeemed": {
79
+ jobId: string;
80
+ };
81
+ "handoff:error": {
82
+ error: Error;
83
+ };
84
+ ready: void;
85
+ error: {
86
+ code: string;
87
+ message: string;
88
+ recoverable: boolean;
89
+ };
90
+ destroy: void;
91
+ }
92
+ export type KwikIdEventName = keyof KwikIdEvents;
93
+ export type KwikIdEventHandler<T extends KwikIdEventName> = (data: KwikIdEvents[T]) => void;
94
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/types/events.ts"],"names":[],"mappings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KwikId protocol vocabulary.
5
+ * They are kept structurally compatible with `@kwik-id/sdk-core` via the build-excluded
6
+ * assertions in `./__compat__`. This package has NO runtime dependency on `@kwik-id/*`.
7
+ */
8
+ export interface KwikIdTheme {
9
+ primary?: string;
10
+ accent?: string;
11
+ background?: string;
12
+ foreground?: string;
13
+ error?: string;
14
+ success?: string;
15
+ }
16
+ export type Locale = "en" | "fr";
17
+ export type LivenessMode = "passive" | "active" | "hybrid";
18
+ export interface KwikIdConfig {
19
+ /** Session token obtained from your backend (POST /api/v1/sessions). */
20
+ clientSecret: string;
21
+ /** Base URL for API calls (defaults to production). */
22
+ baseUrl?: string;
23
+ /** Display name shown in the verification UI. */
24
+ appName?: string;
25
+ /** Theme customization. */
26
+ theme?: KwikIdTheme;
27
+ /** Locale for UI text. */
28
+ locale?: Locale;
29
+ /**
30
+ * Liveness mode; overrides the session config when set.
31
+ * @deprecated Not yet supported: ignored until on-device liveness lands (Phase 2).
32
+ */
33
+ livenessMode?: LivenessMode;
34
+ /** Request timeout in milliseconds. */
35
+ timeout?: number;
36
+ /** Enable debug logging. */
37
+ debug?: boolean;
38
+ }
39
+ export type DocumentType = "id_card" | "passport" | "drivers_license" | "voters_card" | "residence_permit";
40
+ export type CaptureType = "document_front" | "document_back" | "selfie" | "liveness_frame";
41
+ /** RN capture descriptor — replaces the web SDK's DOM File/Blob. */
42
+ export interface CaptureAsset {
43
+ uri: string;
44
+ name: string;
45
+ type: string;
46
+ width: number;
47
+ height: number;
48
+ }
49
+ export interface CaptureMetadata {
50
+ timestamp: number;
51
+ resolution: {
52
+ width: number;
53
+ height: number;
54
+ };
55
+ facingMode: "user" | "environment";
56
+ deviceId?: string;
57
+ qualityScore?: number;
58
+ faceDetected?: boolean;
59
+ }
60
+ export type QualityGuidance = "move_to_brighter_area" | "reduce_brightness" | "hold_still" | "move_closer" | "move_back" | "center_face" | "only_one_face";
61
+ export interface QualityCheckResult {
62
+ passed: boolean;
63
+ value: number;
64
+ threshold: number;
65
+ issue?: string;
66
+ }
67
+ export interface QualityResult {
68
+ passed: boolean;
69
+ timestamp: number;
70
+ checks: {
71
+ luminance: QualityCheckResult & {
72
+ issue?: "too_dark" | "too_bright";
73
+ };
74
+ blur: QualityCheckResult & {
75
+ issue?: "too_blurry";
76
+ };
77
+ resolution: QualityCheckResult & {
78
+ width: number;
79
+ height: number;
80
+ };
81
+ face?: QualityCheckResult & {
82
+ count: number;
83
+ size?: number;
84
+ issue?: "no_face" | "multiple_faces" | "face_too_small";
85
+ };
86
+ };
87
+ guidance: QualityGuidance[];
88
+ }
89
+ export interface FacePose {
90
+ yaw: number;
91
+ pitch: number;
92
+ roll: number;
93
+ }
94
+ /**
95
+ * Normalized per-frame face signals produced by the ML Kit frame processor.
96
+ * All probabilities are 0..1; angles are degrees. This is the single source the
97
+ * alignment + liveness detectors consume (replaces the web SDK's Landmark[] probing).
98
+ */
99
+ export interface FaceSignals {
100
+ faceCount: number;
101
+ /** Face bounding-box area as a fraction of the frame area. */
102
+ bboxRatio: number;
103
+ /** Normalized horizontal offset of the face center from frame center (-1..1). */
104
+ centerOffsetX: number;
105
+ /** Normalized vertical offset of the face center from frame center (-1..1). */
106
+ centerOffsetY: number;
107
+ yaw: number;
108
+ pitch: number;
109
+ roll: number;
110
+ leftEyeOpen: number;
111
+ rightEyeOpen: number;
112
+ smiling: number;
113
+ /** Mouth open ratio (0..1); -1 when unavailable on the device. */
114
+ mouthOpenRatio: number;
115
+ confidence: number;
116
+ }
117
+ export type ChallengeType = "blink" | "smile" | "turn_left" | "turn_right" | "nod" | "open_mouth";
118
+ export interface Challenge {
119
+ type: ChallengeType;
120
+ instruction: string;
121
+ timeoutMs: number;
122
+ requiredCount?: number;
123
+ targetAngle?: number;
124
+ }
125
+ export interface ChallengeResult {
126
+ challenge: Challenge;
127
+ passed: boolean;
128
+ confidence: number;
129
+ completedAt?: number;
130
+ }
131
+ export interface PassiveLivenessResult {
132
+ passed: boolean;
133
+ confidence: number;
134
+ checks: {
135
+ microMovement: {
136
+ passed: boolean;
137
+ detected: boolean;
138
+ };
139
+ naturalBlink: {
140
+ passed: boolean;
141
+ detected: boolean;
142
+ };
143
+ textureAnalysis: {
144
+ passed: boolean;
145
+ score: number;
146
+ };
147
+ };
148
+ spoofType?: "screen" | "print" | "mask" | "unknown";
149
+ }
150
+ export interface LivenessResult {
151
+ passed: boolean;
152
+ mode: LivenessMode;
153
+ passiveResult?: PassiveLivenessResult;
154
+ challenges?: ChallengeResult[];
155
+ confidence: number;
156
+ }
157
+ export interface DeviceFingerprint {
158
+ platform: string;
159
+ osVersion: string;
160
+ deviceModel: string;
161
+ screenResolution: string;
162
+ timezone: string;
163
+ language: string;
164
+ fingerprintHash: string;
165
+ }
166
+ export interface Session {
167
+ sessionId: string;
168
+ clientSecret: string;
169
+ jobId?: string;
170
+ expiresAt: Date;
171
+ deviceFingerprint: string;
172
+ nonce: string;
173
+ sequenceNumber: number;
174
+ }
175
+ export interface SecurePayload {
176
+ sessionId: string;
177
+ timestamp: number;
178
+ nonce: string;
179
+ sequenceNumber: number;
180
+ signature: string;
181
+ deviceFingerprint: string;
182
+ data: unknown;
183
+ }
184
+ export interface VerificationScores {
185
+ documentQuality: number;
186
+ documentAuthenticity: number;
187
+ faceMatch: number;
188
+ liveness: number;
189
+ }
190
+ export interface ExtractedData {
191
+ documentType: string;
192
+ documentNumber?: string;
193
+ fullName?: string;
194
+ firstName?: string;
195
+ lastName?: string;
196
+ dateOfBirth?: string;
197
+ expiryDate?: string;
198
+ issuingCountry?: string;
199
+ nationality?: string;
200
+ gender?: string;
201
+ address?: string;
202
+ [key: string]: string | undefined;
203
+ }
204
+ export interface VerificationResult {
205
+ jobId: string;
206
+ status: "verified" | "rejected" | "manual_review" | "pending" | "processing";
207
+ overallScore: number;
208
+ scores: VerificationScores;
209
+ extractedData?: ExtractedData;
210
+ rejectionReasons?: string[];
211
+ errorDetails?: {
212
+ document: string;
213
+ errorCode: string;
214
+ errorMessage: string;
215
+ };
216
+ timestamps: {
217
+ submitted: string;
218
+ completed?: string;
219
+ };
220
+ referenceId: string;
221
+ }
222
+ /** The terminal outcome surfaced to the host app from `start()`. */
223
+ export interface VerificationOutcome {
224
+ status: "submitted" | "cancelled" | "error";
225
+ jobId?: string;
226
+ error?: Error;
227
+ }
228
+ export interface SessionInfo {
229
+ sessionId: string;
230
+ expiresAt: string;
231
+ orgName?: string;
232
+ orgLogoUrl?: string;
233
+ config: {
234
+ documentTypes: DocumentType[];
235
+ livenessMode: LivenessMode;
236
+ maxRetries: number;
237
+ };
238
+ }
239
+ export type VerificationSubStep = "intro" | "handoff-redeem" | "document-type" | "prepare-front" | "camera-front" | "confirm-front" | "prepare-back" | "camera-back" | "confirm-back" | "prepare-selfie" | "liveness" | "confirm-selfie" | "processing" | "result";
240
+ export type CaptureSlot = "front" | "back" | "selfie";
241
+ export type { KwikIdEvents, KwikIdEventName, KwikIdEventHandler } from "./events.js";
242
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,WAAW,WAAW;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjC,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3D,MAAM,WAAW,YAAY;IACzB,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM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AAM,GAAG,QAAQ,CAAC;AAEtD,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAU,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { DocumentType, KwikIdTheme, Locale, VerificationOutcome } from "../../types/index.js";
2
+ export interface KwikIDVerificationModalProps {
3
+ visible: boolean;
4
+ clientSecret: string;
5
+ baseUrl?: string;
6
+ appName?: string;
7
+ theme?: KwikIdTheme;
8
+ /** UI language; defaults to the device language ('fr' for French, else 'en'). */
9
+ locale?: Locale;
10
+ /** Restrict the selectable document types (intersected with the session config). */
11
+ documentTypes?: DocumentType[];
12
+ /** Skip the Expo Go runtime guard (tests only). */
13
+ skipRuntimeCheck?: boolean;
14
+ onSubmitted?: (data: {
15
+ jobId: string;
16
+ }) => void;
17
+ onComplete: (outcome: VerificationOutcome) => void;
18
+ onClose?: () => void;
19
+ }
20
+ export declare function KwikIDVerificationModal(props: KwikIDVerificationModalProps): import("react/jsx-runtime").JSX.Element;
21
+ //# sourceMappingURL=KwikIDVerificationModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KwikIDVerificationModal.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/KwikIDVerificationModal.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAER,YAAY,EACZ,WAAW,EACX,MAAM,EAEN,mBAAmB,EACtB,MAAM,sBAAa,CAAC;AAWrB,MAAM,WAAW,4BAA4B;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACnD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAgBD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,2CAsV1E"}