RentBack is a public utility for scanning token accounts on Solana and showing read-only excess rent currently reclaimable from each account.
This first iteration intentionally stops at:
- address validation
- on-chain read-only scanning for SPL Token and Token-2022 token accounts
- rent projection math and projections UI
- no wallet connection and no
WithdrawExcessLamportsexecution
- Validates a provided Solana wallet address.
- Scans both SPL Token and Token-2022 accounts for that owner.
- Reads each account’s actual account size and lamport balance.
- Queries
getMinimumBalanceForRentExemptionby unique size from RPC. - Computes claimable claimable lamports using bigint arithmetic.
- Displays current claimable totals and phase projections:
- phase 2 expected unlock
- final phase (phase 5, planned 90% reduction) unlock
- Excludes wrapped/native SOL token accounts from claiming logic.
- Renders a dark single-screen UI with account details in a collapsible section.
- Next.js App Router (TypeScript)
- Tailwind CSS
@solana/kit@solana/react@solana/kit-plugin-rpc@solana/kit-plugin-wallet@solana-program/token@solana-program/token-2022
Set SOLANA_RPC_URL in your environment for a custom RPC endpoint.
Keep production credentials in server-side environment only.
SOLANA_RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR_KEYDo not commit secrets.
- Unit tests cover bigint rent/excess calculations and wrapped-native exclusion.
- The project includes:
pnpm testpnpm lintpnpm typecheckpnpm build
src/app/page.tsx: scanner UIsrc/app/api/scan/route.ts: server-side scanner endpointsrc/lib/solana/scan.ts: read-only scan orchestrationsrc/lib/rent-calculations.ts: bigint rent/projection helperssrc/lib/rent-phases.ts: SIMD-0437 phase configuration
MIT