githubEdit

React Native Core

Hooks-based React Native library for building multi-chain wallet apps with WDK

React Native Core provides a hooks-based API for wallet management, balance fetching, account operations inside any React Native app.

Features

  • Hooks-based architecture - useWdkApp, useWalletManager, useAccount, useBalance, and more

  • TanStack Query caching - automatic balance fetching, per-token fallback for modules without batch balance support, cache invalidation, and optimistic updates

  • Zustand state management - persisted wallet state with MMKV storage

  • Worklet runtime - runs WDK in an isolated Bare worklet

  • Biometric authentication - secure storage with device biometrics

  • Multi-wallet support - create, restore, switch, lock, unlock, and delete wallets

  • TypeScript-first - full type safety with exported types and interfaces

Quick Start

1. Install

npm install @tetherto/wdk-react-native-core

2. Wrap Your App

import { WdkAppProvider } from '@tetherto/wdk-react-native-core'
import { bundle } from './.wdk' // See Bundle Configuration below

export default function App() {
  return (
    <WdkAppProvider bundle={{ bundle }} wdkConfigs={configs}>
      <YourApp />
    </WdkAppProvider>
  )
}

3. Use Hooks

For a full integration guide, see the React Native Quickstart.

Bundle Configuration

The WDK engine runs inside a Bare worklet. You need to provide a bundle - there are two approaches:

Use the @tetherto/wdk-worklet-bundler CLI to generate a bundle with only the blockchain modules you need:

Example wdk.config.js:

After running wdk-worklet-bundler generate, import and use the bundle:

For full bundler documentation, see wdk-worklet-bundlerarrow-up-right.

Pre-built Bundle

For quick prototyping, use the pre-built bundle from @tetherto/pear-wrk-wdk which includes all blockchain modules:

circle-info

The pre-built bundle includes all blockchain modules, resulting in a larger bundle size. For production apps, generate a custom bundle with only the modules you need.

Architecture



Need Help?