Skip to main content
This documentation provides a comprehensive guide for integrating the Para wallet management plugin with Solana Agent Kit v2. Para offers advanced wallet management features that can be seamlessly incorporated into your Solana-powered applications.

Overview

Para is a wallet management solution that provides:
  • Non-custodial wallet creation and management
  • Smart wallet capabilities
  • Transaction batching and management
  • Multi-chain support
  • Embedded wallet experiences
When integrated with Solana Agent Kit, Para enables your applications to create and manage wallets without requiring users to install browser extensions or manage private keys.

Prerequisites

Before getting started, ensure you have:
  • Node.js 16.x or higher
  • pnpm or bun package manager
  • Solana development environment
  • Para API keys (sign up at Para)
  • OpenAI API key (optional, for AI features)

Installation

  1. Set up the Para plugin in your project:
  1. Configure environment variables:

Integration Steps

Server-Side Integration

  1. Create a server-side Para plugin integration:
  1. Create API endpoints for Para operations:

Client-Side Integration

  1. Create a client-side Para plugin integration:
  1. Create React components for wallet management:

Key Features and Methods

Wallet Creation

Wallet Authentication

Sending Transactions

Token Management

Wallet Information

Client-Side Wallet Experience

Para provides a client-side wallet experience that can be embedded directly in your application:

Advanced Use Cases

Batch Transactions

Webhook Integration

Para can send webhooks for various events. Here’s how to set up a webhook endpoint:

Error Handling

Proper error handling is essential when working with Para wallet operations:

Best Practices

  1. Environment Separation
    • Use BETA environment for development and testing
    • Switch to PROD for production deployments
    • Keep API keys separate for each environment
  2. Security Considerations
    • Never expose your Para API key in client-side code
    • Use server-side API endpoints for sensitive operations
    • Implement proper authentication for your API routes
  3. User Experience
    • Provide clear feedback during wallet operations
    • Implement proper loading states for async operations
    • Handle errors gracefully with user-friendly messages
  4. Performance Optimization
    • Cache wallet information when appropriate
    • Batch transactions when possible to reduce network calls
    • Implement retry logic for network-related errors

Troubleshooting

Common Issues

  1. Authentication Errors
    • Verify your Para API key is correct
    • Check the environment setting (BETA vs PROD)
    • Ensure the API key has the necessary permissions
  2. Transaction Failures
    • Check for sufficient funds in the wallet
    • Verify the recipient address is valid
    • Look for any rate limiting issues
  3. Webhook Integration
    • Ensure your webhook URL is accessible
    • Verify the signature validation is correct
    • Check webhook event processing logic

Resources