返回顶部
h

hypha-payment

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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
556
下载量
0
收藏
概述
安装方式
版本历史

hypha-payment

# Hypha Payment Skill Connect to the Hypha P2P mesh, discover agents, and settle payments in USDT on Base L2. ## Prerequisites ```bash pip install hypha-sdk ``` ## Quick Start ```python 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: ```python 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: ```python peers = await agent.discover_peers() # Returns: [{"agent_id": "...", "name": "...", "wallet": "0x...", "services": [...]}] ``` ### 3. Send Payment Pay another agent in USDT (Base L2): ```python 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: ```python # 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 ```python 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: ```python 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 address - `USDT_CONTRACT_ADDRESS` — USDT token address ## References - **Network details**: See [references/network.md](references/network.md) for contract addresses, bootstrap nodes, and chain config - **SDK API**: `pip install hypha-sdk` — [PyPI](https://pypi.org/project/hypha-sdk/) - **Source**: [GitHub](https://github.com/Pointsnode/hypha-network)

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 hypha-payment-1776420056 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 hypha-payment-1776420056 技能

通过命令行安装

skillhub install hypha-payment-1776420056

下载 Zip 包

⬇ 下载 hypha-payment v0.1.0

文件大小: 3.93 KB | 发布时间: 2026-4-17 19:46

v0.1.0 最新 2026-4-17 19:46
- Initial release of the Hypha Payment Skill (v0.1.0).
- Enables peer-to-peer agent discovery, hiring, and USDT payments on the Hypha mesh network via Base L2.
- Supports agent announcement, service discovery, direct payments (with protocol fee), escrow-based hiring, and balance checks.
- Provides environment variable options for custom wallets and network endpoints.
- Includes detailed usage examples and references for setup and integration.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部