@bigbangcore/react-native-kyc
TypeScript icon, indicating that this package has built-in type declarations

1.0.26 • Public • Published

react-native-kyc

KYC SDK wrapper for React Native

Getting started

$ yarn add @bigbangcore/react-native-kyc @bigbangcore/react-native-linkface

Automatic installation

Using in React Native > 0.60 with Cocoapods the autolinking will handle most to the dependencies

See @bigbangcore/react-native-linkface project for installing on iOS and Android

Usage

Init KYCVerificator

import KYCVerificator, {KYCVerifyRegion} from '@bigbangcore/react-native-kyc';

const kycVerificator = new KYCVerificator(
  0, // Your platform (see backend)
  KYCVerifyRegion.China, // Default start with China Region
  'http://api.project.com/api', // API url for kyc center
  authToken, // Current user Auth token
  '<LINKFACE_API_ID>',
  '<LINKFACE_API_SECRET>',
);

Listen for KYC info changes to refresh react component UI

const sub = kycVerificator.kycInfoChanges$.subscribe(() => {
  // Re-Render when info changes
  this.forceUpdate();
});

Scan/Select ID card

  • For region China it will use linkface to Scan Chinese ID Card
  • For region Worldwide it will show a menu to take or select a picture
kycVerificator
  .start(KYCVerifySteps.Front)
  .then(() => {})
  .catch(error => {
    alert(error.message);
  });

Dependencies (0)

    Dev Dependencies (24)

    Package Sidebar

    Install

    npm i @bigbangcore/react-native-kyc

    Weekly Downloads

    26

    Version

    1.0.26

    License

    MIT

    Unpacked Size

    47.1 kB

    Total Files

    18

    Last publish

    Collaborators

    • thomasgaz