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

@trustgate/react-sdk

v0.5.0

Published

TrustGate React SDK - all 20 step types fully implemented

Readme


Installation

npm install @trustgate/react-sdk
# or
yarn add @trustgate/react-sdk
# or
pnpm add @trustgate/react-sdk

Quick Start

1. Get a Session Token

First, create a verification session from your backend:

curl -X POST https://api.bytrustgate.com/api/v1/sdk/access-token \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "external_user_id": "user_123",
    "email": "[email protected]",
    "flow_name": "default"
  }'

2. Use the SDK Component

import { VerificationFlow } from '@trustgate/react-sdk';
import '@trustgate/react-sdk/styles.css';

function VerificationPage() {
  return (
    <VerificationFlow
      sessionToken="sess_abc123..."
      onComplete={(result) => {
        if (result.outcome === 'approved') {
          // User verified successfully
          console.log('Verification complete:', result.verification_id);
        }
      }}
      onError={(error) => {
        console.error('Verification error:', error.message);
      }}
    />
  );
}

Features

  • Document Verification - Passport, driver's license, national ID, residence permit
  • Biometric Liveness - Active and passive liveness detection
  • Face Matching - Compare selfie to document photo
  • Wallet Verification - Cryptocurrency wallet address collection
  • Responsive Design - Mobile-optimized, works on all screen sizes
  • Customizable Theme - Light/dark mode and custom branding

Props

VerificationFlow

| Prop | Type | Required | Description | |------|------|----------|-------------| | sessionToken | string | Yes | Session token from /api/v1/sdk/access-token | | onComplete | (result: VerificationResult) => void | No | Called when verification completes | | onError | (error: SDKError) => void | No | Called on error | | onStepComplete | (step: StepName, data: object) => void | No | Called after each step | | theme | 'light' \| 'dark' | No | Theme mode (default: 'light') | | themeOptions | SDKThemeOptions | No | Custom theme colors | | baseUrl | string | No | API base URL (for self-hosted) | | className | string | No | Additional CSS class | | style | CSSProperties | No | Inline styles |

VerificationResult

interface VerificationResult {
  verification_id: string;
  outcome: 'approved' | 'pending_review' | 'denied' | 'error';
  confidence_score?: number;
  outcome_reason?: string;
  redirect_url?: string;
}

SDKThemeOptions

interface SDKThemeOptions {
  primaryColor?: string;    // e.g., '#0066FF'
  accentColor?: string;
  borderRadius?: number;    // e.g., 8
  fontFamily?: string;      // e.g., 'Inter, sans-serif'
}

Customization

Custom Theme

<VerificationFlow
  sessionToken={token}
  theme="light"
  themeOptions={{
    primaryColor: '#0066FF',
    borderRadius: 12,
    fontFamily: 'Inter, system-ui, sans-serif'
  }}
/>

Dark Mode

<VerificationFlow
  sessionToken={token}
  theme="dark"
/>

Verification Steps

The SDK guides users through these steps (configurable per flow):

  1. Consent - Terms and privacy policy acceptance
  2. Personal Info - Name, date of birth, address
  3. Document - Upload government-issued ID
  4. Selfie/Liveness - Face verification
  5. Review - Summary before submission

Browser Support

  • Chrome 80+
  • Firefox 75+
  • Safari 13+
  • Edge 80+

Camera access requires HTTPS in production.

Documentation

Support

License

MIT - see LICENSE