USDC Escrow Skill
Overview
This skill provides trustless USDC escrow services for agent-to-agent payments on Base. It allows AI agents to create, manage, and resolve payment escrows using smart contracts.
API
All scripts point to
https://api.payclawback.xyz by default. To use a different backend, set:
- -
ESCROW_API_URL - Override API URL (optional)
Available Commands
Create an Escrow
Creates a new escrow holding USDC for a beneficiary.
./scripts/create-escrow.sh <beneficiary_address> <amount_usdc> "<description>" <deadline_hours>
Example: INLINECODE2
List Escrows
List all escrows, optionally filtered by state or depositor.
CODEBLOCK1
Get Escrow Details
Get details of a specific escrow by ID.
CODEBLOCK2
Release Escrow
Release escrowed funds to the beneficiary.
CODEBLOCK3
Dispute Escrow
Open a dispute on an active escrow.
CODEBLOCK4
Resolve Dispute
Resolve a disputed escrow as arbiter.
./scripts/resolve-dispute.sh <escrow_id> <true|false>
- -
true = release funds to beneficiary - INLINECODE4 = refund to depositor
Claim Expired Escrow
Reclaim funds from an expired escrow.
CODEBLOCK6
Workflow Example
- 1. Agent A wants to pay Agent B for a service
- Agent A creates an escrow: INLINECODE5
- Agent B performs the service
- Agent A releases payment: INLINECODE6
How It Works
- - USDC is locked in a verified smart contract on Base
- The escrow has a deadline - funds return to depositor if expired
- Either party can open a dispute for arbiter resolution
- The AI arbiter agent resolves disputes impartially
- All transactions are on-chain and verifiable
API Reference
See
references/api-docs.md for complete API documentation.
USDC 托管技能
概述
该技能为Base链上的代理间支付提供无需信任的USDC托管服务。它允许AI代理使用智能合约创建、管理和解决支付托管。
API
所有脚本默认指向 https://api.payclawback.xyz。如需使用不同的后端,请设置:
- - ESCROWAPIURL - 覆盖API URL(可选)
可用命令
创建托管
创建一个新的托管,为受益人持有USDC。
bash
./scripts/create-escrow.sh <受益人地址>
<描述> <截止时间(小时)>
示例:./scripts/create-escrow.sh 0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28 10 数据分析付款 48
列出托管
列出所有托管,可按状态或存款人进行筛选。
bash
./scripts/list-escrows.sh [--state active|released|disputed|refunded|expired] [--depositor 0x...]
获取托管详情
按ID获取特定托管的详细信息。
bash
./scripts/get-escrow.sh <托管ID>
释放托管
将托管资金释放给受益人。
bash
./scripts/release-escrow.sh <托管ID>
争议托管
对活跃托管发起争议。
bash
./scripts/dispute-escrow.sh <托管ID>
解决争议
以仲裁人身份解决争议托管。
bash
./scripts/resolve-dispute.sh <托管ID>
- - true = 将资金释放给受益人
- false = 退款给存款人
认领过期托管
从过期托管中收回资金。
bash
./scripts/claim-expired.sh <托管ID>
工作流程示例
- 1. 代理A想要向代理B支付服务费用
- 代理A创建托管:./scripts/create-escrow.sh 0xAgentB 50 情感分析任务 24
- 代理B执行服务
- 代理A释放付款:./scripts/release-escrow.sh 1
工作原理
- - USDC锁定在Base上经过验证的智能合约中
- 托管设有截止时间——过期后资金将退还给存款人
- 任何一方均可发起争议,由仲裁人解决
- AI仲裁代理公正地解决争议
- 所有交易均在链上且可验证
API参考
完整API文档请参见 references/api-docs.md。