@wyasolutions/identity-verification
v1.1.0
Published
**Table of Contents**
Readme
identity-verification
Table of Contents
Overview
identity-verification is a lightweight, headless JavaScript SDK for performing identity verification via document scanning (front/back) and selfie capture. It uses a WebAssembly face & barcode/MRZ detector under the hood and falls back gracefully on mobile devices.
Installation
npm install @wyasolutions/identity-verification
# or
yarn add @wyasolutions/identity-verificationUsage
Initialization
import { init, startVerificationFlow } from "identity-verification";
init({
apiKey: "YOUR_WYA_API_KEY",
proxyUrl: "https://proxy.com/api", // optional for proxy
proxyApiKey: "YOUR_PROXY_API_KEY", // optional if your proxy need it
environment: "production",
documentType: "ARG_3", // e.g. 'ARG_2' or 'ARG_3' or 'ARG_4'
});Starting the Verification Flow
startVerificationFlow({
containerId: "verification-root",
onFinish: (result) => {
console.log("Verification result:", result);
},
onError: (err) => {
console.error("Verification error:", err);
},
});This will mount video/canvas inside the specified container, handle transaction lifecycle, detection loops, UI feedback, and upload each step.
Integration
- Bundler: Supports Vite, Webpack, Rollup. Exports ESM modules.
- HTTPS: Required for camera access.
- Torch support: iOS/Android Chrome via MediaStreamTrack capabilities.
Compatibility
- Modern browsers (Chrome, Safari, Firefox).
- Mobile iOS & Android.
- Graceful fallbacks for camera resolution, front/back camera selection, and torch availability.
- Headless—no external UI dependencies except built-in DOM.
Changelog
1.0.20
- Soporte para el nuevo DNI argentino (
ARG_4):- Frente face-only (sin barcode); rear con MRZ.
- Soporte de QR del rear en proceso en el WASM worker (no bloqueante).
- Refactor: detection flags y barcode keys ahora se derivan del template
documentConstraintsen lugar de hardcodearse pordocumentType. - Validación temprana de
documentType: error claro aonErrorsi se pasa un tipo no soportado.
1.0.19
- Bump de versión SDK, header
x-client-type, headerx-sdk-version. - Mensaje de feedback mejorado.
License
© WYA Solutions
