Overview
Para v2 supports authentication with external wallets, allowing users to connect their existing MetaMask, Phantom, or other wallets to authenticate with your Flutter application. The Flutter SDK maintains blockchain packages (web3dart, solana_web3) to provide direct access to external wallet functionality while integrating with Para’s unified wallet architecture. This guide covers how to implement external wallet authentication and interaction using Para’s connector classes.Prerequisites
Before implementing external wallet support, ensure you have:- Para SDK set up in your Flutter project (see the Setup Guide)
- Deep linking configured for your app
- Target external wallet apps installed on the device
Deep Link Configuration
External wallet authentication requires deep linking to redirect users back to your app after wallet interaction. Configure this in both iOS and Android.Android Configuration
Add an intent filter to yourandroid/app/src/main/AndroidManifest.xml
:
iOS Configuration
Add your URL scheme toios/Runner/Info.plist
:
External Wallet Authentication
Para v2 provides a unified method for external wallet authentication:Working with Specific Wallets
Para provides dedicated connectors for popular external wallets:MetaMask Integration
Para includes a MetaMask connector for EVM interactions:Phantom Integration
Para includes a Phantom connector for Solana interactions:Example: Complete External Wallet Flow
Here’s a complete example showing external wallet authentication and usage:Security Considerations
When working with external wallets:- Validate Connections: Always verify the wallet connection before performing operations
- Handle Errors Gracefully: External wallet apps may not be installed or might reject connections
- User Experience: Provide clear instructions for users on wallet installation and connection
- Permissions: Ensure your app requests appropriate permissions for wallet interactions
- Deep Link Security: Validate deep link callbacks to prevent malicious redirects
Troubleshooting
Common issues and solutions:Connection Failures
Phantom Transaction Errors
When working with Phantom, use the transaction helper for proper encoding:Wallet App Not Installed
Network Issues
Ensure you have the correct network selected in your external wallet:- Phantom: Check that you’re on the intended Solana network (mainnet-beta, devnet, testnet)
- MetaMask: Verify you’re connected to the correct Ethereum network
- Transactions: Use testnet/devnet for development to avoid spending real funds
Key Features
Para’s Flutter SDK provides:- Unified Architecture: External wallets integrate seamlessly with Para’s unified wallet system
- Direct Blockchain Access: Uses web3dart for Ethereum and solana_web3 for Solana interactions
- Deep Link Support: Handles wallet app redirections automatically
- Transaction Helpers: Utility classes for transaction encoding/decoding
- Error Handling: Comprehensive error handling for wallet interactions
⚠️ Important Notes
- External wallets use blockchain packages directly for maximum compatibility
- The Flutter SDK maintains these dependencies to support external wallet features
- Phantom’s
signAndSendTransaction
method is deprecated - usesignTransactionBytes
instead - Always validate wallet connections before performing operations