chain-insights 0.22.3 → 0.23.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/README.md +21 -43
- package/dist/cli.cjs +21 -83
- package/dist/cli.mjs +21 -83
- package/dist/cli.mjs.map +1 -1
- package/dist/{config-DYiUgdzg.cjs → config-B542AM4w.cjs} +2 -3
- package/dist/{config-DiQs0rQX.mjs → config-DbbPiGk0.mjs} +2 -3
- package/dist/{config-DiQs0rQX.mjs.map → config-DbbPiGk0.mjs.map} +1 -1
- package/dist/html-generator-BCDtYcGs.mjs +16 -0
- package/dist/{html-generator-D2BDzLED.mjs.map → html-generator-BCDtYcGs.mjs.map} +1 -1
- package/dist/html-generator-DFwMRWN3.cjs +16 -0
- package/dist/index.cjs +2 -8
- package/dist/index.d.cts +1 -99
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -99
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -6
- package/dist/mcp-proxy.cjs +35 -156
- package/dist/mcp-proxy.d.cts.map +1 -1
- package/dist/mcp-proxy.d.mts.map +1 -1
- package/dist/mcp-proxy.mjs +35 -156
- package/dist/mcp-proxy.mjs.map +1 -1
- package/dist/{public-tools-BFs_7U_Z.cjs → public-tools-Bou25cki.cjs} +153 -5
- package/dist/{public-tools-BjqZGGAC.mjs → public-tools-CpOLkME5.mjs} +152 -4
- package/dist/public-tools-CpOLkME5.mjs.map +1 -0
- package/dist/{schema-v5cwychf.mjs → schema-B0OuHW_l.mjs} +63 -4
- package/dist/schema-B0OuHW_l.mjs.map +1 -0
- package/dist/{schema-DepyuUEP.cjs → schema-CtFWYoJz.cjs} +72 -7
- package/dist/{tool-visibility-DZBAP62b.cjs → tool-visibility-C8F9Yoxy.cjs} +1 -2
- package/dist/{tool-visibility-C0ALejXI.mjs → tool-visibility-CXbwfKhv.mjs} +2 -3
- package/dist/tool-visibility-CXbwfKhv.mjs.map +1 -0
- package/dist/{topup-server-rqI7bqem.mjs → topup-server-BLdF1SFQ.mjs} +2 -2
- package/dist/topup-server-BLdF1SFQ.mjs.map +1 -0
- package/dist/{topup-server-DAqmAuu1.cjs → topup-server-YN3iHrHW.cjs} +1 -1
- package/dist/{update-CJUfGCxs.mjs → update-MsoEFbhn.mjs} +2 -36
- package/dist/{update-CJUfGCxs.mjs.map → update-MsoEFbhn.mjs.map} +1 -1
- package/dist/{update-BJoXYucO.cjs → update-RKd0UW90.cjs} +0 -35
- package/docs/architecture.md +13 -44
- package/docs/contributing.md +0 -3
- package/docs/development.md +3 -5
- package/docs/graph-tools.md +4 -29
- package/docs/mcp-proxy.md +3 -27
- package/docs/stability.md +0 -12
- package/package.json +3 -4
- package/skills/chain-insights-address-risk/SKILL.md +0 -1
- package/dist/app-BHRl5oDo.cjs +0 -145
- package/dist/app-BeZyCVuz.mjs +0 -140
- package/dist/app-BeZyCVuz.mjs.map +0 -1
- package/dist/artifact-server-B8WKXtXr.cjs +0 -47
- package/dist/artifact-server-C1fETWsc.mjs +0 -49
- package/dist/artifact-server-C1fETWsc.mjs.map +0 -1
- package/dist/graph-normalizer-B2Q2lgVy.cjs +0 -130
- package/dist/graph-normalizer-BA3Rbd6l.mjs +0 -127
- package/dist/graph-normalizer-BA3Rbd6l.mjs.map +0 -1
- package/dist/graph-reports-B6yoYbPq.mjs +0 -63
- package/dist/graph-reports-B6yoYbPq.mjs.map +0 -1
- package/dist/graph-reports-_gqzxvvs.cjs +0 -64
- package/dist/html-generator-B9f_GIi2.cjs +0 -86
- package/dist/html-generator-D2BDzLED.mjs +0 -70
- package/dist/init-C3AVZHFb.cjs +0 -319
- package/dist/init-CO-PRYhT.mjs +0 -319
- package/dist/init-CO-PRYhT.mjs.map +0 -1
- package/dist/limits-D3Mn-gig.mjs +0 -94
- package/dist/limits-D3Mn-gig.mjs.map +0 -1
- package/dist/limits-km3pmmL3.cjs +0 -115
- package/dist/mcp-endpoint-Bd3SvCkg.mjs +0 -41
- package/dist/mcp-endpoint-Bd3SvCkg.mjs.map +0 -1
- package/dist/mcp-endpoint-DdIVQKW5.cjs +0 -56
- package/dist/output-root-BK4pdjyz.mjs +0 -36
- package/dist/output-root-BK4pdjyz.mjs.map +0 -1
- package/dist/output-root-BewoQaTx.cjs +0 -46
- package/dist/public-tools-BjqZGGAC.mjs.map +0 -1
- package/dist/resolve-port-CbaEoODz.cjs +0 -18
- package/dist/resolve-port-DxPK7Ipx.mjs +0 -20
- package/dist/resolve-port-DxPK7Ipx.mjs.map +0 -1
- package/dist/schema-v5cwychf.mjs.map +0 -1
- package/dist/server-BDmHAF1w.mjs +0 -46
- package/dist/server-BDmHAF1w.mjs.map +0 -1
- package/dist/server-BjprY9Ef.cjs +0 -55
- package/dist/templates/graph.html +0 -1450
- package/dist/tool-visibility-C0ALejXI.mjs.map +0 -1
- package/dist/topup-server-rqI7bqem.mjs.map +0 -1
- package/dist/viz-BJ_kyRjI.cjs +0 -217
- package/dist/viz-Uh_EF-qB.mjs +0 -206
- package/dist/viz-Uh_EF-qB.mjs.map +0 -1
- package/docs/images/graph-mcp-iframe.png +0 -0
- package/docs/images/graph-visualization.png +0 -0
- package/docs/images/quickstart-demo.svg +0 -1
- package/docs/investigation-workspaces.md +0 -108
- package/docs/search-limits.md +0 -73
package/README.md
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
Chain Insights is open-source AML and forensics infrastructure for AI agents
|
|
11
11
|
and analysts: a hosted Chain Insights Graph you reach over MCP, screened
|
|
12
12
|
through one CLI. It screens blockchain addresses for risk, explores fund flows
|
|
13
|
-
through read-only graph queries, and
|
|
14
|
-
|
|
13
|
+
through read-only graph queries, and returns structured investigation facts.
|
|
14
|
+
Every new account gets a free tier — a daily allowance
|
|
15
15
|
of graph queries, no payment setup — so you can run a first screen in minutes.
|
|
16
16
|
|
|
17
17
|
## Quickstart
|
|
@@ -22,14 +22,11 @@ as-is on macOS; on Windows use WSL.
|
|
|
22
22
|
```bash
|
|
23
23
|
npx chain-insights@latest --help # run without installing
|
|
24
24
|
npm install -g chain-insights # or install the cia CLI globally
|
|
25
|
-
cia init ~/cases # optional local investigation folder
|
|
26
25
|
cia mcp call aml_address_risk network=robinhood address=0xYourAddressHere
|
|
27
26
|
cia networks # supported networks + public tool surface
|
|
28
27
|
```
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
Sixty seconds gets you the CLI, a workspace, and the live tool catalog.
|
|
29
|
+
Sixty seconds gets you the CLI and the live tool catalog.
|
|
33
30
|
To call the same tools from an agent, register the MCP proxy:
|
|
34
31
|
`cia setup claude-code` (or `codex` / `hermes`).
|
|
35
32
|
|
|
@@ -49,7 +46,6 @@ Owns:
|
|
|
49
46
|
- The canonical public tool surface: prefixed `aml_*` / `graph_*` / `meta_*`
|
|
50
47
|
/ `wallet_*` tools.
|
|
51
48
|
- Local wallet and payment on Base mainnet (payment chain only).
|
|
52
|
-
- Investigation workspaces, graph reports, and visualization.
|
|
53
49
|
- Shipped product skills under `skills/` (`chain-insights-*`), packaged
|
|
54
50
|
into the npm tarball.
|
|
55
51
|
|
|
@@ -60,8 +56,8 @@ Never touches:
|
|
|
60
56
|
- Automatic risk labeling. Address labels are served by the Chain Insights
|
|
61
57
|
Graph backend and read through `aml_address_risk`; the CLI never writes
|
|
62
58
|
labels.
|
|
63
|
-
- Custodial wallets or hosted case databases. Investigation data stays
|
|
64
|
-
the
|
|
59
|
+
- Custodial wallets or hosted case databases. Investigation data stays with
|
|
60
|
+
the caller.
|
|
65
61
|
|
|
66
62
|
### What You Can Do Today
|
|
67
63
|
|
|
@@ -93,13 +89,13 @@ Downstream:
|
|
|
93
89
|
## Architecture
|
|
94
90
|
|
|
95
91
|
Chain Insights is the investigation layer above the Chain Insights Graph.
|
|
96
|
-
The CLI and MCP proxy call graph tools over one MCP endpoint
|
|
97
|
-
|
|
92
|
+
The CLI and MCP proxy call graph tools over one MCP endpoint and never write
|
|
93
|
+
to the graph.
|
|
98
94
|
|
|
99
95
|
```text
|
|
100
96
|
Agent or CLI user
|
|
101
97
|
-> Chain Insights CLI / MCP proxy
|
|
102
|
-
-> local config
|
|
98
|
+
-> local config and wallet
|
|
103
99
|
-> Chain Insights Graph
|
|
104
100
|
-> graph intelligence for AML workflows
|
|
105
101
|
```
|
|
@@ -112,8 +108,6 @@ Source modules (hand-maintained):
|
|
|
112
108
|
| `federation` | `src/federation` | [components/federation.md](docs/architecture/components/federation.md) |
|
|
113
109
|
| `investigation` | `src/investigation` | [components/investigation.md](docs/architecture/components/investigation.md) |
|
|
114
110
|
| `mcp` | `src/mcp` | [components/mcp.md](docs/architecture/components/mcp.md) |
|
|
115
|
-
| `server` | `src/server` | [components/server.md](docs/architecture/components/server.md) |
|
|
116
|
-
| `viz` | `src/viz` | [components/viz.md](docs/architecture/components/viz.md) |
|
|
117
111
|
| `wallet` | `src/wallet` | [components/wallet.md](docs/architecture/components/wallet.md) |
|
|
118
112
|
|
|
119
113
|
Entry points:
|
|
@@ -213,24 +207,13 @@ cia --version
|
|
|
213
207
|
cia update --check
|
|
214
208
|
```
|
|
215
209
|
|
|
216
|
-
|
|
210
|
+
Run a first screen from any directory:
|
|
217
211
|
|
|
218
212
|
```bash
|
|
219
|
-
mkdir -p ./chain-insights-investigations
|
|
220
|
-
cd ./chain-insights-investigations
|
|
221
|
-
cia init .
|
|
222
|
-
|
|
223
213
|
cia mcp call aml_address_risk \
|
|
224
214
|
network=robinhood address=0xYourAddressHere
|
|
225
|
-
|
|
226
|
-
find reports -maxdepth 3 -type f | sort
|
|
227
215
|
```
|
|
228
216
|
|
|
229
|
-
Workspaces are plain local folders. Reports, graph JSON, graph HTML, and
|
|
230
|
-
published bundles live under the initialized workspace. Export only when
|
|
231
|
-
you need to share, hand off, or archive a review checkpoint — the handoff
|
|
232
|
-
package lands under `published/<workspace-slug>/`.
|
|
233
|
-
|
|
234
217
|
Example queries. Direct topology:
|
|
235
218
|
|
|
236
219
|
```bash
|
|
@@ -299,9 +282,6 @@ The hosted graph includes a small public free tier for `graph_query`
|
|
|
299
282
|
users receive the free tier first, then paid access continues
|
|
300
283
|
automatically.
|
|
301
284
|
|
|
302
|
-
Search bounds (hops, row limits, frontiers) are tunable per call, per
|
|
303
|
-
network, or globally — see [Search limits](docs/search-limits.md).
|
|
304
|
-
|
|
305
285
|
## Test
|
|
306
286
|
|
|
307
287
|
Local gate, in order:
|
|
@@ -349,25 +329,23 @@ cia --version && cia update --check
|
|
|
349
329
|
```
|
|
350
330
|
|
|
351
331
|
If network or tool discovery fails, check the endpoint and access mode
|
|
352
|
-
first.
|
|
353
|
-
|
|
332
|
+
first. Confirm the endpoint with `cia config get graphMcpEndpoint` and retry
|
|
333
|
+
the command.
|
|
354
334
|
|
|
355
335
|
## Documentation Links
|
|
356
336
|
|
|
357
337
|
Product docs:
|
|
358
338
|
|
|
359
|
-
| Doc | Use it for
|
|
360
|
-
| -------------------------------------------------------------- |
|
|
361
|
-
| [Graph tools](docs/graph-tools.md) | Graph layers, `graph_query`, `graph_query_batch`, AML tool contracts
|
|
362
|
-
| [Graph query compatibility](docs/graph-query-compatibility.md) | GQL/Cypher support per layer, rewrite recipes, traversal guidance
|
|
363
|
-
| [
|
|
364
|
-
| [
|
|
365
|
-
| [
|
|
366
|
-
| [
|
|
367
|
-
| [
|
|
368
|
-
| [
|
|
369
|
-
| [Stability policy](docs/stability.md) | Guaranteed surfaces (exit codes, MCP tool names, workspace layout), deprecation rules |
|
|
370
|
-
| [Debugging](docs/debugging.md) | Local troubleshooting, diagnostics, debug workflows |
|
|
339
|
+
| Doc | Use it for |
|
|
340
|
+
| -------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
341
|
+
| [Graph tools](docs/graph-tools.md) | Graph layers, `graph_query`, `graph_query_batch`, and AML tool contracts |
|
|
342
|
+
| [Graph query compatibility](docs/graph-query-compatibility.md) | GQL/Cypher support per layer, rewrite recipes, traversal guidance |
|
|
343
|
+
| [MCP proxy](docs/mcp-proxy.md) | Stdio proxy behavior, endpoint configuration, agent installers, auth modes |
|
|
344
|
+
| [Architecture overview](docs/architecture.md) | Product layers, data flow, security model, and config keys |
|
|
345
|
+
| [Development](docs/development.md) | Build, test, and local install commands |
|
|
346
|
+
| [Contributing](docs/contributing.md) | Development workflow, pull requests, release expectations |
|
|
347
|
+
| [Stability policy](docs/stability.md) | Guaranteed surfaces, deprecation rules, and compatibility expectations |
|
|
348
|
+
| [Debugging](docs/debugging.md) | Local troubleshooting, diagnostics, debug workflows |
|
|
371
349
|
|
|
372
350
|
Architecture depth:
|
|
373
351
|
|
package/dist/cli.cjs
CHANGED
|
@@ -50,7 +50,7 @@ function runInstaller(flag) {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
async function withGraphMcpClient(name, fn) {
|
|
53
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
53
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-B542AM4w.cjs")).then((n) => n.config_exports);
|
|
54
54
|
const config = await loadConfig();
|
|
55
55
|
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-CqAzD519.cjs")).then((n) => n.client_exports);
|
|
56
56
|
const paymentFetch = await createConfiguredGraphMcpFetch(config);
|
|
@@ -70,7 +70,7 @@ async function withGraphMcpClient(name, fn) {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
async function printNetworkCapabilities(opts) {
|
|
73
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
73
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-B542AM4w.cjs")).then((n) => n.config_exports);
|
|
74
74
|
const { fetchNetworkCapabilities, formatNetworkCapabilities } = await Promise.resolve().then(() => require("./capabilities-CPcrxodx.cjs")).then((n) => n.capabilities_exports);
|
|
75
75
|
const document = await fetchNetworkCapabilities(await loadConfig());
|
|
76
76
|
if (opts.json) console.log(JSON.stringify(document, null, 2));
|
|
@@ -84,37 +84,17 @@ program.command("networks").alias("network").description("List supported graph n
|
|
|
84
84
|
process.exit(1);
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
|
-
program.command("serve").description("Start local visualization server").option("-p, --port <number>", "Port to bind (defaults to the configured serverPort)").action(async (opts) => {
|
|
88
|
-
try {
|
|
89
|
-
const { requireWorkspaceRoot } = await Promise.resolve().then(() => require("./output-root-BewoQaTx.cjs")).then((n) => n.output_root_exports);
|
|
90
|
-
const workspaceRoot = requireWorkspaceRoot();
|
|
91
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-DYiUgdzg.cjs")).then((n) => n.config_exports);
|
|
92
|
-
const { resolveServerPort } = await Promise.resolve().then(() => require("./resolve-port-CbaEoODz.cjs"));
|
|
93
|
-
const config = await loadConfig();
|
|
94
|
-
const port = resolveServerPort(opts.port, config.serverPort);
|
|
95
|
-
const { startServer } = await Promise.resolve().then(() => require("./server-BjprY9Ef.cjs")).then((n) => n.server_exports);
|
|
96
|
-
console.log(`Workspace: ${workspaceRoot}`);
|
|
97
|
-
startServer(port);
|
|
98
|
-
} catch (err) {
|
|
99
|
-
console.error(err.message);
|
|
100
|
-
process.exit(1);
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
87
|
program.command("status").description("Show toolkit status and configuration").action(async () => {
|
|
104
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
105
|
-
const { findActiveWorkspace, activeDataDir } = await Promise.resolve().then(() => require("./active-Bc13hJIm.cjs")).then((n) => n.active_exports);
|
|
88
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-B542AM4w.cjs")).then((n) => n.config_exports);
|
|
106
89
|
const config = await loadConfig();
|
|
107
|
-
const workspace = findActiveWorkspace();
|
|
108
90
|
const graphMcpStatus = config.graphMcpMode === "debug" && config.graphMcpAuthToken?.trim() ? "bearer access mode" : `${config.graphMcpMode} mode`;
|
|
109
|
-
console.log("Config: ",
|
|
110
|
-
if (workspace) console.log("Workspace:", workspace.root);
|
|
111
|
-
console.log("Server: ", `http://127.0.0.1:${config.serverPort}`);
|
|
91
|
+
console.log("Config: ", config.dataDir);
|
|
112
92
|
console.log("Chain Insights Graph:", graphMcpStatus);
|
|
113
93
|
console.log("Graph endpoint:", config.graphMcpEndpoint);
|
|
114
94
|
});
|
|
115
95
|
program.command("update").description("Check npmjs for a newer Chain Insights release and update this CLI").option("--check", "Only check for a newer release").option("--dry-run", "Print the update command without running it").action(async (opts) => {
|
|
116
96
|
try {
|
|
117
|
-
const { checkForUpdate, runPackageUpdate } = await Promise.resolve().then(() => require("./update-
|
|
97
|
+
const { checkForUpdate, runPackageUpdate } = await Promise.resolve().then(() => require("./update-RKd0UW90.cjs"));
|
|
118
98
|
const result = await checkForUpdate();
|
|
119
99
|
if (result.error) throw new Error(`Could not check npmjs for updates: ${result.error}`);
|
|
120
100
|
if (!result.updateAvailable || !result.latestVersion) {
|
|
@@ -139,7 +119,7 @@ program.command("update").description("Check npmjs for a newer Chain Insights re
|
|
|
139
119
|
});
|
|
140
120
|
program.command("debug").description("Configure Chain Insights Graph debug mode").addCommand(new commander.Command("on").description("Enable Chain Insights Graph debug mode without x402 payments").requiredOption("--token <token>", "Debug bearer token").option("--endpoint <url>", "Chain Insights Graph endpoint").action(async (opts) => {
|
|
141
121
|
try {
|
|
142
|
-
const { saveConfig } = await Promise.resolve().then(() => require("./config-
|
|
122
|
+
const { saveConfig } = await Promise.resolve().then(() => require("./config-B542AM4w.cjs")).then((n) => n.config_exports);
|
|
143
123
|
await saveConfig({
|
|
144
124
|
graphMcpMode: "debug",
|
|
145
125
|
graphMcpAuthToken: opts.token,
|
|
@@ -154,7 +134,7 @@ program.command("debug").description("Configure Chain Insights Graph debug mode"
|
|
|
154
134
|
}
|
|
155
135
|
})).addCommand(new commander.Command("off").description("Disable Chain Insights Graph debug mode and use paid x402 calls").action(async () => {
|
|
156
136
|
try {
|
|
157
|
-
const { saveConfig } = await Promise.resolve().then(() => require("./config-
|
|
137
|
+
const { saveConfig } = await Promise.resolve().then(() => require("./config-B542AM4w.cjs")).then((n) => n.config_exports);
|
|
158
138
|
await saveConfig({
|
|
159
139
|
graphMcpMode: "paid",
|
|
160
140
|
graphMcpAuthToken: ""
|
|
@@ -167,7 +147,7 @@ program.command("debug").description("Configure Chain Insights Graph debug mode"
|
|
|
167
147
|
}
|
|
168
148
|
})).addCommand(new commander.Command("status").description("Show Chain Insights Graph payment/debug mode").action(async () => {
|
|
169
149
|
try {
|
|
170
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
150
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-B542AM4w.cjs")).then((n) => n.config_exports);
|
|
171
151
|
const config = await loadConfig();
|
|
172
152
|
console.log(`Chain Insights Graph mode: ${config.graphMcpMode}`);
|
|
173
153
|
console.log(`Graph endpoint: ${config.graphMcpEndpoint}`);
|
|
@@ -182,7 +162,7 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
182
162
|
try {
|
|
183
163
|
const normalizedKey = key.trim();
|
|
184
164
|
if (!normalizedKey) throw new Error("Test access key is required");
|
|
185
|
-
const { saveConfig } = await Promise.resolve().then(() => require("./config-
|
|
165
|
+
const { saveConfig } = await Promise.resolve().then(() => require("./config-B542AM4w.cjs")).then((n) => n.config_exports);
|
|
186
166
|
await saveConfig({
|
|
187
167
|
graphMcpMode: "debug",
|
|
188
168
|
graphMcpAuthToken: normalizedKey,
|
|
@@ -197,7 +177,7 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
197
177
|
}
|
|
198
178
|
})).addCommand(new commander.Command("clear").description("Remove the Chain Insights Graph test access key and use paid x402 calls").action(async () => {
|
|
199
179
|
try {
|
|
200
|
-
const { saveConfig } = await Promise.resolve().then(() => require("./config-
|
|
180
|
+
const { saveConfig } = await Promise.resolve().then(() => require("./config-B542AM4w.cjs")).then((n) => n.config_exports);
|
|
201
181
|
await saveConfig({
|
|
202
182
|
graphMcpMode: "paid",
|
|
203
183
|
graphMcpAuthToken: ""
|
|
@@ -210,7 +190,7 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
210
190
|
}
|
|
211
191
|
})).addCommand(new commander.Command("status").description("Show Chain Insights Graph test access key status").action(async () => {
|
|
212
192
|
try {
|
|
213
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
193
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-B542AM4w.cjs")).then((n) => n.config_exports);
|
|
214
194
|
const config = await loadConfig();
|
|
215
195
|
console.log(`Graph endpoint: ${config.graphMcpEndpoint}`);
|
|
216
196
|
console.log(`Access key: ${config.graphMcpAuthToken?.trim() ? "configured" : "not configured"}`);
|
|
@@ -220,22 +200,6 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
220
200
|
process.exit(1);
|
|
221
201
|
}
|
|
222
202
|
}));
|
|
223
|
-
program.command("init").description("Initialize an investigation workspace").argument("[dir]", "Workspace directory to initialize", ".").option("--force", "Overwrite existing workspace files").action(async (dir, opts) => {
|
|
224
|
-
try {
|
|
225
|
-
const { initWorkspace } = await Promise.resolve().then(() => require("./init-C3AVZHFb.cjs"));
|
|
226
|
-
const result = await initWorkspace({
|
|
227
|
-
targetDir: dir,
|
|
228
|
-
force: opts.force
|
|
229
|
-
});
|
|
230
|
-
console.log(`Workspace initialized: ${result.workspaceRoot}`);
|
|
231
|
-
console.log(`Files written: ${result.filesWritten.length}`);
|
|
232
|
-
const { maybePromptForUpdate } = await Promise.resolve().then(() => require("./update-BJoXYucO.cjs"));
|
|
233
|
-
await maybePromptForUpdate();
|
|
234
|
-
} catch (err) {
|
|
235
|
-
console.error(err.message);
|
|
236
|
-
process.exit(1);
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
203
|
program.command("setup").description("Configure external MCP clients").addCommand(new commander.Command("claude-code").alias("claude").description("Install Claude Code skills and register the MCP proxy").action(() => {
|
|
240
204
|
runInstaller("--claude");
|
|
241
205
|
})).addCommand(new commander.Command("codex").description("Install Codex skills and register the MCP proxy").action(() => {
|
|
@@ -244,8 +208,8 @@ program.command("setup").description("Configure external MCP clients").addComman
|
|
|
244
208
|
runInstaller("--hermes");
|
|
245
209
|
}));
|
|
246
210
|
program.command("config").description("Read or write configuration values").addCommand(new commander.Command("get").argument("<key>", "Config key to read").action(async (key) => {
|
|
247
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
248
|
-
const { CONFIG_KEYS } = await Promise.resolve().then(() => require("./schema-
|
|
211
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-B542AM4w.cjs")).then((n) => n.config_exports);
|
|
212
|
+
const { CONFIG_KEYS } = await Promise.resolve().then(() => require("./schema-CtFWYoJz.cjs")).then((n) => n.schema_exports);
|
|
249
213
|
if (!CONFIG_KEYS.includes(key)) {
|
|
250
214
|
console.error(`Unknown config key: ${key}`);
|
|
251
215
|
process.exit(1);
|
|
@@ -265,8 +229,8 @@ program.command("config").description("Read or write configuration values").addC
|
|
|
265
229
|
}
|
|
266
230
|
return;
|
|
267
231
|
}
|
|
268
|
-
const { loadConfig, saveConfig } = await Promise.resolve().then(() => require("./config-
|
|
269
|
-
const { CONFIG_KEYS, DEFAULT_CONFIG } = await Promise.resolve().then(() => require("./schema-
|
|
232
|
+
const { loadConfig, saveConfig } = await Promise.resolve().then(() => require("./config-B542AM4w.cjs")).then((n) => n.config_exports);
|
|
233
|
+
const { CONFIG_KEYS, DEFAULT_CONFIG } = await Promise.resolve().then(() => require("./schema-CtFWYoJz.cjs")).then((n) => n.schema_exports);
|
|
270
234
|
const current = await loadConfig();
|
|
271
235
|
if (!CONFIG_KEYS.includes(key)) {
|
|
272
236
|
console.error(`Unknown config key: ${key}`);
|
|
@@ -327,7 +291,7 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
327
291
|
})).addCommand(new commander.Command("topup").description("Open a local browser page to top up the payment wallet").option("--no-open", "Print the top-up URL without opening a browser").option("--json", "Print machine-readable top-up metadata").action(async (opts) => {
|
|
328
292
|
try {
|
|
329
293
|
const { buildTopupInfo, getWalletAccount } = await Promise.resolve().then(() => require("./tools-lPY6k-vJ.cjs")).then((n) => n.tools_exports);
|
|
330
|
-
const { startTopupServer } = await Promise.resolve().then(() => require("./topup-server-
|
|
294
|
+
const { startTopupServer } = await Promise.resolve().then(() => require("./topup-server-YN3iHrHW.cjs")).then((n) => n.topup_server_exports);
|
|
331
295
|
const account = await getWalletAccount();
|
|
332
296
|
const url = await startTopupServer(account);
|
|
333
297
|
const info = buildTopupInfo(account.address, url);
|
|
@@ -359,8 +323,8 @@ program.command("mcp").description("Interact with the Chain Insights MCP endpoin
|
|
|
359
323
|
try {
|
|
360
324
|
const { loadSchema, saveSchema } = await Promise.resolve().then(() => require("./schema-cache-n7Gbhvsj.cjs"));
|
|
361
325
|
const { formatToolsTable } = await Promise.resolve().then(() => require("./format-9NLBykEL.cjs"));
|
|
362
|
-
const { visibleRemoteTools } = await Promise.resolve().then(() => require("./tool-visibility-
|
|
363
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
326
|
+
const { visibleRemoteTools } = await Promise.resolve().then(() => require("./tool-visibility-C8F9Yoxy.cjs")).then((n) => n.tool_visibility_exports);
|
|
327
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-B542AM4w.cjs")).then((n) => n.config_exports);
|
|
364
328
|
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-CqAzD519.cjs")).then((n) => n.client_exports);
|
|
365
329
|
const config = await loadConfig();
|
|
366
330
|
const graphMcpEndpoint = resolveGraphMcpEndpoint(config);
|
|
@@ -389,7 +353,7 @@ program.command("mcp").description("Interact with the Chain Insights MCP endpoin
|
|
|
389
353
|
})).addCommand(new commander.Command("aml-address-risk").description("Screen an address for AML risk, exchange behavior, and optional comparison with another address").requiredOption("--address <address>", "Full blockchain address to screen").requiredOption("--network <network>", "Network to query. Run `cia mcp networks` for supported networks.").option("--compare-address <address>", "Optional second address to compare against the screened address").action(async (opts) => {
|
|
390
354
|
try {
|
|
391
355
|
await withGraphMcpClient("chain-insights-cli-aml-address-risk", async (client) => {
|
|
392
|
-
const { addressRisk } = await Promise.resolve().then(() => require("./public-tools-
|
|
356
|
+
const { addressRisk } = await Promise.resolve().then(() => require("./public-tools-Bou25cki.cjs"));
|
|
393
357
|
const result = await addressRisk(client, {
|
|
394
358
|
address: opts.address,
|
|
395
359
|
network: opts.network,
|
|
@@ -404,7 +368,7 @@ program.command("mcp").description("Interact with the Chain Insights MCP endpoin
|
|
|
404
368
|
})).addCommand(new commander.Command("call").description("Call an MCP tool directly (debug)").argument("<tool>", "Tool name to call").argument("[args...]", "Key=value arguments (e.g. address=0x1234... network=robinhood)").action(async (tool, rawArgs) => {
|
|
405
369
|
try {
|
|
406
370
|
const { parseMcpCallArgs } = await Promise.resolve().then(() => require("./call-args-DAiQSDmD.cjs"));
|
|
407
|
-
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await Promise.resolve().then(() => require("./tool-visibility-
|
|
371
|
+
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await Promise.resolve().then(() => require("./tool-visibility-C8F9Yoxy.cjs")).then((n) => n.tool_visibility_exports);
|
|
408
372
|
const args = parseMcpCallArgs(rawArgs);
|
|
409
373
|
assertPublicMcpToolName(tool);
|
|
410
374
|
validatePublicMcpToolArguments(tool, args);
|
|
@@ -437,7 +401,7 @@ program.command("mcp").description("Interact with the Chain Insights MCP endpoin
|
|
|
437
401
|
return;
|
|
438
402
|
}
|
|
439
403
|
if (tool === "aml_address_risk") {
|
|
440
|
-
const { addressRisk } = await Promise.resolve().then(() => require("./public-tools-
|
|
404
|
+
const { addressRisk } = await Promise.resolve().then(() => require("./public-tools-Bou25cki.cjs"));
|
|
441
405
|
const result = await addressRisk(client, {
|
|
442
406
|
address: String(args["address"] ?? ""),
|
|
443
407
|
network: String(args["network"] ?? ""),
|
|
@@ -456,32 +420,6 @@ program.command("mcp").description("Interact with the Chain Insights MCP endpoin
|
|
|
456
420
|
process.exit(1);
|
|
457
421
|
}
|
|
458
422
|
}));
|
|
459
|
-
program.command("viz").description("Generate a workspace visualization").argument("[source-id]", "Workspace graph report ID to render").option("--data <file>", "Raw transaction JSON file for ad-hoc visualization").option("-p, --port <number>", "Server port (defaults to the configured serverPort)").action(async (sourceId, opts) => {
|
|
460
|
-
try {
|
|
461
|
-
if (!sourceId && !opts.data) {
|
|
462
|
-
console.error("Provide either a visualization source ID or --data <file.json>");
|
|
463
|
-
process.exit(1);
|
|
464
|
-
}
|
|
465
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-DYiUgdzg.cjs")).then((n) => n.config_exports);
|
|
466
|
-
const { resolveServerPort } = await Promise.resolve().then(() => require("./resolve-port-CbaEoODz.cjs"));
|
|
467
|
-
const config = await loadConfig();
|
|
468
|
-
const port = resolveServerPort(opts.port, config.serverPort);
|
|
469
|
-
const { generateVisualization } = await Promise.resolve().then(() => require("./viz-BJ_kyRjI.cjs")).then((n) => n.viz_exports);
|
|
470
|
-
const result = await generateVisualization({
|
|
471
|
-
sourceId,
|
|
472
|
-
dataFile: opts.data
|
|
473
|
-
});
|
|
474
|
-
const { startServer } = await Promise.resolve().then(() => require("./server-BjprY9Ef.cjs")).then((n) => n.server_exports);
|
|
475
|
-
startServer(port);
|
|
476
|
-
const url = `http://127.0.0.1:${port}/viz/${result.vizId}`;
|
|
477
|
-
console.log(`Visualization: ${url}`);
|
|
478
|
-
const open = (await import("open")).default;
|
|
479
|
-
await open(url);
|
|
480
|
-
} catch (err) {
|
|
481
|
-
console.error(err.message);
|
|
482
|
-
process.exit(1);
|
|
483
|
-
}
|
|
484
|
-
});
|
|
485
423
|
program.parseAsync(process.argv).catch((err) => {
|
|
486
424
|
console.error(err.message);
|
|
487
425
|
process.exit(1);
|
package/dist/cli.mjs
CHANGED
|
@@ -48,7 +48,7 @@ function runInstaller(flag) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
async function withGraphMcpClient(name, fn) {
|
|
51
|
-
const { loadConfig } = await import("./config-
|
|
51
|
+
const { loadConfig } = await import("./config-DbbPiGk0.mjs").then((n) => n.t);
|
|
52
52
|
const config = await loadConfig();
|
|
53
53
|
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-D4aM4bzP.mjs").then((n) => n.r);
|
|
54
54
|
const paymentFetch = await createConfiguredGraphMcpFetch(config);
|
|
@@ -68,7 +68,7 @@ async function withGraphMcpClient(name, fn) {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
async function printNetworkCapabilities(opts) {
|
|
71
|
-
const { loadConfig } = await import("./config-
|
|
71
|
+
const { loadConfig } = await import("./config-DbbPiGk0.mjs").then((n) => n.t);
|
|
72
72
|
const { fetchNetworkCapabilities, formatNetworkCapabilities } = await import("./capabilities-BZI6qROg.mjs").then((n) => n.t);
|
|
73
73
|
const document = await fetchNetworkCapabilities(await loadConfig());
|
|
74
74
|
if (opts.json) console.log(JSON.stringify(document, null, 2));
|
|
@@ -82,37 +82,17 @@ program.command("networks").alias("network").description("List supported graph n
|
|
|
82
82
|
process.exit(1);
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
-
program.command("serve").description("Start local visualization server").option("-p, --port <number>", "Port to bind (defaults to the configured serverPort)").action(async (opts) => {
|
|
86
|
-
try {
|
|
87
|
-
const { requireWorkspaceRoot } = await import("./output-root-BK4pdjyz.mjs").then((n) => n.t);
|
|
88
|
-
const workspaceRoot = requireWorkspaceRoot();
|
|
89
|
-
const { loadConfig } = await import("./config-DiQs0rQX.mjs").then((n) => n.t);
|
|
90
|
-
const { resolveServerPort } = await import("./resolve-port-DxPK7Ipx.mjs");
|
|
91
|
-
const config = await loadConfig();
|
|
92
|
-
const port = resolveServerPort(opts.port, config.serverPort);
|
|
93
|
-
const { startServer } = await import("./server-BDmHAF1w.mjs").then((n) => n.t);
|
|
94
|
-
console.log(`Workspace: ${workspaceRoot}`);
|
|
95
|
-
startServer(port);
|
|
96
|
-
} catch (err) {
|
|
97
|
-
console.error(err.message);
|
|
98
|
-
process.exit(1);
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
85
|
program.command("status").description("Show toolkit status and configuration").action(async () => {
|
|
102
|
-
const { loadConfig } = await import("./config-
|
|
103
|
-
const { findActiveWorkspace, activeDataDir } = await import("./active-BQopLul8.mjs").then((n) => n.t);
|
|
86
|
+
const { loadConfig } = await import("./config-DbbPiGk0.mjs").then((n) => n.t);
|
|
104
87
|
const config = await loadConfig();
|
|
105
|
-
const workspace = findActiveWorkspace();
|
|
106
88
|
const graphMcpStatus = config.graphMcpMode === "debug" && config.graphMcpAuthToken?.trim() ? "bearer access mode" : `${config.graphMcpMode} mode`;
|
|
107
|
-
console.log("Config: ",
|
|
108
|
-
if (workspace) console.log("Workspace:", workspace.root);
|
|
109
|
-
console.log("Server: ", `http://127.0.0.1:${config.serverPort}`);
|
|
89
|
+
console.log("Config: ", config.dataDir);
|
|
110
90
|
console.log("Chain Insights Graph:", graphMcpStatus);
|
|
111
91
|
console.log("Graph endpoint:", config.graphMcpEndpoint);
|
|
112
92
|
});
|
|
113
93
|
program.command("update").description("Check npmjs for a newer Chain Insights release and update this CLI").option("--check", "Only check for a newer release").option("--dry-run", "Print the update command without running it").action(async (opts) => {
|
|
114
94
|
try {
|
|
115
|
-
const { checkForUpdate, runPackageUpdate } = await import("./update-
|
|
95
|
+
const { checkForUpdate, runPackageUpdate } = await import("./update-MsoEFbhn.mjs");
|
|
116
96
|
const result = await checkForUpdate();
|
|
117
97
|
if (result.error) throw new Error(`Could not check npmjs for updates: ${result.error}`);
|
|
118
98
|
if (!result.updateAvailable || !result.latestVersion) {
|
|
@@ -137,7 +117,7 @@ program.command("update").description("Check npmjs for a newer Chain Insights re
|
|
|
137
117
|
});
|
|
138
118
|
program.command("debug").description("Configure Chain Insights Graph debug mode").addCommand(new Command("on").description("Enable Chain Insights Graph debug mode without x402 payments").requiredOption("--token <token>", "Debug bearer token").option("--endpoint <url>", "Chain Insights Graph endpoint").action(async (opts) => {
|
|
139
119
|
try {
|
|
140
|
-
const { saveConfig } = await import("./config-
|
|
120
|
+
const { saveConfig } = await import("./config-DbbPiGk0.mjs").then((n) => n.t);
|
|
141
121
|
await saveConfig({
|
|
142
122
|
graphMcpMode: "debug",
|
|
143
123
|
graphMcpAuthToken: opts.token,
|
|
@@ -152,7 +132,7 @@ program.command("debug").description("Configure Chain Insights Graph debug mode"
|
|
|
152
132
|
}
|
|
153
133
|
})).addCommand(new Command("off").description("Disable Chain Insights Graph debug mode and use paid x402 calls").action(async () => {
|
|
154
134
|
try {
|
|
155
|
-
const { saveConfig } = await import("./config-
|
|
135
|
+
const { saveConfig } = await import("./config-DbbPiGk0.mjs").then((n) => n.t);
|
|
156
136
|
await saveConfig({
|
|
157
137
|
graphMcpMode: "paid",
|
|
158
138
|
graphMcpAuthToken: ""
|
|
@@ -165,7 +145,7 @@ program.command("debug").description("Configure Chain Insights Graph debug mode"
|
|
|
165
145
|
}
|
|
166
146
|
})).addCommand(new Command("status").description("Show Chain Insights Graph payment/debug mode").action(async () => {
|
|
167
147
|
try {
|
|
168
|
-
const { loadConfig } = await import("./config-
|
|
148
|
+
const { loadConfig } = await import("./config-DbbPiGk0.mjs").then((n) => n.t);
|
|
169
149
|
const config = await loadConfig();
|
|
170
150
|
console.log(`Chain Insights Graph mode: ${config.graphMcpMode}`);
|
|
171
151
|
console.log(`Graph endpoint: ${config.graphMcpEndpoint}`);
|
|
@@ -180,7 +160,7 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
180
160
|
try {
|
|
181
161
|
const normalizedKey = key.trim();
|
|
182
162
|
if (!normalizedKey) throw new Error("Test access key is required");
|
|
183
|
-
const { saveConfig } = await import("./config-
|
|
163
|
+
const { saveConfig } = await import("./config-DbbPiGk0.mjs").then((n) => n.t);
|
|
184
164
|
await saveConfig({
|
|
185
165
|
graphMcpMode: "debug",
|
|
186
166
|
graphMcpAuthToken: normalizedKey,
|
|
@@ -195,7 +175,7 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
195
175
|
}
|
|
196
176
|
})).addCommand(new Command("clear").description("Remove the Chain Insights Graph test access key and use paid x402 calls").action(async () => {
|
|
197
177
|
try {
|
|
198
|
-
const { saveConfig } = await import("./config-
|
|
178
|
+
const { saveConfig } = await import("./config-DbbPiGk0.mjs").then((n) => n.t);
|
|
199
179
|
await saveConfig({
|
|
200
180
|
graphMcpMode: "paid",
|
|
201
181
|
graphMcpAuthToken: ""
|
|
@@ -208,7 +188,7 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
208
188
|
}
|
|
209
189
|
})).addCommand(new Command("status").description("Show Chain Insights Graph test access key status").action(async () => {
|
|
210
190
|
try {
|
|
211
|
-
const { loadConfig } = await import("./config-
|
|
191
|
+
const { loadConfig } = await import("./config-DbbPiGk0.mjs").then((n) => n.t);
|
|
212
192
|
const config = await loadConfig();
|
|
213
193
|
console.log(`Graph endpoint: ${config.graphMcpEndpoint}`);
|
|
214
194
|
console.log(`Access key: ${config.graphMcpAuthToken?.trim() ? "configured" : "not configured"}`);
|
|
@@ -218,22 +198,6 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
218
198
|
process.exit(1);
|
|
219
199
|
}
|
|
220
200
|
}));
|
|
221
|
-
program.command("init").description("Initialize an investigation workspace").argument("[dir]", "Workspace directory to initialize", ".").option("--force", "Overwrite existing workspace files").action(async (dir, opts) => {
|
|
222
|
-
try {
|
|
223
|
-
const { initWorkspace } = await import("./init-CO-PRYhT.mjs");
|
|
224
|
-
const result = await initWorkspace({
|
|
225
|
-
targetDir: dir,
|
|
226
|
-
force: opts.force
|
|
227
|
-
});
|
|
228
|
-
console.log(`Workspace initialized: ${result.workspaceRoot}`);
|
|
229
|
-
console.log(`Files written: ${result.filesWritten.length}`);
|
|
230
|
-
const { maybePromptForUpdate } = await import("./update-CJUfGCxs.mjs");
|
|
231
|
-
await maybePromptForUpdate();
|
|
232
|
-
} catch (err) {
|
|
233
|
-
console.error(err.message);
|
|
234
|
-
process.exit(1);
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
201
|
program.command("setup").description("Configure external MCP clients").addCommand(new Command("claude-code").alias("claude").description("Install Claude Code skills and register the MCP proxy").action(() => {
|
|
238
202
|
runInstaller("--claude");
|
|
239
203
|
})).addCommand(new Command("codex").description("Install Codex skills and register the MCP proxy").action(() => {
|
|
@@ -242,8 +206,8 @@ program.command("setup").description("Configure external MCP clients").addComman
|
|
|
242
206
|
runInstaller("--hermes");
|
|
243
207
|
}));
|
|
244
208
|
program.command("config").description("Read or write configuration values").addCommand(new Command("get").argument("<key>", "Config key to read").action(async (key) => {
|
|
245
|
-
const { loadConfig } = await import("./config-
|
|
246
|
-
const { CONFIG_KEYS } = await import("./schema-
|
|
209
|
+
const { loadConfig } = await import("./config-DbbPiGk0.mjs").then((n) => n.t);
|
|
210
|
+
const { CONFIG_KEYS } = await import("./schema-B0OuHW_l.mjs").then((n) => n.r);
|
|
247
211
|
if (!CONFIG_KEYS.includes(key)) {
|
|
248
212
|
console.error(`Unknown config key: ${key}`);
|
|
249
213
|
process.exit(1);
|
|
@@ -263,8 +227,8 @@ program.command("config").description("Read or write configuration values").addC
|
|
|
263
227
|
}
|
|
264
228
|
return;
|
|
265
229
|
}
|
|
266
|
-
const { loadConfig, saveConfig } = await import("./config-
|
|
267
|
-
const { CONFIG_KEYS, DEFAULT_CONFIG } = await import("./schema-
|
|
230
|
+
const { loadConfig, saveConfig } = await import("./config-DbbPiGk0.mjs").then((n) => n.t);
|
|
231
|
+
const { CONFIG_KEYS, DEFAULT_CONFIG } = await import("./schema-B0OuHW_l.mjs").then((n) => n.r);
|
|
268
232
|
const current = await loadConfig();
|
|
269
233
|
if (!CONFIG_KEYS.includes(key)) {
|
|
270
234
|
console.error(`Unknown config key: ${key}`);
|
|
@@ -325,7 +289,7 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
325
289
|
})).addCommand(new Command("topup").description("Open a local browser page to top up the payment wallet").option("--no-open", "Print the top-up URL without opening a browser").option("--json", "Print machine-readable top-up metadata").action(async (opts) => {
|
|
326
290
|
try {
|
|
327
291
|
const { buildTopupInfo, getWalletAccount } = await import("./tools-BKLnlBG1.mjs").then((n) => n.p);
|
|
328
|
-
const { startTopupServer } = await import("./topup-server-
|
|
292
|
+
const { startTopupServer } = await import("./topup-server-BLdF1SFQ.mjs").then((n) => n.r);
|
|
329
293
|
const account = await getWalletAccount();
|
|
330
294
|
const url = await startTopupServer(account);
|
|
331
295
|
const info = buildTopupInfo(account.address, url);
|
|
@@ -357,8 +321,8 @@ program.command("mcp").description("Interact with the Chain Insights MCP endpoin
|
|
|
357
321
|
try {
|
|
358
322
|
const { loadSchema, saveSchema } = await import("./schema-cache-DJdU4MIP.mjs");
|
|
359
323
|
const { formatToolsTable } = await import("./format-Bq94jSyw.mjs");
|
|
360
|
-
const { visibleRemoteTools } = await import("./tool-visibility-
|
|
361
|
-
const { loadConfig } = await import("./config-
|
|
324
|
+
const { visibleRemoteTools } = await import("./tool-visibility-CXbwfKhv.mjs").then((n) => n.i);
|
|
325
|
+
const { loadConfig } = await import("./config-DbbPiGk0.mjs").then((n) => n.t);
|
|
362
326
|
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-D4aM4bzP.mjs").then((n) => n.r);
|
|
363
327
|
const config = await loadConfig();
|
|
364
328
|
const graphMcpEndpoint = resolveGraphMcpEndpoint(config);
|
|
@@ -387,7 +351,7 @@ program.command("mcp").description("Interact with the Chain Insights MCP endpoin
|
|
|
387
351
|
})).addCommand(new Command("aml-address-risk").description("Screen an address for AML risk, exchange behavior, and optional comparison with another address").requiredOption("--address <address>", "Full blockchain address to screen").requiredOption("--network <network>", "Network to query. Run `cia mcp networks` for supported networks.").option("--compare-address <address>", "Optional second address to compare against the screened address").action(async (opts) => {
|
|
388
352
|
try {
|
|
389
353
|
await withGraphMcpClient("chain-insights-cli-aml-address-risk", async (client) => {
|
|
390
|
-
const { addressRisk } = await import("./public-tools-
|
|
354
|
+
const { addressRisk } = await import("./public-tools-CpOLkME5.mjs");
|
|
391
355
|
const result = await addressRisk(client, {
|
|
392
356
|
address: opts.address,
|
|
393
357
|
network: opts.network,
|
|
@@ -402,7 +366,7 @@ program.command("mcp").description("Interact with the Chain Insights MCP endpoin
|
|
|
402
366
|
})).addCommand(new Command("call").description("Call an MCP tool directly (debug)").argument("<tool>", "Tool name to call").argument("[args...]", "Key=value arguments (e.g. address=0x1234... network=robinhood)").action(async (tool, rawArgs) => {
|
|
403
367
|
try {
|
|
404
368
|
const { parseMcpCallArgs } = await import("./call-args-ysbB_xdA.mjs");
|
|
405
|
-
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await import("./tool-visibility-
|
|
369
|
+
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await import("./tool-visibility-CXbwfKhv.mjs").then((n) => n.i);
|
|
406
370
|
const args = parseMcpCallArgs(rawArgs);
|
|
407
371
|
assertPublicMcpToolName(tool);
|
|
408
372
|
validatePublicMcpToolArguments(tool, args);
|
|
@@ -435,7 +399,7 @@ program.command("mcp").description("Interact with the Chain Insights MCP endpoin
|
|
|
435
399
|
return;
|
|
436
400
|
}
|
|
437
401
|
if (tool === "aml_address_risk") {
|
|
438
|
-
const { addressRisk } = await import("./public-tools-
|
|
402
|
+
const { addressRisk } = await import("./public-tools-CpOLkME5.mjs");
|
|
439
403
|
const result = await addressRisk(client, {
|
|
440
404
|
address: String(args["address"] ?? ""),
|
|
441
405
|
network: String(args["network"] ?? ""),
|
|
@@ -454,32 +418,6 @@ program.command("mcp").description("Interact with the Chain Insights MCP endpoin
|
|
|
454
418
|
process.exit(1);
|
|
455
419
|
}
|
|
456
420
|
}));
|
|
457
|
-
program.command("viz").description("Generate a workspace visualization").argument("[source-id]", "Workspace graph report ID to render").option("--data <file>", "Raw transaction JSON file for ad-hoc visualization").option("-p, --port <number>", "Server port (defaults to the configured serverPort)").action(async (sourceId, opts) => {
|
|
458
|
-
try {
|
|
459
|
-
if (!sourceId && !opts.data) {
|
|
460
|
-
console.error("Provide either a visualization source ID or --data <file.json>");
|
|
461
|
-
process.exit(1);
|
|
462
|
-
}
|
|
463
|
-
const { loadConfig } = await import("./config-DiQs0rQX.mjs").then((n) => n.t);
|
|
464
|
-
const { resolveServerPort } = await import("./resolve-port-DxPK7Ipx.mjs");
|
|
465
|
-
const config = await loadConfig();
|
|
466
|
-
const port = resolveServerPort(opts.port, config.serverPort);
|
|
467
|
-
const { generateVisualization } = await import("./viz-Uh_EF-qB.mjs").then((n) => n.n);
|
|
468
|
-
const result = await generateVisualization({
|
|
469
|
-
sourceId,
|
|
470
|
-
dataFile: opts.data
|
|
471
|
-
});
|
|
472
|
-
const { startServer } = await import("./server-BDmHAF1w.mjs").then((n) => n.t);
|
|
473
|
-
startServer(port);
|
|
474
|
-
const url = `http://127.0.0.1:${port}/viz/${result.vizId}`;
|
|
475
|
-
console.log(`Visualization: ${url}`);
|
|
476
|
-
const open = (await import("open")).default;
|
|
477
|
-
await open(url);
|
|
478
|
-
} catch (err) {
|
|
479
|
-
console.error(err.message);
|
|
480
|
-
process.exit(1);
|
|
481
|
-
}
|
|
482
|
-
});
|
|
483
421
|
program.parseAsync(process.argv).catch((err) => {
|
|
484
422
|
console.error(err.message);
|
|
485
423
|
process.exit(1);
|