@umimoney/clawdbot-skill
v0.1.8
Published
UMI wallet integration skill for ClawdBot
Readme
UMI ClawdBot Skill
UMI wallet integration for ClawdBot and other AI agents. Enables AI-powered crypto transactions with spending limits and approval flows.
Installation
npm install @umimoney/clawdbot-skillQuick Start
1. Get an API Key
- Open the UMI extension
- Go to Agents tab
- Click "Connect External Agent"
- Complete the wizard to get your API key
2. Configure the Skill
Set your API key as an environment variable:
export UMI_API_KEY="umi_..."Or configure programmatically:
import { secureStorage } from '@umimoney/clawdbot-skill';
secureStorage.setApiKey('umi_...');3. Use as MCP Server (ClawdBot)
Add to your ClawdBot MCP configuration:
{
"mcpServers": {
"umi-wallet": {
"command": "npx",
"args": ["@umimoney/clawdbot-skill", "mcp"]
}
}
}4. Use Programmatically
import { UmiApiClient } from '@umimoney/clawdbot-skill';
const client = new UmiApiClient({ apiKey: process.env.UMI_API_KEY });
// Get wallet info
const info = await client.getInfo();
console.log(info);
// Execute a swap (UMI handles signing automatically)
const swapResult = await client.execute({
type: 'swap',
chain: 'ethereum',
amount: '100',
tokenIn: 'USDC',
tokenOut: 'ETH',
});
if (swapResult.status === 'completed') {
console.log('Swap complete:', swapResult.transaction?.digest);
} else if (swapResult.status === 'pending_approval') {
console.log('Awaiting user approval:', swapResult.pendingTransaction?.id);
}
// Transfer tokens
const transferResult = await client.execute({
type: 'transfer',
chain: 'solana',
amount: '50',
tokenIn: 'USDC',
recipient: 'DYw8...',
});
console.log(transferResult);Available Tools
Core Wallet Tools
umi_wallet_info
Get information about the connected wallet, supported chains, permissions, and spending limits.
umi_portfolio
Get complete wallet portfolio with token balances and values across all chains. Parameters:
chain: (optional) Filter by chain - "all", "ethereum", "sui", "solana", "tezos", "cardano", "bitcoin" (default: all)includeNfts: (optional) Include NFTs in response (default: false for faster response)
Returns addresses, token balances with USD values, and NFT counts for:
- Ethereum (+ L2s: Arbitrum, Optimism, Base, Polygon, Avalanche, BNB)
- Sui
- Solana
- Tezos
- Cardano
- Bitcoin (Ordinals)
umi_containers
Get NFT containers (multi-chain vaults). Containers hold NFTs from Ethereum, Solana, Tezos, and Cardano in derived vault addresses. Parameters:
containerId: (optional) Get details for a specific container ID
Returns:
- Container list with vault addresses for each chain
- NFT claims inside each container with images
- Verification status and metadata
umi_swap
Swap tokens on a specified blockchain. Parameters:
chain: Target blockchain (ethereum, solana, sui, etc.)amount: Amount to swaptokenIn: Token to swap fromtokenOut: Token to swap toprotocol: (optional) Preferred DEX
umi_transfer
Send tokens to an address. Parameters:
chain: Target blockchainamount: Amount to sendtoken: Token to sendrecipient: Destination address
umi_transaction_status
Check spending limits and pending transactions. Parameters:
transactionId: (optional) Specific transaction to check
Hyperliquid Perps Tools
umi_hl_positions
Get your open Hyperliquid perpetual positions, including PnL and leverage.
umi_hl_balances
Get your Hyperliquid spot token balances.
umi_hl_markets
List available Hyperliquid markets. Parameters:
type: (optional) "perps" or "spot" (default: perps)
umi_hl_price
Get the current mid price for a market. Parameters:
coin: The coin symbol (e.g., "BTC", "ETH")
umi_hl_order
Place a perpetual order on Hyperliquid. Parameters:
coin: The coin to trade (e.g., "BTC", "ETH")side: "buy" (long) or "sell" (short)size: Position size in base unitsprice: (optional) Limit price. If omitted, uses market orderreduceOnly: (optional) Only reduce existing positionleverage: (optional) Leverage to use (e.g., 10 for 10x)
umi_hl_close
Close an open Hyperliquid perpetual position. Parameters:
coin: The coin position to close
umi_hl_open_orders
Get your open Hyperliquid orders.
umi_hl_cancel
Cancel an open Hyperliquid order. Parameters:
coin: The coin symbolorderId: The order ID to cancel
Prediction Market Tools
umi_pm_search
Search for prediction market events by keyword. Parameters:
query: Search query (e.g., "bitcoin", "election")limit: (optional) Max results (default: 10)
umi_pm_categories
Browse prediction market categories and tags.
umi_pm_trending
Get trending/active prediction market events. Parameters:
category: (optional) Filter by categorylimit: (optional) Max results (default: 10)
umi_pm_market
Get details for a specific prediction market. Parameters:
mint: The market mint address (YES or NO token)
umi_pm_positions
Get your open prediction market positions.
umi_pm_orderbook
Get the orderbook for a prediction market. Parameters:
mint: The market mint address
umi_pm_buy
Buy YES or NO tokens in a prediction market. Parameters:
mint: The outcome mint addressamount: Amount in USD to spendmaxPrice: (optional) Maximum price (0-1)
umi_pm_sell
Sell YES or NO tokens in a prediction market. Parameters:
mint: The outcome mint addressamount: Amount of tokens to sellminPrice: (optional) Minimum price (0-1)
Security Features
- Spending Limits: Per-transaction and daily limits enforced at API level
- Approval Flow: Transactions above threshold require user approval in UMI extension
- Encrypted Storage: API keys stored with AES-256-GCM encryption
- On-chain Enforcement: UmiSigner contract provides additional policy checks
Webhooks
Register webhooks to receive transaction notifications:
const client = new UmiApiClient({ apiKey: '...' });
await client.registerWebhook('https://your-server.com/webhook', [
'transaction_approved',
'transaction_rejected',
'transaction_completed',
]);Webhook payloads are signed with HMAC-SHA256. Verify the X-Umi-Signature header.
License
MIT
