Solana icon

Solana

Perform operations on Solana network: send SOL, send token, get balance, create wallet, sign/verify messages, stake, and more.

Overview

This node enables interaction with the Solana blockchain network, supporting a variety of operations such as sending SOL (the native cryptocurrency), sending SPL tokens, retrieving balances, creating wallets, signing and verifying messages, staking SOL, and withdrawing staked SOL. It is useful for automating Solana-related workflows like transferring funds, managing token balances, or interacting with staking mechanisms.

A common scenario is automating payments in SOL or tokens to multiple recipients, checking wallet balances programmatically, or integrating Solana wallet creation and message signing into an application workflow.

For example, using the "Send SOL" operation, you can send SOL to a recipient address and optionally include a 1% donation to the developers automatically.

Properties

Name Meaning
Recipient / Address The destination address for sending SOL or tokens, or the address to query balance from. For "getBalance", if left empty, the sender's account is used.
Amount The amount of SOL or tokens to send, or the stake amount when staking or withdrawing stake.
Include Donation (1% to Devs) Whether to automatically send 1% of the amount as a donation to the developer team (only for "Send SOL" operation).

Output

The output JSON structure varies by operation but generally includes:

  • success: Boolean indicating if the operation succeeded.
  • txSignature: The transaction signature string on the Solana blockchain (for send operations and staking).
  • balance: Numeric value representing the SOL or token balance (for balance queries).
  • publicKey and privateKey: For wallet creation, the generated keypair encoded appropriately.
  • isValid: Boolean result of signature verification.
  • txDetails: Detailed transaction information object (for transaction detail queries).
  • accountInfo: Account information object (for account info queries).
  • balances: Object mapping token mint addresses to their balances (for multiple token balances).

If binary data is involved (e.g., signatures), it is base58 encoded.

Dependencies

  • Requires access to a Solana RPC endpoint URL.
  • Needs an API key credential containing the private key of the Solana wallet to sign transactions.
  • Uses the @solana/web3.js library for blockchain interactions.
  • Uses @solana/spl-token for SPL token operations.
  • Uses bs58 for base58 encoding/decoding.
  • Uses tweetnacl for cryptographic signing and verification.

Troubleshooting

  • No credentials returned!: Ensure that the node has valid Solana API credentials configured with a private key and RPC URL.
  • Message is required for signing: When using the sign message operation, provide a non-empty message string.
  • Message, signature and public key are required for verification: All three inputs must be provided for signature verification.
  • No transaction details found for signature: The provided transaction signature may be invalid or not yet confirmed on the network.
  • No account info found for address: The specified account address might be incorrect or does not exist on the network.
  • Unsupported operation: The selected operation is not implemented; verify the operation name.
  • Network or RPC errors: Check connectivity to the Solana RPC endpoint and ensure the endpoint is operational.

Links and References

Discussion