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

react-native-mdl-verification

v1.0.25

Published

React Native bridge for MDL (Mobile Driver's License) verification using CheckMDL SDK

Downloads

819

Readme

react-native-mdl-verification

React Native bridge for MDL (Mobile Driver's License) verification using CheckMDL SDK.

Installation

npm install react-native-mdl-verification
# or
yarn add react-native-mdl-verification

Android Setup

The package includes the required AAR files for the CheckMDL SDK. No additional manual linking is needed for React Native 0.60+.

Required Permissions

Add the following permissions to your android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true" />

Usage

Initialize the SDK

import MdlVerification from 'react-native-mdl-verification';

// Initialize with your license key
await MdlVerification.initialize('YOUR_LICENSE_KEY');

Start Verification

try {
  const result = await MdlVerification.startVerification({
    command: 'VERIFY',
    stan: '000001',
    terminalId: 'TERMINAL_001',
    merchantId: 'MERCHANT_001',
    minAge: '18',
    timeout: '60',
    demoMode: false,
    onlyVerified: true
  });

  if (result.isSuccessful) {
    console.log('Verification successful!');
    console.log('MDL Token:', result.mdlToken);
    console.log('Document Type:', result.docType);
    console.log('Document Valid:', result.docValid);
  } else {
    console.log('Verification failed:', result.successMesg);
  }
} catch (error) {
  console.error('Verification error:', error);
}

Listen to Verification Events

// Listen for progress updates
const progressListener = MdlVerification.addListener(
  MdlVerification.Events.VERIFICATION_PROGRESS,
  (progress) => {
    console.log('Progress:', progress.status);
    console.log('Log:', progress.logData);
  }
);

// Listen for completion
const completeListener = MdlVerification.addListener(
  MdlVerification.Events.VERIFICATION_COMPLETE,
  (result) => {
    console.log('Verification complete:', result);
  }
);

// Clean up listeners when done
progressListener.remove();
completeListener.remove();

// Or remove all listeners for an event
MdlVerification.removeAllListeners(MdlVerification.Events.VERIFICATION_PROGRESS);

API

Methods

initialize(licenseKey: string): Promise<void>

Initialize the MDL verification SDK with your license key.

startVerification(options: VerificationOptions): Promise<VerificationResponse>

Start the MDL verification process.

Options:

  • command (string, optional): Command type for verification
  • stan (string, optional): Station number
  • terminalId (string, optional): Terminal ID
  • merchantId (string, optional): Merchant ID
  • testHostResponse (string, optional): Test host response for testing purposes
  • minAge (string, required): Minimum age requirement (default: '18')
  • mdlToken (string, optional): MDL token for re-verification
  • timeout (string, required): Timeout in seconds (default: '60')
  • demoMode (boolean, optional): Enable demo mode
  • onlyVerified (boolean, optional): Only accept verified documents

Returns: VerificationResponse object

addListener(eventName: string, listener: Function): Subscription

Add an event listener for verification events.

Events:

  • MdlVerification.Events.VERIFICATION_PROGRESS - Progress updates during verification
  • MdlVerification.Events.VERIFICATION_COMPLETE - Verification completed

Types

VerificationOptions

interface VerificationOptions {
  command?: string;              // Command type for verification
  stan?: string;                 // Station number
  terminalId?: string;           // Terminal ID
  merchantId?: string;           // Merchant ID
  testHostResponse?: string;     // Test host response for testing
  minAge: string;                // Minimum age requirement (e.g., '18', '21')
  mdlToken?: string;             // MDL token for re-verification
  timeout: string;               // Timeout in seconds (e.g., '60')
  demoMode?: boolean;            // Enable demo mode
  onlyVerified?: boolean;        // Only accept verified documents
}

VerificationResponse

interface VerificationResponse {
  command?: string;
  stan?: string;
  terminalId?: string;
  merchantId?: string;
  success?: string;              // 'Y' for success, 'N' for failure
  successMesg?: string;          // Success or error message
  status?: number;               // Status code
  mdlToken?: string;             // Token for the verified MDL
  docType?: string;              // Document type (e.g., 'mDL')
  docValid?: string;             // Document validity status
  authMethod?: string;           // Authentication method used
  authSuccess?: string;          // Authentication success status
  msoValid?: string;             // MSO (Mobile Security Object) validity
  cert?: string;                 // Certificate data
  ica_cert?: string;             // Intermediate CA certificate
  isSuccessful?: boolean;        // Convenience boolean (true if success === 'Y')
  applicationId?: string;        // Application ID (returned on license errors)
  licenseKey?: string;           // License key (returned on license errors)
}

ProgressResponse

interface ProgressResponse {
  command?: string;
  status?: string;
  logData?: string;
  logLevel?: string;
}

License

MIT

Support

For issues and questions, please visit the GitHub repository.