seeder-402
seeder-402
一个通过 x402 在 Base 网络上复制买方提供的 Hypercore/Hyperdrive 密钥以获取 USDC 的 HTTP/MCP 服务。
概述
seeder-402 实现了一个始终在线的复制服务,在 Base 网络上出售对买方提供的 Hypercore/Hyperdrive 密钥的访问权限。该系统允许发布者托管最多 50MB 的捆绑包,持续 7 天,同时维护 24 小时的发现密钥,并支持基于租约的访问控制。
Related MCP server: x402-discovery
架构
两个进程,一个 VPS,一个数据库:
[Agent] --HTTP 402 / MCP--> [api] --IPC/CLI--> [blind-peer]
|
[SQLite]api(Node 22+):x402 中间件、MCP 付费工具、租约 JWT/HMAC、配额、OpenAPI
blind-peer(Holepunch CLI):DHT、Corestore、复制(无支付逻辑)
SQLite:租约、支付、上限(仅 v1)
系统状态
当前里程碑
M1 — 资金存根(活跃)
已实现:未付费请求 → 402 Base Sepolia USDC
已实现:协调者验证+结算 → 200
{ ok: true }状态:资金基础设施就绪,blind-peer 待定
路线图
有关完整的里程碑跟踪,请参阅 docs/ROADMAP.md。当前重点:M7(主网)以实现生产就绪。
快速开始
先决条件
# System dependencies
Node 22+
npm (or bun)
blind-peer-cli or blind-peering-cli
better-sqlite3 (npm)环境设置
# Configure environment (never commit)
export NETWORK=eip155:84532 # Base Sepolia
export PAY_TO=0x... # Payment recipient
export FACILITATOR_URL=https://x402.org/facilitator
export LEASE_SECRET=... # JWT secret
export PEER_KEY=... # Blind-peer key
export STORE_PATH=/var/lib/seeder-402/corestore
export DB_PATH=/var/lib/seeder-402/leases.db
export MAX_KEYS=200
export MAX_BYTES_PER_KEY=52428800
export MAX_BODY_BYTES=52428800
export PRICE_SEED_USD=0.10
export PRICE_PIN_USD=0.20
export PRICE_HOUSE_USD=0.50
export PRICE_STATUS_USD=0.01运行
# Start blind-peer for DHT
blind-peer -s $STORE_PATH
# Start API
node dist/index.js
# or
bun tsx src/index.ts测试
# Test unpaid request (should return 402)
curl -i https://HOST/v1/status?key=00..
# Test paid request (Sepolia)
Use @x402/fetch or CDP Payments MCP with test USDC文档
文档 | 用途 |
架构模式、模块组织、扩展指南 | |
系统规范、公共 API、数据模型 | |
里程碑进度、未来计划、已完成项目 | |
操作流程、部署、常见任务 | |
数据库模式、配置、数据流模式 |
项目结构
seeder-402/
├── AGENTS.md # Agent entry point, build/test commands, conventions
├── README.md # This file
├── docs/ # Canonical documentation
│ ├── FRAMEWORK.md
│ ├── SPEC.md
│ ├── ROADMAP.md
│ ├── PLAYBOOK.md
│ ├── DATA.md
│ └── context/ # Background and architectural context
├── milestones/ # Active and archived milestones
│ └── archive/ # Archived milestone artifacts
└── .omp/ # OhMyPi configuration
└── config.yml # Canonical project configurationOhMyPi 工作流
omp
"Implement M1 only per ROADMAP.md and SPEC.md. Do not start M2."
After each M: run PLAYBOOK tests; commit; stop.注意:此仓库目前处于 M1(仅资金存根)阶段。超出 M1 的实现必须等待路线图进展和收入信号。
贡献
遵循 OhMyPi 工作流:
每个 PR 只实现一个里程碑
严格遵守 SPEC.md 的要求
每次更改后运行 PLAYBOOK.md 测试
未经路线图批准,不得超出分配的里程碑
保持当前架构(无微服务,不重新实现核心 DHT 逻辑)
许可证
架构和文档采用 Apache 2.0。实现(创建时)将遵循项目许可证。
此仓库由 p2primitive 集体维护,并遵循严格的基于里程碑的开发纪律。
项目配置
project_id: seeder-402
project_slug: seeder-402
mode: application # framework: library, application: runnable service
mechanical_tooling:
environment_manager: Node.js + npm (nodeenv)
fast_linter_formatter: Prettier + ESLint (auto-fixable)
pre_commit_framework: Husky
type_checker: TypeScript
milestones:
current: M1
target: M7
requirements:
node_version: "22.0.0"
base_network: eip155:8453 # Mainnet (production)
base_testnet: eip155:84532 # Base Sepolia (testing)This server cannot be deployed
Maintenance
Related MCP Connectors
Pay-per-query x402 business intelligence on Base, settled in USDC via the native 402 payment flow.
Pay-per-call tools for autonomous agents, settled in USDC on Base via x402.
Rent verified subdomains by the hour, day, or month. Free 24h trials, x402 USDC on Base.
USDC/x402 agent marketplace. Verified Base mainnet pilot, testnet and public enrollment.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceOnchain agent-to-agent commerce protocol using x402 and ERC-8004. Enables AI agents to buy/sell services, manage vendor catalogs, and process payments on Base.MIT
- AlicenseNot gradedqualityDmaintenanceDiscovers and queries x402-payable APIs at runtime — enables autonomous agents to find, evaluate, and pay for services via USDC micropayments on Base without API keys or subscriptions.MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to sell or access Ethereum JSON-RPC requests over x402 with per-call USDC payments on Base, no accounts or API keys, including per-method pricing, policy enforcement, and privacy protections.1MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to discover and invoke x402-monetized computational engines for media geometry, measurements, JSON hygiene, and ComfyUI preflight audits, with USDC settlement on Base Mainnet.-