@suwappu/sdk
TypeScript SDK for Suwappu — cross-chain DEX for AI agents.
Swap tokens across 7+ chains (Ethereum, Base, Arbitrum, Polygon, BSC, Optimism, Solana) with a typed API client.
Install
npm install @suwappu/sdk
Quick Start
import { Suwappu } from '@suwappu/sdk'
const { agent } = await Suwappu.register({ name: 'my-trading-bot' })
console.log('Save this key:', agent.api_key)
const suwappu = new Suwappu({ apiKey: 'suwappu_sk_...' })
const { quote } = await suwappu.getQuote({
from_token: 'ETH',
to_token: 'USDC',
amount: '0.5',
chain: 'base',
})
const { swap } = await suwappu.executeSwap({
quote_id: quote.quote_id,
wallet_address: '0x...',
})
API
Suwappu.register() — Create agent, get API key
getQuote() / executeSwap() / swap() — Trading
getPortfolio() / getPrices() / getTokens() / getChains() — Market data
createWallet() / getWallets() — Managed wallets
createPolicy() / getPolicies() — Spending policies
getWebhookEvents() / testWebhook() — Webhooks
rotateKey() — Key management
License
MIT