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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@blusalt-sdk/react-native-full-identity-library

v0.1.6

Published

Document Verification and Liveness SDK

Downloads

118

Readme

react-native-full-identity-library

Document Verification and Liveness SDK

Installation

npm install react-native-full-identity-library

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 {
  startDocumentAbsentSDK,
  startSDKWithIdNumberSDK,
  startSDKWithCustomSelector,
  DocumentType,LivenessType
} from '@blusalt-sdk/react-native-blusalt-document-verification';

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

startWithoutIdNumber = () => {
  startDocumentAbsentSDK(clientId, appName, apiKey, isDev, LivenessType.motional, threshold, timeoutDurationInSec, (responseJson) => {
    console.log(responseJson);
  });
};

startWithIdNumber = () => {
  startSDKWithIdNumberSDK(clientId, appName, apiKey, isDev, DocumentType.bvn, idNumber, LivenessType.motional, threshold, timeoutDurationInSec, (responseJson) => {
    console.log(responseJson);
  });
};

startUsingCustomSelector = () => {
  startSDKWithCustomSelector(clientId, appName, apiKey, isDev, [DocumentType.selector, DocumentType.driverLicense], LivenessType.still, threshold, timeoutDurationInSec, (responseJson) => {
    console.log(responseJson);
  });
};

Android Setup

Android

Step 1

Create a [github.properties] file in root of android folder and put below into content. E.g. "myReactApp/android/github.properties" Replace values with your github credentials from github and make sure to grant necessary permissions especially for github packages

USERNAME_GITHUB=SampleUsername
TOKEN_GITHUB=SampleClassicToken

Step 2

Add below to project level gradle file /android/build.gradle

buildscript {
    ext.kotlin_version = '1.9.+'
    ...

    dependencies {
        classpath 'com.android.tools.build:gradle:7.3.+'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    def githubPropertiesFile = rootProject.file("github.properties")
    def githubProperties = new Properties()
    githubProperties.load(new FileInputStream(githubPropertiesFile))


    repositories {

        maven {
            name "GitHubPackages"
            url 'https://maven.pkg.github.com/Blusalt-FS/Full-Identity-SDK-Android'

            credentials {
                username githubProperties['USERNAME_GITHUB']
                password githubProperties['TOKEN_GITHUB']
            }
        }

        maven {
            name "GitHubPackages"
            url 'https://maven.pkg.github.com/Blusalt-FS/Liveness-Only-Android-Package'

            credentials {
                username githubProperties['USERNAME_GITHUB']
                password githubProperties['TOKEN_GITHUB']
            }
        }

        maven {
            name "GitHubPackages"
            url 'https://maven.pkg.github.com/Blusalt-FS/Blusalt_Document_Verification-Android-Package'

            credentials {
                username githubProperties['USERNAME_GITHUB']
                password githubProperties['TOKEN_GITHUB']
            }
        }
    }
}

Step 3

Change the minimum Android sdk version to 24 (or higher) in your /android/app/build.gradle file.


android {
    ...
    defaultConfig {
      ...
      minSdkVersion 24
    }
    ...
}

Step 4

If you're experiencing crashes or timeouts. Add below to your progaurd.pro file if using progaurd or minify is enabled /android/app/proguard-rules.pro

-keep class net.blusalt.liveness_native.** { *; }
-keep class net.blusalt.identityverify.Core.** { *; }
-keep public class com.megvii.**{*;}

Enable proguard in /android/app/build.gradle file like below.


android {

    ...
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    ...
}

IOS Setup

Add below to your info.plist file to request camera permission /ios/${AppFolder}/info.plist

	<key>NSCameraUsageDescription</key>
	<string>Blusalt Reactnative Liveness requires camera for liveness</string>

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