@helm-protocol/ttt-mcp 0.1.6 → 0.1.8

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/dist/telemetry.js CHANGED
@@ -1,45 +1,59 @@
1
1
  "use strict";
2
- // @helm-protocol/ttt-mcp — Anonymous telemetry counter
3
- // Increments a simple counter on each tool call. Fire-and-forget, never blocks.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.telemetryIncrement = telemetryIncrement;
6
- exports.getTelemetryCounts = getTelemetryCounts;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var telemetry_exports = {};
20
+ __export(telemetry_exports, {
21
+ getTelemetryCounts: () => getTelemetryCounts,
22
+ telemetryIncrement: () => telemetryIncrement
23
+ });
24
+ module.exports = __toCommonJS(telemetry_exports);
7
25
  const counters = {};
8
26
  const TELEMETRY_ENDPOINT = "https://api.studio.thegraph.com/query/1744392/openttt-base-sepolia/v0.1.0";
9
- /**
10
- * Increment an anonymous tool-call counter.
11
- * Posts to subgraph endpoint as a best-effort ping. Never throws.
12
- */
13
27
  function telemetryIncrement(toolName) {
14
- counters[toolName] = (counters[toolName] ?? 0) + 1;
15
- // Fire-and-forget POST — no await, no error propagation
16
- try {
17
- const body = JSON.stringify({
18
- query: `{ _meta { block { number } } }`,
19
- extensions: {
20
- telemetry: {
21
- tool: toolName,
22
- count: counters[toolName],
23
- ts: Date.now(),
24
- pkg: "@helm-protocol/ttt-mcp",
25
- v: "0.1.0",
26
- },
27
- },
28
- });
29
- fetch(TELEMETRY_ENDPOINT, {
30
- method: "POST",
31
- headers: { "Content-Type": "application/json" },
32
- body,
33
- signal: AbortSignal.timeout(3000),
34
- }).catch(() => {
35
- // silently ignore — telemetry is best-effort
36
- });
37
- }
38
- catch {
39
- // never block the tool call
40
- }
28
+ counters[toolName] = (counters[toolName] ?? 0) + 1;
29
+ try {
30
+ const body = JSON.stringify({
31
+ query: `{ _meta { block { number } } }`,
32
+ extensions: {
33
+ telemetry: {
34
+ tool: toolName,
35
+ count: counters[toolName],
36
+ ts: Date.now(),
37
+ pkg: "@helm-protocol/ttt-mcp",
38
+ v: "0.1.0"
39
+ }
40
+ }
41
+ });
42
+ fetch(TELEMETRY_ENDPOINT, {
43
+ method: "POST",
44
+ headers: { "Content-Type": "application/json" },
45
+ body,
46
+ signal: AbortSignal.timeout(3e3)
47
+ }).catch(() => {
48
+ });
49
+ } catch {
50
+ }
41
51
  }
42
- /** Get current session counters (for debugging) */
43
52
  function getTelemetryCounts() {
44
- return { ...counters };
53
+ return { ...counters };
45
54
  }
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ getTelemetryCounts,
58
+ telemetryIncrement
59
+ });
package/dist/tools.js CHANGED
@@ -1,114 +1,118 @@
1
1
  "use strict";
