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

@verisoul_ai/react-native-verisoul

v0.4.64

Published

Verisoul helps businesses stop fake accounts and fraud

Downloads

599

Readme

React Native SDK

Verisoul provides a React Native SDK that allows you to implement fraud prevention in your cross-platform mobile applications. This guide covers the installation, configuration, and usage of the Verisoul React Native SDK.

To run the SDK a Verisoul Project ID is required. Schedule a call here to get started.

System Requirements

  • React Native 0.60 or higher
  • iOS 14.0 or higher
  • Android API level 21 (Android 5.0) or higher
  • For Expo projects: Expo SDK 45 or higher with custom development client

Installation

Using NPM

npm install @verisoul_ai/react-native-verisoul

Using Yarn

yarn add @verisoul_ai/react-native-verisoul

Android Configuration

If an exception occurs during the build stating that the ai.verisoul:android package cannot be downloaded, add the following Maven repository inside your android/build.gradle file:

allprojects {
    repositories {
        // ...
        maven { url = uri("https://us-central1-maven.pkg.dev/verisoul/android") }
    }
}

Expo Projects

Note: Requires custom development client (not supported in Expo Go)

1. Install expo-dev-client:

npx expo install expo-dev-client

2. Configure app.json: add the plugin and set newArchEnabled to true

{
  "expo": {
    "newArchEnabled": true,
    "plugins": ["@verisoul_ai/react-native-verisoul"]
  }
}

3. Install Verisoul SDK:

npm install @verisoul_ai/react-native-verisoul

4. Prebuild and run:

npx expo prebuild --clean
npx expo run:android  # or npx expo run:ios

Usage

Initialize the SDK

The configure() method initializes the Verisoul SDK with your project credentials. This method must be called once when your application starts.

Parameters:

  • environment: The environment to use VerisoulEnvironment.prod for production or VerisoulEnvironment.sandbox for testing
  • projectId: Your unique Verisoul project identifier

Example:

import Verisoul, {
  VerisoulEnvironment,
} from '@verisoul_ai/react-native-verisoul';

useEffect(() => {
  Verisoul.configure({
    environment: VerisoulEnvironment.prod, // or VerisoulEnvironment.sandbox
    projectId: 'YOUR_PROJECT_ID',
  });
}, []);

When called, the Verisoul SDK will initialize its components, begin collecting device telemetry data, and prepare a session ID for fraud assessment.

getSessionId()

The getSessionID() method returns the current session identifier after the SDK has collected sufficient device data. This session ID is required to request a risk assessment from Verisoul's API.

Important Notes:

  • Session IDs are short-lived and expire after 24 hours
  • The session ID becomes available once minimum data collection is complete (typically within seconds)
  • You should send this session ID to your backend, which can then call Verisoul's API to get a risk assessment
  • A new session ID is generated each time the SDK is initialized or when reinitialize() is called

Example:

const sessionId = await Verisoul.getSessionID();

reinitialize()

The reinitialize() method generates a fresh session ID and resets the SDK's data collection. This is essential for maintaining data integrity when user context changes.

Example:

await Verisoul.reinitialize();

After calling this method, you can call getSessionID() to retrieve the new session identifier.

Provide Touch Events

Touch event data is collected and analyzed to detect automated/bot behavior by comparing touch patterns with device sensor data. This helps identify anomalies that may indicate fraud.

React Native Setup:

Wrap your root component with VerisoulTouchRootView to automatically capture touch events across both iOS and Android:

import { VerisoulTouchRootView } from '@verisoul_ai/react-native-verisoul';

function App() {
  return (
    <VerisoulTouchRootView>{/* Your app components */}</VerisoulTouchRootView>
  );
}

iOS Configuration

For iOS-specific configuration including Device Check and App Attest setup, please refer to the iOS SDK Documentation.

Error Codes

The SDK throws VerisoulException with the following error codes:

| Error Code | Description | Recommended Action | | ---------- | ----------- | ------------------ | | INVALID_ENVIRONMENT | The environment parameter passed to Verisoul.configure() is invalid. Valid values are "dev", "sandbox", or "prod". | Ensure Verisoul.configure() parameter is exactly:• "dev", "sandbox", or "prod"• Case-sensitive• Free of whitespace | | SESSION_UNAVAILABLE | A valid session ID could not be obtained. This typically occurs when Verisoul's servers are unreachable due to network blocking or a very slow connection. | • Implement exponential backoff.• Prompt user to check network or disable network blocker.• Log to identify blocking issues. | | WEBVIEW_UNAVAILABLE | WebView is not available on the device. This can occur when WebView is disabled, missing, uninstalled, or corrupted on the device. | Prompt user to:• Enable WebView in settings• Update Android System WebView• Switch devices |

Exception Structure

All errors are thrown as VerisoulException with the following properties:

| Property | Type | Description | | -------- | ---------- | ------------------------------------------------------- | | code | String | One of the error codes above | | message | String | Human-readable error description | | cause | Throwable? | The underlying exception that caused the error (if any) |

Example

For a complete working example, see the example folder in this repository.

Additional Resources