← 返回
未分类 Key

PaySpawn — On-Chain Spending Limits for AI Agents

Give any AI agent on-chain spending limits without sharing a private key. Use when: (1) agent needs to pay for x402 APIs (web scraping, search, AI services),...
在不泄露私钥的情况下,为任意 AI 代理设定链上消费限额。使用时机:① 代理需要支付 x402 API(网页抓取、搜索、AI 服务等)费用,...
adambrainai
未分类 clawhub v1.0.0 1 版本 99585.1 Key: 需要
★ 0
Stars
📥 240
下载
💾 0
安装
1
版本
#latest

概述

PaySpawn — On-Chain Spending Limits for AI Agents

PaySpawn gives OpenClaw agents a credential instead of a raw private key. Spending limits, whitelists, and a kill switch — all enforced by a smart contract on Base. Math, not code.

Quick Start

Install the SDK:

npm install @payspawn/sdk

Set your credential as an environment variable:

PAYSPAWN_CREDENTIAL=your_credential_from_dashboard

Get your credential at payspawn.ai/dashboard — connect wallet, set limits, copy the credential string. No private key needed.


Basic Usage

import { PaySpawn } from "@payspawn/sdk";

const ps = new PaySpawn(process.env.PAYSPAWN_CREDENTIAL);

// Pay an x402 API automatically
const res = await ps.fetch("https://api.example.com/data");
const data = await res.json();

// Direct USDC payment
await ps.pay("recipient-wallet-address", 1.00);

// Check remaining balance
const { balance, remaining } = await ps.check();

// Kill switch — stops all spending instantly
await ps.agent.pause();

What You Get

Daily cap — max USDC the agent can spend per day

Per-tx limit — max per single payment

Address whitelist — only allowed counterparties can receive payments

Velocity limit — max transactions per hour

Kill switch — pause all spending with one call


x402 Auto-Pay

ps.fetch() handles HTTP 402 payment flows automatically. Agent calls a paid API, PaySpawn pays within the credential limits, returns the result:

// Works with any x402-compatible API
const result = await ps.fetch("https://paid-api.example.com/endpoint", {
  method: "POST",
  body: JSON.stringify({ task: "do something" })
});

Agent Fleets

Provision multiple agents from one shared budget pool:

// Create a pool for multiple agents
const pool = await ps.pool.create({ totalBudget: 100, agentDailyLimit: 10 });

// Provision 10 agent credentials in one call
const fleet = await ps.fleet.provision({ poolAddress: pool.address, count: 10 });

One pool. One API call. Each agent gets its own credential with its own daily limit. All draw from the shared pool budget.


Why Use This

Agents with raw wallet keys have unlimited access. One bad prompt or leaked env file and the wallet is drained. PaySpawn credentials are scoped and revocable:

  • Credential limits are enforced by the smart contract, not software
  • Leaked credential still cannot exceed the daily cap
  • Prompt injection tries to pay an unknown address — whitelist blocks it
  • One call stops spending instantly

Links

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-12 06:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,374 📥 319,826
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 673 📥 325,033
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,223 📥 267,422