getTokenAccountsByDelegate
All the specifications for getTokenAccountsByDelegate RPC Method on Solana
Parameters required for this RPC call
curl https://rpc.shyft.to?api_key=YOUR-API-KEY -s -X \
POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenAccountBalance",
"params": [
"7fUAJdStEuGbc3sM84cKRL6yYaaSstyLSU4ve5oovLS7",
{
"commitment": "finalized"
}
]
}
'import { Connection, PublicKey, clusterApiUrl } from "@solana/web3.js";
const connection = new Connection("https://rpc.shyft.to?api_key=YOUR-API-KEY", "confirmed");
let tokenAddress = new PublicKey(
"48gpnn8nsmkvkgso7462Z1nFhUrprGQ71u1YLBPzizbY",
);
let tokenBalance = await connection.getTokenAccountBalance(tokenAddress);
console.log(tokenBalance);Last updated