| name | openclaw-wallet |
| description | Multi-chain wallet and trading tools for AI agents. Provides 27 tools for: wallet management (create, balance, export keys), token swaps with flexible amounts ($100, 50%, max), cross-chain bridges, DEX market data (trending, volume, gainers/losers), token launches with tiered market caps, and fee management. Supports Solana and EVM chains. Use when agents need to interact with wallets, execute trades, research tokens, or launch tokens.
|
| homepage | https://github.com/loomlay/openclaw-wallet |
| metadata | {"openclaw":{"requires":{"env":["LOOMLAY_API_KEY"]},"primaryEnv":"LOOMLAY_API_KEY","optionalEnv":["LOOMLAY_BASE_URL"],"install":"npm install @loomlay/openclaw-wallet-plugin"}} |
OpenClaw Wallet Plugin
Multi-chain wallet and trading toolkit for AI agents with 27 tools.
Installation
You must install the npm package before using any tools:
npm install @loomlay/openclaw-wallet-plugin
This installs the plugin and all its dependencies. No additional packages needed.
Authentication is automatic. On first use, the plugin auto-registers for an API key and saves it to ~/.loomlay/credentials.json. No manual setup required.
To use a specific API key instead of auto-registration:
export LOOMLAY_API_KEY=agent_your_key_here
First-Time Setup
IMPORTANT: After installing the plugin, you must set up a wallet before using trading/wallet tools.
On first interaction with a user (or when the skill is first loaded), run this setup sequence:
const { wallet_get, wallet_create } = require('@loomlay/openclaw-wallet-plugin');
const existing = await wallet_get();
if (!existing.success) {
const created = await wallet_create();
if (created.success) {
}
} else {
}
Always run this check before any wallet or trading operation. If wallet_get() fails with UNAUTHORIZED, the API key may need to be re-registered — delete ~/.loomlay/credentials.json and retry.
How to Use the Tools
All 27 tools are exported as flat async functions from the plugin package. Use them in Node.js like this:
const { wallet_get, swap_quote, swap, dex_trending, token_search } = require('@loomlay/openclaw-wallet-plugin');
const wallet = await wallet_get();
const trending = await dex_trending({ chain: 'solana', limit: 10 });
Every tool returns a standardized response:
{
success: true,
data: { ... },
error: {
message: "...",
code: "RATE_LIMITED",
retryAfter: 30
}
}
Always check result.success before using result.data.
Important: Verify Before Executing
For any action involving funds:
- Get a quote first — show the user what will happen
- Get user confirmation — never execute without approval
- Execute — run the transaction
- Verify — check the result and new balances
const { swap_quote, swap } = require('@loomlay/openclaw-wallet-plugin');
const quote = await swap_quote({ inputToken: 'SOL', outputToken: 'USDC', amount: '$100' });
const result = await swap({ inputToken: 'SOL', outputToken: 'USDC', amount: '$100' });
if (result.success) {
}
Security Rules
- Never log seed phrases —
wallet_create() returns it once, tell user to save it offline
- Never execute without user confirmation — always quote first
- Never guess token addresses — use
token_search() to find them
- Never hardcode API keys — use environment variables
Amount Formats
Trading tools accept flexible amounts:
| Format | Example | Meaning |
|---|
| Decimal | "1.5" | Exact token amount |
| USD | "$100" | Dollar value (auto-converts) |
| Percentage | "50%" | Half of balance |
| Max | "max" | Entire balance |
All 27 Tools Reference
Wallet (3)
const { wallet_create, wallet_get, wallet_export_keys } = require('@loomlay/openclaw-wallet-plugin');
await wallet_create()
await wallet_get()
await wallet_export_keys({ seedPhrase: '12 word phrase here' })
Trading (5)
const { swap, swap_quote, transfer, bridge, bridge_quote } = require('@loomlay/openclaw-wallet-plugin');
await swap({ inputToken: 'SOL', outputToken: 'USDC', amount: '$100', chain: 'solana', slippage: 1 })
await swap_quote({ inputToken: 'SOL', outputToken: 'USDC', amount: '$100' })
await transfer({ token: 'SOL', amount: '1.5', to: 'recipient_address' })
await bridge({ inputToken: 'SOL', amount: '1', sourceChain: 'solana', destinationChain: 'base' })
({ : , : , : , : })
Tokens (4)
const { token_search, token_price, token_details, token_chart } = require('@loomlay/openclaw-wallet-plugin');
await token_search({ query: 'BONK' })
await token_price({ token: 'SOL', chain: 'solana' })
await token_details({ address: 'token_mint_address' })
await token_chart({ address: 'token_mint_address' })
Portfolio (2)
const { portfolio_get, portfolio_history } = require('@loomlay/openclaw-wallet-plugin');
await portfolio_get()
await portfolio_history({ chain: 'solana', limit: 50 })
DEX Market Data (7)
const { dex_trending, dex_volume, dex_gainers, dex_losers, dex_new, dex_pumpfun, dex_query } = require('@loomlay/openclaw-wallet-plugin');
await dex_trending({ chain: 'solana', minLiquidity: 10000, limit: 10 })
await dex_volume({ chain: 'solana', minLiquidity: 10000, limit: 10 })
await dex_gainers({ chain: 'solana', minLiquidity: 10000, limit: 10 })
await dex_losers({ chain: 'solana', minLiquidity: 10000, limit: 10 })
await dex_new({ chain: 'solana', minLiquidity: 5000, limit: 10 })
await dex_pumpfun({ : , : , : })
({
: ,
: ,
: ,
: ,
: ,
:
})
Token Launch (2)
const { tokenize_launch, tokenize_info } = require('@loomlay/openclaw-wallet-plugin');
await tokenize_launch({
name: 'My Token',
symbol: 'MYT',
tier: '100k',
imageUrl: 'https://...'
})
await tokenize_info()
Fees (2)
const { fees_status, fees_claim } = require('@loomlay/openclaw-wallet-plugin');
await fees_status()
await fees_claim()
RPC (2)
const { rpc_call, rpc_chains } = require('@loomlay/openclaw-wallet-plugin');
await rpc_call({ chain: 'solana', method: 'getBalance', params: ['address'] })
await rpc_chains()
Supported Chains
| Chain | Swaps | Bridges | RPC |
|---|
| Solana | yes | yes | yes |
| Ethereum | yes | yes | yes |
| Base | yes | yes | yes |
| Arbitrum | yes | yes | yes |
| Optimism | yes | yes | yes |
| Polygon | yes | yes | yes |
| BSC | yes | yes | yes |
Error Handling
const result = await swap({ inputToken: 'SOL', outputToken: 'USDC', amount: '1' });
if (!result.success) {
switch (result.error?.code) {
case 'RATE_LIMITED':
break;
case 'BAD_REQUEST':
break;
case 'UNAUTHORIZED':
break;
case 'INSUFFICIENT_BALANCE':
break;
default:
break;
}
}
Reference Documents
references/wallet-operations.md - Wallet creation, security, key export
references/trading-guide.md - Swaps, transfers, bridges with amount formats
references/market-analysis.md - DEX data, trending, filtering
references/token-launch.md - Tokenize workflow, tiers, fee structure
references/error-handling.md - Error types, recovery patterns, retries
references/amount-formats.md - Flexible amounts explained
references/chain-reference.md - Supported chains and behaviors
Workflows
workflows/first-time-setup.md - Installation → wallet creation → first trade
workflows/token-launch-playbook.md - Complete token launch guide