Solana Swaps for Openclaw

A high-performance DeFi skill for managing Solana wallet balances and executing token swaps via the Jupiter aggregator.

imthatcarlos
v0.1.0
Jan 25, 2026
0
3.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install solana-swaps

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install solana-swaps using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Solana Swaps?

Solana Swaps is a technical utility designed for Openclaw Skills that bridges the gap between AI agents and the Solana blockchain. It enables users to perform sophisticated decentralized finance (DeFi) operations such as checking SOL and SPL token balances, retrieving real-time swap quotes, and executing trades through the Jupiter aggregator. The skill focuses on transparency and security, requiring manual confirmation for every transaction to ensure the user remains in control of their assets.

By leveraging the Solana CLI and Jupiter's robust API, this skill provides a developer-friendly interface for managing on-chain liquidity. Whether you are building a personal trading bot or simply need a quick way to manage your portfolio through a terminal-based agent, this addition to the Openclaw Skills ecosystem offers the reliability and speed required for the fast-moving Solana environment.

Solana Swaps Use Cases

  • Checking real-time SOL and SPL token balances for any configured wallet.
  • Performing token swaps between any pair supported by Jupiter with automated route discovery.
  • Listing all token accounts and balances associated with a specific Solana public key.
  • Verifying price impact and slippage tolerance before committing to a blockchain transaction.
  • Managing high-priority trades during network congestion using custom prioritization fees.

How Solana Swaps Works

  1. The user requests a balance check or a token swap via the agent interface.
  2. For swaps, the skill calculates the raw units based on token decimals and fetches a quote from the Jupiter API.
  3. The quote details, including expected output and price impact, are presented to the user for explicit confirmation.
  4. Once confirmed, the skill requests a serialized swap transaction from the Jupiter swap endpoint using the Openclaw Skills environment variables.
  5. The transaction is signed locally using the specified keypair and submitted to the Solana cluster via a Node.js helper script.
  6. The final transaction signature is provided to the user along with a block explorer link for verification.

Solana Swaps Setup

To get started with this skill, ensure you have the Solana CLI and Node.js installed on your system. Configuration requires setting your wallet path and an optional Jupiter API key within your Openclaw Skills environment:

# Set your wallet path
export SOLANA_KEYPAIR_PATH="/path/to/your/keypair.json"

# Set your Jupiter API key (required for certain tokens)
export JUPITER_API_KEY="your_api_key_here"

Verify your setup by running:

solana address --keypair "$SOLANA_KEYPAIR_PATH"

Solana Swaps Data Schema & Taxonomy

The skill organizes interaction data and blockchain metadata using the following structures:

Component Description
Wallet Config Utilizes the SOLANA_KEYPAIR_PATH to derive the public key for all queries.
Quote Response Metadata from Jupiter containing swap routes, price impact, and minimum output.
Token Registry A mapping of common mint addresses like USDC (EPjFW...) and BONK (DezXA...) to their decimal values.
Transaction Logs Temporary storage of swap JSON files for signing and submission cycles.

Solana Swaps Advanced Features

  • Support for Token2022 and pump.fun assets through authenticated API requests.
  • Automatic compute unit limit optimization to ensure transaction success without overpaying.
  • Safety guards that trigger warnings if price impact or slippage exceeds 1% thresholds.
  • High-priority transaction support with configurable max lamports for prioritization fees.
  • Error handling logic for insufficient balances, expired blockhashes, and slippage tolerance violations.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*