Solana connect

From npc-live/clawfirm · View interactive version

Solana connect is an AI agent skill from the GitHub repository npc-live/clawfirm. OpenClaw Solana Connect — Secure toolkit for AI agents to interact with Solana blockchain. Features private key protection, max limits, dry-run mode, and human confirmation for large transactions.

How to use this skill

Skill file

🔗 OpenClaw Solana Connect v3.0

Secure toolkit for AI agents to interact with Solana blockchain

🛡️ Security Features

What Works

| Function | Status | Description |

|----------|--------|-------------|

| generateWallet() | ✅ Works | Generate wallet addresses |

| connectWallet() | ✅ Works | Validate wallet addresses |

| getBalance() | ✅ Works | Read SOL/token balances |

| getTransactions() | ✅ Works | Read transaction history |

| getTokenAccounts() | ✅ Works | Read token holdings |

| sendSol() | ✅ Works | Send SOL (with security) |

Installation

clawhub install solana-connect

Environment Variables

Usage

const { generateWallet, getBalance, sendSol, getConfig } = require('./scripts/solana.js');

// Generate wallet (address only - private key protected)
const wallet = generateWallet();
console.log('Address:', wallet.address);

// Check balance
const balance = await getBalance(wallet.address);

// Send SOL (DRY-RUN by default - simulation only)
const result = await sendSol(privateKey, toAddress, 0.5, { dryRun: true });
console.log('Simulation:', result);

// Send real transaction
const tx = await sendSol(privateKey, toAddress, 0.5, { dryRun: false, skipConfirmation: true });
console.log('Signature:', tx.signature);

Security Options

// Dry-run (simulation) - safe, doesn't send
await sendSol(key, to, amount, { dryRun: true });

// Real transaction - requires explicit flag
await sendSol(key, to, amount, { dryRun: false });

// Skip human confirmation (for automated agents)
await sendSol(key, to, amount, { dryRun: false, skipConfirmation: true });

Security: Never hardcode private keys. Use environment variables.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.