Solana Skill
name: solana-skill
by chattyclaw · published 2026-03-22
$ claw add gh:chattyclaw/chattyclaw-solana-basics---
name: solana-skill
description: Interact with Solana blockchain via Helius APIs. Create/manage wallets, check balances (SOL + tokens), send transactions, swap tokens via Jupiter, and monitor addresses. Use for any Solana blockchain operation, crypto wallet management, token transfers, DeFi swaps, or portfolio tracking.
---
# Solana Skill
Comprehensive Solana blockchain interaction using Helius infrastructure.
Prerequisites
1. **Helius API Key** — Get free at https://dashboard.helius.dev/signup
2. Store key in `~/.config/solana-skill/config.json`:
{
"heliusApiKey": "your-api-key",
"network": "mainnet-beta"
}Core Capabilities
Wallet Management
Balance & Assets
Transactions
Swaps (Jupiter)
Monitoring
Quick Reference
Check Balance
import { createHelius } from 'helius-sdk';
const helius = createHelius({ apiKey: 'YOUR_KEY' });
const assets = await helius.getAssetsByOwner({
ownerAddress: 'WALLET_ADDRESS',
displayOptions: {
showFungible: true,
showNativeBalance: true
}
});Send SOL
import { Connection, Keypair, SystemProgram, Transaction, sendAndConfirmTransaction, LAMPORTS_PER_SOL } from '@solana/web3.js';
const connection = new Connection('https://mainnet.helius-rpc.com/?api-key=YOUR_KEY');
const tx = new Transaction().add(
SystemProgram.transfer({
fromPubkey: sender.publicKey,
toPubkey: recipientPubkey,
lamports: amount * LAMPORTS_PER_SOL
})
);
await sendAndConfirmTransaction(connection, tx, [sender]);Jupiter Swap
// 1. Get quote
const quote = await fetch(`https://api.jup.ag/swap/v1/quote?inputMint=${inputMint}&outputMint=${outputMint}&amount=${amount}`);
// 2. Build swap transaction
const swap = await fetch('https://api.jup.ag/swap/v1/swap', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
quoteResponse: await quote.json(),
userPublicKey: wallet.publicKey.toString()
})
});
// 3. Sign and sendAPI Endpoints
| Service | Base URL |
|---------|----------|
| Helius RPC | `https://mainnet.helius-rpc.com/?api-key=KEY` |
| Helius Sender | `https://sender.helius-rpc.com/fast` |
| Jupiter Quote | `https://api.jup.ag/swap/v1/quote` |
| Jupiter Swap | `https://api.jup.ag/swap/v1/swap` |
Security
**Critical rules:**
See [references/security.md](references/security.md) for detailed security practices.
Detailed References
Common Token Addresses
| Token | Mint Address |
|-------|-------------|
| SOL | `So11111111111111111111111111111111111111112` (wrapped) |
| USDC | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` |
| USDT | `Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB` |
| BONK | `DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263` |
Error Handling
Common errors and solutions:
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...