2
- // @helm-protocol/ttt-mcp — Tool implementations for Proof of Time MCP Server
3
- // Uses OpenTTT SDK: TimeSynthesis, IntegrityPipeline, PotSigner, AdaptiveSwitch
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.potGenerate = potGenerate;
6
- exports.potVerify = potVerify;
7
- exports.potQuery = potQuery;
8
- exports.potStats = potStats;
9
- exports.potHealth = potHealth;
10
- const openttt_1 = require("openttt");
11
- const telemetry_1 = require("./telemetry");
12
- // ---------- Shared Instances ----------
13
- const timeSynth = new openttt_1.TimeSynthesis();
14
- const adaptiveSwitch = new openttt_1.AdaptiveSwitch();
15
- const potSigner = new openttt_1.PotSigner(); // ephemeral Ed25519 keypair per server session
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var tools_exports = {};
20
+ __export(tools_exports, {
21
+ potGenerate: () => potGenerate,
22
+ potHealth: () => potHealth,
23
+ potQuery: () => potQuery,
24
+ potStats: () => potStats,
25
+ potVerify: () => potVerify
26
+ });
27
+ module.exports = __toCommonJS(tools_exports);
28
+ var import_openttt = require("openttt");
29
+ var import_adaptive_switch = require("openttt/dist/adaptive_switch");
30
+ var import_grg_pipeline = require("openttt/dist/grg_pipeline");
31
+ var import_telemetry = require("./telemetry");
32
+ const timeSynth = new import_openttt.TimeSynthesis();
33
+ const adaptiveSwitch = new import_adaptive_switch.AdaptiveSwitch();
34
+ const potSigner = new import_openttt.PotSigner();
16
35
  const startedAt = Date.now();
17
- // In-memory PoT anchor log (bounded ring buffer)
18
- const POT_LOG_MAX = 10000;
36
+ const POT_LOG_MAX = 1e4;
19
37
  const potLog = [];
20
- // ---------- Helpers ----------
21
38
  function bigintReplacer(_key, value) {
22
- return typeof value === "bigint" ? value.toString() : value;
39
+ return typeof value === "bigint" ? value.toString() : value;
23
40
  }
24
41
  function serialize(obj) {
25
- return JSON.parse(JSON.stringify(obj, bigintReplacer));
42
+ return JSON.parse(JSON.stringify(obj, bigintReplacer));
26
43
  }
27
44
  const SUBGRAPH_URL = "https://api.studio.thegraph.com/query/1744392/openttt-base-sepolia/v0.1.0";
28
- // ---------- Tool: pot_generate ----------
29
45
  async function potGenerate(args) {
30
- (0, telemetry_1.telemetryIncrement)("pot_generate");
31
- // 1. Synthesize time from multiple NTP/HTTPS sources
32
- const pot = await timeSynth.generateProofOfTime();
33
- const potHash = openttt_1.TimeSynthesis.getOnChainHash(pot);
34
- // 2. GRG pipeline — encode tx data into integrity shards (black box)
35
- const txData = new TextEncoder().encode(args.txHash);
36
- const grgShards = openttt_1.GrgPipeline.processForward(txData, args.chainId, args.poolAddress);
37
- // 3. Ed25519 sign the PoT hash for non-repudiation
38
- const signature = potSigner.signPot(potHash);
39
- // 4. Log the anchor
40
- const entry = {
41
- potHash,
42
- timestamp: pot.timestamp.toString(),
43
- stratum: pot.stratum,
44
- mode: adaptiveSwitch.getCurrentMode(),
45
- chainId: args.chainId,
46
- poolAddress: args.poolAddress,
47
- createdAt: Date.now(),
48
- };
49
- potLog.push(entry);
50
- if (potLog.length > POT_LOG_MAX)
51
- potLog.shift();
52
- return serialize({
53
- potHash,
54
- timestamp: pot.timestamp.toString(),
55
- stratum: pot.stratum,
56
- uncertainty: pot.uncertainty,
57
- confidence: pot.confidence,
58
- sources: pot.sources,
59
- nonce: pot.nonce,
60
- expiresAt: pot.expiresAt.toString(),
61
- grgShards: grgShards.map((s) => Buffer.from(s).toString("hex")),
62
- signature: {
63
- issuerPubKey: signature.issuerPubKey,
64
- signature: signature.signature,
65
- issuedAt: signature.issuedAt.toString(),
66
- },
67
- });
46
+ (0, import_telemetry.telemetryIncrement)("pot_generate");
47
+ const pot = await timeSynth.generateProofOfTime();
48
+ const potHash = import_openttt.TimeSynthesis.getOnChainHash(pot);
49
+ const txData = new TextEncoder().encode(args.txHash);
50
+ const grgShards = import_grg_pipeline.GrgPipeline.processForward(txData, args.chainId, args.poolAddress);
51
+ const signature = potSigner.signPot(potHash);
52
+ const entry = {
53
+ potHash,
54
+ timestamp: pot.timestamp.toString(),
55
+ stratum: pot.stratum,
56
+ mode: adaptiveSwitch.getCurrentMode(),
57
+ chainId: args.chainId,
58
+ poolAddress: args.poolAddress,
59
+ createdAt: Date.now()
60
+ };
61
+ potLog.push(entry);
62
+ if (potLog.length > POT_LOG_MAX) potLog.shift();
63
+ return serialize({
64
+ potHash,
65
+ timestamp: pot.timestamp.toString(),
66
+ stratum: pot.stratum,
67
+ uncertainty: pot.uncertainty,
68
+ confidence: pot.confidence,
69
+ sources: pot.sources,
70
+ nonce: pot.nonce,
71
+ expiresAt: pot.expiresAt.toString(),
72
+ grgShards: grgShards.map((s) => Buffer.from(s).toString("hex")),
73
+ signature: {
74
+ issuerPubKey: signature.issuerPubKey,
75
+ signature: signature.signature,
76
+ issuedAt: signature.issuedAt.toString()
77
+ }
78
+ });
68
79
  }
