Solana Integration Guide for Farcaster Mini Apps
Guide for using Solana wallet features in your Farcaster Mini App template.How It Works
Conditional Solana Support
Not all Farcaster clients support Solana wallets, so your app should gracefully handle both scenarios.Sign Message
Solana message signing requires converting text to bytes and handling the response properly for browser compatibility.Send Transaction
Solana transactions require proper setup including blockhash, simulation, and error handling.Key Points
- Always check
useHasSolanaProvider()
before rendering Solana UI - Use
TextEncoder
andbtoa
for browser-compatible message signing - Simulate transactions before sending to catch errors early
- Import Solana hooks from
@solana/wallet-adapter-react
not@farcaster/mini-app-solana
- Replace placeholder addresses with real addresses for your app