Rust CLI toolkit for NFT and token operations on Solana — compressed NFT transfers, holder analytics, and token aggregation.
| Crate | Description |
|---|---|
cnft-transfer |
Batch transfer compressed NFTs (cNFTs) via Metaplex Bubblegum with Merkle proof resolution |
nft-holder-query |
Multi-strategy NFT collection holder analysis (DAS API, RPC, SPL enumeration) |
token-collector |
Aggregate SPL tokens from multiple wallets to a single address |
- Metaplex Bubblegum
TransferBuilderwith full Merkle proof - DAS API integration (
getAssetsByOwner,getAssetProof) - Collection-based filtering
- Auto-retry (3 attempts per transfer)
- Multiple analysis strategies:
- Helius DAS API (
getAssetsByGroup) with pagination - Standard RPC (
getTokenLargestAccounts+getAccountInfo) - SPL token holder enumeration
- Transaction history analysis
- Helius DAS API (
- CSV/JSON export with holder counts
- Wallet-to-NFT mapping utilities
- Parallel token sweeping via rayon
- Auto-create recipient ATA if missing
- Multi-format keypair support (base58, hex)
- CSV transaction logging
# Build all tools
cargo build --release
# Transfer cNFTs by collection
cargo run -p cnft-transfer -- --keypair owner.json --collection <COLLECTION_ADDR> --recipient <DEST>
# Analyze NFT holders (Helius DAS)
cargo run -p nft-holder-query --bin helius -- --collection <COLLECTION_ADDR> --api-key <HELIUS_KEY> --output holders.csv
# Sweep tokens from multiple wallets
cargo run -p token-collector -- --keys wallets.txt --mint <TOKEN_MINT> --destination <DEST>- Rust + Tokio + Rayon
- mpl-bubblegum (Metaplex compressed NFTs)
- solana-sdk / solana-client
- Helius DAS API
- clap / csv / serde_json
MIT