React Native Quickstart

Get started with WDK in React Native in under 3 minutes

What You'll Build

In this quickstart, you'll integrate WDK into a React Native app to create a multi-chain wallet that:

You can try all features without real funds required. You can use the Pimlico or Candide faucets to get some Sepolia USD₮.

Get mock/test USD₮ on Pimlico Get mock/test USD₮ on Candide

See the configuration.md for quick setup and Sepolia testnet configuration.

Prerequisites

Before we start, make sure you have:

Tool
Version
Why You Need It

Node.js

22+

To run JavaScript code

npm

Latest

To install packages

React Native

0.81.0+

Framework version

Android SDK

API 29+

Android minimum SDK version

iOS

15.1+

iOS deployment target


Quick Start Paths

You have 2 options for using WDK in a React Native. Choose your preferred starting point:

Get up and running in 3 minutes with our pre-configured starter template.

→ Jump to Starter Template Setup


Option 1: Starter Template

The fastest way to get started is with our starter template. Note: this is still in alpha, and may be subject to breaking changes.

Step 1: Clone the Starter

Step 2: Install Dependencies

Step 3: Configure Environment

Create an environment file for the WDK Indexer API:

Edit .env and add your WDK Indexer API key:

Get your free WDK Indexer API key here

Step 4: Run Your App

Congratulations! You now have a multi-chain wallet running.

→ Skip to What's Next


Option 2: Add to Existing App

Integrate WDK into your existing React Native or Expo project.

Step 1: Install the Provider Library

Step 2: Install Peer Dependencies

The library requires several peer dependencies for cryptographic operations and blockchain interactions:

Step 3: Configure Android minSdkVersion

The library requires Android API 29 or higher to support react-native-bare-kit.

Add to your app.json or app.config.js:

If you haven't installed expo-build-properties:

Step 4: Configure Metro Bundler

The library requires Node.js core module polyfills. Update your metro.config.js:

Step 5: Configure Chain Settings

Create a configuration file for your supported blockchains (e.g., src/config/chains.ts):

See the Chain Configuration Guide for complete configuration options for all supported chains.

Step 6: Add WalletProvider

Wrap your app with the WalletProvider to enable wallet functionality throughout your app.

Add to your app/_layout.tsx:

Step 7: Use the Wallet Hook

Now you can use the useWallet hook in any component to access wallet functionality:

Step 8: Rebuild and Run

For Expo projects, run prebuild to apply native changes:

Congratulations! You've successfully integrated WDK into your React Native app!


What's Next?

Now that you have WDK integrated, here's what you can explore:

Access Balances and Transactions

Send Transactions

Use the WDKService directly for advanced operations:

Quote Transaction Fees

Clear Wallet Data

Call clearWallet() to securely wipe all sensitive data and secret keys from memory when you're done with wallet operations.


Troubleshooting

"Unable to resolve module" errors

If you see errors about missing Node.js modules like stream, buffer, or crypto:

  1. Ensure Metro polyfills are configured correctly

  2. Clear Metro cache: npx expo start --clear or npx react-native start --reset-cache

  3. Delete and reinstall dependencies:

Android build fails with "Execution failed for task ':app:checkDebugAarMetadata'"

This means your minSdkVersion is too low. Make sure you've set it to 29:

Then rebuild:

"WDK Manager not initialized"

The WDK service initializes automatically when WalletProvider mounts. Ensure:

  1. Your component is wrapped with WalletProvider

  2. You're checking isInitialized before performing wallet operations:

TypeScript errors about missing types

Some peer dependencies may lack type definitions. Add to your tsconfig.json:

Complete Setup Checklist

For Expo projects:

  • ✅ Install @tetherto/wdk-react-native-provider and peer dependencies

  • ✅ Configure Android minSdkVersion to 29 in app.json

  • ✅ Configure Metro polyfills in metro.config.js

  • ✅ Add WalletProvider to app/_layout.tsx

  • ✅ Use useWallet() hook in components

  • ✅ Run npx expo prebuild --clean before building

For bare React Native:

  • ✅ Install package and peer dependencies

  • ✅ Set minSdkVersion to 29 in android/build.gradle

  • ✅ Configure Metro polyfills in metro.config.js

  • ✅ Wrap root component with WalletProvider

  • ✅ Rebuild native code


Learn More

Ready to dive deeper? Check out these resources:

Core Concepts

Examples & Starters

Need Help?