Solana
getTokenAccountsByDelegate25 créditos
Returns all SPL Token accounts by approved delegate
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
| pubkey | string | Delegate pubkey (base-58). |
| filter | Object | Either { mint: <token mint pubkey> } or { programId: <token program pubkey> }. |
| config | Object | commitment (processed | confirmed | finalized); minContextSlot; dataSlice { offset, length }; encoding (base58 | base64 | base64+zstd | jsonParsed). (opcional) |
Retorno
Tipo
Object
{ context, value } where value is an array of { pubkey, account } token accounts.
Exemplos de código
curl https://holy-burned-sky-solana-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
-X POST \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenAccountsByDelegate",
"params": [
"4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
{
"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
},
{
"encoding": "jsonParsed"
}
]
}'