69
- // ---------- Tool: pot_verify ----------
70
80
  async function potVerify(args) {
71
- (0, telemetry_1.telemetryIncrement)("pot_verify");
72
- const shards = args.grgShards.map((hex) => new Uint8Array(Buffer.from(hex, "hex")));
73
- let valid = false;
74
- let reconstructedSize = 0;
75
- try {
76
- const recovered = openttt_1.GrgPipeline.processInverse(shards, 0, args.chainId, args.poolAddress);
77
- valid = recovered.length > 0;
78
- reconstructedSize = recovered.length;
79
- }
80
- catch {
81
- valid = false;
82
- }
83
- const mode = adaptiveSwitch.getCurrentMode() === openttt_1.AdaptiveMode.TURBO ? "turbo" : "full";
84
- return serialize({
85
- valid,
86
- mode,
87
- potHash: args.potHash,
88
- reconstructedBytes: reconstructedSize,
89
- verifiedAt: Date.now(),
90
- });
81
+ (0, import_telemetry.telemetryIncrement)("pot_verify");
82
+ const shards = args.grgShards.map((hex) => new Uint8Array(Buffer.from(hex, "hex")));
83
+ let valid = false;
84
+ let reconstructedSize = 0;
85
+ try {
86
+ const recovered = import_grg_pipeline.GrgPipeline.processInverse(shards, 0, args.chainId, args.poolAddress);
87
+ valid = recovered.length > 0;
88
+ reconstructedSize = recovered.length;
89
+ } catch {
90
+ valid = false;
91
+ }
92
+ const mode = adaptiveSwitch.getCurrentMode() === import_adaptive_switch.AdaptiveMode.TURBO ? "turbo" : "full";
93
+ return serialize({
94
+ valid,
95
+ mode,
96
+ potHash: args.potHash,
97
+ reconstructedBytes: reconstructedSize,
98
+ verifiedAt: Date.now()
99
+ });
91
100
  }
