npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kernaq/verify-react-native

v2.0.1

Published

Drop-in KYC verification UI for React Native — document capture, selfie, and liveness in one component.

Readme

@kernaq/verify-react-native

Official React Native SDK for Kernaq Identity — a drop-in KYC verification component that handles document capture, selfie, and liveness detection in a single modal. Works with both bare React Native and Expo.

Install

npm install @kernaq/verify-react-native react-native-vision-camera react-native-permissions

Bare React Native — link native modules:

cd ios && pod install

Expo — generate native folders:

npx expo install @kernaq/verify-react-native react-native-vision-camera react-native-permissions
npx expo prebuild

Android permissions

Add to android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

Android — vision-camera setup

Add to android/app/build.gradle:

android {
  ...
  defaultConfig {
    ...
    minSdkVersion 26
  }
}

iOS — link native modules

cd ios && pod install

iOS permissions

Add to ios/<App>/Info.plist:

<key>NSCameraUsageDescription</key>
<string>Camera is required to capture your ID document and selfie.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone is required to record the liveness video.</string>

Quick start

import React, { useState } from 'react'
import { Button, View } from 'react-native'
import { KernaqVerify } from '@kernaq/verify-react-native'

export default function App() {
  const [visible, setVisible] = useState(false)

  return (
    <View>
      <Button title="Verify Identity" onPress={() => setVisible(true)} />

      <KernaqVerify
        visible={visible}
        apiKey="k_test_..."
        country="KEN"
        reference="user_abc123"
        onComplete={(result) => {
          console.log(result.verdict)        // "pass" | "fail" | "review"
          console.log(result.score)          // 0-100
          console.log(result.faceMatch)      // true | false
          console.log(result.documentFields) // { name, dob, document_number, ... }
          setVisible(false)
        }}
        onCancel={() => setVisible(false)}
        onError={(err) => console.error(err.code, err.message)}
      />
    </View>
  )
}

Props

| Prop | Type | Required | Description | |---|---|---|---| | visible | boolean | ✓ | Show or hide the verification modal | | apiKey | string | * | Your Kernaq API key (k_test_... or k_live_...) | | backendUrl | string | * | Backend proxy URL (use instead of apiKey for production) | | country | string | | ISO 3166-1 alpha-3 country code. Default: KEN | | reference | string | | Your internal user/session ID | | sandbox | boolean | | Use sandbox mode — no billing. Default: false | | livenessDuration | number | | Liveness recording duration in ms. Default: 3000 | | documentTypes | DocumentType[] | | Document types to accept. Default: ['national_id', 'passport'] | | theme | VerifyTheme | | Customise colours, border radius and font | | locale | Partial<VerifyLocale> | | Override any displayed string | | onComplete | (result: VerifyResult) => void | | Called when verification completes | | onCancel | () => void | | Called when user dismisses without completing | | onError | (error) => void | | Called on unrecoverable error |

*Either apiKey or backendUrl is required.

Theming

<KernaqVerify
  visible={visible}
  apiKey="k_test_..."
  theme={{
    accentColor: '#6366f1',
    backgroundColor: '#0f0f0f',
    textColor: '#f9fafb',
    mode: 'dark',
    borderRadius: 16,
  }}
  onComplete={handleComplete}
  onCancel={() => setVisible(false)}
/>

Localisation

<KernaqVerify
  visible={visible}
  apiKey="k_test_..."
  locale={{
    intro_title: 'Thibitisha utambulisho wako',
    intro_cta: 'Anza',
    result_pass_title: 'Umefaulu',
  }}
  onComplete={handleComplete}
  onCancel={() => setVisible(false)}
/>

Using a backend proxy (recommended for production)

Never expose a live API key in your app. Instead, forward requests through your server:

<KernaqVerify
  visible={visible}
  backendUrl="https://api.yourapp.com/kyc/verify"
  country="KEN"
  reference={userId}
  onComplete={handleComplete}
  onCancel={() => setVisible(false)}
/>

Your backend endpoint receives a multipart/form-data POST with document, selfie, video, document_type, country, and reference fields. Forward it to https://api.identity.kernaq.com/v1/verify with your secret key.

Result object

interface VerifyResult {
  verificationId: string
  reference: string
  verdict: 'pass' | 'fail' | 'review'
  score: number                              // 0–100
  faceMatch: boolean
  isLive: boolean
  documentFields?: {
    name?: string
    first_name?: string
    last_name?: string
    date_of_birth?: string
    document_number?: string
    nationality?: string
    gender?: string
    expiry_date?: string
  }
}

Peer dependencies

| Package | Version | |---|---| | react | >=18.0.0 | | react-native | >=0.73.0 | | react-native-vision-camera | >=4.0.0 | | react-native-permissions | >=4.0.0 |

Links