@velion-la/onboarding-sdk-react-native 1.3.0-beta.8 → 1.3.0
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/CHANGELOG.md +23 -0
- package/LICENSE-UNICODE.txt +39 -0
- package/README.md +114 -5
- package/android/build.gradle +15 -0
- package/android/src/main/java/la/velion/onboarding/sdk/devicekey/VelionDeviceKeyModule.kt +94 -0
- package/app.plugin.js +19 -2
- package/expo-module.config.json +9 -0
- package/ios/VelionDeviceKey.podspec +25 -0
- package/ios/VelionDeviceKeyModule.swift +76 -0
- package/lib/commonjs/camera/AddressSearchBar.js +2 -1
- package/lib/commonjs/camera/AddressSearchBar.js.map +1 -1
- package/lib/commonjs/camera/DocumentCapture.js +2 -1
- package/lib/commonjs/camera/DocumentCapture.js.map +1 -1
- package/lib/commonjs/camera/LivenessCamera.js +2 -1
- package/lib/commonjs/camera/LivenessCamera.js.map +1 -1
- package/lib/commonjs/camera/MapAddressPicker.js +2 -1
- package/lib/commonjs/camera/MapAddressPicker.js.map +1 -1
- package/lib/commonjs/core/VelionOnboarding.js +4 -1
- package/lib/commonjs/core/VelionOnboarding.js.map +1 -1
- package/lib/commonjs/i18n/strings/en.js +5 -1
- package/lib/commonjs/i18n/strings/en.js.map +1 -1
- package/lib/commonjs/i18n/strings/es.js +5 -1
- package/lib/commonjs/i18n/strings/es.js.map +1 -1
- package/lib/commonjs/steps/AddressInfoStep.js +343 -257
- package/lib/commonjs/steps/AddressInfoStep.js.map +1 -1
- package/lib/commonjs/steps/FingerprintStep.js +1 -0
- package/lib/commonjs/steps/FingerprintStep.js.map +1 -1
- package/lib/commonjs/steps/LivenessMatchStep.js +109 -13
- package/lib/commonjs/steps/LivenessMatchStep.js.map +1 -1
- package/lib/commonjs/steps/livenessGuidance.js +88 -0
- package/lib/commonjs/steps/livenessGuidance.js.map +1 -0
- package/lib/commonjs/steps/livenessRestart.js +32 -0
- package/lib/commonjs/steps/livenessRestart.js.map +1 -0
- package/lib/commonjs/transport/api.js +17 -1
- package/lib/commonjs/transport/api.js.map +1 -1
- package/lib/commonjs/transport/irisWebSocket.js +3 -0
- package/lib/commonjs/transport/irisWebSocket.js.map +1 -1
- package/lib/commonjs/types/index.js +12 -0
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/ui/StepShell.js +2 -1
- package/lib/commonjs/ui/StepShell.js.map +1 -1
- package/lib/commonjs/ui/VelionOnboardingScreen.js +2 -1
- package/lib/commonjs/ui/VelionOnboardingScreen.js.map +1 -1
- package/lib/commonjs/ui/icons/HomeHeartIcon.js +2 -1
- package/lib/commonjs/ui/icons/HomeHeartIcon.js.map +1 -1
- package/lib/commonjs/ui/overlays/AnalyzingOverlay.js +2 -1
- package/lib/commonjs/ui/overlays/AnalyzingOverlay.js.map +1 -1
- package/lib/commonjs/ui/theme/ThemeProvider.js +2 -1
- package/lib/commonjs/ui/theme/ThemeProvider.js.map +1 -1
- package/lib/commonjs/utils/addressForm.js +77 -0
- package/lib/commonjs/utils/addressForm.js.map +1 -0
- package/lib/commonjs/utils/appId.js +23 -0
- package/lib/commonjs/utils/appId.js.map +1 -0
- package/lib/commonjs/utils/deviceFingerprint.js +1 -1
- package/lib/commonjs/utils/deviceFingerprint.js.map +1 -1
- package/lib/commonjs/utils/deviceIntegrity.js +104 -0
- package/lib/commonjs/utils/deviceIntegrity.js.map +1 -0
- package/lib/commonjs/utils/deviceKey.js +53 -0
- package/lib/commonjs/utils/deviceKey.js.map +1 -0
- package/lib/commonjs/utils/frameChain.js +55 -0
- package/lib/commonjs/utils/frameChain.js.map +1 -0
- package/lib/commonjs/utils/hmac.js +6 -4
- package/lib/commonjs/utils/hmac.js.map +1 -1
- package/lib/commonjs/utils/jpegFromUri.js.map +1 -1
- package/lib/commonjs/utils/osGeocoder.js +2 -1
- package/lib/commonjs/utils/osGeocoder.js.map +1 -1
- package/lib/commonjs/utils/subdivisions.js +74 -0
- package/lib/commonjs/utils/subdivisions.js.map +1 -0
- package/lib/module/core/VelionOnboarding.js +4 -1
- package/lib/module/core/VelionOnboarding.js.map +1 -1
- package/lib/module/i18n/strings/en.js +5 -1
- package/lib/module/i18n/strings/en.js.map +1 -1
- package/lib/module/i18n/strings/es.js +5 -1
- package/lib/module/i18n/strings/es.js.map +1 -1
- package/lib/module/steps/AddressInfoStep.js +344 -258
- package/lib/module/steps/AddressInfoStep.js.map +1 -1
- package/lib/module/steps/FingerprintStep.js +1 -0
- package/lib/module/steps/FingerprintStep.js.map +1 -1
- package/lib/module/steps/LivenessMatchStep.js +107 -12
- package/lib/module/steps/LivenessMatchStep.js.map +1 -1
- package/lib/module/steps/livenessGuidance.js +80 -0
- package/lib/module/steps/livenessGuidance.js.map +1 -0
- package/lib/module/steps/livenessRestart.js +28 -0
- package/lib/module/steps/livenessRestart.js.map +1 -0
- package/lib/module/transport/api.js +17 -1
- package/lib/module/transport/api.js.map +1 -1
- package/lib/module/transport/irisWebSocket.js +3 -0
- package/lib/module/transport/irisWebSocket.js.map +1 -1
- package/lib/module/types/index.js +13 -0
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/utils/addressForm.js +72 -0
- package/lib/module/utils/addressForm.js.map +1 -0
- package/lib/module/utils/appId.js +18 -0
- package/lib/module/utils/appId.js.map +1 -0
- package/lib/module/utils/deviceFingerprint.js +1 -1
- package/lib/module/utils/deviceFingerprint.js.map +1 -1
- package/lib/module/utils/deviceIntegrity.js +99 -0
- package/lib/module/utils/deviceIntegrity.js.map +1 -0
- package/lib/module/utils/deviceKey.js +46 -0
- package/lib/module/utils/deviceKey.js.map +1 -0
- package/lib/module/utils/frameChain.js +52 -0
- package/lib/module/utils/frameChain.js.map +1 -0
- package/lib/module/utils/hmac.js +6 -4
- package/lib/module/utils/hmac.js.map +1 -1
- package/lib/module/utils/jpegFromUri.js.map +1 -1
- package/lib/module/utils/subdivisions.js +67 -0
- package/lib/module/utils/subdivisions.js.map +1 -0
- package/lib/typescript/core/VelionOnboarding.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/en.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/es.d.ts +4 -0
- package/lib/typescript/i18n/strings/es.d.ts.map +1 -1
- package/lib/typescript/steps/AddressInfoStep.d.ts +6 -0
- package/lib/typescript/steps/AddressInfoStep.d.ts.map +1 -1
- package/lib/typescript/steps/FingerprintStep.d.ts.map +1 -1
- package/lib/typescript/steps/LivenessMatchStep.d.ts.map +1 -1
- package/lib/typescript/steps/livenessGuidance.d.ts +58 -0
- package/lib/typescript/steps/livenessGuidance.d.ts.map +1 -0
- package/lib/typescript/steps/livenessRestart.d.ts +25 -0
- package/lib/typescript/steps/livenessRestart.d.ts.map +1 -0
- package/lib/typescript/steps/types.d.ts +2 -0
- package/lib/typescript/steps/types.d.ts.map +1 -1
- package/lib/typescript/transport/api.d.ts.map +1 -1
- package/lib/typescript/transport/irisWebSocket.d.ts +8 -0
- package/lib/typescript/transport/irisWebSocket.d.ts.map +1 -1
- package/lib/typescript/types/index.d.ts +34 -0
- package/lib/typescript/types/index.d.ts.map +1 -1
- package/lib/typescript/utils/addressForm.d.ts +51 -0
- package/lib/typescript/utils/addressForm.d.ts.map +1 -0
- package/lib/typescript/utils/appId.d.ts +8 -0
- package/lib/typescript/utils/appId.d.ts.map +1 -0
- package/lib/typescript/utils/deviceFingerprint.d.ts +2 -0
- package/lib/typescript/utils/deviceFingerprint.d.ts.map +1 -1
- package/lib/typescript/utils/deviceIntegrity.d.ts +20 -0
- package/lib/typescript/utils/deviceIntegrity.d.ts.map +1 -0
- package/lib/typescript/utils/deviceKey.d.ts +13 -0
- package/lib/typescript/utils/deviceKey.d.ts.map +1 -0
- package/lib/typescript/utils/frameChain.d.ts +15 -0
- package/lib/typescript/utils/frameChain.d.ts.map +1 -0
- package/lib/typescript/utils/hmac.d.ts +3 -1
- package/lib/typescript/utils/hmac.d.ts.map +1 -1
- package/lib/typescript/utils/jpegFromUri.d.ts +1 -1
- package/lib/typescript/utils/jpegFromUri.d.ts.map +1 -1
- package/lib/typescript/utils/subdivisions.d.ts +46 -0
- package/lib/typescript/utils/subdivisions.d.ts.map +1 -0
- package/node_modules/@velion-la/geo/all.js +252 -0
- package/node_modules/@velion-la/geo/countries/AD.js +2 -0
- package/node_modules/@velion-la/geo/countries/AE.js +2 -0
- package/node_modules/@velion-la/geo/countries/AF.js +2 -0
- package/node_modules/@velion-la/geo/countries/AG.js +2 -0
- package/node_modules/@velion-la/geo/countries/AI.js +2 -0
- package/node_modules/@velion-la/geo/countries/AL.js +2 -0
- package/node_modules/@velion-la/geo/countries/AM.js +2 -0
- package/node_modules/@velion-la/geo/countries/AO.js +2 -0
- package/node_modules/@velion-la/geo/countries/AQ.js +2 -0
- package/node_modules/@velion-la/geo/countries/AR.js +2 -0
- package/node_modules/@velion-la/geo/countries/AS.js +2 -0
- package/node_modules/@velion-la/geo/countries/AT.js +2 -0
- package/node_modules/@velion-la/geo/countries/AU.js +2 -0
- package/node_modules/@velion-la/geo/countries/AW.js +2 -0
- package/node_modules/@velion-la/geo/countries/AX.js +2 -0
- package/node_modules/@velion-la/geo/countries/AZ.js +2 -0
- package/node_modules/@velion-la/geo/countries/BA.js +2 -0
- package/node_modules/@velion-la/geo/countries/BB.js +2 -0
- package/node_modules/@velion-la/geo/countries/BD.js +2 -0
- package/node_modules/@velion-la/geo/countries/BE.js +2 -0
- package/node_modules/@velion-la/geo/countries/BF.js +2 -0
- package/node_modules/@velion-la/geo/countries/BG.js +2 -0
- package/node_modules/@velion-la/geo/countries/BH.js +2 -0
- package/node_modules/@velion-la/geo/countries/BI.js +2 -0
- package/node_modules/@velion-la/geo/countries/BJ.js +2 -0
- package/node_modules/@velion-la/geo/countries/BL.js +2 -0
- package/node_modules/@velion-la/geo/countries/BM.js +2 -0
- package/node_modules/@velion-la/geo/countries/BN.js +2 -0
- package/node_modules/@velion-la/geo/countries/BO.js +2 -0
- package/node_modules/@velion-la/geo/countries/BQ.js +2 -0
- package/node_modules/@velion-la/geo/countries/BR.js +2 -0
- package/node_modules/@velion-la/geo/countries/BS.js +2 -0
- package/node_modules/@velion-la/geo/countries/BT.js +2 -0
- package/node_modules/@velion-la/geo/countries/BV.js +2 -0
- package/node_modules/@velion-la/geo/countries/BW.js +2 -0
- package/node_modules/@velion-la/geo/countries/BY.js +2 -0
- package/node_modules/@velion-la/geo/countries/BZ.js +2 -0
- package/node_modules/@velion-la/geo/countries/CA.js +2 -0
- package/node_modules/@velion-la/geo/countries/CC.js +2 -0
- package/node_modules/@velion-la/geo/countries/CD.js +2 -0
- package/node_modules/@velion-la/geo/countries/CF.js +2 -0
- package/node_modules/@velion-la/geo/countries/CG.js +2 -0
- package/node_modules/@velion-la/geo/countries/CH.js +2 -0
- package/node_modules/@velion-la/geo/countries/CI.js +2 -0
- package/node_modules/@velion-la/geo/countries/CK.js +2 -0
- package/node_modules/@velion-la/geo/countries/CL.js +2 -0
- package/node_modules/@velion-la/geo/countries/CM.js +2 -0
- package/node_modules/@velion-la/geo/countries/CN.js +2 -0
- package/node_modules/@velion-la/geo/countries/CO.js +2 -0
- package/node_modules/@velion-la/geo/countries/CR.js +2 -0
- package/node_modules/@velion-la/geo/countries/CU.js +2 -0
- package/node_modules/@velion-la/geo/countries/CV.js +2 -0
- package/node_modules/@velion-la/geo/countries/CW.js +2 -0
- package/node_modules/@velion-la/geo/countries/CX.js +2 -0
- package/node_modules/@velion-la/geo/countries/CY.js +2 -0
- package/node_modules/@velion-la/geo/countries/CZ.js +2 -0
- package/node_modules/@velion-la/geo/countries/DE.js +2 -0
- package/node_modules/@velion-la/geo/countries/DJ.js +2 -0
- package/node_modules/@velion-la/geo/countries/DK.js +2 -0
- package/node_modules/@velion-la/geo/countries/DM.js +2 -0
- package/node_modules/@velion-la/geo/countries/DO.js +2 -0
- package/node_modules/@velion-la/geo/countries/DZ.js +2 -0
- package/node_modules/@velion-la/geo/countries/EC.js +2 -0
- package/node_modules/@velion-la/geo/countries/EE.js +2 -0
- package/node_modules/@velion-la/geo/countries/EG.js +2 -0
- package/node_modules/@velion-la/geo/countries/EH.js +2 -0
- package/node_modules/@velion-la/geo/countries/ER.js +2 -0
- package/node_modules/@velion-la/geo/countries/ES.js +2 -0
- package/node_modules/@velion-la/geo/countries/ET.js +2 -0
- package/node_modules/@velion-la/geo/countries/FI.js +2 -0
- package/node_modules/@velion-la/geo/countries/FJ.js +2 -0
- package/node_modules/@velion-la/geo/countries/FK.js +2 -0
- package/node_modules/@velion-la/geo/countries/FM.js +2 -0
- package/node_modules/@velion-la/geo/countries/FO.js +2 -0
- package/node_modules/@velion-la/geo/countries/FR.js +2 -0
- package/node_modules/@velion-la/geo/countries/GA.js +2 -0
- package/node_modules/@velion-la/geo/countries/GB.js +2 -0
- package/node_modules/@velion-la/geo/countries/GD.js +2 -0
- package/node_modules/@velion-la/geo/countries/GE.js +2 -0
- package/node_modules/@velion-la/geo/countries/GF.js +2 -0
- package/node_modules/@velion-la/geo/countries/GG.js +2 -0
- package/node_modules/@velion-la/geo/countries/GH.js +2 -0
- package/node_modules/@velion-la/geo/countries/GI.js +2 -0
- package/node_modules/@velion-la/geo/countries/GL.js +2 -0
- package/node_modules/@velion-la/geo/countries/GM.js +2 -0
- package/node_modules/@velion-la/geo/countries/GN.js +2 -0
- package/node_modules/@velion-la/geo/countries/GP.js +2 -0
- package/node_modules/@velion-la/geo/countries/GQ.js +2 -0
- package/node_modules/@velion-la/geo/countries/GR.js +2 -0
- package/node_modules/@velion-la/geo/countries/GS.js +2 -0
- package/node_modules/@velion-la/geo/countries/GT.js +2 -0
- package/node_modules/@velion-la/geo/countries/GU.js +2 -0
- package/node_modules/@velion-la/geo/countries/GW.js +2 -0
- package/node_modules/@velion-la/geo/countries/GY.js +2 -0
- package/node_modules/@velion-la/geo/countries/HK.js +2 -0
- package/node_modules/@velion-la/geo/countries/HM.js +2 -0
- package/node_modules/@velion-la/geo/countries/HN.js +2 -0
- package/node_modules/@velion-la/geo/countries/HR.js +2 -0
- package/node_modules/@velion-la/geo/countries/HT.js +2 -0
- package/node_modules/@velion-la/geo/countries/HU.js +2 -0
- package/node_modules/@velion-la/geo/countries/ID.js +2 -0
- package/node_modules/@velion-la/geo/countries/IE.js +2 -0
- package/node_modules/@velion-la/geo/countries/IL.js +2 -0
- package/node_modules/@velion-la/geo/countries/IM.js +2 -0
- package/node_modules/@velion-la/geo/countries/IN.js +2 -0
- package/node_modules/@velion-la/geo/countries/IO.js +2 -0
- package/node_modules/@velion-la/geo/countries/IQ.js +2 -0
- package/node_modules/@velion-la/geo/countries/IR.js +2 -0
- package/node_modules/@velion-la/geo/countries/IS.js +2 -0
- package/node_modules/@velion-la/geo/countries/IT.js +2 -0
- package/node_modules/@velion-la/geo/countries/JE.js +2 -0
- package/node_modules/@velion-la/geo/countries/JM.js +2 -0
- package/node_modules/@velion-la/geo/countries/JO.js +2 -0
- package/node_modules/@velion-la/geo/countries/JP.js +2 -0
- package/node_modules/@velion-la/geo/countries/KE.js +2 -0
- package/node_modules/@velion-la/geo/countries/KG.js +2 -0
- package/node_modules/@velion-la/geo/countries/KH.js +2 -0
- package/node_modules/@velion-la/geo/countries/KI.js +2 -0
- package/node_modules/@velion-la/geo/countries/KM.js +2 -0
- package/node_modules/@velion-la/geo/countries/KN.js +2 -0
- package/node_modules/@velion-la/geo/countries/KP.js +2 -0
- package/node_modules/@velion-la/geo/countries/KR.js +2 -0
- package/node_modules/@velion-la/geo/countries/KW.js +2 -0
- package/node_modules/@velion-la/geo/countries/KY.js +2 -0
- package/node_modules/@velion-la/geo/countries/KZ.js +2 -0
- package/node_modules/@velion-la/geo/countries/LA.js +2 -0
- package/node_modules/@velion-la/geo/countries/LB.js +2 -0
- package/node_modules/@velion-la/geo/countries/LC.js +2 -0
- package/node_modules/@velion-la/geo/countries/LI.js +2 -0
- package/node_modules/@velion-la/geo/countries/LK.js +2 -0
- package/node_modules/@velion-la/geo/countries/LR.js +2 -0
- package/node_modules/@velion-la/geo/countries/LS.js +2 -0
- package/node_modules/@velion-la/geo/countries/LT.js +2 -0
- package/node_modules/@velion-la/geo/countries/LU.js +2 -0
- package/node_modules/@velion-la/geo/countries/LV.js +2 -0
- package/node_modules/@velion-la/geo/countries/LY.js +2 -0
- package/node_modules/@velion-la/geo/countries/MA.js +2 -0
- package/node_modules/@velion-la/geo/countries/MC.js +2 -0
- package/node_modules/@velion-la/geo/countries/MD.js +2 -0
- package/node_modules/@velion-la/geo/countries/ME.js +2 -0
- package/node_modules/@velion-la/geo/countries/MF.js +2 -0
- package/node_modules/@velion-la/geo/countries/MG.js +2 -0
- package/node_modules/@velion-la/geo/countries/MH.js +2 -0
- package/node_modules/@velion-la/geo/countries/MK.js +2 -0
- package/node_modules/@velion-la/geo/countries/ML.js +2 -0
- package/node_modules/@velion-la/geo/countries/MM.js +2 -0
- package/node_modules/@velion-la/geo/countries/MN.js +2 -0
- package/node_modules/@velion-la/geo/countries/MO.js +2 -0
- package/node_modules/@velion-la/geo/countries/MP.js +2 -0
- package/node_modules/@velion-la/geo/countries/MQ.js +2 -0
- package/node_modules/@velion-la/geo/countries/MR.js +2 -0
- package/node_modules/@velion-la/geo/countries/MS.js +2 -0
- package/node_modules/@velion-la/geo/countries/MT.js +2 -0
- package/node_modules/@velion-la/geo/countries/MU.js +2 -0
- package/node_modules/@velion-la/geo/countries/MV.js +2 -0
- package/node_modules/@velion-la/geo/countries/MW.js +2 -0
- package/node_modules/@velion-la/geo/countries/MX.js +2 -0
- package/node_modules/@velion-la/geo/countries/MY.js +2 -0
- package/node_modules/@velion-la/geo/countries/MZ.js +2 -0
- package/node_modules/@velion-la/geo/countries/NA.js +2 -0
- package/node_modules/@velion-la/geo/countries/NC.js +2 -0
- package/node_modules/@velion-la/geo/countries/NE.js +2 -0
- package/node_modules/@velion-la/geo/countries/NF.js +2 -0
- package/node_modules/@velion-la/geo/countries/NG.js +2 -0
- package/node_modules/@velion-la/geo/countries/NI.js +2 -0
- package/node_modules/@velion-la/geo/countries/NL.js +2 -0
- package/node_modules/@velion-la/geo/countries/NO.js +2 -0
- package/node_modules/@velion-la/geo/countries/NP.js +2 -0
- package/node_modules/@velion-la/geo/countries/NR.js +2 -0
- package/node_modules/@velion-la/geo/countries/NU.js +2 -0
- package/node_modules/@velion-la/geo/countries/NZ.js +2 -0
- package/node_modules/@velion-la/geo/countries/OM.js +2 -0
- package/node_modules/@velion-la/geo/countries/PA.js +2 -0
- package/node_modules/@velion-la/geo/countries/PE.js +2 -0
- package/node_modules/@velion-la/geo/countries/PF.js +2 -0
- package/node_modules/@velion-la/geo/countries/PG.js +2 -0
- package/node_modules/@velion-la/geo/countries/PH.js +2 -0
- package/node_modules/@velion-la/geo/countries/PK.js +2 -0
- package/node_modules/@velion-la/geo/countries/PL.js +2 -0
- package/node_modules/@velion-la/geo/countries/PM.js +2 -0
- package/node_modules/@velion-la/geo/countries/PN.js +2 -0
- package/node_modules/@velion-la/geo/countries/PR.js +2 -0
- package/node_modules/@velion-la/geo/countries/PS.js +2 -0
- package/node_modules/@velion-la/geo/countries/PT.js +2 -0
- package/node_modules/@velion-la/geo/countries/PW.js +2 -0
- package/node_modules/@velion-la/geo/countries/PY.js +2 -0
- package/node_modules/@velion-la/geo/countries/QA.js +2 -0
- package/node_modules/@velion-la/geo/countries/RE.js +2 -0
- package/node_modules/@velion-la/geo/countries/RO.js +2 -0
- package/node_modules/@velion-la/geo/countries/RS.js +2 -0
- package/node_modules/@velion-la/geo/countries/RU.js +2 -0
- package/node_modules/@velion-la/geo/countries/RW.js +2 -0
- package/node_modules/@velion-la/geo/countries/SA.js +2 -0
- package/node_modules/@velion-la/geo/countries/SB.js +2 -0
- package/node_modules/@velion-la/geo/countries/SC.js +2 -0
- package/node_modules/@velion-la/geo/countries/SD.js +2 -0
- package/node_modules/@velion-la/geo/countries/SE.js +2 -0
- package/node_modules/@velion-la/geo/countries/SG.js +2 -0
- package/node_modules/@velion-la/geo/countries/SH.js +2 -0
- package/node_modules/@velion-la/geo/countries/SI.js +2 -0
- package/node_modules/@velion-la/geo/countries/SJ.js +2 -0
- package/node_modules/@velion-la/geo/countries/SK.js +2 -0
- package/node_modules/@velion-la/geo/countries/SL.js +2 -0
- package/node_modules/@velion-la/geo/countries/SM.js +2 -0
- package/node_modules/@velion-la/geo/countries/SN.js +2 -0
- package/node_modules/@velion-la/geo/countries/SO.js +2 -0
- package/node_modules/@velion-la/geo/countries/SR.js +2 -0
- package/node_modules/@velion-la/geo/countries/SS.js +2 -0
- package/node_modules/@velion-la/geo/countries/ST.js +2 -0
- package/node_modules/@velion-la/geo/countries/SV.js +2 -0
- package/node_modules/@velion-la/geo/countries/SX.js +2 -0
- package/node_modules/@velion-la/geo/countries/SY.js +2 -0
- package/node_modules/@velion-la/geo/countries/SZ.js +2 -0
- package/node_modules/@velion-la/geo/countries/TC.js +2 -0
- package/node_modules/@velion-la/geo/countries/TD.js +2 -0
- package/node_modules/@velion-la/geo/countries/TF.js +2 -0
- package/node_modules/@velion-la/geo/countries/TG.js +2 -0
- package/node_modules/@velion-la/geo/countries/TH.js +2 -0
- package/node_modules/@velion-la/geo/countries/TJ.js +2 -0
- package/node_modules/@velion-la/geo/countries/TK.js +2 -0
- package/node_modules/@velion-la/geo/countries/TL.js +2 -0
- package/node_modules/@velion-la/geo/countries/TM.js +2 -0
- package/node_modules/@velion-la/geo/countries/TN.js +2 -0
- package/node_modules/@velion-la/geo/countries/TO.js +2 -0
- package/node_modules/@velion-la/geo/countries/TR.js +2 -0
- package/node_modules/@velion-la/geo/countries/TT.js +2 -0
- package/node_modules/@velion-la/geo/countries/TV.js +2 -0
- package/node_modules/@velion-la/geo/countries/TW.js +2 -0
- package/node_modules/@velion-la/geo/countries/TZ.js +2 -0
- package/node_modules/@velion-la/geo/countries/UA.js +2 -0
- package/node_modules/@velion-la/geo/countries/UG.js +2 -0
- package/node_modules/@velion-la/geo/countries/UM.js +2 -0
- package/node_modules/@velion-la/geo/countries/US.js +2 -0
- package/node_modules/@velion-la/geo/countries/UY.js +2 -0
- package/node_modules/@velion-la/geo/countries/UZ.js +2 -0
- package/node_modules/@velion-la/geo/countries/VA.js +2 -0
- package/node_modules/@velion-la/geo/countries/VC.js +2 -0
- package/node_modules/@velion-la/geo/countries/VE.js +2 -0
- package/node_modules/@velion-la/geo/countries/VG.js +2 -0
- package/node_modules/@velion-la/geo/countries/VI.js +2 -0
- package/node_modules/@velion-la/geo/countries/VN.js +2 -0
- package/node_modules/@velion-la/geo/countries/VU.js +2 -0
- package/node_modules/@velion-la/geo/countries/WF.js +2 -0
- package/node_modules/@velion-la/geo/countries/WS.js +2 -0
- package/node_modules/@velion-la/geo/countries/YE.js +2 -0
- package/node_modules/@velion-la/geo/countries/YT.js +2 -0
- package/node_modules/@velion-la/geo/countries/ZA.js +2 -0
- package/node_modules/@velion-la/geo/countries/ZM.js +2 -0
- package/node_modules/@velion-la/geo/countries/ZW.js +2 -0
- package/node_modules/@velion-la/geo/data/countries.js +2 -0
- package/node_modules/@velion-la/geo/data/loaders.js +504 -0
- package/node_modules/@velion-la/geo/data/locales.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AD.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AF.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AG.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AI.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AL.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AO.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AQ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AS.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AT.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AU.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AW.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AX.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/AZ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BA.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BB.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BD.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BF.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BG.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BH.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BI.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BJ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BL.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BN.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BO.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BQ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BS.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BT.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BV.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BW.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BY.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/BZ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CA.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CC.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CD.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CF.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CG.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CH.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CI.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CK.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CL.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CN.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CO.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CU.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CV.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CW.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CX.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CY.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/CZ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/DE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/DJ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/DK.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/DM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/DO.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/DZ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/EC.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/EE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/EG.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/EH.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/ER.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/ES.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/ET.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/FI.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/FJ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/FK.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/FM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/FO.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/FR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GA.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GB.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GD.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GF.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GG.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GH.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GI.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GL.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GN.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GP.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GQ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GS.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GT.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GU.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GW.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/GY.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/HK.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/HM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/HN.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/HR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/HT.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/HU.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/ID.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/IE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/IL.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/IM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/IN.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/IO.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/IQ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/IR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/IS.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/IT.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/JE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/JM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/JO.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/JP.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/KE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/KG.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/KH.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/KI.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/KM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/KN.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/KP.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/KR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/KW.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/KY.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/KZ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/LA.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/LB.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/LC.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/LI.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/LK.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/LR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/LS.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/LT.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/LU.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/LV.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/LY.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MA.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MC.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MD.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/ME.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MF.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MG.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MH.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MK.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/ML.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MN.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MO.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MP.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MQ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MS.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MT.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MU.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MV.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MW.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MX.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MY.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/MZ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/NA.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/NC.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/NE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/NF.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/NG.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/NI.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/NL.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/NO.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/NP.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/NR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/NU.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/NZ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/OM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PA.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PF.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PG.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PH.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PK.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PL.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PN.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PS.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PT.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PW.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/PY.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/QA.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/RE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/RO.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/RS.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/RU.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/RW.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SA.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SB.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SC.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SD.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SG.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SH.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SI.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SJ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SK.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SL.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SN.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SO.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SS.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/ST.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SV.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SX.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SY.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/SZ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TC.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TD.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TF.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TG.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TH.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TJ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TK.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TL.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TN.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TO.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TR.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TT.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TV.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TW.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/TZ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/UA.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/UG.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/UM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/US.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/UY.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/UZ.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/VA.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/VC.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/VE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/VG.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/VI.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/VN.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/VU.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/WF.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/WS.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/YE.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/YT.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/ZA.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/ZM.js +2 -0
- package/node_modules/@velion-la/geo/geocoder/ZW.js +2 -0
- package/node_modules/@velion-la/geo/geocoders.js +252 -0
- package/node_modules/@velion-la/geo/index.js +105 -0
- package/node_modules/@velion-la/geo/load.js +33 -0
- package/node_modules/@velion-la/geo/normalize.js +46 -0
- package/node_modules/@velion-la/geo/package.json +78 -0
- package/node_modules/@velion-la/geo/suggest.js +54 -0
- package/node_modules/@velion-la/geo/types/all.d.ts +5 -0
- package/node_modules/@velion-la/geo/types/country.d.ts +10 -0
- package/node_modules/@velion-la/geo/types/geocoder.d.ts +9 -0
- package/node_modules/@velion-la/geo/types/geocoders.d.ts +8 -0
- package/node_modules/@velion-la/geo/types/index.d.ts +49 -0
- package/node_modules/@velion-la/geo/types/load.d.ts +8 -0
- package/package.json +25 -13
- package/src/core/VelionOnboarding.ts +4 -1
- package/src/i18n/strings/en.ts +7 -1
- package/src/i18n/strings/es.ts +7 -1
- package/src/steps/AddressInfoStep.tsx +427 -266
- package/src/steps/FingerprintStep.tsx +1 -0
- package/src/steps/LivenessMatchStep.tsx +119 -13
- package/src/steps/livenessGuidance.ts +103 -0
- package/src/steps/livenessRestart.ts +32 -0
- package/src/steps/types.ts +2 -0
- package/src/transport/api.ts +17 -0
- package/src/transport/irisWebSocket.ts +9 -0
- package/src/types/index.ts +37 -0
- package/src/utils/addressForm.ts +122 -0
- package/src/utils/appId.ts +15 -0
- package/src/utils/deviceFingerprint.ts +3 -1
- package/src/utils/deviceIntegrity.ts +102 -0
- package/src/utils/deviceKey.ts +52 -0
- package/src/utils/frameChain.ts +56 -0
- package/src/utils/hmac.ts +8 -5
- package/src/utils/jpegFromUri.ts +1 -1
- package/src/utils/subdivisions.ts +86 -0
|
@@ -48,6 +48,7 @@ export class FingerprintStep implements StepModule {
|
|
|
48
48
|
let result: DeviceFingerprintResult;
|
|
49
49
|
try {
|
|
50
50
|
result = await generateDeviceFingerprint({
|
|
51
|
+
sessionId: this.deps.sessionId,
|
|
51
52
|
endpoint: this.deps.fingerprintEndpoint ?? DEFAULT_FINGERPRINT_ENDPOINT,
|
|
52
53
|
...(this.deps.fingerprintApiKey !== undefined && {
|
|
53
54
|
apiKey: this.deps.fingerprintApiKey,
|
|
@@ -40,6 +40,9 @@ import { StepShell } from '../ui/StepShell';
|
|
|
40
40
|
import { StepIcon } from '../ui/icons/StepIcon';
|
|
41
41
|
import { mixHex, useTheme } from '../ui/theme';
|
|
42
42
|
import { getStrings } from '../i18n';
|
|
43
|
+
import { submitDeviceIntegrity } from '../utils/deviceIntegrity';
|
|
44
|
+
import { destroyDeviceKey, signWithDeviceKey } from '../utils/deviceKey';
|
|
45
|
+
import { createFrameChain, type FrameChain } from '../utils/frameChain';
|
|
43
46
|
import { log } from '../utils/log';
|
|
44
47
|
import {
|
|
45
48
|
byteLengthOfUri,
|
|
@@ -60,6 +63,13 @@ import {
|
|
|
60
63
|
type IrisConnection,
|
|
61
64
|
type IrisServerMessage,
|
|
62
65
|
} from '../transport/irisWebSocket';
|
|
66
|
+
import { planLivenessRestart, type LivenessPhase } from './livenessRestart';
|
|
67
|
+
import {
|
|
68
|
+
positioningInstruction,
|
|
69
|
+
preludeHoldMs,
|
|
70
|
+
retryPrelude,
|
|
71
|
+
type ChallengePrelude,
|
|
72
|
+
} from './livenessGuidance';
|
|
63
73
|
import {
|
|
64
74
|
LivenessCamera,
|
|
65
75
|
type LivenessCameraHandle,
|
|
@@ -301,6 +311,7 @@ export class LivenessMatchStep implements StepModule {
|
|
|
301
311
|
sessionId={this.deps.sessionId}
|
|
302
312
|
locale={this.deps.locale}
|
|
303
313
|
calibrationLabel={this.deps.livenessCalibrationLabel}
|
|
314
|
+
googleCloudProjectNumber={this.deps.googleCloudProjectNumber}
|
|
304
315
|
showIntro
|
|
305
316
|
showBackButton
|
|
306
317
|
onVideoUploaded={this.deps.onLivenessVideoUploaded}
|
|
@@ -331,6 +342,7 @@ interface ViewProps {
|
|
|
331
342
|
locale: string;
|
|
332
343
|
/** Optional Iris calibration label forwarded to /liveness-init body. */
|
|
333
344
|
calibrationLabel?: string | undefined;
|
|
345
|
+
googleCloudProjectNumber?: string | undefined;
|
|
334
346
|
showIntro: boolean;
|
|
335
347
|
showBackButton: boolean;
|
|
336
348
|
/** Best-effort: fires only on a successful video upload (HTTP 200 from GCS). */
|
|
@@ -339,13 +351,14 @@ interface ViewProps {
|
|
|
339
351
|
onCancel: (err: SdkError) => void;
|
|
340
352
|
}
|
|
341
353
|
|
|
342
|
-
type Phase =
|
|
354
|
+
type Phase = LivenessPhase;
|
|
343
355
|
|
|
344
356
|
function LivenessMatchView({
|
|
345
357
|
api,
|
|
346
358
|
sessionId,
|
|
347
359
|
locale,
|
|
348
360
|
calibrationLabel,
|
|
361
|
+
googleCloudProjectNumber,
|
|
349
362
|
showIntro,
|
|
350
363
|
showBackButton,
|
|
351
364
|
onVideoUploaded,
|
|
@@ -357,6 +370,9 @@ function LivenessMatchView({
|
|
|
357
370
|
const cameraRef = useRef<LivenessCameraHandle>(null);
|
|
358
371
|
|
|
359
372
|
const [phase, setPhase] = useState<Phase>(showIntro ? 'intro' : 'capturing');
|
|
373
|
+
// Bumped on every verification attempt, so work scheduled by one attempt
|
|
374
|
+
// (the async switch to `finalizing`) cannot land on the next one.
|
|
375
|
+
const attemptRef = useRef(0);
|
|
360
376
|
const [statusText, setStatusText] = useState<string | null>(null);
|
|
361
377
|
const [challengeText, setChallengeText] = useState<string | null>(null);
|
|
362
378
|
const [ovalCue, setOvalCue] = useState<LivenessOvalCue>('NEUTRAL');
|
|
@@ -375,6 +391,7 @@ function LivenessMatchView({
|
|
|
375
391
|
// triggering re-renders: kept in refs.
|
|
376
392
|
const wsRef = useRef<IrisConnection | null>(null);
|
|
377
393
|
const hmacRef = useRef<HmacKey | null>(null);
|
|
394
|
+
const frameChainRef = useRef<FrameChain | null>(null);
|
|
378
395
|
const livenessSessionIdRef = useRef<string | null>(null);
|
|
379
396
|
const currentChallengeRef = useRef<IrisChallenge | null>(null);
|
|
380
397
|
// Tracks the position of the active challenge inside the session sequence
|
|
@@ -414,11 +431,18 @@ function LivenessMatchView({
|
|
|
414
431
|
// treat a handled rejection as "socket closed before the step finalized".
|
|
415
432
|
const closingForRetryRef = useRef(false);
|
|
416
433
|
const toastTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
434
|
+
// "Come closer first" waiting for the MOVE_FARTHER that Iris re-issues right
|
|
435
|
+
// after it, and the timer that hands the slot back to that challenge's own
|
|
436
|
+
// instruction once its read delay ends (OSDKR-40).
|
|
437
|
+
const pendingPreludeRef = useRef<ChallengePrelude | null>(null);
|
|
438
|
+
const preludeTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
417
439
|
// Tracks the toast currently on screen so we can extend its visibility when
|
|
418
440
|
// the same message arrives again (instead of dismount/remount, which made
|
|
419
441
|
// warnings flash in <2s and the user couldn't read them).
|
|
420
442
|
const activeToastRef = useRef<{ kind: 'success' | 'warning'; message: string } | null>(null);
|
|
421
443
|
|
|
444
|
+
const unmountedRef = useRef(false);
|
|
445
|
+
|
|
422
446
|
// ── Video recording state (OSDKR-4) ─────────────────────────────────────
|
|
423
447
|
// `videoUploadRef` holds the signed URL returned by /liveness-init when the
|
|
424
448
|
// backend enabled video capture for this session. `null` → skip recording.
|
|
@@ -497,8 +521,17 @@ function LivenessMatchView({
|
|
|
497
521
|
}
|
|
498
522
|
}, []);
|
|
499
523
|
|
|
524
|
+
const clearPrelude = useCallback(() => {
|
|
525
|
+
pendingPreludeRef.current = null;
|
|
526
|
+
if (preludeTimerRef.current) {
|
|
527
|
+
clearTimeout(preludeTimerRef.current);
|
|
528
|
+
preludeTimerRef.current = null;
|
|
529
|
+
}
|
|
530
|
+
}, []);
|
|
531
|
+
|
|
500
532
|
const stopCapture = useCallback(() => {
|
|
501
533
|
clearCaptureTimer();
|
|
534
|
+
clearPrelude();
|
|
502
535
|
captureGenerationRef.current += 1;
|
|
503
536
|
const pending = pendingFrameRef.current;
|
|
504
537
|
pendingFrameRef.current = null;
|
|
@@ -507,7 +540,7 @@ function LivenessMatchView({
|
|
|
507
540
|
// next loop start must not stay blocked on it.
|
|
508
541
|
captureInFlightRef.current = false;
|
|
509
542
|
processingRef.current = false;
|
|
510
|
-
}, [clearCaptureTimer]);
|
|
543
|
+
}, [clearCaptureTimer, clearPrelude]);
|
|
511
544
|
|
|
512
545
|
// ── Video upload pipeline (OSDKR-4) ─────────────────────────────────────
|
|
513
546
|
// Everything below is best-effort: never throws into the caller; never
|
|
@@ -842,7 +875,8 @@ function LivenessMatchView({
|
|
|
842
875
|
});
|
|
843
876
|
}
|
|
844
877
|
const key = hmacRef.current;
|
|
845
|
-
|
|
878
|
+
const frameChain = frameChainRef.current;
|
|
879
|
+
if (key || frameChain) {
|
|
846
880
|
const envelope = buildSignedFrameEnvelope({
|
|
847
881
|
key,
|
|
848
882
|
sessionId: livenessSessionIdRef.current ?? sessionId,
|
|
@@ -851,6 +885,7 @@ function LivenessMatchView({
|
|
|
851
885
|
jpegBase64: jpeg.base64,
|
|
852
886
|
});
|
|
853
887
|
ws.sendJson(envelope.json);
|
|
888
|
+
frameChain?.addFrame(framesSentRef.current, envelope.canonical);
|
|
854
889
|
} else {
|
|
855
890
|
// Vision-camera + RN's WebSocket need an ArrayBuffer for binary frames.
|
|
856
891
|
// `Uint8Array.buffer` is a `SharedArrayBuffer` on some Hermes versions
|
|
@@ -1008,6 +1043,8 @@ function LivenessMatchView({
|
|
|
1008
1043
|
case 'CHALLENGE': {
|
|
1009
1044
|
const ch = (msg.challenge ?? null) as IrisChallenge | null;
|
|
1010
1045
|
currentChallengeRef.current = ch;
|
|
1046
|
+
const prelude = pendingPreludeRef.current;
|
|
1047
|
+
clearPrelude();
|
|
1011
1048
|
// Stash the sequence position so CHALLENGE_COMPLETE can tell
|
|
1012
1049
|
// whether this was the LAST challenge and switch to the analyzing
|
|
1013
1050
|
// overlay immediately instead of waiting for SESSION_COMPLETE.
|
|
@@ -1027,18 +1064,32 @@ function LivenessMatchView({
|
|
|
1027
1064
|
? FRAME_MS_BLINK
|
|
1028
1065
|
: FRAME_MS_DEFAULT,
|
|
1029
1066
|
);
|
|
1030
|
-
setChallengeText(challengeLabel(ch));
|
|
1031
1067
|
// Map distance challenges to an oval-size cue so the viewfinder
|
|
1032
1068
|
// shape reinforces the instruction (grows for closer, returns to
|
|
1033
1069
|
// neutral for farther). All other challenges keep the neutral
|
|
1034
1070
|
// oval — the dim mask shouldn't move under a turn / smile / blink.
|
|
1035
|
-
|
|
1071
|
+
const challengeCue: LivenessOvalCue =
|
|
1036
1072
|
ch === 'MOVE_CLOSER'
|
|
1037
1073
|
? 'MOVE_CLOSER'
|
|
1038
1074
|
: ch === 'MOVE_FARTHER'
|
|
1039
1075
|
? 'MOVE_FARTHER'
|
|
1040
|
-
: 'NEUTRAL'
|
|
1041
|
-
)
|
|
1076
|
+
: 'NEUTRAL';
|
|
1077
|
+
if (prelude && prelude.challenge === ch) {
|
|
1078
|
+
// Keep "come closer first" up through the read delay: the user,
|
|
1079
|
+
// already far after the failed attempt, needs room to pull back
|
|
1080
|
+
// before the window opens (OSDKR-40, IRIS-44).
|
|
1081
|
+
setChallengeText(prelude.text);
|
|
1082
|
+
setOvalCue('MOVE_CLOSER');
|
|
1083
|
+
preludeTimerRef.current = setTimeout(() => {
|
|
1084
|
+
preludeTimerRef.current = null;
|
|
1085
|
+
if (currentChallengeRef.current !== ch) return;
|
|
1086
|
+
setChallengeText(challengeLabel(ch));
|
|
1087
|
+
setOvalCue(challengeCue);
|
|
1088
|
+
}, preludeHoldMs(msg.readDelayMs));
|
|
1089
|
+
} else {
|
|
1090
|
+
setChallengeText(challengeLabel(ch));
|
|
1091
|
+
setOvalCue(challengeCue);
|
|
1092
|
+
}
|
|
1042
1093
|
setProgress(0);
|
|
1043
1094
|
// Positioning skipped or already passed — start the evidence
|
|
1044
1095
|
// recorder if it is not running yet (idempotent).
|
|
@@ -1080,8 +1131,13 @@ function LivenessMatchView({
|
|
|
1080
1131
|
videoOutcome: videoOutcomeRef.current,
|
|
1081
1132
|
});
|
|
1082
1133
|
stopCapture();
|
|
1134
|
+
const attempt = attemptRef.current;
|
|
1083
1135
|
(async () => {
|
|
1084
1136
|
await stopVideoRecordingIfActive();
|
|
1137
|
+
// A terminal WARNING can arrive while the recording flushes and
|
|
1138
|
+
// the user may already have retried: leaving the new attempt
|
|
1139
|
+
// without a camera is OSDKR-39 again.
|
|
1140
|
+
if (attempt !== attemptRef.current) return;
|
|
1085
1141
|
log.info('[Liveness] last challenge: switching phase to finalizing');
|
|
1086
1142
|
setPhase('finalizing');
|
|
1087
1143
|
})();
|
|
@@ -1122,7 +1178,26 @@ function LivenessMatchView({
|
|
|
1122
1178
|
resetWatchdog();
|
|
1123
1179
|
return;
|
|
1124
1180
|
}
|
|
1181
|
+
const prelude = retryPrelude(msg, t.liveness);
|
|
1182
|
+
if (prelude) {
|
|
1183
|
+
// Pinned now and held into the MOVE_FARTHER Iris re-issues next.
|
|
1184
|
+
pendingPreludeRef.current = prelude;
|
|
1185
|
+
currentChallengeRef.current = null;
|
|
1186
|
+
setProgress(null);
|
|
1187
|
+
setChallengeText(prelude.text);
|
|
1188
|
+
setOvalCue('MOVE_CLOSER');
|
|
1189
|
+
showToast('warning', prelude.text);
|
|
1190
|
+
resetWatchdog();
|
|
1191
|
+
return;
|
|
1192
|
+
}
|
|
1193
|
+
// While the positioning gate blocks, its instruction has to outlive
|
|
1194
|
+
// the toast: the block can last tens of seconds (OSDKR-40, IRIS-45).
|
|
1195
|
+
const pinned = positioningInstruction(msg, currentChallengeRef.current, t.liveness);
|
|
1196
|
+
if (pinned) setChallengeText(pinned);
|
|
1125
1197
|
const isPositioningReady = msg.code === 'POSITIONING_READY';
|
|
1198
|
+
if (isPositioningReady && currentChallengeRef.current === null) {
|
|
1199
|
+
setChallengeText(t.liveness.positioningReady);
|
|
1200
|
+
}
|
|
1126
1201
|
// Per-code SDK-side fallback used when the orchestrator forwarded a
|
|
1127
1202
|
// code but no localised text (e.g. older orchestrator versions, or
|
|
1128
1203
|
// the rare WS message that drops the body). The orchestrator's own
|
|
@@ -1286,6 +1361,7 @@ function LivenessMatchView({
|
|
|
1286
1361
|
adjustFps,
|
|
1287
1362
|
api,
|
|
1288
1363
|
challengeLabel,
|
|
1364
|
+
clearPrelude,
|
|
1289
1365
|
failWith,
|
|
1290
1366
|
onComplete,
|
|
1291
1367
|
presentTerminalRetry,
|
|
@@ -1297,6 +1373,7 @@ function LivenessMatchView({
|
|
|
1297
1373
|
stopCapture,
|
|
1298
1374
|
stopVideoRecordingIfActive,
|
|
1299
1375
|
stopWatchdog,
|
|
1376
|
+
t.liveness,
|
|
1300
1377
|
t.liveness.getReady,
|
|
1301
1378
|
t.liveness.positioningReady,
|
|
1302
1379
|
t.liveness.repositioning,
|
|
@@ -1306,6 +1383,7 @@ function LivenessMatchView({
|
|
|
1306
1383
|
);
|
|
1307
1384
|
|
|
1308
1385
|
const startVerification = useCallback(async () => {
|
|
1386
|
+
attemptRef.current += 1;
|
|
1309
1387
|
setBannerError(null);
|
|
1310
1388
|
setRetry(null);
|
|
1311
1389
|
setStatusText(t.liveness.connecting);
|
|
@@ -1317,6 +1395,14 @@ function LivenessMatchView({
|
|
|
1317
1395
|
frameMsRef.current = FRAME_MS_DEFAULT;
|
|
1318
1396
|
hmacRef.current = null;
|
|
1319
1397
|
|
|
1398
|
+
frameChainRef.current = null;
|
|
1399
|
+
const hasDeviceKey = await submitDeviceIntegrity(api, sessionId, googleCloudProjectNumber);
|
|
1400
|
+
// Attestation can take seconds: the user may have left the step meanwhile.
|
|
1401
|
+
if (unmountedRef.current) {
|
|
1402
|
+
destroyDeviceKey();
|
|
1403
|
+
return;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1320
1406
|
let init: LivenessSessionResponse;
|
|
1321
1407
|
try {
|
|
1322
1408
|
// `calibration_label` is the wire name expected by the backend
|
|
@@ -1349,6 +1435,11 @@ function LivenessMatchView({
|
|
|
1349
1435
|
return;
|
|
1350
1436
|
}
|
|
1351
1437
|
livenessSessionIdRef.current = init.liveness_session_id;
|
|
1438
|
+
if (hasDeviceKey) {
|
|
1439
|
+
frameChainRef.current = createFrameChain(init.liveness_session_id, signWithDeviceKey, (json) => {
|
|
1440
|
+
wsRef.current?.sendJson(json);
|
|
1441
|
+
});
|
|
1442
|
+
}
|
|
1352
1443
|
if (init.frame_integrity_key_base64) {
|
|
1353
1444
|
try {
|
|
1354
1445
|
hmacRef.current = importHmacKey(init.frame_integrity_key_base64);
|
|
@@ -1437,6 +1528,7 @@ function LivenessMatchView({
|
|
|
1437
1528
|
}, [
|
|
1438
1529
|
api,
|
|
1439
1530
|
calibrationLabel,
|
|
1531
|
+
googleCloudProjectNumber,
|
|
1440
1532
|
failWith,
|
|
1441
1533
|
handleWsMessage,
|
|
1442
1534
|
locale,
|
|
@@ -1449,15 +1541,26 @@ function LivenessMatchView({
|
|
|
1449
1541
|
t.liveness.terminalRetryFallback,
|
|
1450
1542
|
]);
|
|
1451
1543
|
|
|
1452
|
-
// Re-run after a terminal retry
|
|
1453
|
-
//
|
|
1544
|
+
// Re-run after a terminal retry. The retry dialog replaced the camera, and
|
|
1545
|
+
// the step may have reached `finalizing` before the session failed, so the
|
|
1546
|
+
// phase has to go back to `capturing` or the new WebSocket gets no frames
|
|
1547
|
+
// (OSDKR-39). Entering `capturing` starts the verification through the
|
|
1548
|
+
// phase effect; only when the phase is already `capturing` do we start it.
|
|
1454
1549
|
const restartVerification = useCallback(async () => {
|
|
1455
1550
|
setRetry(null);
|
|
1456
1551
|
setProgress(null);
|
|
1457
1552
|
setChallengeText(null);
|
|
1458
1553
|
setOvalCue('NEUTRAL');
|
|
1459
|
-
|
|
1460
|
-
|
|
1554
|
+
const plan = planLivenessRestart(phase);
|
|
1555
|
+
if (plan.startNow) {
|
|
1556
|
+
await startVerification();
|
|
1557
|
+
return;
|
|
1558
|
+
}
|
|
1559
|
+
// Invalidate the previous attempt now: its pending switch to `finalizing`
|
|
1560
|
+
// must not undo this phase change before the effect starts the new one.
|
|
1561
|
+
attemptRef.current += 1;
|
|
1562
|
+
setPhase(plan.phase);
|
|
1563
|
+
}, [phase, startVerification]);
|
|
1461
1564
|
|
|
1462
1565
|
// Effect: when the user enters the capture phase (intro skipped or
|
|
1463
1566
|
// confirmed), run the start sequence.
|
|
@@ -1472,8 +1575,8 @@ function LivenessMatchView({
|
|
|
1472
1575
|
useEffect(() => {
|
|
1473
1576
|
if (phase !== 'capturing') return;
|
|
1474
1577
|
void startVerification();
|
|
1475
|
-
// We intentionally only re-run when phase flips into capturing
|
|
1476
|
-
//
|
|
1578
|
+
// We intentionally only re-run when phase flips into capturing: the first
|
|
1579
|
+
// start, and a retry from `finalizing` (see `restartVerification`).
|
|
1477
1580
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1478
1581
|
}, [phase]);
|
|
1479
1582
|
|
|
@@ -1483,7 +1586,10 @@ function LivenessMatchView({
|
|
|
1483
1586
|
// / fail / terminal-retry handlers already close the WS explicitly when
|
|
1484
1587
|
// the flow ends normally; this is the safety net for an actual unmount.
|
|
1485
1588
|
useEffect(() => {
|
|
1589
|
+
unmountedRef.current = false;
|
|
1486
1590
|
return () => {
|
|
1591
|
+
unmountedRef.current = true;
|
|
1592
|
+
destroyDeviceKey();
|
|
1487
1593
|
stopCapture();
|
|
1488
1594
|
stopWatchdog();
|
|
1489
1595
|
if (toastTimerRef.current) clearTimeout(toastTimerRef.current);
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which Iris instructions stay pinned above the oval instead of flashing by
|
|
3
|
+
* in a toast (OSDKR-40).
|
|
4
|
+
*
|
|
5
|
+
* Two cases left users stuck because the instruction they needed was only
|
|
6
|
+
* shown for a moment, or overwritten right away:
|
|
7
|
+
*
|
|
8
|
+
* - The positioning gate. Iris blocks until the frame is good enough and, with
|
|
9
|
+
* IRIS-45, says why — `TOO_FAR` with `reasons: ['SHARPNESS']` when a small
|
|
10
|
+
* face reads blurry. A toast expires while the block goes on (30 s on the
|
|
11
|
+
* Motorola Edge 30 Neo sessions), so the instruction is pinned until Iris
|
|
12
|
+
* sends another one or POSITIONING_READY.
|
|
13
|
+
* - The MOVE_FARTHER retry. IRIS-44 sends `MOVE_FARTHER_RETRY` ("first bring
|
|
14
|
+
* the phone closer, then move it away") and re-announces MOVE_FARTHER in the
|
|
15
|
+
* same instant. The CHALLENGE used to replace it with "move the phone away"
|
|
16
|
+
* at once, so the user, already far, had no room left to pull back. The
|
|
17
|
+
* instruction is now held for the challenge's read delay, before the window
|
|
18
|
+
* opens.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import type { IrisChallenge } from '../transport/irisWebSocket';
|
|
22
|
+
|
|
23
|
+
/** Positioning-gate codes whose instruction is pinned while the gate blocks. */
|
|
24
|
+
const POSITIONING_CODES = new Set(['POSITIONING_REQUIRED', 'TOO_FAR', 'TOO_CLOSE']);
|
|
25
|
+
|
|
26
|
+
/** Hold used when the CHALLENGE carries no `readDelayMs` (older Iris). */
|
|
27
|
+
export const DEFAULT_PRELUDE_HOLD_MS = 2_000;
|
|
28
|
+
|
|
29
|
+
export interface GuidanceCopy {
|
|
30
|
+
warningTooFar: string;
|
|
31
|
+
warningTooFarBlurry: string;
|
|
32
|
+
warningTooClose: string;
|
|
33
|
+
warningGeneric: string;
|
|
34
|
+
warningMoveFartherRetry: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface GuidanceWarning {
|
|
38
|
+
code?: string | undefined;
|
|
39
|
+
message?: string | undefined;
|
|
40
|
+
reasons?: unknown;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Instruction to show before a re-issued challenge's window opens. */
|
|
44
|
+
export interface ChallengePrelude {
|
|
45
|
+
challenge: IrisChallenge;
|
|
46
|
+
text: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function serverText(msg: GuidanceWarning): string | null {
|
|
50
|
+
const text = typeof msg.message === 'string' ? msg.message.trim() : '';
|
|
51
|
+
return text.length > 0 ? text : null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Whether the warning lists `reason`. Tolerates an Iris that predates the
|
|
56
|
+
* field or sends something unexpected in it.
|
|
57
|
+
*/
|
|
58
|
+
export function hasReason(msg: GuidanceWarning, reason: string): boolean {
|
|
59
|
+
return Array.isArray(msg.reasons) && msg.reasons.includes(reason);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Text to pin above the oval for a positioning warning, or `null` when the
|
|
64
|
+
* warning is not a positioning one or a challenge is already running (those
|
|
65
|
+
* hints stay toasts: the challenge instruction owns the pinned slot).
|
|
66
|
+
*/
|
|
67
|
+
export function positioningInstruction(
|
|
68
|
+
msg: GuidanceWarning,
|
|
69
|
+
running: IrisChallenge | null,
|
|
70
|
+
copy: GuidanceCopy,
|
|
71
|
+
): string | null {
|
|
72
|
+
if (running !== null) return null;
|
|
73
|
+
if (!msg.code || !POSITIONING_CODES.has(msg.code)) return null;
|
|
74
|
+
const fromServer = serverText(msg);
|
|
75
|
+
if (fromServer) return fromServer;
|
|
76
|
+
switch (msg.code) {
|
|
77
|
+
case 'TOO_FAR':
|
|
78
|
+
return hasReason(msg, 'SHARPNESS') ? copy.warningTooFarBlurry : copy.warningTooFar;
|
|
79
|
+
case 'TOO_CLOSE':
|
|
80
|
+
return copy.warningTooClose;
|
|
81
|
+
default:
|
|
82
|
+
return copy.warningGeneric;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Prelude for the challenge Iris is about to re-issue, or `null` when the
|
|
88
|
+
* warning does not ask for one.
|
|
89
|
+
*/
|
|
90
|
+
export function retryPrelude(msg: GuidanceWarning, copy: GuidanceCopy): ChallengePrelude | null {
|
|
91
|
+
if (msg.code !== 'MOVE_FARTHER_RETRY') return null;
|
|
92
|
+
return {
|
|
93
|
+
challenge: 'MOVE_FARTHER',
|
|
94
|
+
text: serverText(msg) ?? copy.warningMoveFartherRetry,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** How long the prelude stays before the challenge instruction replaces it. */
|
|
99
|
+
export function preludeHoldMs(readDelayMs: unknown): number {
|
|
100
|
+
return typeof readDelayMs === 'number' && Number.isFinite(readDelayMs) && readDelayMs > 0
|
|
101
|
+
? readDelayMs
|
|
102
|
+
: DEFAULT_PRELUDE_HOLD_MS;
|
|
103
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the liveness step has to be for a retry to actually capture frames.
|
|
3
|
+
*
|
|
4
|
+
* The camera is only mounted in the `capturing` phase: `intro` shows the tips
|
|
5
|
+
* and `finalizing` shows the analyzing overlay. A terminal WARNING can land
|
|
6
|
+
* after the last CHALLENGE_COMPLETE already switched the step to `finalizing`
|
|
7
|
+
* — Iris only reports CHALLENGE_NOT_CONFIRMED once the whole sequence ran, so
|
|
8
|
+
* a challenge that timed out earlier fails the session after the last one
|
|
9
|
+
* passed. Restarting the verification from there opened a fresh WebSocket
|
|
10
|
+
* with no camera behind it: Iris received no frames and the user was stuck on
|
|
11
|
+
* the overlay until the watchdog fired (OSDKR-39).
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export type LivenessPhase = 'intro' | 'capturing' | 'finalizing';
|
|
15
|
+
|
|
16
|
+
export interface LivenessRestartPlan {
|
|
17
|
+
/** Phase the step must be in for the new attempt. */
|
|
18
|
+
phase: LivenessPhase;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the caller starts the verification itself. `false` when the phase
|
|
21
|
+
* changes, because entering `capturing` already starts it — starting it here
|
|
22
|
+
* too would open two Iris sessions.
|
|
23
|
+
*/
|
|
24
|
+
startNow: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function planLivenessRestart(current: LivenessPhase): LivenessRestartPlan {
|
|
28
|
+
if (current === 'capturing') {
|
|
29
|
+
return { phase: 'capturing', startNow: true };
|
|
30
|
+
}
|
|
31
|
+
return { phase: 'capturing', startNow: false };
|
|
32
|
+
}
|
package/src/steps/types.ts
CHANGED
|
@@ -78,6 +78,8 @@ export interface StepDeps {
|
|
|
78
78
|
* `LivenessMatchStep`.
|
|
79
79
|
*/
|
|
80
80
|
livenessCalibrationLabel?: string;
|
|
81
|
+
/** See `VelionConfig.googleCloudProjectNumber`. Only read by `LivenessMatchStep`. */
|
|
82
|
+
googleCloudProjectNumber?: string;
|
|
81
83
|
/**
|
|
82
84
|
* Forwarded `VelionConfig.onLivenessVideoUploaded` callback. Invoked by
|
|
83
85
|
* `LivenessMatchStep` only when the recorded session video uploaded
|
package/src/transport/api.ts
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { SdkErrorCode, type SdkError } from '../types';
|
|
19
19
|
import { isSecureHttpUrl } from './secureUrl';
|
|
20
|
+
import { getAppId } from '../utils/appId';
|
|
20
21
|
import { log } from '../utils/log';
|
|
21
22
|
import { SDK_VERSION } from '../utils/sdkVersion';
|
|
22
23
|
|
|
@@ -25,6 +26,9 @@ const CLOCK_SKEW_WARN_HOURS = 24;
|
|
|
25
26
|
|
|
26
27
|
const SESSION_EXPIRED_CODE = SdkErrorCode.SESSION_EXPIRED;
|
|
27
28
|
|
|
29
|
+
/** Backend code for an app outside the organization's enforced allowed apps. */
|
|
30
|
+
const APP_ID_NOT_ALLOWED_BACKEND_CODE = 'VOB-40302';
|
|
31
|
+
|
|
28
32
|
interface BackendErrorBody {
|
|
29
33
|
message?: string;
|
|
30
34
|
code?: string;
|
|
@@ -88,6 +92,7 @@ export function createApiCaller(
|
|
|
88
92
|
let currentToken = sessionToken;
|
|
89
93
|
let currentExpiresAt = expiresAt;
|
|
90
94
|
let clockSkewWarned = false;
|
|
95
|
+
const appId = getAppId();
|
|
91
96
|
|
|
92
97
|
function ensureTokenValid(): void {
|
|
93
98
|
if (!currentExpiresAt) return;
|
|
@@ -121,6 +126,7 @@ export function createApiCaller(
|
|
|
121
126
|
...extra,
|
|
122
127
|
Authorization: `Bearer ${currentToken}`,
|
|
123
128
|
'X-Velion-SDK-Version': SDK_VERSION,
|
|
129
|
+
...(appId !== null && { 'X-App-Id': appId }),
|
|
124
130
|
};
|
|
125
131
|
}
|
|
126
132
|
|
|
@@ -165,6 +171,17 @@ export function createApiCaller(
|
|
|
165
171
|
// Body may not be JSON (e.g., a 502 from a proxy). That's fine.
|
|
166
172
|
}
|
|
167
173
|
|
|
174
|
+
if (errorBody.code === APP_ID_NOT_ALLOWED_BACKEND_CODE) {
|
|
175
|
+
throw {
|
|
176
|
+
code: SdkErrorCode.APP_NOT_ALLOWED,
|
|
177
|
+
message:
|
|
178
|
+
`App "${appId ?? 'unknown'}" is not allowed for this organization. ` +
|
|
179
|
+
'Register it in the allowed apps of the SDK settings in the Velion portal.',
|
|
180
|
+
cause: errorBody,
|
|
181
|
+
httpStatus: response.status,
|
|
182
|
+
} satisfies SdkError;
|
|
183
|
+
}
|
|
184
|
+
|
|
168
185
|
throw buildApiError(
|
|
169
186
|
errorBody.message ??
|
|
170
187
|
`Backend returned ${response.status} on ${endpoint}.`,
|
|
@@ -43,6 +43,14 @@ export interface IrisServerMessage {
|
|
|
43
43
|
code?: string;
|
|
44
44
|
/** Bumps as the user keeps missing positioning. */
|
|
45
45
|
consecutiveMisses?: number;
|
|
46
|
+
/**
|
|
47
|
+
* Capture-quality dimensions the frame fails on (positioning WARNINGs only,
|
|
48
|
+
* IRIS-45): `FACE_DETECTION`, `LIGHTING`, `BACKGROUND`, `SHARPNESS`,
|
|
49
|
+
* `FACE_AREA`. Absent on older Iris versions.
|
|
50
|
+
*/
|
|
51
|
+
reasons?: string[];
|
|
52
|
+
/** Ms between the CHALLENGE announcement and its window opening (CHALLENGE only). */
|
|
53
|
+
readDelayMs?: number;
|
|
46
54
|
/** Final score map on SESSION_COMPLETE. */
|
|
47
55
|
signals?: Record<string, number>;
|
|
48
56
|
/** Zero-based position of this challenge in the session sequence (CHALLENGE only). */
|
|
@@ -146,6 +154,7 @@ export function openIrisWebSocket(opts: IrisOpenOptions): IrisConnection {
|
|
|
146
154
|
...(parsed.consecutiveMisses != null
|
|
147
155
|
? { consecutiveMisses: parsed.consecutiveMisses }
|
|
148
156
|
: {}),
|
|
157
|
+
...(parsed.reasons != null ? { reasons: parsed.reasons } : {}),
|
|
149
158
|
});
|
|
150
159
|
|
|
151
160
|
try {
|
package/src/types/index.ts
CHANGED
|
@@ -289,6 +289,12 @@ export enum SdkErrorCode {
|
|
|
289
289
|
SESSION_INVALID = 'SESSION_INVALID',
|
|
290
290
|
/** The sessionToken has expired (typically a 401 after initial validation). */
|
|
291
291
|
SESSION_EXPIRED = 'SESSION_EXPIRED',
|
|
292
|
+
/**
|
|
293
|
+
* The organization enforces its allowed apps and this app is not on the list
|
|
294
|
+
* (403 `VOB-40302` on `GET /sessions/:id`). The message names the app id to
|
|
295
|
+
* register; retrying does not help.
|
|
296
|
+
*/
|
|
297
|
+
APP_NOT_ALLOWED = 'APP_NOT_ALLOWED',
|
|
292
298
|
/** Could not fetch the initial session state from the backend. */
|
|
293
299
|
SESSION_FETCH_FAILED = 'SESSION_FETCH_FAILED',
|
|
294
300
|
/** Backend sent SESSION_DECLINED over SSE; session ended before completion. */
|
|
@@ -803,6 +809,14 @@ export interface VelionConfig extends VelionCallbacks {
|
|
|
803
809
|
*/
|
|
804
810
|
routingTimeoutMs?: number;
|
|
805
811
|
|
|
812
|
+
/**
|
|
813
|
+
* Number of the Google Cloud project linked to your app in Play Console, used
|
|
814
|
+
* to request Play Integrity tokens on Android. Without it the session reports
|
|
815
|
+
* no attestation and the workflow's integrity policy decides. iOS needs the
|
|
816
|
+
* `appAttestEnvironment` option of the config plugin instead.
|
|
817
|
+
*/
|
|
818
|
+
googleCloudProjectNumber?: string;
|
|
819
|
+
|
|
806
820
|
/**
|
|
807
821
|
* Google Maps Platform API key (Maps JavaScript API + Places). Required for the
|
|
808
822
|
* {@code ADDRESS_INFO} step to show the map, search, and geocoding. Omit only if
|
|
@@ -1069,6 +1083,29 @@ export interface VideoUpload {
|
|
|
1069
1083
|
* recorded video uploaded successfully (HTTP 200 from GCS). When omitted, the
|
|
1070
1084
|
* backend completes liveness based on the Iris score only.
|
|
1071
1085
|
*/
|
|
1086
|
+
/** `POST /sessions/:id/integrity-challenge` response. Single use, valid for 5 minutes. */
|
|
1087
|
+
export interface IntegrityChallengeResponse {
|
|
1088
|
+
challenge: string;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* `POST /sessions/:id/integrity` body. `token` is absent when the device could
|
|
1093
|
+
* not attest; otherwise it is the Play Integrity token on Android and
|
|
1094
|
+
* `<key id>.<attestation object in base64>` on iOS, both over the challenge.
|
|
1095
|
+
*/
|
|
1096
|
+
export interface SubmitIntegrityPayload {
|
|
1097
|
+
challenge: string;
|
|
1098
|
+
platform: 'IOS' | 'ANDROID';
|
|
1099
|
+
token?: string;
|
|
1100
|
+
/**
|
|
1101
|
+
* SPKI of the hardware key that signs the frames, in base64. When present,
|
|
1102
|
+
* the attestation is made over `<challenge>.<sha256 hex of this value>`.
|
|
1103
|
+
*/
|
|
1104
|
+
device_public_key?: string;
|
|
1105
|
+
/** Risk codes such as `ROOTED` or `EMULATOR`. They never stop the flow. */
|
|
1106
|
+
capture_signals?: string[];
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1072
1109
|
export interface LivenessVerifyVideoMeta {
|
|
1073
1110
|
/** MIME type that was sent in the PUT `Content-Type` header. */
|
|
1074
1111
|
content_type: string;
|