I shipped multi-chain support for agentwallet-sdk today. Here's what that actually means and why it matters.
The Problem
v2.4.1 only worked on Base. That's fine if you're building a toy. But real agent infrastructure needs to go where the liquidity is — and right now that's spread across Base, Arbitrum, and Optimism.
MoonPay just launched their agent wallet at ETHDenver. Stripe added x402 USDC support. Coinbase is pushing AgentKit hard. The agent payments space went from "interesting experiment" to "everyone's fighting over it" in about two weeks.
Our edge? Fully open-source, MIT-licensed, non-custodial, no vendor lock-in. But we needed multi-chain or that edge doesn't matter.
What's New in v2.5.0
Multi-chain swap support. SwapModule now accepts a chain parameter. Pass 'arbitrum' or 'optimism' and it resolves the right Uniswap V3 router and quoter addresses automatically. No manual address lookup.
import { createAgentWallet } from 'agentwallet-sdk';
import { attachSwap } from 'agentwallet-sdk/swap';
const wallet = createAgentWallet({ chain: 'arbitrum' });
const swap = attachSwap(wallet, { chain: 'arbitrum' });
// Same API, different chain. That's it.
await swap.execute({
tokenIn: WETH_ADDRESS,
tokenOut: USDC_ADDRESS,
amountIn: parseEther('0.1'),
slippageBps: 50
});
x402 on three networks. The x402 client now handles payment offers from Base, Arbitrum, and Optimism. If a server sends you an x402 challenge on any of those chains, the SDK picks the right USDC address and signs the payment. No config changes needed if you're already using v2.4.x.
Shared chain config. CHAIN_CONFIG gives you a single source of truth for chain IDs, RPC URLs, USDC addresses, Uniswap contracts, and WETH addresses. Export it and use it in your own code:
import { getChainConfig, chainFromId } from 'agentwallet-sdk';
const config = getChainConfig('optimism');
// { chainId: 10, rpcUrl: '...', usdcAddress: '0x0b2C63...', ... }
Backwards Compatible
If you're on v2.4.x and only use Base, nothing breaks. The default chain is still 'base'. Upgrade, run your tests, done.
199 tests passing. Zero breaking changes.
What's Next
ERC-8004 agent identity is already in the SDK (shipped in v2.3.0). The next piece is bridging — CCTP V2 cross-chain transfers are built and tested, but I want to add Arbitrum↔Optimism routes before calling that production-ready.
The full source is MIT-licensed: github.com/up2itnow0822/agent-wallet-sdk
Install: npm install agentwallet-sdk@2.5.0
I'm building the non-custodial infrastructure layer for autonomous AI agents — wallets, payments, swaps, bridges. If that's your problem space, I'd like to hear what you're working on.
Top comments (0)