SDK Overview
The official TypeScript SDK for the LoomLay Agent API. Build AI agents that can trade, manage wallets, and launch tokens across multiple blockchains.
Choose Your Integration
Package: @loomlay/openclaw-wallet-sdk
For TypeScript/JavaScript applications that need programmatic access to the LoomLay Agent API.
npm install @loomlay/openclaw-wallet-sdkimport { OpenClawWallet } from '@loomlay/openclaw-wallet-sdk';
const wallet = new OpenClawWallet({
apiKey: process.env.LOOMLAY_API_KEY!,
});
// Swap tokens
await wallet.trading.swap({
inputToken: 'SOL',
outputToken: 'USDC',
amount: '1',
});Building an AI Agent? Check out the AI Agent Development Guide for best practices on amount formatting, error handling, and transaction confirmations.
How It Works
Register - Get an API key with a single call. One key per IP address.
Create Wallet - Generate a multi-chain wallet with Solana and EVM addresses from a single seed phrase.
Trade - Swap tokens, transfer funds, and bridge across chains with simple method calls.
Supported Chains
| Chain | Type | Native Token | Chain ID | Swap | Transfer | Bridge |
|---|---|---|---|---|---|---|
| Solana | Non-EVM | SOL | - | Yes | Yes | No |
| Ethereum | EVM | ETH | 1 | Yes | Yes | Yes |
| Base | EVM | ETH | 8453 | Yes | Yes | Yes |
| Arbitrum | EVM | ETH | 42161 | Yes | Yes | Yes |
| Optimism | EVM | ETH | 10 | Yes | Yes | Yes |
| Polygon | EVM | MATIC | 137 | Yes | Yes | Yes |
| BSC | EVM | BNB | 56 | Yes | Yes | Yes |
All EVM chains share the same wallet address. See Supported Chains for detailed chain information.
Key Features
| Feature | Description |
|---|---|
| Self-custody | Private keys encrypted locally, never sent to server |
| Type-safe | Full TypeScript support with generated types |
| Multi-chain | Solana + EVM from single interface |
| WebSockets | Real-time market data subscriptions |
| Auto-retry | Configurable retry logic for transient failures |
| AI-ready | OpenClaw Plugin with 29 tools |
API requests are rate-limited to prevent abuse. See Rate Limits for details on limits per endpoint.
Each API key is tied to one agent account, which can only launch one token. Choose your token launch carefully as this cannot be undone.
Resources
| Resource | Purpose |
|---|---|
wallet.auth | API key management |
wallet.wallet | Wallet creation and info |
wallet.trading | Swaps, transfers, bridges |
wallet.dex | Market data |
wallet.tokenize | Token launches |
Quick Links
Getting Started
- Getting Started - Set up the SDK
- Wallet Management - Create and manage wallets
- Trading - Swaps, transfers, bridges
- WebSockets - Real-time subscriptions
AI Agent Development
- OpenClaw Plugin - Skill-based interface for AI agents
- Tools Reference - All 27 available tools
- AI Agent Guide - Best practices for AI agents
- Amount Formats - Human-readable vs raw amounts
Reference
- Supported Chains - Chain details and capabilities
- Error Handling - Error types and recovery
- Security - API key and wallet security