@helm-protocol/ttt-mcp 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @helm-protocol/ttt-mcp
2
2
 
3
+ > Reference implementation of [draft-helmprotocol-tttps-00](https://datatracker.ietf.org/doc/draft-helmprotocol-tttps/) (IETF Experimental)
4
+
3
5
  **MCP Server for OpenTTT — Proof of Time tools for AI agents**
4
6
 
5
7
  > AI Agent A and Agent B both trigger a payment at the same time.
@@ -39,6 +41,55 @@ That's it. Your AI agent now has access to 5 Proof of Time tools.
39
41
  | `pot_stats` | Get turbo/full mode statistics for a time period |
40
42
  | `pot_health` | Check system health: time sources, subgraph sync, uptime |
41
43
 
44
+ ## Tool Parameters
45
+
46
+ ### pot_generate
47
+
48
+ Generate a Proof of Time for a transaction. Returns potHash, timestamp, stratum, and GRG integrity shards.
49
+
50
+ | Parameter | Type | Required | Description |
51
+ |-----------|------|----------|-------------|
52
+ | txHash | string | Yes | Transaction hash (hex with 0x prefix) |
53
+ | chainId | number | Yes | Chain ID (e.g. 8453 for Base, 84532 for Base Sepolia) |
54
+ | poolAddress | string | Yes | DEX pool contract address |
55
+
56
+ ### pot_verify
57
+
58
+ Verify a Proof of Time using its hash and GRG shards. Returns validity, mode (turbo/full), and timestamp.
59
+
60
+ | Parameter | Type | Required | Description |
61
+ |-----------|------|----------|-------------|
62
+ | potHash | string | Yes | PoT hash to verify (hex with 0x prefix) |
63
+ | grgShards | string[] | Yes | Array of hex-encoded GRG integrity shards |
64
+ | chainId | number | Yes | EVM chain ID (e.g. 84532 for Base Sepolia) |
65
+ | poolAddress | string | Yes | Uniswap V4 pool address (0x-prefixed) |
66
+
67
+ ### pot_query
68
+
69
+ Query Proof of Time history from local log and on-chain subgraph.
70
+
71
+ | Parameter | Type | Required | Description |
72
+ |-----------|------|----------|-------------|
73
+ | startTime | number | No | Start time (unix ms). Default: 24h ago |
74
+ | endTime | number | No | End time (unix ms). Default: now |
75
+ | limit | number | No | Max entries to return. Default: 100, max: 1000 |
76
+
77
+ ### pot_stats
78
+
79
+ Get PoT statistics: total swaps, turbo/full counts, and turbo ratio for a given period.
80
+
81
+ | Parameter | Type | Required | Description |
82
+ |-----------|------|----------|-------------|
83
+ | period | `"day"` \| `"week"` \| `"month"` | Yes | Time period for statistics |
84
+
85
+ ### pot_health
86
+
87
+ Check PoT system health: time source status, subgraph sync, server uptime, and current mode.
88
+
89
+ | Parameter | Type | Required | Description |
90
+ |-----------|------|----------|-------------|
91
+ | *(none)* | — | — | This tool takes no parameters |
92
+
42
93
  ## Example: Generate and Verify a PoT
43
94
 
44
95
  ```typescript
package/dist/index.js CHANGED
@@ -35,6 +35,8 @@ server.tool("pot_generate", "Generate a Proof of Time for a transaction. Returns
35
35
  server.tool("pot_verify", "Verify a Proof of Time using its hash and GRG shards. Returns validity, mode (turbo/full), and timestamp.", {
36
36
  potHash: zod_1.z.string().describe("PoT hash to verify (hex with 0x prefix)"),
37
37
  grgShards: zod_1.z.array(zod_1.z.string()).describe("Array of hex-encoded GRG integrity shards"),
38
+ chainId: zod_1.z.number().describe("EVM chain ID (e.g. 84532 for Base Sepolia)"),
39
+ poolAddress: zod_1.z.string().describe("Uniswap V4 pool address (0x-prefixed)"),
38
40
  }, async (args) => {
39
41
  try {
40
42
  const result = await (0, tools_1.potVerify)(args);
package/dist/tools.d.ts CHANGED
@@ -6,6 +6,8 @@ export declare function potGenerate(args: {
6
6
  export declare function potVerify(args: {
7
7
  potHash: string;
8
8
  grgShards: string[];
9
+ chainId: number;
10
+ poolAddress: string;
9
11
  }): Promise<unknown>;
10
12
  export declare function potQuery(args: {
11
13
  startTime?: number;
package/dist/tools.js CHANGED
@@ -33,7 +33,7 @@ async function potGenerate(args) {
33
33
  const potHash = openttt_1.TimeSynthesis.getOnChainHash(pot);
34
34
  // 2. GRG pipeline — encode tx data into integrity shards (black box)
35
35
  const txData = new TextEncoder().encode(args.txHash);
36
- const grgShards = openttt_1.GrgPipeline.processForward(txData);
36
+ const grgShards = openttt_1.GrgPipeline.processForward(txData, args.chainId, args.poolAddress);
37
37
  // 3. Ed25519 sign the PoT hash for non-repudiation
38
38
  const signature = potSigner.signPot(potHash);
39
39
  // 4. Log the anchor
@@ -73,7 +73,7 @@ async function potVerify(args) {
73
73
  let valid = false;
74
74
  let reconstructedSize = 0;
75
75
  try {
76
- const recovered = openttt_1.GrgPipeline.processInverse(shards, 0);
76
+ const recovered = openttt_1.GrgPipeline.processInverse(shards, 0, args.chainId, args.poolAddress);
77
77
  valid = recovered.length > 0;
78
78
  reconstructedSize = recovered.length;
79
79
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helm-protocol/ttt-mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "MCP Server for OpenTTT — Proof of Time tools for AI agents",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,17 +29,19 @@
29
29
  "license": "MIT",
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "https://github.com/Helm-Protocol/OpenTTT"
32
+ "url": "https://github.com/Helm-Protocol/OpenTTT",
33
+ "directory": "mcp"
33
34
  },
35
+ "homepage": "https://github.com/Helm-Protocol/OpenTTT/tree/main/mcp#readme",
34
36
  "engines": {
35
37
  "node": ">=18"
36
38
  },
37
39
  "dependencies": {
38
40
  "@modelcontextprotocol/sdk": "^1.12.1",
39
- "openttt": "^0.1.2"
41
+ "openttt": "^0.1.3"
40
42
  },
41
43
  "devDependencies": {
42
- "typescript": "^5.3.3",
43
- "@types/node": "^20.11.19"
44
+ "@types/node": "^20.11.19",
45
+ "typescript": "^5.3.3"
44
46
  }
45
47
  }