← 返回
开发者工具 中文

Agentwallet Sdk

Manage on-chain spend limits for AI agents with ERC-6551 wallets, enforcing per-tx and daily token budgets, scoped operator access, and approval queues on Base.
管理 AI 代理的链上支出限额,支持 ERC‑6551 钱包,强制单笔和每日代币预算,限定操作员访问权限,并在 Base 上维护审批队列。
up2itnow
开发者工具 clawhub v1.1.0 1 版本 99894.6 Key: 无需
★ 0
Stars
📥 948
下载
💾 9
安装
1
版本
#latest

概述

Agent Wallet SDK Skill

Non-custodial wallet SDK for autonomous AI agents. Handles x402 payments, CCTP V2 cross-chain bridge transfers, ERC-8004 agent identity, and Uniswap V3 token swaps — all without holding user keys.

When to Use

Use this skill when an AI agent needs to:

  • Create or manage a non-custodial wallet (ERC-4337 smart account)
  • Make x402 HTTP payments to APIs
  • Bridge tokens cross-chain via CCTP V2 (Circle)
  • Swap tokens via Uniswap V3
  • Register or verify agent identity via ERC-8004
  • Sign transactions autonomously without custodial risk

Installation

npm install agentwallet-sdk

Current version: v2.4.1 on npm (158 tests passing, 0 compile errors)

Core Modules

WalletModule — Account Abstraction (ERC-4337)

import { AgentWallet } from 'agentwallet-sdk';

const wallet = await AgentWallet.create({
  chain: 'base',
  signer: privateKey, // Agent's own key — never custodied
});

// Send ETH
await wallet.transfer({ to: recipient, value: '0.01' });

// Get balance
const balance = await wallet.getBalance();

PaymentModule — x402 HTTP Payments

// Pay for API access automatically
const response = await wallet.x402Pay({
  url: 'https://api.example.com/data',
  maxPayment: '0.001', // ETH
});

BridgeModule — CCTP V2 Cross-Chain

// Bridge USDC from Base to Ethereum
await wallet.bridge({
  token: 'USDC',
  amount: '100',
  fromChain: 'base',
  toChain: 'ethereum',
});

SwapModule — Uniswap V3

// Swap ETH for USDC
await wallet.swap({
  tokenIn: 'ETH',
  tokenOut: 'USDC',
  amount: '0.5',
  slippage: 0.5, // 0.5%
});

IdentityModule — ERC-8004

// Register agent identity on-chain
await wallet.registerIdentity({
  name: 'MyTradingAgent',
  capabilities: ['x402-payment', 'swap', 'bridge'],
});

// Verify another agent
const verified = await wallet.verifyAgent(agentAddress);

Security Model

  • Non-custodial: Agent holds its own private key. No server stores keys
  • ERC-4337 Smart Accounts: Gas abstraction, batch transactions, session keys
  • No oracle dependencies: No external price feed reliance (prevents oracle manipulation attacks)
  • Audited: forge test suite 129/129 passing on smart contracts

Integration with Other Skills

With Mastra (AI Framework)

npm install @agent-wallet/mastra-plugin

Provides 10 Mastra tools: getBalance, transfer, swap, bridge, x402Pay, registerIdentity, verifyAgent, getTransactionHistory, estimateGas, getChainInfo.

With ClawPay MCP

npm install clawpay-mcp

Exposes wallet operations as MCP tools for any MCP-compatible agent.

Links

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-03-29 14:25 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,799
security-compliance

Validator Agent

up2itnow
在部署前通过运行全面的安全、测试、质量、文档、CI/CD、隐私、可维护性、可用性、市场性等检查来验证项目。
★ 0 📥 1,251
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,165