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

@transfergratis/react-native-sdk

v0.1.25

Published

transfergratis react native sdk

Readme

TransferGratis KYC SDK

A comprehensive React Native SDK for identity verification (KYC - Know Your Customer) with Expo support, featuring advanced camera capabilities powered by react-native-vision-camera.

🚀 Features

Advanced Camera Integration with react-native-vision-camera
Selfie Capture with face detection and overlay
Document Capture with auto-focus and quality controls
Orientation Video Processing for liveness detection
File Upload with validation
Custom Overlays and instructions
Permission Management with graceful fallbacks
Multi-Platform Support (iOS, Android, Web)
TypeScript Support with full type definitions
Expo Config Plugin for easy setup
JSON Template System for configurable KYC flows
Multilingual Support (French, English)
GPS Location Capture
Country Selection with region mapping
Reusable UI Components

📦 Installation

Installing Dependencies

npm install @transfergratis/react-native-sdk react-native-vision-camera expo-location expo-image-manipulator react-native-svg

Expo Configuration (app.json / app.config.js)

Add the plugin to your Expo configuration file:

{
  "expo": {
    "plugins": [
      [
        "react-native-vision-camera",
        {
          "cameraPermissionText": "This app uses the camera for KYC identity verification.",
          "enableMicrophonePermission": true,
          "microphonePermissionText": "This app uses the microphone for video recording."
        }
      ],
      [
        "@transfergratis/react-native-sdk/plugin",
        {
          "visionCamera": {
            "cameraPermissionText": "This app uses the camera for KYC identity verification.",
            "microphonePermissionText": "This app uses the microphone for video recording."
          },
          "location": {
            "locationPermissionText": "This app uses location to verify your identity and location.",
            "locationWhenInUsePermissionText": "This app uses location to verify your identity and location.",
            "enableBackgroundLocation": false
          }
        }
      ]
    ]
  }
}

Android Setup

The config plugin automatically handles Android permissions. No additional setup required.

iOS Setup

iOS permissions are also automatically handled by the Expo plugin.

🎯 Quick Start

Using JSON Templates (Recommended)

The recommended approach is to use the JSON template system to configure your KYC flow:

import React from 'react';
import { LauchTransferGratisKYC } from '@transfergratis/react-native-sdk';

export default function App() {
  return (
    <LauchTransferGratisKYC
          onComplete={(data:VerificationState) => {
            Alert.alert('Template KYC completed');
            setShowTemplateKYC(false);
            console.log('Template KYC completed', JSON.stringify(data, null, 2));
          }}
          onCancel={() => {
            setShowTemplateKYC(false);
            Alert.alert('Template KYC cancelled');
          }}
          onError={(error) => {
            Alert.alert('Template KYC error', error);
            setShowTemplateKYC(false);
          }}
          language="en"
          API_KEY={undefined} // for test env leave this blanc
        />
  );
}

🛠️ Development

Building the SDK

cd transfergratis-sdk
npm install
npm run build

Running the Example

cd transfergratis-sdk/example
npm install
npm run ios # or npm run android

Testing

npm test

Linting

npm run lint

🚀 npm Publishing

Prerequisites

  • npm account with publish rights for the @transfergratis/react-native-sdk package
  • Node 18+ and npm 9+

Release Steps

  1. Install and clean
cd transfergratis-sdk
npm ci
npm run clean
  1. Build the SDK
npm run build
  1. Verify content to be published
npm publish --dry-run
npm pack
tar -tf transfergratis-react-native-sdk-*.tgz | cat
  1. Bump version
# patch | minor | major | prerelease
npm version patch -m "release: %s"
  1. npm login (if needed)
npm whoami || npm login
  1. Publish to npm (public)
npm publish --access public
  • With 2FA:
npm publish --access public --otp=123456
  • Publish a pre-release (beta tag):
npm publish --tag beta --access public
  1. Push git tags
git push && git push --tags
  1. Verify published version
npm info @transfergratis/react-native-sdk version

📝 Supported Document Types

The SDK supports several government document types:

  • identity_card - Identity card
  • passport - Passport
  • drivers_licence - Driver's license
  • health_insurance_card - Health insurance card
  • permanent_residence - Permanent residence permit
  • national_id - National ID card
  • work_permit - Work permit

🌍 Multilingual Support

The SDK currently supports French and English. Texts can be customized via the JSON template system using LocalizedText objects:

{
  labels: {
    en: "Upload your ID card",
    fr: "Téléversez votre carte d'identité"
  }
}

🚨 Breaking Changes

v0.1.10

  • JSON Template System: New JSON-based configuration system
  • Specialized KYC Components: New components for each KYC flow step
  • Web Support: Added support for web applications
  • Liveness Detection Improvements: Enhanced orientation video processing
  • Multilingual Support: Improved support for multiple languages

v0.1.0

  • Camera Implementation: Switched from custom native views to react-native-vision-camera
  • Permissions: Now requires both camera and microphone permissions
  • Component Props: Updated prop interfaces for better type safety
  • Config Plugin: New plugin required for automatic permissions setup

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

For support, email [email protected] or open an issue on GitHub.

📚 Additional Resources


Built with ❤️ by the TransferGratis Team