92
- // ---------- Tool: pot_query ----------
93
101
  async function potQuery(args) {
94
- (0, telemetry_1.telemetryIncrement)("pot_query");
95
- const limit = Math.min(args.limit ?? 100, 1000);
96
- const now = Date.now();
97
- const startTime = args.startTime ?? now - 86400_000;
98
- const endTime = args.endTime ?? now;
99
- // Filter from in-memory log
100
- const filtered = potLog
101
- .filter((e) => e.createdAt >= startTime && e.createdAt <= endTime)
102
- .slice(-limit);
103
- // Best-effort subgraph query
104
- let subgraphEntries = [];
105
- try {
106
- const query = `{
102
+ (0, import_telemetry.telemetryIncrement)("pot_query");
103
+ const limit = Math.min(args.limit ?? 100, 1e3);
104
+ const now = Date.now();
105
+ const startTime = args.startTime ?? now - 864e5;
106
+ const endTime = args.endTime ?? now;
107
+ const filtered = potLog.filter((e) => e.createdAt >= startTime && e.createdAt <= endTime).slice(-limit);
108
+ let subgraphEntries = [];
109
+ try {
110
+ const query = `{
107
111
  potAnchors(
108
112
  first: ${limit},
109
113
  orderBy: blockTimestamp,
110
114
  orderDirection: desc,
111
- where: { blockTimestamp_gte: "${Math.floor(startTime / 1000)}", blockTimestamp_lte: "${Math.floor(endTime / 1000)}" }
115
+ where: { blockTimestamp_gte: "${Math.floor(startTime / 1e3)}", blockTimestamp_lte: "${Math.floor(endTime / 1e3)}" }
112
116
  ) {
113
117
  id
114
118
  potHash
@@ -116,110 +120,113 @@ async function potQuery(args) {
116
120
  txHash
117
121
  }
118
122
  }`;
119
- const controller = new AbortController();
120
- const timeout = setTimeout(() => controller.abort(), 5000);
121
- const resp = await fetch(SUBGRAPH_URL, {
122
- method: "POST",
123
- headers: { "Content-Type": "application/json" },
124
- body: JSON.stringify({ query }),
125
- signal: controller.signal,
126
- });
127
- clearTimeout(timeout);
128
- if (resp.ok) {
129
- const json = (await resp.json());
130
- subgraphEntries = json.data?.potAnchors ?? [];
131
- }
132
- }
133
- catch {
134
- // Subgraph unavailable — local log still returned
135
- }
136
- return serialize({
137
- local: filtered,
138
- subgraph: subgraphEntries,
139
- totalLocal: potLog.length,
140
- query: { startTime, endTime, limit },
123
+ const controller = new AbortController();
124
+ const timeout = setTimeout(() => controller.abort(), 5e3);
125
+ const resp = await fetch(SUBGRAPH_URL, {
126
+ method: "POST",
127
+ headers: { "Content-Type": "application/json" },
128
+ body: JSON.stringify({ query }),
129
+ signal: controller.signal
141
130
  });
131
+ clearTimeout(timeout);
132
+ if (resp.ok) {
133
+ const json = await resp.json();
134
+ subgraphEntries = json.data?.potAnchors ?? [];
135
+ }
136
+ } catch {
137
+ }
138
+ return serialize({
139
+ local: filtered,
140
+ subgraph: subgraphEntries,
141
+ totalLocal: potLog.length,
142
+ query: { startTime, endTime, limit }
143
+ });
142
144
  }
143
- // ---------- Tool: pot_stats ----------
144
145
  async function potStats(args) {
145
- (0, telemetry_1.telemetryIncrement)("pot_stats");
146
- const now = Date.now();
147
- const periodMs = {
148
- day: 86400_000,
149
- week: 604800_000,
150
- month: 2592000_000,
151
- };
152
- const cutoff = now - (periodMs[args.period] ?? periodMs.day);
153
- const entries = potLog.filter((e) => e.createdAt >= cutoff);
154
- const turboCount = entries.filter((e) => e.mode === openttt_1.AdaptiveMode.TURBO).length;
155
- const fullCount = entries.filter((e) => e.mode === openttt_1.AdaptiveMode.FULL).length;
156
- const totalSwaps = entries.length;
157
- return serialize({
158
- period: args.period,
159
- totalSwaps,
160
- turboCount,
161
- fullCount,
162
- turboRatio: totalSwaps > 0 ? +(turboCount / totalSwaps).toFixed(4) : 0,
163
- currentMode: adaptiveSwitch.getCurrentMode(),
164
- windowStart: new Date(cutoff).toISOString(),
165
- windowEnd: new Date(now).toISOString(),
166
- });
146
+ (0, import_telemetry.telemetryIncrement)("pot_stats");
147
+ const now = Date.now();
148
+ const periodMs = {
149
+ day: 864e5,
150
+ week: 6048e5,
151
+ month: 2592e6
152
+ };
153
+ const cutoff = now - (periodMs[args.period] ?? periodMs.day);
154
+ const entries = potLog.filter((e) => e.createdAt >= cutoff);
155
+ const turboCount = entries.filter((e) => e.mode === import_adaptive_switch.AdaptiveMode.TURBO).length;
156
+ const fullCount = entries.filter((e) => e.mode === import_adaptive_switch.AdaptiveMode.FULL).length;
157
+ const totalSwaps = entries.length;
158
+ return serialize({
159
+ period: args.period,
160
+ totalSwaps,
161
+ turboCount,
162
+ fullCount,
163
+ turboRatio: totalSwaps > 0 ? +(turboCount / totalSwaps).toFixed(4) : 0,
164
+ currentMode: adaptiveSwitch.getCurrentMode(),
165
+ windowStart: new Date(cutoff).toISOString(),
166
+ windowEnd: new Date(now).toISOString()
167
+ });
167
168
  }
168
- // ---------- Tool: pot_health ----------
169
169
  async function potHealth() {
170
- (0, telemetry_1.telemetryIncrement)("pot_health");
171
- let timeStatus = "unknown";
172
- let synthSources = 0;
173
- try {
174
- const synth = await Promise.race([
175
- timeSynth.synthesize(),
176
- new Promise((_, reject) => setTimeout(() => reject(new Error("timeout")), 5000)),
177
- ]);
178
- if (synth && synth.sources >= 2) {
179
- timeStatus = "healthy";
180
- synthSources = synth.sources;
181
- }
182
- else {
183
- timeStatus = "degraded";
184
- synthSources = synth?.sources ?? 0;
185
- }
170
+ (0, import_telemetry.telemetryIncrement)("pot_health");
171
+ let timeStatus = "unknown";
172
+ let synthSources = 0;
173
+ try {
174
+ const synth = await Promise.race([
175
+ timeSynth.synthesize(),
176
+ new Promise(
177
+ (_, reject) => setTimeout(() => reject(new Error("timeout")), 5e3)
178
+ )
179
+ ]);
180
+ if (synth && synth.sources >= 2) {
181
+ timeStatus = "healthy";
182
+ synthSources = synth.sources;
183
+ } else {
184
+ timeStatus = "degraded";
185
+ synthSources = synth?.sources ?? 0;
186
186
  }
187
- catch {
188
- timeStatus = "unhealthy";
189
- }
190
- let latestBlock = 0;
191
- let syncStatus = "unknown";
192
- try {
193
- const query = `{ _meta { block { number } hasIndexingErrors } }`;
194
- const controller = new AbortController();
195
- const timeout = setTimeout(() => controller.abort(), 5000);
196
- const resp = await fetch(SUBGRAPH_URL, {
197
- method: "POST",
198
- headers: { "Content-Type": "application/json" },
199
- body: JSON.stringify({ query }),
200
- signal: controller.signal,
201
- });
202
- clearTimeout(timeout);
203
- if (resp.ok) {
204
- const json = (await resp.json());
205
- latestBlock = json.data?._meta?.block?.number ?? 0;
206
- syncStatus = json.data?._meta?.hasIndexingErrors ? "indexing_errors" : "synced";
207
- }
187
+ } catch {
188
+ timeStatus = "unhealthy";
189
+ }
190
+ let latestBlock = 0;
191
+ let syncStatus = "unknown";
192
+ try {
193
+ const query = `{ _meta { block { number } hasIndexingErrors } }`;
194
+ const controller = new AbortController();
195
+ const timeout = setTimeout(() => controller.abort(), 5e3);
196
+ const resp = await fetch(SUBGRAPH_URL, {
197
+ method: "POST",
198
+ headers: { "Content-Type": "application/json" },
199
+ body: JSON.stringify({ query }),
200
+ signal: controller.signal
201
+ });
202
+ clearTimeout(timeout);
203
+ if (resp.ok) {
204
+ const json = await resp.json();
205
+ latestBlock = json.data?._meta?.block?.number ?? 0;
206
+ syncStatus = json.data?._meta?.hasIndexingErrors ? "indexing_errors" : "synced";
208
207
  }
209
- catch {
210
- syncStatus = "unreachable";
208
+ } catch {
209
+ syncStatus = "unreachable";
210
+ }
211
+ const uptimeMs = Date.now() - startedAt;
212
+ return serialize({
213
+ status: timeStatus === "healthy" ? "ok" : timeStatus,
214
+ timeSources: { status: timeStatus, activeSources: synthSources },
215
+ subgraph: { latestBlock, syncStatus },
216
+ server: {
217
+ uptime: uptimeMs,
218
+ uptimeHuman: `${(uptimeMs / 36e5).toFixed(1)}h`,
219
+ potCount: potLog.length,
220
+ currentMode: adaptiveSwitch.getCurrentMode(),
221
+ signerPubKey: potSigner.getPubKeyHex()
211
222
  }
212
- const uptimeMs = Date.now() - startedAt;
213
- return serialize({
214
- status: timeStatus === "healthy" ? "ok" : timeStatus,
215
- timeSources: { status: timeStatus, activeSources: synthSources },
216
- subgraph: { latestBlock, syncStatus },
217
- server: {
218
- uptime: uptimeMs,
219
- uptimeHuman: `${(uptimeMs / 3600000).toFixed(1)}h`,
220
- potCount: potLog.length,
221
- currentMode: adaptiveSwitch.getCurrentMode(),
222
- signerPubKey: potSigner.getPubKeyHex(),
223
- },
224
- });
223
+ });
225
224
  }
225
+ // Annotate the CommonJS export names for ESM import in node:
226
+ 0 && (module.exports = {
227
+ potGenerate,
228
+ potHealth,
229
+ potQuery,
230
+ potStats,
231
+ potVerify
232
+ });
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@helm-protocol/ttt-mcp",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "MCP Server for OpenTTT — Proof of Time tools for AI agents",
5
5
  "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
6
  "bin": {
8
7
  "ttt-mcp": "./dist/index.js"
9
8
  },
@@ -12,7 +11,7 @@
12
11
  "README.md"
13
12
  ],
14
13
  "scripts": {
15
- "build": "tsc",
14
+ "build": "esbuild index.ts --bundle --platform=node --target=node18 --format=cjs --outfile=dist/index.js --external:@aws-sdk/client-kms --external:@turnkey/ethers --external:@turnkey/api-key-stamper --external:@google-cloud/kms --external:openttt",
16
15
  "start": "node dist/index.js",
17
16
  "dev": "npx ts-node index.ts"
18
17
  },
@@ -37,11 +36,12 @@
37
36
  },
38
37
  "dependencies": {
39
38
  "@modelcontextprotocol/sdk": "^1.12.1",
40
- "openttt": "^0.1.3",
39
+ "openttt": "^0.2.9",
41
40
  "zod": "^3.25.0"
42
41
  },
43
42
  "devDependencies": {
44
43
  "@types/node": "^20.11.19",
44
+ "esbuild": "^0.27.4",
45
45
  "typescript": "^5.3.3"
46
46
  },
47
47
  "mcpName": "io.github.Helm-Protocol/openttt-pot"
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * Increment an anonymous tool-call counter.
3
- * Posts to subgraph endpoint as a best-effort ping. Never throws.
4
- */
5
- export declare function telemetryIncrement(toolName: string): void;
6
- /** Get current session counters (for debugging) */
7
- export declare function getTelemetryCounts(): Record<string, number>;
package/dist/tools.d.ts DELETED
@@ -1,20 +0,0 @@
1
- export declare function potGenerate(args: {
2
- txHash: string;
3
- chainId: number;
4
- poolAddress: string;
5
- }): Promise<unknown>;
6
- export declare function potVerify(args: {
7
- potHash: string;
8
- grgShards: string[];
9
- chainId: number;
10
- poolAddress: string;
11
- }): Promise<unknown>;
12
- export declare function potQuery(args: {
13
- startTime?: number;
14
- endTime?: number;
15
- limit?: number;
16
- }): Promise<unknown>;
17
- export declare function potStats(args: {
18
- period: "day" | "week" | "month";
19
- }): Promise<unknown>;
20
- export declare function potHealth(): Promise<unknown>;