This guide walks you through setting up the Lazorkit React Native example from scratch.
Before you begin, ensure you have:
- Node.js 18+ - Download here
- Expo Go app - Available on iOS App Store and Google Play
- Git - For cloning the repository
# Clone the repository
git clone https://github.com/AngryPacifist/zero-app.git
cd zero-app
# Install dependencies
npm installThe project uses these core packages:
{
"@lazorkit/wallet-mobile-adapter": "^1.5.1",
"@solana/web3.js": "^1.98.0",
"@react-navigation/native": "^7.x",
"expo-system-ui": "^4.x"
}React Native requires polyfills for Node.js APIs. These are configured at the top of src/App.tsx:
// Polyfills - MUST be at the very top
import 'react-native-get-random-values';
import 'react-native-url-polyfill/auto';
import { Buffer } from 'buffer';
global.Buffer = global.Buffer || Buffer;Important: These imports must come before any other imports.
Edit src/config.ts to customize the configuration:
export const CONFIG = {
// Solana RPC endpoint
RPC_URL: 'https://api.devnet.solana.com',
// Kora paymaster for gasless transactions
PAYMASTER_URL: 'https://kora.devnet.lazorkit.com',
};| Network | RPC URL | Paymaster URL | Notes |
|---|---|---|---|
| Devnet | https://api.devnet.solana.com |
https://kora.devnet.lazorkit.com |
Free, no API key |
| Mainnet | https://api.mainnet-beta.solana.com |
https://kora.lazorkit.com |
Requires API key |
For mainnet, you must apply for an API key.
The app must be wrapped in LazorKitProvider. See src/App.tsx:
import { LazorKitProvider } from '@lazorkit/wallet-mobile-adapter';
export default function App() {
return (
<LazorKitProvider
config={{
paymasterUrl: CONFIG.PAYMASTER_URL,
rpcUrl: CONFIG.RPC_URL,
}}
>
<SafeAreaProvider>
<AppContent />
<StatusBar style="light" />
</SafeAreaProvider>
</LazorKitProvider>
);
}# Start the development server
npx expo start --clearYou'll see a QR code in your terminal. Scan it with:
- iOS: Camera app → tap the Expo Go banner
- Android: Expo Go app → Scan QR code
- Create Wallet: Tap "Create Wallet" and authenticate with your biometric
- Get Devnet SOL: Use the Solana Faucet to airdrop SOL
- Send Transaction: Try sending SOL to another address
my-mobile-app/
├── src/
│ ├── App.tsx # Main app entry
│ ├── config.ts # Configuration
│ ├── screens/ # UI screens
│ └── utils/ # Helper functions
├── docs/ # Documentation
├── package.json
├── metro.config.js # Metro bundler config
└── tsconfig.json
- Passkey Wallet - Learn how passkey authentication works
- Gasless Transactions - Understand the Kora paymaster
- Protocol Integrations - Jupiter swap & Metaplex NFT examples