SDK
With hardware wallets in mind, this SDK is designed for easy of use and to allow the user close accounts of multiple wallets at once.
Some of the key features are:
Claim 0.002 SOL for every account closed.
No gas fee is charged, wallets with no funds can use the tool.
Close list of accounts or all accounts of a wallet.
Close accounts of one or multiple wallets in a single function.
Receive your rent of all accounts in a single address.
Close accounts of all wallets in a folder.
Attention! To close a solana account, the account must be empty. Any remaning balance on the accounts will be burned on the closing process. Use the tool with caution, any miss use can lead to lost of funds.
The service has no costs. Sol Dust Vacuum only charges a small percentage on each account closed (0.0003 SOL).
Quick start
install
npm install sol-dust-vacuum-sdkyarn add sol-dust-vacuum-sdkClosing solana accounts from one wallet
import { SDV } from 'sol-dust-vacuum-sdk'
import { Keypair } from '@solana/web3.js'
import fs from 'fs'
async function main() {
// your JSON wallet
const jsonFile = fs.readFileSync(process.cwd() + "/wallet.json", 'utf8');
const wallet = Keypair.fromSecretKey(new Uint8Array(JSON.parse(jsonFile.toString())));
// you can specify your wallet path instead
//const wallet = process.cwd() + "/wallet.json"
// Get your API key at https://soldustvacuum.app/sdk/keys
const sdv = new SDV("YOUR_API_KEY_HERE")
// List of tokens to close.
const tokens = ["rSzXH2jd6e6Mdro2MdRWHpRXA8QdZ8638AWi4fopump"]
const signature = await sdv.closeAccounts(wallet, tokens)
console.log(signature)
}
main()
Use custom RPC endpoint
How to receive all funds in one address
How to use
Closing solana accounts from one wallet
Closing all solana accounts from one wallet
Closing solana accounts from multiple wallets
Closing all solana accounts from multiple wallets
Close solana accounts from all wallet in a folder
Close all solana accounts from all wallet in a folder
Last updated