TopRank Skills

Home / Claw Skills / API 集成 / payspawn
Official OpenClaw rules 36%

payspawn

Add spending controls to any AI agent that makes API payments. Supports x402 auto-pay, daily limits, per-transaction limits, address allowlists, and fleet provisioning. Use when your agent calls paid APIs or sends payments autonomously. Works on Base with USDC.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 payspawn 技能。 若已安装,则直接安装 payspawn 技能。

Overview

Skill Key
adambrainai/payspawn
Author
adambrainai
Source Repo
openclaw/skills
Version
-
Source Path
skills/adambrainai/payspawn
Latest Commit SHA
0a99e4aebb79d0c66842b357c6acfcd35db314b2

Extracted Content

SKILL.md excerpt

# PaySpawn — Agent Payment Controls

Set spending limits for AI agents that make payments autonomously. Limits are enforced at the smart contract level on Base — not in software, not on a server. The contract cannot be overridden.

## Install

```bash
npm install @payspawn/sdk
```

## Credential Setup (One Human Step)

Before the agent can make payments, the wallet owner must create a credential:

1. Go to [payspawn.ai/dashboard](https://payspawn.ai/dashboard)
2. Connect your wallet (MetaMask, Coinbase Wallet, or any USDC wallet on Base)
3. Approve a USDC spending ceiling (one on-chain transaction, ~$0.005 gas)
4. Set limits: daily cap, per-transaction cap, optional address whitelist
5. Sign the credential (EIP-712 signature — no gas, no transaction)
6. Copy the credential string and set it as `PAYSPAWN_CREDENTIAL` in your environment

The credential is not a private key. Your wallet key never leaves your control. The agent can only spend within the limits you set — the contract enforces this and cannot be bypassed.

## Usage

```typescript
import { PaySpawn } from "@payspawn/sdk";
const ps = new PaySpawn(process.env.PAYSPAWN_CREDENTIAL);

// Auto-pay x402 APIs within your set limits
const res = await ps.fetch("https://api.example.com/endpoint");

// Send a payment
await ps.pay("0xRecipientAddress", 1.00);

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

// Pause all payments instantly (on-chain, immediate effect)
await ps.agent.pause();

// Resume payments
await ps.agent.unpause();
```

## Fleet Mode

Provision multiple agent credentials from one shared pool. One wallet funds the pool; each agent gets its own credential with its own daily limit.

```typescript
// Create a shared budget pool
const pool = await ps.pool.create({ totalBudget: 100, agentDailyLimit: 10 });

// Fund the pool: send USDC to pool.address from your wallet

// Provision credentials for each agent
const fleet = await ps.fleet.provision({ poolAddr...

Related Claw Skills