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-sdk
import { 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',
});

Get Started with the SDK

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

ChainTypeNative TokenChain IDSwapTransferBridge
SolanaNon-EVMSOL-YesYesNo
EthereumEVMETH1YesYesYes
BaseEVMETH8453YesYesYes
ArbitrumEVMETH42161YesYesYes
OptimismEVMETH10YesYesYes
PolygonEVMMATIC137YesYesYes
BSCEVMBNB56YesYesYes

All EVM chains share the same wallet address. See Supported Chains for detailed chain information.

Key Features

FeatureDescription
Self-custodyPrivate keys encrypted locally, never sent to server
Type-safeFull TypeScript support with generated types
Multi-chainSolana + EVM from single interface
WebSocketsReal-time market data subscriptions
Auto-retryConfigurable retry logic for transient failures
AI-readyOpenClaw 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

ResourcePurpose
wallet.authAPI key management
wallet.walletWallet creation and info
wallet.tradingSwaps, transfers, bridges
wallet.dexMarket data
wallet.tokenizeToken launches

Quick Links

Getting Started

AI Agent Development

Reference