Skip to main content

Overview

Para 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:
  1. Para SDK set up in your Flutter project (see the Setup Guide)
  2. Deep linking configured for your app
  3. Target external wallet apps installed on the device
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 your android/app/src/main/AndroidManifest.xml:

iOS Configuration

Add your URL scheme to ios/Runner/Info.plist:

External Wallet Authentication

Para 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:
  1. Validate Connections: Always verify the wallet connection before performing operations
  2. Handle Errors Gracefully: External wallet apps may not be installed or might reject connections
  3. User Experience: Provide clear instructions for users on wallet installation and connection
  4. Permissions: Ensure your app requests appropriate permissions for wallet interactions
  5. 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 - use signTransactionBytes instead
  • Always validate wallet connections before performing operations

Resources

For more information about external wallet integration:

MetaMask Mobile Integration

Phantom Deep Links