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

cmc-ekyc-react-native

v1.0.3

Published

SDK wrapper for CMC eKYC

Readme

CMC eKYC SDK for React Native

A comprehensive React Native wrapper for eKYC services, starting with Kalapa integration and built to support multiple providers (e.g., QTS in the future). This SDK standardizes output contracts, error handling, and configuration across different native SDKs.

Installation

npm install cmc-ekyc-react-native
# or
yarn add cmc-ekyc-react-native

Android Setup

  1. Update AndroidManifest.xml with permissions:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />

Usage

import CmcEkycSDK, {
  CmcEkycConfig,
  CmcEkycSdkResultCode,
  CmcEkycSdkMediaType,
} from 'cmc-ekyc-react-native';

const startEkyc = async () => {
  const config: CmcEkycConfig = {
    appId: "YOUR_APP_ID",
    session: "SESSION_KEY",
    token_CA: "TOKEN_CA",
    flow: "nfc_ekyc", // or 'ekyc', 'nfc_only'
    documentType: CmcEkycSdkMediaType.FRONT,
    // Add other config parameters as needed
  };
  try {
    const result = await CmcEkycSDK.start(config);
    console.log("eKYC Success:", result);
    // Result follows the standardized CmcEkycResult interface. For example:
    // {
    //   code: CmcEkycSdkResultCode.SUCCESS,
    //   data: { ... },
    //   nfc_data: { face_image: "..." },
    // }
  } catch (error: any) {
    if (error.code === CmcEkycSdkResultCode.USER_LEAVE) {
      console.log("User cancelled the process.");
    } else {
      console.error("eKYC Error:", error.message, error.code);
    }
  }
  }
};

### Receiving raw data from the SDK

Some flows (e.g. NFC) allow consuming intermediate data such as images or
NFC records. The example app demonstrates implementing
`CmcRawDataDelegate` and passing it to the SDK:

```tsx
import { CmcRawDataDelegate } from 'cmc-ekyc-react-native/lib/typescript/src/providers/kalapa/KalapaAdapter';

class NFCDataProcessor implements CmcRawDataDelegate {
  async processBackImage(image: Uint8Array): Promise<any> {
    console.log('processing back side image');
  }
  async processFrontImage(image: Uint8Array): Promise<any> {
    console.log('processing front side image');
  }
  async processSelfieImage(image: Uint8Array): Promise<any> {
    console.log('processing selfie image');
  }
  async processNFCData(sod: string, dg1: string, dg2: string, dg13: string): Promise<any> {
    console.log(`Processing NFC data with sod: ${sod}`);
  }
}

// when calling start():
const rawDataDelegate = new NFCDataProcessor();
const result = await CmcEkycSDK.start({ ...config, rawDataDelegate });

The delegate hooks are optional; if you don't need raw data you can omit rawDataDelegate entirely.

Running the example application

  1. Clone or pull the repository and run yarn install at the root.

  2. Navigate to the example/ folder and install dependencies:

    cd example
    yarn
  3. Start the Metro bundler and run on a device/emulator:

    yarn android   # or yarn ios

    The sample app demonstrates a simple UI with a "Start eKYC" button that triggers the SDK using hard‑coded configuration values. Use it as a reference for how your application should integrate the library.

Configuration options

The CmcEkycConfig interface includes (but is not limited to) the following fields:

| Property | Type | Description | |-----------------|----------|-------------| | appId | string | Application identifier issued by backend | | session | string | Session token for eKYC transaction | | token_CA | string | Authentication token for CA gateway | | baseUrl | string | Base URL for eKYC API | | baseUrl_CA | string | CA gateway URL | | token_CA_KALA | string | Kalapa-specific CA token | | flow | string | One of nfc_ekyc,nfc_only,ekyc. | | livenessVersion | number | Liveness check version (0 = default) | | rawDataDelegate | object? | Delegate for receiving raw images/data | | isUseCmcGateway | boolean | When set to true the SDK will route requests through the CMC gateway service|


This README should serve as the primary developer reference; copy or modify sections as needed for your project's own documentation.

License

MIT