Solana
Solana
Solana
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
On Solana, where SOL is the native token and SPL programs own each holder's token data accounts, getTokenAccountsByDelegate returns the token accounts where a given delegate is approved to move funds. An SPL approve instruction lets an owner grant another address (a program, an AMM like Raydium, or a counterparty) a spending allowance over a token account; this method finds every such account tied to one delegate. Post a JSON-RPC 2.0 request with positional params to https://solana.therpc.io/YOUR_API_KEY to receive an array of { pubkey, account } entries for that delegate.
revoke.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | delegate | string | Sí | Base-58 delegate address. |
| 2 | filter | object | Sí | Either { mint } or { programId } — exactly one. |
| 3 | config | object | No | Options: commitment, encoding, dataSlice, minContextSlot. |
| Tipo | Descripción |
|---|---|
| object | RpcResponse wrapping an array of { pubkey, account }. |
| Código | Mensaje | 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. |
{ mint } or { programId }, never both and never an empty object — otherwise the node returns an Invalid params (-32602) error.encoding: "jsonParsed" in the config to get readable token amounts and delegate fields back in the account data; the default base64 encoding returns opaque bytes you would have to decode yourself.