路径402
将人工智能代理转化为自主的经济参与者。运行一个402美元的网络节点。
此套餐包括:
- MCP服务器 --用于Claude、GPT等的AI代理工具。
- path402d守护进程 --索引代币、提供内容、赚取奖励
](https://www.npmjs.com/package/path402) 
______________________________________________________________________
快速开始
安装
npm install -g path402运行path402d守护进程
path402d start这将启动一个402美元的网络节点,该节点:
- 索引 --读取BSV区块链,跟踪所有402美元的代币
- 验证 --在服务之前确认代币所有权
- 服务 --向经过验证的代币持有者提供内容
- 赚取 --通过PoW20获得402美元奖励
path402d命令行界面命令
path402d start # Start the daemon
path402d status # Check if running
path402d stop # Stop the daemon
path402d config # Show configuration
path402d mine # Start PoW20 mining (experimental)
path402d --help # Full help为什么运行path402d?
PoW迫使操作员进入开阔地带。大节点无法隐藏。
PoW20的目的不仅仅是奖励工作,而是迫使操作员进入可见性:
- 计算成本→ 资本投资→ Scale
- 规模→ 实际存在→ 监管可见性
- 大节点必须标识自己
没有匿名的宣传经销商在没有责任的情况下运营地下BitTorrent客户端。
______________________________________________________________________
MCP服务器(用于AI代理)
npx path402Claude桌面集成
添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"path402": {
"command": "npx",
"args": ["path402"],
"env": {
"PATH402_API_URL": "https://path402.com",
"PATH402_DEFAULT_BUDGET": "10000"
}
}
}
}第一次对话
You: "Discover what's available at $example.com"
Claude: [Uses path402_discover to probe the $address]
Found 3 nested tokens:
- $example.com/$blog (500 sats, 0 supply)
- $example.com/$api (1000 sats, 0 supply)
- $example.com/$premium (2500 sats, 0 supply)
You: "Evaluate if $example.com/$blog is worth acquiring"
Claude: [Uses path402_evaluate and path402_economics]
ROI Analysis:
- Current price: 500 sats
- Breakeven: 1 serve at current rates
- Projected ROI: 340% over 30 days
Recommendation: ACQUIRE (high confidence)
You: "Acquire 10 tokens"
Claude: [Uses path402_acquire]
Acquired 10 $example.com/$blog tokens
Total cost: 5,000 sats
New balance: 10 tokens______________________________________________________________________
402美元协议
402美元是多少?
402美元将URL路径转化为代币化市场。任何前缀为的路径 $ 成为经济对象:
$example.com → Site-level token
$example.com/$api → API access token
$example.com/$api/$premium → Premium tier token每个令牌都有:
- 价格曲线 (默认情况下,粘合曲线呈上升趋势)
- 供应柜台 (每次收购都会增加)
- 持有人登记处 (谁拥有什么)
- 收入分配 (发行人/主持人分开)
上升粘结曲线
价格由剩余资金决定,而非投机:
price = base_price / √(treasury_remaining + 1)| 库存 | 价格 | %已售出 |
|---|---|---|
| 500万 | 10个卫星 | 0% |
| 100米 | 22个卫星 | 80% |
| 1000万 | 71个卫星 | 98% |
| 1M | 224个卫星 | 99.8% |
| 1K | 7072个卫星 | 99.9998% |
关键洞察:早期买家总是能得到更好的价格。这为发现和早期采用创造了自然激励。
自筹资金代理
代理人可以在经济上自给自足:
- 以当前价格获取代币
- 向其他代理/用户提供内容
- 从服务中获得收入
- 将利润再投资到更多代币中
上升的债券曲线在数学上保证了早期收购者可以通过服务实现正的投资回报率。
______________________________________________________________________
完整的工具参考
发现与评估
| 工具 | 说明 |
|---|---|
path402_discover | 查找$地址以了解定价、供应、收入模式和嵌套路径 |
path402_batch_discover | 在一次通话中发现多个$地址 |
path402_evaluate | 购买前评估投资回报率可行性 |
path402_economics | 深度财务分析:盈亏平衡、预测、情景 |
path402_price_schedule | 查看不同供应水平的价格变化情况 |
path402_discover
// Input
{
address: "$example.com/$api"
}
// Output
{
address: "$example.com/$api",
exists: true,
pricing: {
model: "alice_bond",
base_price_sats: 1000,
current_price_sats: 45,
treasury_remaining: 499500000
},
supply: {
total: 500000,
max: null
},
revenue_split: {
issuer_bps: 8000,
facilitator_bps: 2000
},
nested: [
"$example.com/$api/$premium",
"$example.com/$api/$enterprise"
],
content_type: "application/json",
description: "API access credits"
}path402_评估
// Input
{
address: "$example.com/$api",
amount: 100,
budget_sats: 10000
}
// Output
{
recommendation: "ACQUIRE",
confidence: 0.85,
analysis: {
total_cost_sats: 4500,
within_budget: true,
avg_price_per_token: 45,
breakeven_serves: 5,
projected_roi_30d: 0.34,
risk_level: "low"
},
reasoning: "Early position in growing market. Favorable price curve."
}收购和钱包
| 工具 | 说明 |
|---|---|
path402_acquire | 购买代币并接收门控内容 |
path402_set_budget | 配置代理支出参数 |
path402_wallet | 查看余额、持股和净财务状况 |
path402_transfer | 将令牌转移到另一个地址 |
path402_history | 查看交易历史记录 |
path402_查询
// Input
{
address: "$example.com/$api",
amount: 100
}
// Output
{
success: true,
acquired: 100,
total_cost_sats: 4500,
avg_price: 45,
new_balance: 100,
content: {
type: "api_key",
value: "sk_live_xxx...",
expires: null
},
txId: "bsv_abc123..."
}路径402_钱包
// Output
{
balance_sats: 45000,
holdings: [
{
address: "$example.com/$api",
balance: 100,
avg_cost: 45,
current_value: 4800,
unrealized_pnl: 300
}
],
total_value_sats: 49800,
total_cost_sats: 49500,
net_pnl_sats: 300,
serving_revenue_sats: 1200
}服务与收入
| 工具 | 说明 |
|---|---|
path402_serve | 分发内容并赚取收入 |
path402_servable | 列出代理可以提供的所有内容 |
path402_register | 将新的$地址注册为发行人 |
path402_serve
// Input
{
address: "$example.com/$api",
requester: "agent_xyz",
amount: 1
}
// Output
{
served: true,
tokens_consumed: 1,
revenue_earned_sats: 40,
remaining_balance: 99,
content_delivered: true
}path402_servable
// Output
{
servable: [
{
address: "$example.com/$api",
balance: 99,
serves_remaining: 99,
revenue_per_serve: 40,
total_potential_revenue: 3960
}
],
total_serves_available: 99,
total_potential_revenue_sats: 3960
}x402引导工具
| 工具 | 说明 |
|---|---|
x402_verify | 验证来自任何受支持链的付款证明 |
x402_settle | 通过协调人结算跨链支付 |
x402_inscription | 获取或创建BSV铭文证明 |
x402_验证
// Input
{
payment_proof: "0xabc123...",
network: "base",
expected_amount: 1000,
expected_recipient: "0x..."
}
// Output
{
valid: true,
network: "base",
amount_sats: 1000,
recipient: "0x...",
sender: "0x...",
txId: "0x...",
timestamp: "2026-02-02T10:00:00Z",
facilitator: "path402.com"
}______________________________________________________________________
配置
环境变量
| 变量 | 默认值 | 描述 |
|---|---|---|
PATH402_API_URL | https://path402.com | API终点 |
PATH402_DEFAULT_BUDGET | 10000 | 默认预算(单位:sats) |
PATH402_WALLET_KEY | - | 钱包签名密钥(用于支付) |
PATH402_AUTO_ACQUIRE | false | 推荐时自动获取 |
PATH402_MAX_SINGLE_SPEND | 5000 | 每次采集的最大卫星数 |
PATH402_LOG_LEVEL | info | 记录冗长 |
高级配置
{
"mcpServers": {
"path402": {
"command": "npx",
"args": ["path402"],
"env": {
"PATH402_API_URL": "https://path402.com",
"PATH402_DEFAULT_BUDGET": "50000",
"PATH402_AUTO_ACQUIRE": "true",
"PATH402_MAX_SINGLE_SPEND": "10000",
"PATH402_WALLET_KEY": "your-wallet-key",
"PATH402_LOG_LEVEL": "debug"
}
}
}
}______________________________________________________________________
用例
1.内容发现代理
Agent探索$402命名空间,发现有价值的内容:
1. path402_batch_discover(["$news.com", "$research.org", "$data.io"])
2. path402_evaluate() on promising finds
3. path402_acquire() undervalued tokens
4. path402_serve() to users who request content2.API网关代理
代理为团队管理API访问:
1. path402_acquire("$api.service.com", 1000)
2. path402_wallet() to track usage
3. path402_serve() when team members need API calls
4. path402_acquire() more when balance runs low3.研究代理人
Agent从付费墙来源收集信息:
1. path402_discover() research databases
2. path402_economics() to evaluate cost/benefit
3. path402_acquire() access to valuable sources
4. Compile research using acquired content4.创收代理
自费代理人:
1. path402_acquire() tokens at low prices
2. path402_servable() to list inventory
3. path402_serve() to other agents
4. path402_wallet() to track profits
5. Reinvest profits into more tokens______________________________________________________________________
支持的网络
| 网络 | 状态 | 资产 |
|---|---|---|
| BSV | 主 | BSV、BSV-20令牌 |
| 基础 | 支持 | 美元、以太坊 |
| Solana | 支持 | USDC、SOL |
| 以太坊 | 支持 | USDC、ETH、USDT |
BSV是结算层。来自其他链的付款经过验证并刻在BSV上作为永久证明。
______________________________________________________________________
API 参考
PATH402.com端点
$PATH402代币 (PATH402自己的令牌)
| 端点 | 方法 | 描述 |
|---|---|---|
/api/token/stats | 获取 | $PATH402统计数据和定价 |
/api/token/buy | POST | 获取$PATH402代币 |
/api/token/holding | 获取 | 用户持有的$PATH402 |
多租户市场 (任何$地址)
| 端点 | 方法 | 描述 |
|---|---|---|
/api/tokens | GET | 列出所有已注册的令牌 |
/api/tokens | POST | 注册新的$地址 |
/api/tokens/[address] | GET | 代币详细信息+价格表 |
/api/tokens/[address] | POST | 获取令牌 |
/api/tokens/holdings | GET | 用户持有量(所有代币) |
/api/tokens/transfer | POST | 转移代币 |
/api/tokens/history | GET | 交易历史 |
x402主持人 (付款验证)
| 端点 | 方法 | 描述 |
|---|---|---|
/.well-known/x402.json | GET | 发现文档 |
/api/x402/verify | POST | 验证付款 |
/api/x402/settle | POST | 结算付款 |
/api/x402/inscription | GET/POST | 题词管理 |
/api/x402/stats | GET | 主持人统计 |
______________________________________________________________________
发展
本地运行
git clone https://github.com/b0ase/path402
cd path402
npm install
npm run dev测试
npm test
npm run test:integration建筑
npm run build______________________________________________________________________
路线图
v1.0.0(当前)
- ✅ 10个核心工具
- ✅ 上升债券曲线定价
- ✅ 预算管理
- ✅ 模拟采集/服务
v1.1.0(进行中)
- 🔲 path402.com的实时HTTP客户端
- 🔲 x402辅助工具(验证、结算、题词)
- 🔲 真实支付集成
v1.2.0(计划中)
- 🔲 传输和历史记录工具
- 🔲 多智能体协调
- 🔲 持久存储
v1.3.0(计划中)
- 🔲 创建者工具(注册)
- 🔲 高级分析
- 🔲 代理市场整合
______________________________________________________________________
贡献
欢迎投稿!请阅读我们的贡献指南。
# Fork the repo
git checkout -b feature/your-feature
# Make changes
npm test
git commit -m "Add your feature"
git push origin feature/your-feature
# Open a PR______________________________________________________________________
许可证
______________________________________________________________________
链接
- 网站: path402.com
- 白皮书: path402.com/白皮书
- 交换: path402.com/exchange
- 文档: path402.com/docs
- GitHub:
______________________________________________________________________
支持
- 问题:
- 电子邮件: hello@b0ase.com
- 推特:@b0ase
