Solana Transfer
Skill by vortitron
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/vortitron/solana-transferSolana Transfer Skill
Description: Send SOL and SPL tokens on Solana blockchain from OpenClaw agents.
Location: /root/.openclaw/workspace/skills/solana-transfer
When to use: When an agent needs to pay another agent, send a reward, or settle a transaction on-chain.
Quick Start
1. Install
cd /root/.openclaw/workspace/skills/solana-transfer
npm install
2. Set Up Keypair
Generate a keypair (or use an existing one):
solana-keygen new --outfile keypair.json
This creates a Solana wallet. Get your address:
node index.js address
3. Fund the Wallet
For mainnet: Transfer SOL to your address from your main wallet For devnet/testnet: Use the Solana faucet
4. Use from an Agent
In an agent's task or skill code:
import { sendSOL } from '../skills/solana-transfer/index.js';
// Send 0.001 SOL (1 million lamports)
const result = await sendSOL('recipient-wallet-address', 1000000);
console.log(`Sent ${result.amount} SOL`);
console.log(`Transaction: ${result.signature}`);
Common Patterns
Pattern 1: Pay for Expert Query
Scenario: A cheap agent asks an expert agent a question. The expert quotes a price, the cheap agent pays.
// In cheap agent's code
import { sendSOL } from '../skills/solana-transfer/index.js';
// After expert responds with quote...
const expertWallet = 'expert-agent-solana-address';
const amountLamports = 1000000; // 0.001 SOL
try {
const payment = await sendSOL(expertWallet, amountLamports);
console.log(`Paid expert ${payment.amount} SOL for query`);
console.log(`Tx: ${payment.signature}`);
} catch (error) {
console.error(`Payment failed: ${error.message}`);
}
Pattern 2: Reward Agents for Task Completion
Scenario: A coordinator agent awards SOL to agents that complete work.
// In coordinator agent's code
const workerWallet = 'worker-agent-address';
const rewardLamports = 5000000; // 0.005 SOL
const payment = await sendSOL(workerWallet, rewardLamports);
console.log(`Rewarded worker with ${payment.amount} SOL`);
Pattern 3: SPL Token Payments
Scenario: Pay with USDC or other SPL tokens instead of native SOL.
import { sendSPLToken } from '../skills/solana-transfer/index.js';
const recipientWallet = 'recipient-address';
const tokenMint = 'EPjFWdd5Au17LS7bF8hgGhXMdGGZ5gLtaWh3yzXXQ3g4'; // USDC mainnet
const amountSmallestUnits = 1000000; // 1 USDC (6 decimals)
const payment = await sendSPLToken(recipientWallet, tokenMint, amountSmallestUnits);
console.log(`Sent USDC payment: ${payment.signature}`);
Configuration
Edit config.json to change RPC endpoint or network:
{
"rpc": "https://api.mainnet-beta.solana.com",
"network": "mainnet-beta"
}
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-vortitron-solana-transfer": {
"enabled": true,
"auto_update": true
}
}
}