Menu

1 / 2

I Built a Terminal Account Explorer (Mini Solscan)

DEV Community·Samuel Akoji·6 months ago
#qSRPpi87
#blockchain#cli#node#program#account
Reading 0:00
15s threshold

Day 23 of #100DaysOfSolana

Today I stopped staring at raw terminal output and built something actually useful: a CLI tool that takes any Solana address and prints a clean summary of the account balance, owner, data size, and whether it's executable.

Think of it as your own mini Solscan, no browser required.

What I built

A Node.js script ( explorer.mjs ) that:

Accepts any Solana address as a CLI argument

Fetches balance via getBalance and account metadata via getAccountInfo

Converts lamports to SOL (divide by 1,000,000,000)

Maps owner addresses to friendly names (System Program, Token Program, etc.)

Truncates large data fields so your terminal doesn't explode

Stack: @solana/kit , ES Modules, devnet RPC

The core insight

Every single account on Solana — wallets, token accounts, deployed programs — is described by the same 5 fields:

Field What it tells you

balance How much SOL (in lamports)

owner Which program controls this account

data Custom bytes stored in the account

executable Is this…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.