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

@surepass/digilocker-react-native-sdk

v1.0.0

Published

React Native wrapper for Digilocker SDK (Android .aar + iOS .xcframework)

Readme

Digilocker React Native SDK

React Native wrapper for the Digilocker SDK — enables Aadhaar-based identity verification on Android and iOS via SurePass.

Features

  • Single JS API (launchSDK) for both platforms
  • Android: prebuilt .aar binary, auto-linked via React Native config
  • iOS: prebuilt .xcframework, linked via CocoaPods
  • TypeScript definitions included
  • Promise-based with typed results and error codes

Requirements

| Requirement | Minimum | | ----------------- | -------------- | | React Native | 0.70+ | | iOS | 15.0 | | Android minSdk | 28 | | Android compileSdk| 34 | | Swift | 5.7 | | Kotlin / Java | 1.8 / 17 |

Installation

npm install @surepass/digilocker-react-native-sdk
# or
yarn add @surepass/digilocker-react-native-sdk

iOS

cd ios && pod install

Android

No additional setup needed — the module is auto-linked.

Quick Start

import { launchSDK } from '@surepass/digilocker-react-native-sdk';

try {
  const result = await launchSDK('<your-token>', 'PREPROD');

  if (result.success) {
    // iOS  → result.clientId
    // Android → result.signedResponse, result.status_code
    console.log('Verified!', result.clientId ?? result.signedResponse);
  } else {
    console.warn('Verification failed:', result.error);
  }
} catch (e: any) {
  switch (e.code) {
    case 'USER_CANCELLED':
      console.log('User backed out (Android)');
      break;
    case 'SDK_ERROR':
      console.log('SDK error (iOS):', e.message);
      break;
    default:
      console.error('Unexpected error:', e);
  }
}

Token: Obtain a bearer token from the Digilocker Initialize API before calling launchSDK.

API Reference

launchSDK(token, env)

Launches the Digilocker verification flow.

| Parameter | Type | Description | | --------- | ------------- | -------------------------------------------- | | token | string | Bearer token from the Initialize API | | env | Environment | 'PREPROD' (sandbox) or 'PROD' (live) |

Returns: Promise<SDKResult>

SDKResult

| Field | Type | Platform | Description | | ---------------- | --------- | -------- | ------------------------------------------------ | | success | boolean | Both | Whether the verification completed successfully | | clientId | string? | iOS | Client ID for the Download Aadhaar API | | signedResponse | string? | Android | Raw signed JSON string from the SDK | | status_code | number? | Android | HTTP-style status code from the SDK response | | error | string? | Both | Error message when success is false |

Error Codes

| Code | Platform | Description | | --------------------- | -------- | ---------------------------------------- | | USER_CANCELLED | Android | User pressed back / cancelled the flow | | SDK_BUSY | Android | Another SDK session is already running | | NO_ACTIVITY | Android | No current activity available | | LAUNCH_ERROR | Android | Failed to start the SDK activity | | PARSE_ERROR | Android | SDK returned a response that could not be parsed as JSON | | UNKNOWN_RESULT | Android | SDK returned an unrecognised result code | | SDK_ERROR | iOS | SDK returned a failure or was cancelled | | NO_VIEW_CONTROLLER | iOS | Could not find a root view controller |

Troubleshooting

The package '@surepass/digilocker-react-native-sdk' doesn't seem to be linked

Rebuild the app after installing:

# iOS
cd ios && pod install && cd ..
npx react-native run-ios

# Android
npx react-native run-android

iOS build fails with missing framework

Ensure ios/DigilockerSDK.xcframework is present in the package and that pod install completed without errors.

Android build fails with missing .aar

Verify android/libs/app-release.aar exists in the package directory.