Solana
Solana
Solana
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
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.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | delegate | string | 是 | Base-58 delegate address. |
| 2 | filter | object | 是 | Either { mint } or { programId } — exactly one. |
| 3 | config | object | 否 | Options: commitment, encoding, dataSlice, minContextSlot. |
| 类型 | 描述 |
|---|---|
| object | RpcResponse wrapping an array of { pubkey, account }. |
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-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.