Documentation
¶
Overview ¶
Package solana reads a Solana wallet (Phantom, Solflare, Ledger…) from its public address: SOL and SPL token history and balances. Nothing is signed and no secret is needed.
Data comes from the public JSON-RPC (api.mainnet-beta.solana.com): getSignaturesForAddress lists the transactions of the address and of each of its token accounts (an incoming token transfer often does not mention the owner, only its token account), getTransaction (jsonParsed) gives the balances before and after each one, and the owner's movements are their difference. Unknown token mints are named by Jupiter's token API.
Limits of this first version:
- a swap shows as its legs (a Withdrawal of what was sent and a Deposit of what was received, same TxID), not as a Trade;
- tokens Jupiter does not list as verified are skipped as spam, and well-known symbols (SOL, USDC, USDT…) only count from their canonical mint, so a counterfeit "USDC" airdrop is ignored;
- staking rewards (credited to stake accounts at epoch boundaries, not by a transaction) and SOL held in stake accounts are not read;
- SOL locked as rent in token accounts is not part of the balance: its payment shows as a Withdrawal, its refund on close as a Deposit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.