Privy App Kit - React Native
Mobile chat application for Solana blockchain interaction with React Native and Privy
Features
Embedded Wallet
Authentication with Privy supporting Google, Apple, and Email login methods
Natural Language Interface
Chat interface for interacting with Solana blockchain using simple language
AI-Powered
Solana transaction capabilities through an intelligent AI assistant
Chat History
Persistent chat history management across sessions
Profile Management
User profile creation and management
Native Mobile Experience
Built with React Native for native mobile performance
Prerequisites
- Node.js (v16+)
- MongoDB
- OpenAI API Key
- Helius API Key (for Solana RPC access)
- iOS/Android development environment
Setup Instructions
Clone the repository
Install dependencies
Configure environment variables
Copy the example environment files:
Update these files with your app’s information and API keys.
Start the server
Run the app on iOS
For Android:
This app cannot be run with Expo Go as some polyfills used in the project are not compatible with Expo Go. You must use the development build with npx expo run:ios
or npx expo run:android
.
Environment Variables
The following environment variables are required:
Client (.env.local)
Server (.env)
Project Structure
Privy Integration
This example demonstrates how to integrate Privy’s embedded wallet solution with React Native. Key integration points include:
Wallet Provider Setup
Solana Agent Kit Integration
Mobile-Specific Considerations
When working with Solana Agent Kit in React Native, consider these mobile-specific aspects:
- Polyfills: Several Node.js modules need polyfills in React Native
- Performance: Be mindful of resource usage on mobile devices
- Offline Handling: Implement proper handling for intermittent connectivity
- Deep Linking: Configure for wallet connection redirects
- Secure Storage: Use secure storage for sensitive information
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.