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

@unifold/connect-react-native

v0.1.8

Published

Unifold Connect React Native SDK - Crypto deposit and onramp for React Native/Expo

Readme

@unifold/connect-react-native

React Native/Expo SDK for crypto deposits and onramp with Unifold.

Installation

# npm
npm install @unifold/connect-react-native react-native-svg react-native-webview

# yarn
yarn add @unifold/connect-react-native react-native-svg react-native-webview

# Expo (recommended)
npx expo install @unifold/connect-react-native react-native-svg react-native-webview

iOS (bare React Native only)

cd ios && pod install

Quick Start

1. Wrap your app with UnifoldProvider

import { UnifoldProvider } from '@unifold/connect-react-native';

export default function App() {
  return (
    <UnifoldProvider
      publishableKey="pk_live_your_key"
      config={{
        appearance: 'dark', // 'light' | 'dark' | 'auto'
      }}
    >
      <YourApp />
    </UnifoldProvider>
  );
}

2. Launch the deposit flow

import { useUnifold } from '@unifold/connect-react-native';
import { Button, View } from 'react-native';

function DepositScreen() {
  const { beginDeposit } = useUnifold();

  const handleDeposit = async () => {
    try {
      const result = await beginDeposit({
        externalUserId: 'user_123',
        destinationChainType: 'ethereum',
        destinationChainId: '137', // Polygon
        destinationTokenAddress: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
        destinationTokenSymbol: 'USDC',
        recipientAddress: '0x...user_wallet_address',
        onSuccess: (data) => {
          console.log('Deposit successful:', data);
        },
        onError: (error) => {
          console.error('Deposit error:', error);
        },
      });
      
      console.log('Deposit completed:', result);
    } catch (error) {
      // User cancelled the deposit flow
      console.log('Deposit cancelled');
    }
  };

  return (
    <View>
      <Button title="Deposit Crypto" onPress={handleDeposit} />
    </View>
  );
}

API Reference

UnifoldProvider

| Prop | Type | Required | Description | |------|------|----------|-------------| | publishableKey | string | Yes | Your Unifold publishable key | | config.appearance | 'light' \| 'dark' \| 'auto' | No | Theme mode (default: 'dark') | | config.modalTitle | string | No | Custom modal title | | config.hideDepositTracker | boolean | No | Hide the deposit tracker button |

useUnifold Hook

const { beginDeposit, closeDeposit, publishableKey } = useUnifold();

| Method | Type | Description | |--------|------|-------------| | beginDeposit | (config: DepositConfig) => Promise<DepositResult> | Opens the deposit modal and returns a promise | | closeDeposit | () => void | Programmatically close the deposit modal | | publishableKey | string | The configured publishable key |

DepositConfig

| Option | Type | Required | Description | |--------|------|----------|-------------| | externalUserId | string | Yes | Your user's unique identifier | | destinationChainType | 'ethereum' \| 'solana' \| 'bitcoin' | No | Target blockchain type | | destinationChainId | string | No | Target chain ID (e.g., '137' for Polygon) | | destinationTokenAddress | string | No | Target token contract address | | destinationTokenSymbol | string | No | Target token symbol (e.g., 'USDC') | | recipientAddress | string | No | Wallet address to receive funds | | onSuccess | (data: DepositResult) => void | No | Called when deposit succeeds | | onError | (error: DepositError) => void | No | Called when an error occurs |

DepositResult

interface DepositResult {
  message: string;
  transaction?: unknown;
  executionId?: string;
}

DepositError

interface DepositError {
  message: string;
  error?: unknown;
  code?: string;  // e.g., 'DEPOSIT_CANCELLED' when user closes modal
}

TypeScript

Full TypeScript support is included. Import types as needed:

import type { 
  DepositConfig, 
  DepositResult, 
  DepositError,
  ThemeMode,
  UnifoldProviderProps,
} from '@unifold/connect-react-native';

Requirements

| Dependency | Version | |------------|---------| | React Native | >= 0.72.0 | | Expo (optional) | >= 49.0.0 | | react-native-svg | >= 13.0.0 | | react-native-webview | >= 11.0.0 |

Support

License

MIT © Unifold