Overview
This node interacts with the Solana blockchain to perform various operations related to wallet balances and token transfers. Specifically, for the 'Get Token Account Balance' operation, it retrieves the balance of a specified token (identified by its mint address) held in a given Solana wallet address. This is useful for users who want to monitor token holdings in their Solana wallets or integrate token balance checks into automated workflows.
Use Case Examples
- A user wants to check the balance of a specific SPL token in their Solana wallet to display it in a dashboard.
- An automated process needs to verify token balances before executing further transactions or business logic.
Properties
| Name | Meaning |
|---|---|
| Mint Address | The Solana mint address to get the balance for. This identifies the specific token whose balance is being queried. |
| Wallet Address | The Solana wallet address to get the balance for. This is the wallet whose token balance is being retrieved. |
Output
JSON
tokenAccountBalance- The balance of the specified token in the given wallet address.
Dependencies
- Solana blockchain connection via @solana/web3.js
- bs58 for decoding private keys
- An API key credential providing RPC URL, WebSocket endpoint, and private key for Solana network access
Troubleshooting
- Ensure the provided mint address and wallet address are valid Solana addresses; invalid addresses will cause errors.
- The node requires valid Solana API credentials including a private key and RPC URL; missing or incorrect credentials will prevent connection.
- Network issues or incorrect RPC URL can cause failures in fetching data from the Solana blockchain.
- If the token account does not exist for the given wallet and mint address, the balance may be zero or an error might be returned.
Links
- Solana JavaScript API Documentation - Official documentation for interacting with Solana blockchain using JavaScript.