Skip to main content
Solana Agent Kit provides comprehensive integration with Voltr vaults for managing deposits, withdrawals, and viewing position values. The integration supports both Token Program and Token-2022 assets.

Key Features

  • Strategy deposits
  • Strategy withdrawals
  • Position value tracking
  • Token-2022 support
  • Remaining accounts handling
  • LangChain tool integration

Basic Usage

Getting Position Values

Depositing into a Strategy

Withdrawing from a Strategy

Input Parameters

Strategy Operation Parameters

Remaining Accounts Structure

LangChain Integration

Solana Agent Kit provides several LangChain tools for Voltr operations:

Get Position Values Tool

Deposit Strategy Tool

Withdraw Strategy Tool

Example Prompts

For LangChain AI tools, here are example prompts:

Position Management

Important Notes

  1. Token Programs
    • Supports both Token Program and Token-2022
    • Automatically detects token program type
    • Validates program compatibility
  2. Amount Handling
    • All amounts must be in base units (lamports)
    • Use BN.js for precise number handling
    • Consider token decimals when calculating amounts
  3. Remaining Accounts
    • Fetched automatically from Voltr API
    • Required for strategy operations
    • Includes instruction discriminators

Best Practices

  1. Error Handling
  2. Amount Calculation
  3. Transaction Monitoring

Technical Details

Constants

Voltr Client Configuration

API Endpoints

Transaction Options

Implementation Examples

  1. Full Deposit Flow
  2. Position Value Check
  3. Withdrawal with Amount Validation