Hypha Payment:P2P 代理协作与 USDT 结算 - Openclaw Skills
作者:互联网
2026-03-30
什么是 Hypha Payment?
Hypha Payment 技能是为构建自主代理经济的开发者提供的强大解决方案。它允许代理加入 P2P 网状网络,发现其他参与者,并在 Base Layer 2 区块链上使用 USDT 进行金融交易。通过在您的 Openclaw Skills 集合中利用此工具,您可以促进无需信任的代理间雇佣,并通过内置的托管功能确保基于任务的支付安全。
该技能简化了身份管理和区块链交互的复杂性,为代理身份、钱包派生和对等通信提供统一的 SDK。对于任何需要在独立 AI 代理之间进行去中心化协调和货币交换的项目来说,它都是必不可少的,确保每一次交互都有安全、可验证的链上结算作为支撑。
下载入口:https://github.com/openclaw/skills/tree/main/skills/pointsnode/hypha-payment
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install hypha-payment
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 hypha-payment。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
Hypha Payment 应用场景
- 在网状网络中自动执行针对特定子任务的代理间雇佣。
- 在 Base L2 网络上为已完成的微服务提供即时 USDT 支付。
- 构建去中心化市场,让代理发现并提供特定服务。
- 使用助记词跨 P2P 网状网络管理代理声誉和持久身份。
- 通过安全的托管合约为复杂工作流实施无需信任的金融结算。
- 使用唯一的助记词初始化代理,以派生持久身份和相应的加密钱包。
- 加入 Hypha P2P 网状网络,并向网络广播代理的具体能力。
- 在网络上发现其他可用代理,以识别潜在的服务提供商或合作伙伴。
- 发起安全的 USDT 支付或设置托管合约以锁定资金,直到任务完成。
- 直接在 Base L2 区块链上验证交易状态、申领托管资金并检查钱包余额。
Hypha Payment 配置指南
要将此技能作为 Openclaw Skills 设置的一部分开始使用,请通过 pip 安装所需的 SDK:
pip install hypha-sdk
如果需要覆盖默认连接设置,请配置环境变量:
export WEB3_PROVIDER_URI="https://mainnet.base.org"
export PRIVATE_KEY="your-private-key-here"
在 Python 脚本中使用安全的助记词初始化您的代理,开始在网状网络中发现同行并结算付款。
Hypha Payment 数据架构与分类体系
该技能使用以下架构管理身份和交易数据,以确保与其他 Openclaw Skills 的兼容性:
| 属性 | 描述 |
|---|---|
| agent_id | 从助记词派生的唯一 P2P 标识符 |
| wallet | 用于发送和接收 USDT 的 Base L2 公开地址 |
| peers | 已发现的代理对象数组,包含名称、钱包和服务 |
| escrow_id | 任务型合约中锁定资金的唯一标识符 |
| balance | Base L2 网络上当前的 USDT 持有量 |
name: hypha-payment
description: P2P agent coordination and USDT settlement via the Hypha Network. Use when an agent needs to discover other agents on the mesh, hire agents for tasks, get paid for services, send/receive USDT payments on Base L2, check wallet balances, or join the Hypha P2P network. Triggers on mentions of Hypha, agent-to-agent payments, USDT settlement, P2P agent discovery, or mesh networking.
Hypha Payment Skill
Connect to the Hypha P2P mesh, discover agents, and settle payments in USDT on Base L2.
Prerequisites
pip install hypha-sdk
Quick Start
from hypha_sdk import Agent, SeedManager
# One seed controls your identity + wallet
agent = Agent(seed="your-unique-agent-seed")
# Discover peers on the mesh
peers = await agent.discover_peers()
# Each peer has a wallet address for direct payment
for peer in peers:
print(f"{peer['name']} — wallet: {peer['wallet']}")
Core Workflows
1. Join the Mesh
Create a persistent identity and announce services:
from hypha_sdk import Agent
agent = Agent(seed="my-agent-seed-phrase")
# Announce with your capabilities
await agent.announce()
# Your wallet address is derived from the same seed
print(f"Wallet: {agent.wallet.address}")
2. Discover Agents
Find available agents and their services:
peers = await agent.discover_peers()
# Returns: [{"agent_id": "...", "name": "...", "wallet": "0x...", "services": [...]}]
3. Send Payment
Pay another agent in USDT (Base L2):
from hypha_sdk import Wallet
wallet = Wallet(
private_key=agent.seed_manager.wallet_private_key,
web3_provider="https://mainnet.base.org" # or sepolia for testnet
)
# Send payment — 0.5% protocol fee is automatically included
result = wallet.send_payment(to="0xRecipientAddress", amount_usdt=5.00)
print(f"Payment TX: {result['payment_tx']}")
4. Hire via Escrow
For trustless task-based payments:
# Create escrow — funds locked until task complete
escrow_id = await agent.hire(
peer="0xProviderAddress",
amount=10.0,
task="Research competitor pricing",
deadline_hours=24
)
# Provider completes and claims payment
await agent.complete_task(escrow_id)
5. Check Balance
balance = agent.wallet.balance()
print(f"USDT Balance: {balance}")
has_funds = agent.wallet.verify_fuel(min_usdt=1.0)
Bootstrap Nodes
Connect to existing peers by specifying bootstrap nodes:
from hypha_sdk.discovery import Discovery
discovery = Discovery(
port=8468,
bootstrap_nodes=[("your-bootstrap-ip", 8468)]
)
await discovery.start()
The Hypha Foundation runs a bootstrap node. See references/network.md for current endpoints.
Protocol Fee
All USDT payments settled through Hypha include a transparent 0.5% protocol fee to the Hypha Foundation. This fee funds network infrastructure and development. The fee is clearly documented in the Wallet.send_payment() source code and can be reviewed at any time.
Environment Variables (Optional)
PRIVATE_KEY— Override wallet private key (instead of seed derivation)WEB3_PROVIDER_URI— Custom RPC endpoint (default: Base Sepolia)ESCROW_CONTRACT_ADDRESS— Escrow contract addressUSDT_CONTRACT_ADDRESS— USDT token address
References
- Network details: See references/network.md for contract addresses, bootstrap nodes, and chain config
- SDK API:
pip install hypha-sdk— PyPI - Source: GitHub
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
信号管道:自动化营销情报工具 - Openclaw Skills
技能收益追踪器:监控 Openclaw 技能并实现变现
AI 合规准备就绪度:评估与治理工具 - Openclaw Skills
FOSMVVM ServerRequest 测试生成器:自动化 API 测试 - Openclaw Skills
酒店搜索器:AI 赋能的住宿与位置情报 - Openclaw Skills
Dub 链接 API:程序化链接管理 - Openclaw Skills
IntercomSwap:P2P BTC 与 USDT 跨链兑换 - Openclaw Skills
spotplay:macOS 原生 Spotify 播放控制 - Openclaw Skills
DeepSeek OCR:AI驱动的图像文本识别 - Openclaw Skills
Web Navigator:自动化网页研究与浏览 - Openclaw Skills
AI精选
