@helm协议/ttt-mcp
参考实施 健康协议草案-tttps-00 (IETF实验)
OpenTTT的MCP服务器——AI代理的时间证明工具
AI代理A和代理B同时触发付款。 谁是第一个? OpenTTT用加密的时间证明来回答这个问题——从 通过GRG完整性分片验证的多个独立时间源, 并与Ed25519签署了不可否认性协议。
快速开始
npm install @helm-protocol/ttt-mcp// claude_desktop_config.json
{
"mcpServers": {
"ttt": {
"command": "npx",
"args": ["@helm-protocol/ttt-mcp"]
}
}
}就是这样。你的AI代理现在可以访问5个时间证明工具。
工具
| 工具 | 说明 |
|---|---|
pot_generate | 为交易生成时间证明 |
pot_verify | 使用哈希值和GRG分片验证时间证明 |
pot_query | 从本地日志和链上子图查询PoT历史 |
pot_stats | 获取一段时间内的涡轮/全模式统计数据 |
pot_health | 检查系统健康状况:时间源、子图同步、正常运行时间 |
工具参数
pot_generate
为交易生成时间证明。返回potHash、时间戳、stratum和GRG完整性分片。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| txHash | string | Yes | 事务哈希(前缀为0x的十六进制) |
| chainId | 编号 | 是 | 链ID(例如,8453代表Base,84532代表Base Sepolia) |
| poolAddress | string | Yes | DEX池合约地址 |
pot_verify
使用哈希值和GRG分片验证时间证明。返回有效性、模式(turbo/full)和时间戳。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| potHash | string | Yes | 要验证的PoT哈希(前缀为0x的十六进制) |
| grgShards | string\[\] | Yes | 十六进制编码的GRG完整性分片数组 |
| chainId | 编号 | 是 | EVM链ID(例如,对于Base Sepolia为84532) |
| poolAddress | string | Yes | Uniswap V4池地址(前缀0x) |
pot_query
从本地日志和链上子图查询时间历史证明。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| startTime | number | No | 开始时间(unix毫秒)。默认值:24小时前 |
| endTime | number | No | 结束时间(unix毫秒)。默认值:现在 |
| limit | number | No | 要返回的最大条目数。默认值:100,最大值:1000 |
pot_stats
获取PoT统计数据:给定时间段内的总交换、涡轮/满计数和涡轮比。
| 参数 | 类型 | 必填 | 说明 | ||
|---|---|---|---|---|---|
| 期间 | "day" | "week" | "month" | 是 | 统计时间段 |
pot_健康
检查PoT系统健康状况:时间源状态、子图同步、服务器正常运行时间和当前模式。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| *(无)* | -- | -- | 此工具不接受任何参数 |
示例:生成并验证PoT
// In your AI agent's tool call:
const pot = await pot_generate({
txHash: "0xabc123...",
chainId: 84532,
poolAddress: "0xdef456..."
});
// pot.potHash — unique Proof of Time hash
// pot.grgShards — GRG integrity shards for verification
// pot.timestamp — synthesized nanosecond timestamp
// pot.mode — "turbo" (honest) or "full" (requires full verification)
const verification = await pot_verify({
potHash: pot.potHash,
grgShards: pot.grgShards
});
// verification.valid — true if integrity shards reconstruct correctly运作原理
- 时间综合 --通过HTTPS/NTP查询多个独立的时间源(NIST、谷歌、Cloudflare),并合成具有不确定性边界的中值时间戳
- GRG管道 --通过多层完整性管道对事务数据进行编码,生成可验证的分片
- Ed25519签署 --签署PoT哈希以实现不可否认性
- 自适应模式 --诚实的建设者得到
turbo模式(快速、盈利);篡改序列full模式(缓慢、昂贵)——自然经济选择
Claude桌面配置
添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"ttt": {
"command": "npx",
"args": ["@helm-protocol/ttt-mcp"]
}
}
}配置文件位置:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - 视窗:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
需求
- Node.js>=18
- 时间合成的网络访问(HTTPS到time.nist.gov、time.google.com、time.cloudflare.com)
了解更多
- OpenTTT SDK --底层SDK
- IETF草案:Draft-helmprotocol-tttps-00 --TTTPS协议规范
- Helm协议 --GitHub
许可证
麻省理工学院
