Recipe 05: Wallet Adapter Integration
Use LazorKit alongside other wallets with popular Solana wallet adapters
๐ก Why Use Wallet Adapters?
While LazorKit provides an excellent standalone wallet experience with passkeys, many users already have their preferred wallets (Phantom, Solflare, Backpack, etc.).
The Best of Both Worlds:
- โNew users: Onboard instantly with passkeys (no extension needed)
- โExisting users: Connect their preferred wallet
- โLazorKit users: Still get gasless transactions via paymaster
Key Integration Point:
import { registerLazorkitWallet } from '@lazorkit/wallet';
// Register LazorKit as a wallet-standard wallet
useEffect(() => {
registerLazorkitWallet({
rpcUrl: 'https://api.devnet.solana.com',
portalUrl: 'https://portal.lazor.sh',
paymasterConfig: {
paymasterUrl: 'https://kora.devnet.lazorkit.com',
},
});
}, []);This registers LazorKit as a discoverable wallet that any wallet-standard compatible adapter can detect.
How It Works
Register LazorKit
Call registerLazorkitWallet() on app init to make LazorKit discoverable
Setup Wallet Provider
Wrap your app with the wallet adapter provider of your choice
LazorKit Appears as Option
Users see LazorKit alongside Phantom, Solflare, and other wallets
Use Standard Hooks
Use the adapter's hooks (useWallet, etc.) - works the same regardless of which wallet is connected
Choose an Adapter
Each example below demonstrates the same gasless USDC transfer feature, but using a different wallet adapter library. Click to try each one!
Anza Wallet Adapter
โThe official Solana wallet adapter by Anza (formerly Solana Labs). Most widely used in the ecosystem.
@solana/wallet-adapter-react@solana/wallet-adapter-react-ui- โ Industry standard for Solana dApps
- โ Built-in modal with wallet icons
Wallet UI
โA modern, unstyled UI library built on Wallet Standard. Highly customizable with Tailwind CSS.
@wallet-ui/react- โ Headless/unstyled components
- โ Full Tailwind CSS integration
ConnectorKit
โSolana Foundation's official connector kit. Simple hooks-based API for wallet connectivity.
@solana/connector- โ Official Solana Foundation package
- โ Minimal bundle size
Jupiter Unified Wallet Kit
โThe Swiss Army Knife wallet adapter used by Jupiter and Meteora. Feature-rich with multiple themes.
@jup-ag/wallet-adapter- โ Battle-tested by Jupiter & Meteora
- โ Built-in themes (Light, Dark, Jupiter)