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:
Prerequisites
Before we start, make sure you have:
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.
Integrate WDK into your existing React Native or Expo app.
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:
Step 4: Run Your App
Congratulations! You now have a multi-chain wallet running.
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:
Update android/build.gradle:
Step 4: Configure Metro Bundler
The library requires Node.js core module polyfills. Update your metro.config.js:
Runtime polyfills for Buffer, process, and crypto are automatically initialized when you import the library. No additional setup needed!
Step 5: Configure Chain Settings
Create a configuration file for your supported blockchains (e.g., src/config/chains.ts):
Step 6: Add WalletProvider
Wrap your app with the WalletProvider to enable wallet functionality throughout your app.
Add to your app/_layout.tsx:
Update your App.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:
Rebuild your native apps:
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:
Ensure Metro polyfills are configured correctly
Clear Metro cache:
npx expo start --clearornpx react-native start --reset-cacheDelete 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:
Your component is wrapped with
WalletProviderYou're checking
isInitializedbefore 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-providerand peer dependencies✅ Configure Android minSdkVersion to 29 in
app.json✅ Configure Metro polyfills in
metro.config.js✅ Add
WalletProvidertoapp/_layout.tsx✅ Use
useWallet()hook in components✅ Run
npx expo prebuild --cleanbefore 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
Chain Configuration - Configure blockchain networks
Wallet Management - Create, import, and manage wallets
Transaction Handling - Send and track transactions
Examples & Starters
React Native Starter - Full-featured starter app
React Native UI Kit - Pre-built wallet components

