Solana
Solana
Solana
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
On Solana — the high-throughput chain whose native token is SOL — getTokenSupply returns the total supply of a token mint, summed across every account that holds it. The figure comes straight from the SPL Token (or Token-2022) mint account, so it reflects all mints and burns recorded on chain. Send a JSON-RPC 2.0 request with positional params to https://solana.therpc.io/YOUR_API_KEY, passing the mint address, and you get back the raw amount, the mint's decimals, and a uiAmountString.
finalized commitment for stable numbers.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | mint | string | Sim | Base-58 token mint address. |
| 2 | config | object | Não | Options: commitment. |
| Tipo | Descrição |
|---|---|
| object | RpcResponse wrapping { amount, decimals, uiAmount, uiAmountString }. |
| Código | Mensagem | Causa |
|---|---|---|
-32602 | Invalid params | A param is missing, of the wrong type, or malformed (e.g. a non-base58 pubkey or a bad config field). |
-32603 | Internal error | The node hit an internal error serving the request — retry, and reduce the requested range/encoding if it persists. |
amount is a raw integer string in the mint's smallest unit — divide by 10 to the power of decimals, or just read uiAmountString, to get the human figure.