liqproof 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +536 -2
- package/bugs/README.md +144 -0
- package/bugs/coin-gecko-liquidity-report.md +283 -0
- package/bugs/collect-ds-aggregate.mjs +213 -0
- package/bugs/collect-evidence.mjs +458 -0
- package/bugs/collect-gt-aggregate.mjs +215 -0
- package/bugs/collect-raw-rpc.mjs +165 -0
- package/bugs/collect-sweep-context.mjs +162 -0
- package/bugs/dexscreener-fake-liquidity-report.md +310 -0
- package/bugs/evidence/aggregator-liquidity-claims.json +648 -0
- package/bugs/evidence/aggregator-liquidity-claims.md +103 -0
- package/bugs/evidence/bat-native-pool-drained.json +136 -0
- package/bugs/evidence/bat-native-pool-drained.md +51 -0
- package/bugs/evidence/chz-impersonator-pool-drained.json +136 -0
- package/bugs/evidence/chz-impersonator-pool-drained.md +51 -0
- package/bugs/evidence/gt-stale-reserve-after-drain.json +141 -0
- package/bugs/evidence/gt-stale-reserve-after-drain.md +31 -0
- package/bugs/evidence/raw-rpc-transcript.json +683 -0
- package/bugs/evidence/raw-rpc-transcript.md +308 -0
- package/bugs/evidence/sweep-context.json +325 -0
- package/bugs/evidence/sweep-context.md +55 -0
- package/bugs/evidence/verified-aggregate.json +526 -0
- package/bugs/evidence/verified-aggregate.md +24 -0
- package/bugs/evidence/verified-ds-liquidity-usd.json +1197 -0
- package/bugs/evidence/verified-ds-liquidity-usd.md +250 -0
- package/bugs/evidence/verified-gt-reserve-in-usd.json +1002 -0
- package/bugs/evidence/verified-gt-reserve-in-usd.md +218 -0
- package/bugs/fix-bundle-titles.mjs +72 -0
- package/bugs/geckoterminal-stale-reserve-after-drain.md +137 -0
- package/data/dataset-summary.md +103 -0
- package/data/impersonators.json +12888 -0
- package/data/verified-impersonators.json +725 -0
- package/data/wallets.json +23 -0
- package/dist/base58.js +70 -0
- package/dist/base58.js.map +1 -0
- package/dist/canonical.js +372 -0
- package/dist/canonical.js.map +1 -0
- package/dist/cli.js +830 -0
- package/dist/cli.js.map +1 -0
- package/dist/curve.js +255 -0
- package/dist/curve.js.map +1 -0
- package/dist/dashboard.js +485 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/keccak.js +197 -0
- package/dist/keccak.js.map +1 -0
- package/dist/mcp.js +604 -0
- package/dist/mcp.js.map +1 -0
- package/dist/operator.js +180 -0
- package/dist/operator.js.map +1 -0
- package/dist/pda.js +86 -0
- package/dist/pda.js.map +1 -0
- package/dist/receipt.js +897 -0
- package/dist/receipt.js.map +1 -0
- package/dist/render.js +335 -0
- package/dist/render.js.map +1 -0
- package/dist/rpc.js +377 -0
- package/dist/rpc.js.map +1 -0
- package/dist/sources.js +599 -0
- package/dist/sources.js.map +1 -0
- package/dist/store.js +330 -0
- package/dist/store.js.map +1 -0
- package/dist/tokenmeta.js +424 -0
- package/dist/tokenmeta.js.map +1 -0
- package/dist/util.js +273 -0
- package/dist/util.js.map +1 -0
- package/dist/vaults.js +510 -0
- package/dist/vaults.js.map +1 -0
- package/dist/wallet.js +404 -0
- package/dist/wallet.js.map +1 -0
- package/dist/warnings.js +41 -0
- package/dist/warnings.js.map +1 -0
- package/dist/worker.js +857 -0
- package/dist/worker.js.map +1 -0
- package/dist/x402.js +549 -0
- package/dist/x402.js.map +1 -0
- package/docs/HACKATHON-SUBMISSION.md +264 -0
- package/docs/liqproof-plan.md +221 -0
- package/docs/llms.txt +32 -0
- package/docs/mcp-registry.md +165 -0
- package/docs/screenshots/01-dashboard.png +0 -0
- package/docs/screenshots/02-receipt-drained.png +0 -0
- package/docs/screenshots/03-receipt-impersonator.png +0 -0
- package/docs/screenshots/04-receipt-canonical.png +0 -0
- package/docs/x402-pricing.md +171 -0
- package/docs/zero-xyz.md +250 -0
- package/out/6eftxVbSAunVEoxUWdGhPdxg5UdsJ8Wkwy5w5YFuxouw.json +1171 -0
- package/out/6eftxVbSAunVEoxUWdGhPdxg5UdsJ8Wkwy5w5YFuxouw.md +52 -0
- package/out/6eftxVbSAunVEoxUWdGhPdxg5UdsJ8Wkwy5w5YFuxouw.svg +25 -0
- package/out/BTNiaZb6HaEFWeEtND4SXtZ7T6mgtDwSryHTAj6PuPyp.json +3975 -0
- package/out/BTNiaZb6HaEFWeEtND4SXtZ7T6mgtDwSryHTAj6PuPyp.md +90 -0
- package/out/BTNiaZb6HaEFWeEtND4SXtZ7T6mgtDwSryHTAj6PuPyp.svg +25 -0
- package/out/ENGkoidj2jNs73A7GZuseVmnkRg6EVF9tDtViwPz8o85.json +1446 -0
- package/out/ENGkoidj2jNs73A7GZuseVmnkRg6EVF9tDtViwPz8o85.md +66 -0
- package/out/ENGkoidj2jNs73A7GZuseVmnkRg6EVF9tDtViwPz8o85.svg +25 -0
- package/out/dataset.csv +67 -0
- package/out/impersonation-table.md +156 -0
- package/out/index.html +1179 -0
- package/package.json +78 -4
- package/scripts/assert-no-canonical-accusations.mjs +193 -0
- package/scripts/backfill.mjs +1063 -0
- package/scripts/bundle-evidence.mjs +237 -0
- package/scripts/bundle-stale-claim.mjs +417 -0
- package/scripts/capture-bch-evidence.mjs +58 -0
- package/scripts/check-orientation-fix.mjs +40 -0
- package/scripts/check-wallet.mjs +54 -0
- package/scripts/daily-refresh.mjs +451 -0
- package/scripts/decode-clmm-vaults.mjs +180 -0
- package/scripts/falsifiability.mjs +263 -0
- package/scripts/impersonator-mining.mjs +156 -0
- package/scripts/inspect-matches.mjs +73 -0
- package/scripts/operator-sweep.mjs +252 -0
- package/scripts/publish-release.mjs +248 -0
- package/scripts/refresh-store.mjs +78 -0
- package/scripts/survival-miner.mjs +951 -0
- package/scripts/test-keccak.mjs +103 -0
- package/scripts/verify-bch-1p95b.mjs +124 -0
- package/scripts/verify-clmm-1p95b.mjs +127 -0
- package/scripts/verify-clmm-control.mjs +84 -0
- package/scripts/verify-impersonators.mjs +138 -0
- package/scripts/verify-raw.mjs +110 -0
- package/scripts/verify-raw2.mjs +99 -0
- package/server.json +34 -0
- package/src/base58.ts +68 -0
- package/src/canonical.ts +447 -0
- package/src/cli.ts +941 -0
- package/src/curve.ts +349 -0
- package/src/dashboard.ts +504 -0
- package/src/keccak.ts +228 -0
- package/src/mcp.ts +735 -0
- package/src/operator.ts +219 -0
- package/src/receipt.ts +1219 -0
- package/src/render.ts +396 -0
- package/src/rpc.ts +435 -0
- package/src/sources.ts +714 -0
- package/src/store.ts +428 -0
- package/src/tokenmeta.ts +460 -0
- package/src/util.ts +276 -0
- package/src/vaults.ts +574 -0
- package/src/wallet.ts +459 -0
- package/src/warnings.ts +40 -0
- package/src/worker.ts +1086 -0
- package/src/x402.ts +717 -0
package/src/mcp.ts
ADDED
|
@@ -0,0 +1,735 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mcp.ts — a Model Context Protocol server for LIQPROOF, implemented by hand.
|
|
3
|
+
*
|
|
4
|
+
* WHY hand-rolled: the MCP wire format is newline-delimited JSON-RPC 2.0, and
|
|
5
|
+
* the only SDK would become the single npm dependency in this tree. LIQPROOF's
|
|
6
|
+
* whole promise is "$0 budget, zero dependencies", so we speak the protocol
|
|
7
|
+
* directly: no SDK, no registry client, no paid anything.
|
|
8
|
+
*
|
|
9
|
+
* WHAT IT EXPOSES: four read-only tools over the same receipt builder the
|
|
10
|
+
* CLI uses, so an agent gets exactly the evidence a human would see.
|
|
11
|
+
*
|
|
12
|
+
* READ-ONLY BY CONSTRUCTION: every tool only reads public chain state, public
|
|
13
|
+
* HTTP endpoints and the local store. Nothing here can mutate a chain, pay a
|
|
14
|
+
* third party, or require a credential.
|
|
15
|
+
*
|
|
16
|
+
* STDOUT IS A PROTOCOL CHANNEL: stdout carries JSON-RPC messages and nothing
|
|
17
|
+
* else. Every diagnostic goes to stderr.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import './warnings.js';
|
|
21
|
+
import { createInterface } from 'node:readline';
|
|
22
|
+
import { RpcPool } from './rpc.js';
|
|
23
|
+
import { buildReceipt, type Receipt } from './receipt.js';
|
|
24
|
+
import {
|
|
25
|
+
geckoTerminalNewPools,
|
|
26
|
+
geckoTerminalTopPools,
|
|
27
|
+
geckoTerminalTrendingPools,
|
|
28
|
+
isMajorMint,
|
|
29
|
+
type PoolReport,
|
|
30
|
+
} from './sources.js';
|
|
31
|
+
import { Store } from './store.js';
|
|
32
|
+
|
|
33
|
+
export const PROTOCOL_VERSION = '2024-11-05';
|
|
34
|
+
export const SERVER_NAME = 'liqproof';
|
|
35
|
+
export const SERVER_VERSION = '0.1.0';
|
|
36
|
+
|
|
37
|
+
// ── JSON-RPC plumbing ───────────────────────────────────────────────────────
|
|
38
|
+
|
|
39
|
+
export interface JsonRpcRequest {
|
|
40
|
+
jsonrpc?: string;
|
|
41
|
+
id?: string | number | null;
|
|
42
|
+
method?: string;
|
|
43
|
+
params?: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface JsonRpcError {
|
|
47
|
+
code: number;
|
|
48
|
+
message: string;
|
|
49
|
+
data?: unknown;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface JsonRpcResponse {
|
|
53
|
+
jsonrpc: '2.0';
|
|
54
|
+
id: string | number | null;
|
|
55
|
+
result?: unknown;
|
|
56
|
+
error?: JsonRpcError;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const ERR_PARSE = -32700;
|
|
60
|
+
const ERR_INVALID_REQUEST = -32600;
|
|
61
|
+
const ERR_METHOD_NOT_FOUND = -32601;
|
|
62
|
+
const ERR_INVALID_PARAMS = -32602;
|
|
63
|
+
const ERR_INTERNAL = -32603;
|
|
64
|
+
|
|
65
|
+
// ── tool catalogue ──────────────────────────────────────────────────────────
|
|
66
|
+
|
|
67
|
+
export interface JsonSchemaProperty {
|
|
68
|
+
type: 'string' | 'number' | 'integer' | 'boolean';
|
|
69
|
+
description: string;
|
|
70
|
+
default?: unknown;
|
|
71
|
+
minimum?: number;
|
|
72
|
+
maximum?: number;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface JsonSchema {
|
|
76
|
+
type: 'object';
|
|
77
|
+
properties: Record<string, JsonSchemaProperty>;
|
|
78
|
+
required: string[];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface McpToolDefinition {
|
|
82
|
+
name: string;
|
|
83
|
+
description: string;
|
|
84
|
+
inputSchema: JsonSchema;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Exactly four tools. The catalogue is the contract — do not drift from it. */
|
|
88
|
+
export const TOOLS: McpToolDefinition[] = [
|
|
89
|
+
{
|
|
90
|
+
name: 'verify_token',
|
|
91
|
+
description:
|
|
92
|
+
"Verify a Solana token's liquidity against on-chain vault balances. Returns claimed vs deposited USD, deposit coverage, self-denominated liquidity %, price impact, the token's on-chain identity (name/symbol from its own Metaplex metadata account) and whether that mint is the canonical token or an impostor, plus a verdict (FAKE_LIQUIDITY | UNBACKED_LIQUIDITY | NO_DEPTH | DRAINED | THIN | CONSISTENT | NO_ROUTE | UNKNOWN). A canonical token is never reported as fake.",
|
|
93
|
+
inputSchema: {
|
|
94
|
+
type: 'object',
|
|
95
|
+
properties: {
|
|
96
|
+
mint: {
|
|
97
|
+
type: 'string',
|
|
98
|
+
description: 'Solana SPL mint address',
|
|
99
|
+
},
|
|
100
|
+
include_curve: {
|
|
101
|
+
type: 'boolean',
|
|
102
|
+
default: false,
|
|
103
|
+
description: 'Reconstruct the historical liquidity curve (costs more RPC calls)',
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
required: ['mint'],
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'liquidity_timeline',
|
|
111
|
+
description:
|
|
112
|
+
"Reconstruct the historical liquidity curve of a token's pool from on-chain transaction metadata. Returns timestamped deposit/withdrawal events and the peak deposit ever held.",
|
|
113
|
+
inputSchema: {
|
|
114
|
+
type: 'object',
|
|
115
|
+
properties: {
|
|
116
|
+
mint: {
|
|
117
|
+
type: 'string',
|
|
118
|
+
description: 'Solana SPL mint address',
|
|
119
|
+
},
|
|
120
|
+
max_transactions: {
|
|
121
|
+
type: 'integer',
|
|
122
|
+
default: 200,
|
|
123
|
+
minimum: 10,
|
|
124
|
+
maximum: 1000,
|
|
125
|
+
description: 'Maximum number of transactions to inspect',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
required: ['mint'],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'find_fake_liquidity',
|
|
133
|
+
description:
|
|
134
|
+
'Sweep Solana pools that advertise liquidity and return the ones whose claim is not actually deposited on-chain, ranked by how badly the claim overstates the deposit.',
|
|
135
|
+
inputSchema: {
|
|
136
|
+
type: 'object',
|
|
137
|
+
properties: {
|
|
138
|
+
limit: {
|
|
139
|
+
type: 'integer',
|
|
140
|
+
default: 10,
|
|
141
|
+
minimum: 1,
|
|
142
|
+
maximum: 25,
|
|
143
|
+
description: 'Maximum number of candidate pools to audit',
|
|
144
|
+
},
|
|
145
|
+
min_claimed_usd: {
|
|
146
|
+
type: 'number',
|
|
147
|
+
default: 50000,
|
|
148
|
+
description: 'Only report tokens whose claimed liquidity is at least this many USD',
|
|
149
|
+
},
|
|
150
|
+
include_curve: {
|
|
151
|
+
type: 'boolean',
|
|
152
|
+
default: false,
|
|
153
|
+
description: 'Reconstruct the historical liquidity curve for every candidate',
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
required: [],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: 'survival_stats',
|
|
161
|
+
description:
|
|
162
|
+
'Aggregate statistics from the local LIQPROOF store: how many audited tokens were fake vs consistent, average deposit coverage, and the verdict breakdown.',
|
|
163
|
+
inputSchema: {
|
|
164
|
+
type: 'object',
|
|
165
|
+
properties: {
|
|
166
|
+
days: {
|
|
167
|
+
type: 'integer',
|
|
168
|
+
default: 30,
|
|
169
|
+
minimum: 1,
|
|
170
|
+
maximum: 365,
|
|
171
|
+
description: 'Size of the trailing window, in days',
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
required: [],
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
];
|
|
178
|
+
|
|
179
|
+
// ── small formatting helpers ────────────────────────────────────────────────
|
|
180
|
+
|
|
181
|
+
function fmtUsd(n: number): string {
|
|
182
|
+
if (!Number.isFinite(n)) return 'n/a';
|
|
183
|
+
const abs = Math.abs(n);
|
|
184
|
+
if (abs >= 1_000_000_000) return `$${(n / 1_000_000_000).toFixed(2)}B`;
|
|
185
|
+
if (abs >= 1_000_000) return `$${(n / 1_000_000).toFixed(2)}M`;
|
|
186
|
+
if (abs >= 1_000) return `$${(n / 1_000).toFixed(2)}K`;
|
|
187
|
+
return `$${n.toFixed(2)}`;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function pct(n: number, digits = 2): string {
|
|
191
|
+
if (!Number.isFinite(n)) return 'n/a';
|
|
192
|
+
return `${(n * 100).toFixed(digits)}%`;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** Trim a mint for display without hiding it entirely. */
|
|
196
|
+
function shortMint(mint: string): string {
|
|
197
|
+
return mint.length <= 12 ? mint : `${mint.slice(0, 8)}…${mint.slice(-4)}`;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// ── shared RPC pool ─────────────────────────────────────────────────────────
|
|
201
|
+
|
|
202
|
+
let sharedRpc: RpcPool | undefined;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* One RPC pool for the whole server: the free public endpoints are rate
|
|
206
|
+
* limited, so every tool must share the same learned budget state.
|
|
207
|
+
*/
|
|
208
|
+
function rpc(): RpcPool {
|
|
209
|
+
if (!sharedRpc) {
|
|
210
|
+
sharedRpc = new RpcPool({
|
|
211
|
+
verbose: false,
|
|
212
|
+
onEvent: (e) => {
|
|
213
|
+
if (e.kind === 'rotate' || e.kind === 'error' || e.kind === 'throttle') {
|
|
214
|
+
process.stderr.write(`[liqproof:mcp] rpc ${e.kind} ${JSON.stringify(e)}\n`);
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
return sharedRpc;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function dbPath(): string {
|
|
223
|
+
return process.env.LIQPROOF_DB || '.liqproof/liqproof.db';
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// ── tools ───────────────────────────────────────────────────────────────────
|
|
227
|
+
|
|
228
|
+
function argString(args: Record<string, unknown>, key: string): string {
|
|
229
|
+
const v = args[key];
|
|
230
|
+
return typeof v === 'string' ? v.trim() : '';
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function argNumber(args: Record<string, unknown>, key: string, fallback: number): number {
|
|
234
|
+
const v = args[key];
|
|
235
|
+
if (typeof v === 'number' && Number.isFinite(v)) return v;
|
|
236
|
+
if (typeof v === 'string' && v.trim() !== '') {
|
|
237
|
+
const n = Number(v);
|
|
238
|
+
if (Number.isFinite(n)) return n;
|
|
239
|
+
}
|
|
240
|
+
return fallback;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function argBool(args: Record<string, unknown>, key: string, fallback = false): boolean {
|
|
244
|
+
const v = args[key];
|
|
245
|
+
if (typeof v === 'boolean') return v;
|
|
246
|
+
if (v === 'true') return true;
|
|
247
|
+
if (v === 'false') return false;
|
|
248
|
+
return fallback;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function clamp(n: number, lo: number, hi: number): number {
|
|
252
|
+
return Math.min(hi, Math.max(lo, n));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/** Human-readable one-liner in front of the machine-readable JSON. */
|
|
256
|
+
function summaryLine(r: Receipt): string {
|
|
257
|
+
const impact = r.oracle.buyQuote?.priceImpactPct;
|
|
258
|
+
const impactText = typeof impact === 'number' && Number.isFinite(impact)
|
|
259
|
+
? pct(impact, 1)
|
|
260
|
+
: 'n/a';
|
|
261
|
+
const label = r.symbol ? `${r.symbol} ` : '';
|
|
262
|
+
if (r.verdict === 'UNKNOWN') {
|
|
263
|
+
return (
|
|
264
|
+
`LIQPROOF ${label}(${shortMint(r.mint)}) — INSUFFICIENT EVIDENCE: ` +
|
|
265
|
+
`the pool vaults or the quote-side price could not be read, so no verdict is issued. ` +
|
|
266
|
+
`claimed ${fmtUsd(r.claimed.liquidityUsd)}, deposited ${fmtUsd(r.real.depositedUsd)}, ` +
|
|
267
|
+
`coverage ${pct(r.real.coverage, 4)}, self-denominated ${pct(r.real.selfDenominatedPct)}, ` +
|
|
268
|
+
`buy price impact ${impactText}.`
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
// The identity clause is part of the sentence, not an afterthought: a
|
|
272
|
+
// liquidity verdict without knowing WHICH token it is about is half a
|
|
273
|
+
// receipt. This is what stops a caller from reading "FAKE_LIQUIDITY" as
|
|
274
|
+
// "this project is a scam" when the token may be perfectly legitimate and
|
|
275
|
+
// only the venue's number is wrong.
|
|
276
|
+
const can = r.identity?.canonical;
|
|
277
|
+
let identity = '';
|
|
278
|
+
if (can?.status === 'canonical') {
|
|
279
|
+
identity = ' This mint is the registered canonical token, so the finding is about the pool, not the project.';
|
|
280
|
+
} else if (can?.status === 'impersonator' && can.impersonates) {
|
|
281
|
+
identity = ` This mint is NOT the canonical ${can.impersonates.name} (${can.impersonates.mint}).`;
|
|
282
|
+
}
|
|
283
|
+
return (
|
|
284
|
+
`LIQPROOF ${label}(${shortMint(r.mint)}) — ${r.verdict}: ` +
|
|
285
|
+
`claimed ${fmtUsd(r.claimed.liquidityUsd)} vs deposited ${fmtUsd(r.real.depositedUsd)}, ` +
|
|
286
|
+
`coverage ${pct(r.real.coverage, 4)}, self-denominated ${pct(r.real.selfDenominatedPct)}, ` +
|
|
287
|
+
`buy price impact ${impactText}.` +
|
|
288
|
+
identity
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
async function toolVerifyToken(args: Record<string, unknown>): Promise<string> {
|
|
293
|
+
const mint = argString(args, 'mint');
|
|
294
|
+
if (!mint) throw new Error('mint is required (Solana SPL mint address)');
|
|
295
|
+
const includeCurve = argBool(args, 'include_curve', false);
|
|
296
|
+
|
|
297
|
+
const receipt = await buildReceipt(rpc(), mint, {
|
|
298
|
+
includeCurve,
|
|
299
|
+
maxTransactions: includeCurve ? 600 : 0,
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
const summary = summaryLine(receipt);
|
|
303
|
+
process.stderr.write(`[liqproof:mcp] verify_token ${shortMint(mint)} → ${receipt.verdict}\n`);
|
|
304
|
+
return `${summary}\n${JSON.stringify(receipt, null, 2)}`;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
async function toolLiquidityTimeline(args: Record<string, unknown>): Promise<string> {
|
|
308
|
+
const mint = argString(args, 'mint');
|
|
309
|
+
if (!mint) throw new Error('mint is required (Solana SPL mint address)');
|
|
310
|
+
const maxTransactions = clamp(Math.round(argNumber(args, 'max_transactions', 200)), 10, 1000);
|
|
311
|
+
|
|
312
|
+
const receipt = await buildReceipt(rpc(), mint, {
|
|
313
|
+
includeCurve: true,
|
|
314
|
+
maxTransactions,
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
const payload = {
|
|
318
|
+
mint: receipt.mint,
|
|
319
|
+
symbol: receipt.symbol ?? null,
|
|
320
|
+
verdict: receipt.verdict,
|
|
321
|
+
claimedUsd: receipt.claimed.liquidityUsd,
|
|
322
|
+
depositedUsd: receipt.real.depositedUsd,
|
|
323
|
+
coverage: receipt.real.coverage,
|
|
324
|
+
selfDenominatedPct: receipt.real.selfDenominatedPct,
|
|
325
|
+
peakDepositedUsd: receipt.real.peakDepositedUsd ?? null,
|
|
326
|
+
peakAt: receipt.real.peakAt ?? null,
|
|
327
|
+
drainAt: receipt.real.drainAt ?? null,
|
|
328
|
+
drainSignature: receipt.real.drainSignature ?? null,
|
|
329
|
+
drainDeltaUsd: receipt.real.drainDeltaUsd ?? null,
|
|
330
|
+
timeline: {
|
|
331
|
+
points: receipt.timeline.points,
|
|
332
|
+
scanned: receipt.timeline.scanned,
|
|
333
|
+
unavailable: receipt.timeline.unavailable,
|
|
334
|
+
truncated: receipt.timeline.truncated,
|
|
335
|
+
strategy: receipt.timeline.strategy,
|
|
336
|
+
totalSignatures: receipt.timeline.totalSignatures,
|
|
337
|
+
},
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
const summary =
|
|
341
|
+
`LIQPROOF timeline ${receipt.symbol ? `${receipt.symbol} ` : ''}(${shortMint(receipt.mint)}): ` +
|
|
342
|
+
`${receipt.timeline.points.length} points from ${receipt.timeline.totalSignatures} signatures ` +
|
|
343
|
+
`(strategy ${receipt.timeline.strategy}), peak deposit ` +
|
|
344
|
+
`${receipt.real.peakDepositedUsd !== undefined ? fmtUsd(receipt.real.peakDepositedUsd) : 'n/a'}.`;
|
|
345
|
+
process.stderr.write(
|
|
346
|
+
`[liqproof:mcp] liquidity_timeline ${shortMint(receipt.mint)} → ${receipt.timeline.points.length} points\n`,
|
|
347
|
+
);
|
|
348
|
+
return `${summary}\n${JSON.stringify(payload, null, 2)}`;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
interface Finding {
|
|
352
|
+
mint: string;
|
|
353
|
+
symbol: string | null;
|
|
354
|
+
verdict: string;
|
|
355
|
+
claimedUsd: number;
|
|
356
|
+
depositedUsd: number;
|
|
357
|
+
coverage: number;
|
|
358
|
+
selfDenominatedPct: number;
|
|
359
|
+
overstatementRatio: number | null;
|
|
360
|
+
overstatementText: string;
|
|
361
|
+
candidatePool: string;
|
|
362
|
+
candidateDex: string;
|
|
363
|
+
candidateClaimedUsd: number;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
async function toolFindFakeLiquidity(args: Record<string, unknown>): Promise<string> {
|
|
367
|
+
const limit = clamp(Math.round(argNumber(args, 'limit', 10)), 1, 25);
|
|
368
|
+
const minClaimedUsd = argNumber(args, 'min_claimed_usd', 50_000);
|
|
369
|
+
const includeCurve = argBool(args, 'include_curve', false);
|
|
370
|
+
|
|
371
|
+
// Candidate feed.
|
|
372
|
+
//
|
|
373
|
+
// `new_pools` is the wrong feed for this job: a pool created ten seconds
|
|
374
|
+
// ago still reports `reserve_in_usd = 0`, so there is no claim to falsify.
|
|
375
|
+
// The pools worth auditing are the ones that already ADVERTISE a number —
|
|
376
|
+
// top pools and trending pools. We keep new_pools as a third source for
|
|
377
|
+
// tokens that are about to be picked up.
|
|
378
|
+
const sources: Array<{ name: string; load: (page: number) => Promise<PoolReport[]> }> = [
|
|
379
|
+
{ name: 'top', load: geckoTerminalTopPools },
|
|
380
|
+
{ name: 'trending', load: geckoTerminalTrendingPools },
|
|
381
|
+
{ name: 'new', load: geckoTerminalNewPools },
|
|
382
|
+
];
|
|
383
|
+
const pages = limit > 10 ? [1, 2, 3] : [1];
|
|
384
|
+
const candidates: Array<{
|
|
385
|
+
mint: string;
|
|
386
|
+
pool: string;
|
|
387
|
+
dex: string;
|
|
388
|
+
claimed: number;
|
|
389
|
+
poolData: PoolReport;
|
|
390
|
+
}> = [];
|
|
391
|
+
const seenPools = new Set<string>();
|
|
392
|
+
|
|
393
|
+
outer: for (const src of sources) {
|
|
394
|
+
for (const page of pages) {
|
|
395
|
+
let pools: PoolReport[] = [];
|
|
396
|
+
try {
|
|
397
|
+
pools = await src.load(page);
|
|
398
|
+
} catch (err) {
|
|
399
|
+
process.stderr.write(
|
|
400
|
+
`[liqproof:mcp] find_fake_liquidity: ${src.name} page ${page} failed: ${(err as Error).message}\n`,
|
|
401
|
+
);
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
for (const p of pools) {
|
|
405
|
+
const mint = (p.baseTokenAddress || '').trim();
|
|
406
|
+
if (!mint || seenPools.has(p.address)) continue;
|
|
407
|
+
if (p.reportedLiquidityUsd < minClaimedUsd) continue;
|
|
408
|
+
// SOL/USDC-style pairs are legitimately unbalanced — a low coverage
|
|
409
|
+
// there says nothing about anybody's honesty. Never report them.
|
|
410
|
+
if (isMajorMint(mint)) continue;
|
|
411
|
+
seenPools.add(p.address);
|
|
412
|
+
candidates.push({
|
|
413
|
+
mint,
|
|
414
|
+
pool: p.address,
|
|
415
|
+
dex: p.dexId,
|
|
416
|
+
claimed: p.reportedLiquidityUsd,
|
|
417
|
+
poolData: p,
|
|
418
|
+
});
|
|
419
|
+
if (candidates.length >= limit) break outer;
|
|
420
|
+
}
|
|
421
|
+
if (candidates.length >= limit) break outer;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
const BAD = new Set(['FAKE_LIQUIDITY', 'NO_DEPTH', 'DRAINED']);
|
|
426
|
+
const findings: Finding[] = [];
|
|
427
|
+
let considered = 0;
|
|
428
|
+
let failed = 0;
|
|
429
|
+
|
|
430
|
+
for (const cand of candidates) {
|
|
431
|
+
considered++;
|
|
432
|
+
try {
|
|
433
|
+
const receipt = await buildReceipt(rpc(), cand.mint, {
|
|
434
|
+
includeCurve,
|
|
435
|
+
maxTransactions: includeCurve ? 200 : 0,
|
|
436
|
+
focusPool: cand.pool,
|
|
437
|
+
focusPoolData: cand.poolData,
|
|
438
|
+
});
|
|
439
|
+
const claimed = receipt.claimed.liquidityUsd;
|
|
440
|
+
if (claimed < minClaimedUsd) continue;
|
|
441
|
+
if (!BAD.has(receipt.verdict)) continue;
|
|
442
|
+
const deposited = receipt.real.depositedUsd;
|
|
443
|
+
const ratio = deposited > 0 ? claimed / deposited : claimed > 0 ? Infinity : 0;
|
|
444
|
+
findings.push({
|
|
445
|
+
mint: receipt.mint,
|
|
446
|
+
symbol: receipt.symbol ?? null,
|
|
447
|
+
verdict: receipt.verdict,
|
|
448
|
+
claimedUsd: claimed,
|
|
449
|
+
depositedUsd: deposited,
|
|
450
|
+
coverage: receipt.real.coverage,
|
|
451
|
+
selfDenominatedPct: receipt.real.selfDenominatedPct,
|
|
452
|
+
overstatementRatio: Number.isFinite(ratio) ? ratio : null,
|
|
453
|
+
overstatementText: Number.isFinite(ratio)
|
|
454
|
+
? `${ratio.toLocaleString('en-US', { maximumFractionDigits: 0 })}×`
|
|
455
|
+
: '∞',
|
|
456
|
+
candidatePool: cand.pool,
|
|
457
|
+
candidateDex: cand.dex,
|
|
458
|
+
candidateClaimedUsd: cand.claimed,
|
|
459
|
+
});
|
|
460
|
+
} catch (err) {
|
|
461
|
+
// One bad candidate must never abort the sweep.
|
|
462
|
+
failed++;
|
|
463
|
+
process.stderr.write(
|
|
464
|
+
`[liqproof:mcp] find_fake_liquidity: candidate ${shortMint(cand.mint)} failed: ${(err as Error).message}\n`,
|
|
465
|
+
);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
findings.sort((a, b) => {
|
|
470
|
+
const ra = a.overstatementRatio ?? Infinity;
|
|
471
|
+
const rb = b.overstatementRatio ?? Infinity;
|
|
472
|
+
if (ra !== rb) return rb - ra;
|
|
473
|
+
return b.claimedUsd - a.claimedUsd;
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
const payload = {
|
|
477
|
+
generatedAt: new Date().toISOString(),
|
|
478
|
+
limit,
|
|
479
|
+
minClaimedUsd,
|
|
480
|
+
includeCurve,
|
|
481
|
+
candidatesConsidered: considered,
|
|
482
|
+
candidatesFailed: failed,
|
|
483
|
+
findings,
|
|
484
|
+
note:
|
|
485
|
+
findings.length === 0
|
|
486
|
+
? 'No candidate pool in the mined window overstated its deposit above the requested threshold.'
|
|
487
|
+
: 'Claims are aggregator-reported; deposits are read directly from the pool vaults on chain.',
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
process.stderr.write(
|
|
491
|
+
`[liqproof:mcp] find_fake_liquidity → ${findings.length} findings from ${considered} candidates\n`,
|
|
492
|
+
);
|
|
493
|
+
return JSON.stringify(payload, null, 2);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
async function toolSurvivalStats(args: Record<string, unknown>): Promise<string> {
|
|
497
|
+
const days = clamp(Math.round(argNumber(args, 'days', 30)), 1, 365);
|
|
498
|
+
const now = Math.floor(Date.now() / 1000);
|
|
499
|
+
const since = now - days * 86_400;
|
|
500
|
+
|
|
501
|
+
const store = new Store(dbPath());
|
|
502
|
+
let tokens: ReturnType<Store['allTokens']> = [];
|
|
503
|
+
let counts: ReturnType<Store['counts']> = { tokens: 0, events: 0, receipts: 0 };
|
|
504
|
+
let overall: ReturnType<Store['survival']> | null = null;
|
|
505
|
+
try {
|
|
506
|
+
tokens = store.allTokens();
|
|
507
|
+
counts = store.counts();
|
|
508
|
+
overall = store.survival();
|
|
509
|
+
} finally {
|
|
510
|
+
store.close();
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
const window = tokens.filter((t) => (t.last_seen ?? 0) >= since);
|
|
514
|
+
const byVerdict: Record<string, number> = {};
|
|
515
|
+
let coverageSum = 0;
|
|
516
|
+
let coverageN = 0;
|
|
517
|
+
for (const t of window) {
|
|
518
|
+
const v = t.verdict ?? 'UNKNOWN';
|
|
519
|
+
byVerdict[v] = (byVerdict[v] ?? 0) + 1;
|
|
520
|
+
if (typeof t.coverage === 'number' && Number.isFinite(t.coverage)) {
|
|
521
|
+
coverageSum += t.coverage;
|
|
522
|
+
coverageN++;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
const payload = {
|
|
527
|
+
generatedAt: new Date().toISOString(),
|
|
528
|
+
days,
|
|
529
|
+
windowStart: new Date(since * 1000).toISOString(),
|
|
530
|
+
windowEnd: new Date(now * 1000).toISOString(),
|
|
531
|
+
database: dbPath(),
|
|
532
|
+
total: window.length,
|
|
533
|
+
fake:
|
|
534
|
+
(byVerdict.FAKE_LIQUIDITY ?? 0) + (byVerdict.NO_DEPTH ?? 0) + (byVerdict.DRAINED ?? 0),
|
|
535
|
+
consistent: byVerdict.CONSISTENT ?? 0,
|
|
536
|
+
coverageAvg: coverageN ? coverageSum / coverageN : 0,
|
|
537
|
+
byVerdict,
|
|
538
|
+
store: { tokens: counts.tokens, events: counts.events, receipts: counts.receipts },
|
|
539
|
+
overall: overall
|
|
540
|
+
? {
|
|
541
|
+
total: overall.total,
|
|
542
|
+
fake: overall.fake,
|
|
543
|
+
consistent: overall.consistent,
|
|
544
|
+
coverageAvg: overall.coverageAvg,
|
|
545
|
+
byVerdict: overall.byVerdict,
|
|
546
|
+
}
|
|
547
|
+
: null,
|
|
548
|
+
note:
|
|
549
|
+
window.length === 0
|
|
550
|
+
? 'Insufficient evidence: no audited tokens were recorded in this window.'
|
|
551
|
+
: 'Verdicts come from the local store; every one of them was decided from on-chain vault balances.',
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
process.stderr.write(
|
|
555
|
+
`[liqproof:mcp] survival_stats → ${payload.total} tokens in ${days}d window\n`,
|
|
556
|
+
);
|
|
557
|
+
return JSON.stringify(payload, null, 2);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/** Dispatch a tool call and return its text payload. */
|
|
561
|
+
export async function dispatchTool(
|
|
562
|
+
name: string,
|
|
563
|
+
args: Record<string, unknown>,
|
|
564
|
+
): Promise<string> {
|
|
565
|
+
switch (name) {
|
|
566
|
+
case 'verify_token':
|
|
567
|
+
return toolVerifyToken(args);
|
|
568
|
+
case 'liquidity_timeline':
|
|
569
|
+
return toolLiquidityTimeline(args);
|
|
570
|
+
case 'find_fake_liquidity':
|
|
571
|
+
return toolFindFakeLiquidity(args);
|
|
572
|
+
case 'survival_stats':
|
|
573
|
+
return toolSurvivalStats(args);
|
|
574
|
+
default:
|
|
575
|
+
throw new Error(`unknown tool: ${name}`);
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
// ── JSON-RPC server ─────────────────────────────────────────────────────────
|
|
580
|
+
|
|
581
|
+
export interface McpServerOptions {
|
|
582
|
+
/** Defaults to process.stdin. */
|
|
583
|
+
input?: NodeJS.ReadableStream;
|
|
584
|
+
/** Defaults to process.stdout. */
|
|
585
|
+
output?: NodeJS.WritableStream;
|
|
586
|
+
/** Defaults to $LIQPROOF_DB or .liqproof/liqproof.db. */
|
|
587
|
+
dbPath?: string;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/** Handle a single inbound JSON-RPC message. Returns null for notifications. */
|
|
591
|
+
export async function handleMessage(
|
|
592
|
+
msg: JsonRpcRequest,
|
|
593
|
+
): Promise<JsonRpcResponse | null> {
|
|
594
|
+
const isNotification = msg.id === undefined || msg.id === null;
|
|
595
|
+
const id = msg.id ?? null;
|
|
596
|
+
const method = typeof msg.method === 'string' ? msg.method : '';
|
|
597
|
+
|
|
598
|
+
if (!method) {
|
|
599
|
+
if (isNotification) return null;
|
|
600
|
+
return {
|
|
601
|
+
jsonrpc: '2.0',
|
|
602
|
+
id,
|
|
603
|
+
error: { code: ERR_INVALID_REQUEST, message: 'missing method' },
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
// Notifications never get a response.
|
|
608
|
+
if (method.startsWith('notifications/')) return null;
|
|
609
|
+
|
|
610
|
+
switch (method) {
|
|
611
|
+
case 'initialize':
|
|
612
|
+
return {
|
|
613
|
+
jsonrpc: '2.0',
|
|
614
|
+
id,
|
|
615
|
+
result: {
|
|
616
|
+
protocolVersion: PROTOCOL_VERSION,
|
|
617
|
+
capabilities: { tools: {} },
|
|
618
|
+
serverInfo: { name: SERVER_NAME, version: SERVER_VERSION },
|
|
619
|
+
},
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
case 'ping':
|
|
623
|
+
return { jsonrpc: '2.0', id, result: {} };
|
|
624
|
+
|
|
625
|
+
case 'tools/list':
|
|
626
|
+
return { jsonrpc: '2.0', id, result: { tools: TOOLS } };
|
|
627
|
+
|
|
628
|
+
case 'tools/call': {
|
|
629
|
+
const params = (msg.params ?? {}) as Record<string, unknown>;
|
|
630
|
+
const name = typeof params.name === 'string' ? params.name : '';
|
|
631
|
+
const rawArgs = (params.arguments ?? params.args ?? {}) as Record<string, unknown>;
|
|
632
|
+
const args =
|
|
633
|
+
rawArgs && typeof rawArgs === 'object' && !Array.isArray(rawArgs)
|
|
634
|
+
? (rawArgs as Record<string, unknown>)
|
|
635
|
+
: {};
|
|
636
|
+
if (!name) {
|
|
637
|
+
return {
|
|
638
|
+
jsonrpc: '2.0',
|
|
639
|
+
id,
|
|
640
|
+
error: { code: ERR_INVALID_PARAMS, message: 'params.name is required' },
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
try {
|
|
644
|
+
const text = await dispatchTool(name, args);
|
|
645
|
+
return {
|
|
646
|
+
jsonrpc: '2.0',
|
|
647
|
+
id,
|
|
648
|
+
result: { content: [{ type: 'text', text }] },
|
|
649
|
+
};
|
|
650
|
+
} catch (err) {
|
|
651
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
652
|
+
return {
|
|
653
|
+
jsonrpc: '2.0',
|
|
654
|
+
id,
|
|
655
|
+
result: {
|
|
656
|
+
content: [{ type: 'text', text: `Error: ${message}` }],
|
|
657
|
+
isError: true,
|
|
658
|
+
},
|
|
659
|
+
};
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
default:
|
|
664
|
+
if (isNotification) return null;
|
|
665
|
+
return {
|
|
666
|
+
jsonrpc: '2.0',
|
|
667
|
+
id,
|
|
668
|
+
error: { code: ERR_METHOD_NOT_FOUND, message: `method not found: ${method}` },
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* Run the MCP server over stdio until the input stream closes.
|
|
675
|
+
* stdout receives JSON-RPC messages only; stderr receives diagnostics.
|
|
676
|
+
*/
|
|
677
|
+
export async function startMcpServer(opts: McpServerOptions = {}): Promise<void> {
|
|
678
|
+
const input = opts.input ?? process.stdin;
|
|
679
|
+
const output = opts.output ?? process.stdout;
|
|
680
|
+
|
|
681
|
+
const write = (msg: JsonRpcResponse | JsonRpcResponse[]): void => {
|
|
682
|
+
output.write(`${JSON.stringify(msg)}\n`);
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
const rl = createInterface({ input, crlfDelay: Infinity });
|
|
686
|
+
process.stderr.write(
|
|
687
|
+
`[liqproof:mcp] server ready · protocol ${PROTOCOL_VERSION} · db ${opts.dbPath ?? dbPath()}\n`,
|
|
688
|
+
);
|
|
689
|
+
|
|
690
|
+
for await (const line of rl) {
|
|
691
|
+
const trimmed = line.trim();
|
|
692
|
+
if (!trimmed) continue;
|
|
693
|
+
|
|
694
|
+
let parsed: unknown;
|
|
695
|
+
try {
|
|
696
|
+
parsed = JSON.parse(trimmed);
|
|
697
|
+
} catch (err) {
|
|
698
|
+
write({
|
|
699
|
+
jsonrpc: '2.0',
|
|
700
|
+
id: null,
|
|
701
|
+
error: { code: ERR_PARSE, message: `parse error: ${(err as Error).message}` },
|
|
702
|
+
});
|
|
703
|
+
continue;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
try {
|
|
707
|
+
if (Array.isArray(parsed)) {
|
|
708
|
+
const responses: JsonRpcResponse[] = [];
|
|
709
|
+
for (const item of parsed) {
|
|
710
|
+
const res = await handleMessage(item as JsonRpcRequest);
|
|
711
|
+
if (res) responses.push(res);
|
|
712
|
+
}
|
|
713
|
+
if (responses.length) write(responses);
|
|
714
|
+
} else {
|
|
715
|
+
const res = await handleMessage(parsed as JsonRpcRequest);
|
|
716
|
+
if (res) write(res);
|
|
717
|
+
}
|
|
718
|
+
} catch (err) {
|
|
719
|
+
const id =
|
|
720
|
+
parsed && typeof parsed === 'object' && 'id' in (parsed as Record<string, unknown>)
|
|
721
|
+
? ((parsed as Record<string, unknown>).id as string | number | null)
|
|
722
|
+
: null;
|
|
723
|
+
write({
|
|
724
|
+
jsonrpc: '2.0',
|
|
725
|
+
id: id ?? null,
|
|
726
|
+
error: {
|
|
727
|
+
code: ERR_INTERNAL,
|
|
728
|
+
message: err instanceof Error ? err.message : String(err),
|
|
729
|
+
},
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
process.stderr.write('[liqproof:mcp] stdin closed · server stopped\n');
|
|
735
|
+
}
|