The easiest way to reclaim rent from 100 Solana wallets depends on your technical comfort level. Here are the most efficient methods: For Non-Technical UsersFor Technical UsersCommand Line (solana-cli) text
for wallet in wallet_list.txt; do solana close-account $wallet --recipient DESTINATION_WALLETdone
JavaScript/TypeScript Script javascript
const { Connection, Keypair, PublicKey } = require('@solana/web3.js');async function closeAccounts(walletList, destination) { const connection = new Connection('https://api.mainnet-beta.solana.com'); // Add logic to close each account}
Solana Program Library (SPL) Tools
Important ConsiderationsYou'll need the private key for each wallet Each closure requires a small amount of SOL for transaction fees Current rent exemption is 0.00203928 SOL per account
|