Actions11
Overview
This node interacts with the Solana blockchain network to perform various operations such as sending SOL tokens, sending SPL tokens, retrieving balances, creating wallets, signing/verifying messages, staking SOL, and more. Specifically, the "Get Balance" operation retrieves the SOL balance of a specified address or the sender's own account if no address is provided.
Common scenarios where this node is beneficial include:
- Checking the SOL balance of a wallet before performing transactions.
- Monitoring token balances for portfolio tracking.
- Automating wallet management tasks like creating new wallets or staking SOL.
- Verifying transaction details or signatures programmatically.
Practical example: A user wants to check the SOL balance of their wallet or another public address to ensure sufficient funds before sending tokens or interacting with decentralized applications.
Properties
Name | Meaning |
---|---|
Recipient / Address | The Solana address to get the balance from. If left empty for "Get Balance", the node uses the sender's account address. |
Output
The output JSON object for the "Get Balance" operation contains:
success
(boolean): Indicates if the operation was successful.balance
(number): The SOL balance of the specified address, expressed in SOL (not lamports).operation
(string): The name of the operation performed ("getBalance").
Example output:
{
"success": true,
"balance": 1.2345,
"operation": "getBalance"
}
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for accessing the Solana RPC endpoint.
- Uses the official Solana Web3.js library to interact with the blockchain.
- Requires network access to the configured Solana RPC URL.
Troubleshooting
- Missing Credentials: If the node throws "No credentials returned!", ensure that the Solana API credentials are properly configured in n8n.
- Invalid Address: Providing an invalid or malformed Solana address will cause errors when fetching the balance. Verify the address format.
- Network Issues: RPC connection failures can occur due to network problems or incorrect RPC URLs. Confirm the RPC endpoint is reachable.
- Empty Address Field: For "Get Balance", leaving the address empty defaults to the sender's account. If the sender's private key is missing or invalid, the operation will fail.
- Rate Limits: Excessive requests to the RPC endpoint may be throttled; consider adding delays or using a dedicated RPC provider.