DEV Community

Bill Wilson
Bill Wilson

Posted on

agentwallet-sdk v3.0.0: Solana Wallets, Jupiter Swaps, and a 17-Chain CCTP V2 Bridge

EVM has been fine. But EVM isn't fast enough or cheap enough for agents doing real work.

An AI agent processing micropayments — 50 cents here, a dollar there — gets eaten alive by gas on Ethereum mainnet. Even on Base, if your agent is making hundreds of transactions a day, costs stack up. Solana does sub-cent transactions in ~400ms. For autonomous agents that need to actually move money, that's not a nice-to-have. It's infrastructure.

That's why v3.0.0 of agentwallet-sdk adds full Solana support. Not a wrapper. Not a proof-of-concept. Keypair-based wallets, Jupiter swaps, x402 payments on Solana, and a 17-chain bridge — all in the same SDK your agent already uses.


What shipped in v3.0.0

Solana Wallet (non-custodial, Keypair-based)

Agents generate and hold their own Solana keypairs locally. No server ever touches the private key. Same design philosophy as the EVM side — spend limits enforced by the agent, not by a custody provider.

import { SolanaWallet } from 'agentwallet-sdk';

const wallet = await SolanaWallet.create({
  rpcUrl: 'https://api.mainnet-beta.solana.com',
  spendLimit: { amount: '10', token: 'SOL', windowSeconds: 86400 }
});

console.log(wallet.publicKey); // agent's Solana address
Enter fullscreen mode Exit fullscreen mode

The spend limit is the key thing here. Your agent can't accidentally — or maliciously, prompt injection is real — drain the wallet in one transaction. It enforces a daily cap. Set it to $10/day. $100/day. Whatever your use case warrants.

Jupiter Swap Integration

SOL↔SPL token swaps through Jupiter's aggregator. Best route, best price, no manual DEX hunting.

import { SolanaWallet, JupiterSwap } from 'agentwallet-sdk';

const wallet = await SolanaWallet.fromKeypair(existingKeypair, {
  rpcUrl: 'https://api.mainnet-beta.solana.com'
});

const swap = new JupiterSwap(wallet);

// Swap 1 SOL for USDC
const result = await swap.execute({
  inputMint: 'So11111111111111111111111111111111111111112',    // SOL
  outputMint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', // USDC
  amount: '1000000000', // 1 SOL in lamports
  slippageBps: 50
});

console.log(`Swapped. Tx: ${result.signature}`);
Enter fullscreen mode Exit fullscreen mode

Agents can now rebalance their own treasuries. If a task pays in USDC and the agent needs SOL for gas, it swaps. Autonomously. That's the point.

x402 Payment Protocol — Now on Solana

x402 is how agents pay for API calls, services, and resources on-chain — the HTTP 402 payment-required protocol, actually implemented. It was EVM-only until now.

v3.0.0 brings x402 to Solana. An agent receives a 402 challenge from a Solana-aware endpoint and responds with a signed Solana payment. Same pattern, different chain.

import { SolanaX402Client } from 'agentwallet-sdk';

const client = new SolanaX402Client(wallet);

// Agent hits a paid API endpoint
const response = await client.fetch('https://api.example.com/premium-data');
// If the endpoint returns 402, the client auto-pays and retries
console.log(await response.json());
Enter fullscreen mode Exit fullscreen mode

This matters because not every service wants to run on EVM. Solana-native services can now charge agents directly without a cross-chain intermediary.


The UnifiedBridge — 17 chains, one interface

Cross-chain transfers are where most SDKs fall apart. You get chain-specific bridges, chain-specific ABIs, chain-specific error handling. It's a mess.

UnifiedBridge wraps CCTP V2 — Circle's Cross-Chain Transfer Protocol — across all 17 supported chains:

Base, Ethereum, Arbitrum, Optimism, Polygon, Avalanche, Solana — plus 10 more EVM chains.

One interface. Your agent doesn't care what chain it's on.

import { UnifiedBridge } from 'agentwallet-sdk';

const bridge = new UnifiedBridge({
  sourceWallet: evmWallet,    // AgentWallet instance
  solanaWallet: solanaWallet  // SolanaWallet instance (optional)
});

// Move USDC from Base to Solana
const transfer = await bridge.transfer({
  sourceChain: 'base',
  destinationChain: 'solana',
  token: 'USDC',
  amount: '100',
  destinationAddress: solanaWallet.publicKey
});

await transfer.waitForFinality();
console.log(`Bridged. Destination tx: ${transfer.destinationTxHash}`);
Enter fullscreen mode Exit fullscreen mode

Why does this matter for agents? Agent mobility. An agent working on Base can get paid, bridge to Solana to buy compute, bridge back to Arbitrum to deploy a contract — all without human intervention. The agent follows the work, not the chain.

CCTP V2 specifically is the right choice here — it's canonical USDC (not wrapped), Circle attests the burns, and finality is ~20 seconds on most chains. No liquidity pools to drain, no bridge hacks from LP imbalances. CCTP's track record is clean.


Numbers that matter

  • 376/376 tests passing — no regressions from adding Solana on top of the EVM side
  • 17 chains supported in UnifiedBridge
  • ~400ms average Solana transaction confirmation
  • MIT licensed — use it in anything

Install: npm install agentwallet-sdk

GitHub: github.com/up2itnow0822/agent-wallet-sdk


What's next

A few things on the roadmap:

Agent-to-agent payments — one agent pays another directly, with receipts both sides can verify. TaskBridge integration (the agent labor marketplace we're building) is the first real use case.

Solana program-based spend limits — right now limits are enforced in the SDK layer. Moving them on-chain on Solana gives verifiable enforcement without trusting the agent runtime.

More chains — Sui and Aptos are interesting. Non-EVM chains with fast finality are exactly where agents want to operate.

If you're building autonomous agents that need to handle crypto — not simulate it, actually touch mainnet — this is the SDK. The non-custodial design means your users' funds aren't sitting on your server. The spend limits mean your agents can't blow the budget. The multi-chain support means your agents go where the work is.


Previous post: v2.5.0 — Arbitrum and Optimism support

npm: npmjs.com/package/agentwallet-sdk

Top comments (0)