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

kyc_package

v1.0.9

Published

For launching the kyc module

Readme

# KYC SDK Documentation

## Table of Contents

- [Overview](#overview)
- [Installation (Website)](#installation-website)
  - [1. Install the SDK Package](#1-install-the-sdk-package)
  - [2. Import and Initialize](#2-import-and-initialize)
  - [3. Using the SDK](#3-using-the-sdk)
- [Installation via CDN (Website)](#installation-via-cdn-website)
- [Ionic Integration](#ionic-integration)
  - [1. Install Dependencies](#1-install-dependencies)
  - [2. iOS Permission Configuration](#2-ios-permission-configuration)
  - [3. Android Permission Configuration](#3-android-permission-configuration)
  - [4. Handling Permission Requests in Ionic](#4-handling-permission-requests-in-ionic)
- [Methods](#methods)
- [Error Handling](#error-handling)
- [Conclusion](#conclusion)

## Overview

This guide explains how to integrate and use the KYC SDK for both websites and Ionic mobile applications. The SDK allows you to manage user KYC (Know Your Customer) processes, including updating user information and authenticating users.

## Installation (Website)

### 1. Install the SDK Package

Use the following npm command to install the package in your web project:

```sh
npm install kyc_package
```

2. Import and Initialize

Import the SDK into your JavaScript or TypeScript file:

import AcidCheck from "kyc_package";

Then, initialize it with the following syntax:

const kycSDK = new AcidCheck(Acid, email, url);

Replace the parameters as follows:

  • Acid: A unique identifier for the user (derived from the organization ID and the account number of the user).
  • email: The user's email address.
  • url (optional): The custom URL for the KYC service (if applicable).

Example:

const kycSDK = new AcidCheck("USER_ID_123", "[email protected]");

3. Using the SDK

  • Update KYC Information:

    kycSDK.initializeUpdate();
  • Authenticate User:

    kycSDK.initialize();

Installation via CDN (Website)

For web projects where you prefer to use a CDN, include the SDK directly in your HTML file:

<script src="https://cdn.example.com/kyc_package.min.js"></script>

After including the script, you can initialize and use the SDK as shown in the Installation (Website) section.

Ionic Integration

When using the KYC SDK in an Ionic mobile app, additional setup is required to handle camera and location permissions.

1. Install Dependencies

For location and camera access in an Ionic app, install the necessary Capacitor plugins.

  • Location Access:

    npm install @capacitor/geolocation
    npx cap sync
  • Camera Access:

    npm install @capacitor/camera
    npx cap sync

2. iOS Permission Configuration

Add the following entries to your info.plist file:

<!-- Location Permissions -->
<key>NSLocationWhenInUseUsageDescription</key>
<string>We need your location to verify your identity.</string>

<!-- Camera Permissions -->
<key>NSCameraUsageDescription</key>
<string>We need access to your camera for KYC verification.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>We need access to add photos to your library.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>We need access to your photo library for KYC verification.</string>

3. Android Permission Configuration

In your AndroidManifest.xml, add the following permissions:

  • Location Permissions:

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-feature android:name="android.hardware.location.gps" />
  • Camera and Storage Permissions:

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Additionally, add the following service for photo picker functionality:

<service android:name="com.google.android.gms.metadata.ModuleDependencies"
         android:enabled="false"
         android:exported="false"
         tools:ignore="MissingClass">
  <intent-filter>
    <action android:name="com.google.android.gms.metadata.MODULE_DEPENDENCIES" />
  </intent-filter>
  <meta-data android:name="photopicker_activity:0:required" android:value="" />
</service>

4. Handling Permission Requests in Ionic

Before calling the KYC SDK methods in an Ionic app, ensure that both camera and location permissions are granted. Here's an example of how to check and request these permissions:

import { Camera } from "@capacitor/camera";
import { Geolocation } from "@capacitor/geolocation";
import { isPlatform } from "@ionic/react";
import { presentAlert } from "@ionic/react";

const initializeUpdate = async () => {
  if (!isPlatform("capacitor")) {
    kycSDK.initializeUpdate();
    return;
  }

  const cam = await Camera.requestPermissions();
  const geo = await Geolocation.requestPermissions();

  if (cam.camera !== "granted") {
    presentAlert({
      header: "Error",
      message: "Camera permission is required",
      buttons: ["OK"],
    });
    return;
  }

  if (geo.location !== "granted") {
    presentAlert({
      header: "Error",
      message: "Location permission is required",
      buttons: ["OK"],
    });
    return;
  }

  if (cam.camera === "granted" && geo.location === "granted") {
    kycSDK.initializeUpdate();
  }
};

Methods

Once the KYC SDK is initialized, you can use the following methods:

  • Update KYC Information:

    kycSDK.initializeUpdate();
  • Authenticate User:

    kycSDK.initialize();

Error Handling

During the KYC update or authentication process, the SDK may encounter errors due to invalid user data or connection issues. Ensure that you handle these errors appropriately in your implementation.

Example Error Handling:

kycSDK.initialize().catch((error) => {
  console.error("KYC authentication failed:", error);
});

Implement similar error handling for kycSDK.initializeUpdate() as needed.

Conclusion

By following this guide, you can successfully integrate and use the KYC SDK for both websites and Ionic mobile applications. Make sure that all necessary permissions are granted in your Ionic app to avoid issues with camera and location access.