How devrox911/wallet-drainer-solana works
This TypeScript wallet-consolidation tool accepts a BS58 private key and destination, inventories SOL and SPL balances, prices assets, filters by a $5 threshold, reserves fees, then builds and submits one Solana transaction. The CLI provides wallet review and confirmation; the library API also exposes wallet information and transfer results. Source excerpts show the core orchestration and service calls; external price and Solana interactions are explicit in those excerpts.
Main entry points: moneyMover.ts Transfer orchestrator · walletService.ts Wallet service · index.ts Interactive CLI · priceService.ts Price service
Components 8
User entry
- Interactive CLI
src/index.ts
Transfer workflow
- Transfer orchestrator
src/moneyMover.ts - Transfer data types
src/types.ts
Wallet and pricing
- Wallet service
src/walletService.ts - Price service
src/priceService.ts
External systems
- Solana RPC network
- Price APIs
Other components
- Wallet operator
Connections 10
- Wallet operator → Interactive CLI: provides inputs
src/index.ts - Interactive CLI → Transfer orchestrator: requests transfer
src/index.ts - Interactive CLI → Transfer orchestrator: requests wallet info
src/index.ts - Transfer orchestrator → Wallet service: reads balances
src/moneyMover.ts - Transfer orchestrator → Price service: gets asset prices
src/moneyMover.ts - Transfer orchestrator → Wallet service: estimates fees
src/moneyMover.ts - Transfer orchestrator → Wallet service: builds transaction
src/moneyMover.ts - Transfer orchestrator → Wallet service: submits transaction
src/moneyMover.ts - Wallet service → Solana RPC network: queries and submits
src/walletService.ts - Price service → Price APIs: fetches prices
src/priceService.ts