Providers

Solscan

Solana balances, history, details and blocks through the Pro API. Needs SOLSCAN_API_KEY and throws without it.
IDsolscan06 / 19SOLSCAN_API_KEY
Provider

Solscan

  • solana
Chains
1
Auth
key
Operations
4 of 10
served 4 / 10

Operations

  • balancegetBalanceserved
  • historygetTxHistoryserved
  • tx detailgetTxDetailserved
  • utxosgetUtxosabsent
  • pubkeygetPubkeyabsent
  • contractgetContractInfoabsent
  • tokensgetTokenBalancesabsent
  • transfersgetTokenTransfersabsent
  • gasgetGasDataabsent
  • blockgetBlockInfoserved

Access

Createcreate("solscan")
Import@agntn/explorers/providers/solscan
Hostpro-api.solscan.io/v2.0
Statusproviders on the docs worker

Address it

ts
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. balanceFormatted is SOL.
  • A Solana transaction signature is base58 and 64 to 88 characters long, and that's how classifyInput tells 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.