Providers
Solscan
Solana balances, history, details and blocks through the Pro API. Needs SOLSCAN_API_KEY and throws without it.
Provider
Solscan
- solana
- Chains
- 1
- Auth
- key
- Operations
- 4 of 10
served 4 / 10
Operations
- balance
getBalanceserved - history
getTxHistoryserved - tx detail
getTxDetailserved - utxos
getUtxosabsent - pubkey
getPubkeyabsent - contract
getContractInfoabsent - tokens
getTokenBalancesabsent - transfers
getTokenTransfersabsent - gas
getGasDataabsent - block
getBlockInfoserved
Access
- Create
create("solscan") - Import
@agntn/explorers/providers/solscan - Host
pro-api.solscan.io/v2.0 - Statusproviders on the docs worker
Address it
const solscan = await create("solscan"); // SOLSCAN_API_KEY required
await solscan.getBalance("…", "solana");
One chain, one key, four reads. Nothing clever. Any other chain is an UnsupportedChainError, and a missing key is an AuthError from the constructor, before a single request goes out.
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's 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, so neither is wrong, they just don't overlap much.
Where it lives
src/providers/solscan.ts.