Solana
Solana
Solana
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
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.| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | delegate | string | Ja | Base-58 delegate address. |
| 2 | filter | object | Ja | Either { mint } or { programId } — exactly one. |
| 3 | config | object | Nein | Options: commitment, encoding, dataSlice, minContextSlot. |
| Typ | Beschreibung |
|---|---|
| object | RpcResponse wrapping an array of { pubkey, account }. |
| Code | Meldung | Ursache |
|---|---|---|
-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.