UMI wallet integration skill for ClawdBot
npm install @umimoney/clawdbot-skillUMI wallet integration for ClawdBot and other AI agents. Enables AI-powered crypto transactions with spending limits and approval flows.
``bash`
npm install @umimoney/clawdbot-skill
1. Open the UMI extension
2. Go to Agents tab
3. Click "Connect External Agent"
4. Complete the wizard to get your API key
Set your API key as an environment variable:
`bash`
export UMI_API_KEY="umi_..."
Or configure programmatically:
`typescript
import { secureStorage } from '@umimoney/clawdbot-skill';
secureStorage.setApiKey('umi_...');
`
Add to your ClawdBot MCP configuration:
`json`
{
"mcpServers": {
"umi-wallet": {
"command": "npx",
"args": ["@umimoney/clawdbot-skill", "mcp"]
}
}
}
`typescript
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);
`
#### umi_wallet_info
Get information about the connected wallet, supported chains, permissions, and spending limits.
#### umi_portfoliochain
Get complete wallet portfolio with token balances and values across all chains. Parameters:
- : (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_containerscontainerId
Get NFT containers (multi-chain vaults). Containers hold NFTs from Ethereum, Solana, Tezos, and Cardano in derived vault addresses. Parameters:
- : (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_swapchain
Swap tokens on a specified blockchain. Parameters:
- : Target blockchain (ethereum, solana, sui, etc.)amount
- : Amount to swaptokenIn
- : Token to swap fromtokenOut
- : Token to swap toprotocol
- : (optional) Preferred DEX
#### umi_transferchain
Send tokens to an address. Parameters:
- : Target blockchainamount
- : Amount to sendtoken
- : Token to sendrecipient
- : Destination address
#### umi_transaction_statustransactionId
Check spending limits and pending transactions. Parameters:
- : (optional) Specific transaction to check
#### umi_hl_positions
Get your open Hyperliquid perpetual positions, including PnL and leverage.
#### umi_hl_balances
Get your Hyperliquid spot token balances.
#### umi_hl_marketstype
List available Hyperliquid markets. Parameters:
- : (optional) "perps" or "spot" (default: perps)
#### umi_hl_pricecoin
Get the current mid price for a market. Parameters:
- : The coin symbol (e.g., "BTC", "ETH")
#### umi_hl_ordercoin
Place a perpetual order on Hyperliquid. Parameters:
- : 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_closecoin
Close an open Hyperliquid perpetual position. Parameters:
- : The coin position to close
#### umi_hl_open_orders
Get your open Hyperliquid orders.
#### umi_hl_cancelcoin
Cancel an open Hyperliquid order. Parameters:
- : The coin symbolorderId
- : The order ID to cancel
#### umi_pm_searchquery
Search for prediction market events by keyword. Parameters:
- : Search query (e.g., "bitcoin", "election")limit
- : (optional) Max results (default: 10)
#### umi_pm_categories
Browse prediction market categories and tags.
#### umi_pm_trendingcategory
Get trending/active prediction market events. Parameters:
- : (optional) Filter by categorylimit
- : (optional) Max results (default: 10)
#### umi_pm_marketmint
Get details for a specific prediction market. Parameters:
- : The market mint address (YES or NO token)
#### umi_pm_positions
Get your open prediction market positions.
#### umi_pm_orderbookmint
Get the orderbook for a prediction market. Parameters:
- : The market mint address
#### umi_pm_buymint
Buy YES or NO tokens in a prediction market. Parameters:
- : The outcome mint addressamount
- : Amount in USD to spendmaxPrice
- : (optional) Maximum price (0-1)
#### umi_pm_sellmint
Sell YES or NO tokens in a prediction market. Parameters:
- : The outcome mint addressamount
- : Amount of tokens to sellminPrice
- : (optional) Minimum price (0-1)
- 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
Register webhooks to receive transaction notifications:
`typescript
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.
MIT