Providers
Solscan
Solana balances, history, details and blocks through the Pro API. Needs SOLSCAN_API_KEY, throws without it.
- provider
- create("solscan")
- auth
- SOLSCAN_API_KEY
- chains
- Solana
- capabilities
- balance, history, tx detail, block
- endpoint
- pro-api.solscan.io/v2.0
- default chain
- solana
Address it
const solscan = await create("solscan"); // SOLSCAN_API_KEY required
await solscan.getBalance("…", "solana");
Single chain. Any other chain is an UnsupportedChainError, and a missing key is an AuthError from the constructor.
What it reads
pro-api.solscan.io/v2.0: account detail for the balance, account transactions for history, transaction detail for one, block detail for a block. Balances, history, details and blocks; token holdings go through Helius.
Gotchas
- Lamports, nine decimals.
balanceFormattedis SOL. - A Solana transaction signature is base58 and 64 to 88 characters long, and that is how
classifyInputtells a signature from an address on this chain. - Solscan and Helius disagree about which Solana questions exist: Solscan has the balance, Helius has the holdings. With both keys set, selection picks whichever comes first in the registry for the capability you asked for.
Where it lives
src/providers/solscan.ts.