@blusalt-sdk/react-native-blusalt-document-verification
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

react-native-blusalt-document-verification

Document Verification SDK for Android and IOS

Installation

npm install react-native-blusalt-document-verification

Android Setup

#Create a github.properties file in the root folder of android. Path should be like below: E.g. "myReactApp/android/github.properties"

# Add the following in github.properties:
USERNAME_GITHUB=MyUsernameOnGithub
TOKEN_GITHUB=TokenFromGithubClassicToken

Usage

import {
  startSDK,
  startSDKWithIdNumber,
  startSDKWithCustomSelector,
  DocumentType
} from '@blusalt-sdk/react-native-blusalt-document-verification';

// ...
const clientId = "";
const appName = "";
const apiKey = "";
const isDev: boolean = false;
const idNumber = "1212121212";

startWithoutIdNumber = () => {
  startSDK(clientId, appName, apiKey, isDev, DocumentType.selector, (responseJson) => {
    console.log(responseJson);
  });
}

startWithIdNumber = () => {
  startSDKWithIdNumber(clientId, appName, apiKey, isDev, DocumentType.bvn, idNumber, (responseJson) => {
    console.log(responseJson);
  });
}

startUsingCustomSelector = () => {
  startSDKWithCustomSelector(clientId, appName, apiKey, isDev, [DocumentType.nin, DocumentType.driverLicense], (responseJson) => {
    console.log(responseJson);
  });
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Package Sidebar

Install

npm i @blusalt-sdk/react-native-blusalt-document-verification

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

2.87 MB

Total Files

48

Last publish

Collaborators

  • folarinblusalt
  • oluwaseyiblusalt
  • blusalt-fs