The URL of the Solana RPC endpoint.
The public key of the wallet owner.
The mint address of the SPL token.
The balance of the SPL token in the specified wallet.
const rpcUrl = 'https://rpc.helius.xyz/?api-key=<API_KEY>'
const ownerAddress = 'EPiCHbeCzokXifRK6m91uwFM5A5XVoS6cgwM2JuLXVdC'
const mintAddress = 'CvB1ztJvpYQPvdPBePtRzjL4aQidjydtUz61NWgcgQtP'
const result = await getSPLTokenBalance(rpcUrl, ownerAddress, mintAddress)
console.log(result)
Generated using TypeDoc
Fetches the balance of a specified SPL token for a given wallet address.