Skip to main content

Crate solana_recover

Crate solana_recover 

Source
Expand description

§Solana Recover

A high-performance Solana wallet scanner and SOL recovery library.

This library provides functionality to:

  • Scan Solana wallets for empty token accounts
  • Calculate recoverable SOL from empty accounts
  • Perform automated SOL recovery operations
  • Handle batch processing of multiple wallets
  • Provide connection pooling and caching for optimal performance

§Quick Start

use solana_recover::{scan_wallet};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let result = scan_wallet("9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM", None).await?;
     
    println!("Found {} recoverable SOL", result.recoverable_sol);
     
    Ok(())
}

§Feature Flags

  • default: Enables scanner and client features
  • scanner: Core wallet scanning functionality
  • client: HTTP client for external APIs
  • api: REST API server functionality
  • full: Enables all features
  • database: Database persistence support
  • cache: Advanced caching capabilities
  • metrics: Prometheus metrics collection
  • security: Enhanced security features
  • config: Configuration file support

Re-exports§

pub use core::*;

Modules§

api
config
core
rpc
storage
utils
wallet

Macros§

log_error
log_performance

Structs§

EmptyAccount
Represents an empty token account
UnifiedScanResult
Unified scan result containing both SOL and NFT information
UnifiedTotalClaimResult
Unified total claim result containing both SOL and NFT information

Enums§

ScanMode
Scan modes for different types of scanning

Constants§

DEFAULT_DEVNET_ENDPOINT
Default RPC endpoint for devnet
DEFAULT_MAINNET_ENDPOINT
Default RPC endpoint for mainnet
VERSION
Library version

Functions§

parse_targets_wrapper
Parse targets string into wallet addresses Wrapper function to parse targets in the same format as the CLI
recover_sol
Convenience function for SOL recovery using the core recovery manager
scan_wallet
Convenience function for quick wallet scanning using the unified scanner
scan_wallet_ultra_fast
This function provides the fastest possible wallet scanning using: