chain-insights 0.75.0 → 0.76.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 +1 -0
- package/dist/{action-log-D49Par9P.mjs → action-log-Byv9Ln_6.mjs} +4 -10
- package/dist/{action-log-D49Par9P.mjs.map → action-log-Byv9Ln_6.mjs.map} +1 -1
- package/dist/{action-log-HniMMF7f.cjs → action-log-WMW6xFMx.cjs} +3 -9
- package/dist/{active-Dkf8AB1R.mjs → active-D2aabYRF.mjs} +3 -4
- package/dist/{active-Dkf8AB1R.mjs.map → active-D2aabYRF.mjs.map} +1 -1
- package/dist/{active-Bc13hJIm.cjs → active-q3yViZhc.cjs} +2 -3
- package/dist/answer-hint-BlYEBq_Y.cjs +57 -0
- package/dist/answer-hint-vOE1O6Lf.mjs +48 -0
- package/dist/answer-hint-vOE1O6Lf.mjs.map +1 -0
- package/dist/{buy-_mpdRieG.mjs → buy-B2luUbWF.mjs} +5 -6
- package/dist/{buy-_mpdRieG.mjs.map → buy-B2luUbWF.mjs.map} +1 -1
- package/dist/{buy-97M6dtEu.cjs → buy-DEoGITbT.cjs} +4 -5
- package/dist/{cache-location-CBVzUIxq.cjs → cache-location-C09AE55j.cjs} +2 -3
- package/dist/{cache-location-BO2XkfgI.mjs → cache-location-DxTTqBwk.mjs} +2 -3
- package/dist/{cache-location-BO2XkfgI.mjs.map → cache-location-DxTTqBwk.mjs.map} +1 -1
- package/dist/{call-args-B0oMK1-J.mjs → call-args-CBqbYfOE.mjs} +15 -4
- package/dist/{call-args-B0oMK1-J.mjs.map → call-args-CBqbYfOE.mjs.map} +1 -1
- package/dist/{call-args-C8Gp5gco.cjs → call-args-DXEmPeE-.cjs} +14 -2
- package/dist/{capabilities-DxojbX4D.mjs → capabilities-BRNHcabF.mjs} +5 -11
- package/dist/{capabilities-DxojbX4D.mjs.map → capabilities-BRNHcabF.mjs.map} +1 -1
- package/dist/{capabilities-Ds3320iS.cjs → capabilities-DalimVY2.cjs} +4 -10
- package/dist/{claude-desktop-Jmm4PlBZ.cjs → claude-desktop-3OksQZVE.cjs} +2 -3
- package/dist/{claude-desktop-6jwX0Lux.mjs → claude-desktop-C1SDYAP2.mjs} +2 -3
- package/dist/{claude-desktop-6jwX0Lux.mjs.map → claude-desktop-C1SDYAP2.mjs.map} +1 -1
- package/dist/cli.cjs +95 -76
- package/dist/cli.mjs +94 -75
- package/dist/cli.mjs.map +1 -1
- package/dist/{client-7qOfAdpH.mjs → client-BaHAIidE.mjs} +10 -21
- package/dist/{client-7qOfAdpH.mjs.map → client-BaHAIidE.mjs.map} +1 -1
- package/dist/{client-C9uwHnBS.cjs → client-Ddk4X9Ko.cjs} +9 -20
- package/dist/{config-BxtMoo9c.cjs → config-BdE8LcF-.cjs} +3 -5
- package/dist/{config-9MabJh5R.mjs → config-BkLIqOYq.mjs} +4 -6
- package/dist/{config-9MabJh5R.mjs.map → config-BkLIqOYq.mjs.map} +1 -1
- package/dist/{create-CpfZq2fx.mjs → create-CluDZkuF.mjs} +3 -4
- package/dist/{create-CpfZq2fx.mjs.map → create-CluDZkuF.mjs.map} +1 -1
- package/dist/{create-DdggkF04.cjs → create-DvBumvHn.cjs} +2 -3
- package/dist/{dex-registry-Chs79Ukc.cjs → dex-registry-CZQB2YhU.cjs} +4 -26
- package/dist/{dex-registry-rziydXYq.mjs → dex-registry-D6Xxi_vr.mjs} +5 -27
- package/dist/{dex-registry-rziydXYq.mjs.map → dex-registry-D6Xxi_vr.mjs.map} +1 -1
- package/dist/{dex-tool-ib_ICiyV.mjs → dex-tool-BoAYqhZO.mjs} +8 -62
- package/dist/dex-tool-BoAYqhZO.mjs.map +1 -0
- package/dist/{dex-tool-85_76Q8i.cjs → dex-tool-DsM-pSku.cjs} +12 -72
- package/dist/{format-CSesEBvS.mjs → format-CsnW5M4D.mjs} +2 -3
- package/dist/{format-CSesEBvS.mjs.map → format-CsnW5M4D.mjs.map} +1 -1
- package/dist/{format-DfhRQq4L.cjs → format-DUzmoeaE.cjs} +1 -2
- package/dist/{graph-schema-DNJXDaTn.cjs → graph-schema-C8Pi6r7c.cjs} +8 -25
- package/dist/{graph-schema-Bxqwukqu.mjs → graph-schema-D4LAefGf.mjs} +9 -26
- package/dist/{graph-schema-Bxqwukqu.mjs.map → graph-schema-D4LAefGf.mjs.map} +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +0 -16
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -16
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/{known-keys-B87ZqOgE.mjs → known-keys-BbuzCZOW.mjs} +4 -7
- package/dist/{known-keys-B87ZqOgE.mjs.map → known-keys-BbuzCZOW.mjs.map} +1 -1
- package/dist/{known-keys-PKZF5GYd.cjs → known-keys-Cy8lKDOA.cjs} +3 -6
- package/dist/mcp-proxy.cjs +65 -39
- package/dist/mcp-proxy.d.cts +2 -2
- package/dist/mcp-proxy.d.cts.map +1 -1
- package/dist/mcp-proxy.d.mts +2 -2
- package/dist/mcp-proxy.d.mts.map +1 -1
- package/dist/mcp-proxy.mjs +63 -38
- package/dist/mcp-proxy.mjs.map +1 -1
- package/dist/{print-result-if-AbNLY.cjs → print-result-BYppJlUi.cjs} +19 -19
- package/dist/{print-result-BtEAn2Wl.mjs → print-result-IFARsMnL.mjs} +9 -21
- package/dist/print-result-IFARsMnL.mjs.map +1 -0
- package/dist/{public-tools-COG3pCpD.cjs → public-tools-Cfc1OPNS.cjs} +8 -13
- package/dist/{public-tools-DIJs4SHz.mjs → public-tools-DXlZcanX.mjs} +8 -13
- package/dist/{public-tools-DIJs4SHz.mjs.map → public-tools-DXlZcanX.mjs.map} +1 -1
- package/dist/{quote-DfTut0cx.mjs → quote-41CbMc37.mjs} +2 -3
- package/dist/{quote-DfTut0cx.mjs.map → quote-41CbMc37.mjs.map} +1 -1
- package/dist/{quote-B9sYNOiv.cjs → quote-pFKcSvMv.cjs} +1 -2
- package/dist/{request-timeout-CYmQF8N7.cjs → request-timeout-DxwNijQD.cjs} +1 -2
- package/dist/{request-timeout-lBBe0mGf.mjs → request-timeout-K3ljP0pa.mjs} +2 -3
- package/dist/{request-timeout-lBBe0mGf.mjs.map → request-timeout-K3ljP0pa.mjs.map} +1 -1
- package/dist/{robinhood-CCTMagwM.mjs → robinhood-0NZsA6ZW.mjs} +2 -3
- package/dist/robinhood-0NZsA6ZW.mjs.map +1 -0
- package/dist/{robinhood-ChiT69sc.cjs → robinhood-DumTxvlA.cjs} +1 -2
- package/dist/{rolldown-runtime-8H4AJuhK.mjs → rolldown-runtime-BJohB4LM.mjs} +1 -2
- package/dist/{rolldown-runtime-C0BPl7ul.cjs → rolldown-runtime-BW-eSwOZ.cjs} +1 -2
- package/dist/{rules-BWdbOtHi.mjs → rules-B3w9pCeQ.mjs} +2 -3
- package/dist/{rules-BWdbOtHi.mjs.map → rules-B3w9pCeQ.mjs.map} +1 -1
- package/dist/{rules-BD-cNHMX.cjs → rules-BKwfmNsJ.cjs} +1 -2
- package/dist/{schema-KjZqCHbu.mjs → schema-CKnQsdw9.mjs} +6 -13
- package/dist/{schema-KjZqCHbu.mjs.map → schema-CKnQsdw9.mjs.map} +1 -1
- package/dist/{schema-tX0U0-VI.cjs → schema-CSESfCvA.cjs} +5 -12
- package/dist/{schema-cache-DRObKUvS.mjs → schema-cache-BfKHodDY.mjs} +3 -4
- package/dist/{schema-cache-DRObKUvS.mjs.map → schema-cache-BfKHodDY.mjs.map} +1 -1
- package/dist/{schema-cache-C7v9ml6S.cjs → schema-cache-NLgJmh4X.cjs} +3 -4
- package/dist/{skill-refresh-xYWZ_hua.mjs → skill-refresh-BchIsODN.mjs} +2 -3
- package/dist/{skill-refresh-xYWZ_hua.mjs.map → skill-refresh-BchIsODN.mjs.map} +1 -1
- package/dist/{skill-refresh-Be2D5FrX.cjs → skill-refresh-DaCTxhhy.cjs} +2 -3
- package/dist/{subscription-status-DIuH84fM.mjs → subscription-status-5WfPhSep.mjs} +3 -4
- package/dist/{subscription-status-DIuH84fM.mjs.map → subscription-status-5WfPhSep.mjs.map} +1 -1
- package/dist/{subscription-status-9tMfD90J.cjs → subscription-status-w4zI2KCK.cjs} +2 -3
- package/dist/token-lookup-BJ00JO9A.cjs +342 -0
- package/dist/token-lookup-XnyisLQW.mjs +303 -0
- package/dist/token-lookup-XnyisLQW.mjs.map +1 -0
- package/dist/{tool-visibility-DTAYvE9E.cjs → tool-visibility-DIpgPULN.cjs} +5 -10
- package/dist/{tool-visibility-zcmwMSbn.mjs → tool-visibility-Dy3psowS.mjs} +6 -11
- package/dist/tool-visibility-Dy3psowS.mjs.map +1 -0
- package/dist/{tools-D9ep9E7Q.mjs → tools-6pZo4h_p.mjs} +6 -21
- package/dist/{tools-D9ep9E7Q.mjs.map → tools-6pZo4h_p.mjs.map} +1 -1
- package/dist/{tools-Cmnq7yip.cjs → tools-DZLizem9.cjs} +5 -20
- package/dist/{topup-B6gZbTmv.mjs → topup--7JTo4UQ.mjs} +6 -7
- package/dist/{topup-B6gZbTmv.mjs.map → topup--7JTo4UQ.mjs.map} +1 -1
- package/dist/{topup-DVTCU2le.cjs → topup-BgI9OcUd.cjs} +5 -6
- package/dist/{topup-server-ShuYSyBY.cjs → topup-server-D9Uk1Th3.cjs} +7 -24
- package/dist/{topup-server-KQDviFXG.mjs → topup-server-DR0HaUcR.mjs} +8 -25
- package/dist/{topup-server-KQDviFXG.mjs.map → topup-server-DR0HaUcR.mjs.map} +1 -1
- package/dist/{topup-server-BcT7DIpd.mjs → topup-server-DlwzFEF1.mjs} +5 -12
- package/dist/{topup-server-BcT7DIpd.mjs.map → topup-server-DlwzFEF1.mjs.map} +1 -1
- package/dist/{topup-server-f4Gx0vji.cjs → topup-server-H1M_7PJK.cjs} +4 -11
- package/dist/{transport-error-C7OQjmC7.mjs → transport-error-68G35VPH.mjs} +3 -4
- package/dist/{transport-error-C7OQjmC7.mjs.map → transport-error-68G35VPH.mjs.map} +1 -1
- package/dist/{transport-error-qDWQn8hb.cjs → transport-error-DXy1iTpS.cjs} +2 -3
- package/dist/{update-DqBhBXFs.mjs → update-BH8F4cQ2.mjs} +3 -4
- package/dist/{update-DqBhBXFs.mjs.map → update-BH8F4cQ2.mjs.map} +1 -1
- package/dist/{update-NowrCmjR.cjs → update-DUDdQSEU.cjs} +2 -3
- package/dist/{usage-status-Frot6fPG.mjs → usage-status-BUZgRl4r.mjs} +3 -5
- package/dist/{usage-status-Frot6fPG.mjs.map → usage-status-BUZgRl4r.mjs.map} +1 -1
- package/dist/{usage-status-DonwoLR3.cjs → usage-status-DnV3I3gX.cjs} +2 -4
- package/dist/{wallet-QTo5YCFR.mjs → wallet-B1M0HdQh.mjs} +4 -8
- package/dist/{wallet-QTo5YCFR.mjs.map → wallet-B1M0HdQh.mjs.map} +1 -1
- package/dist/{wallet-CgIAfdxL.cjs → wallet-BubGd_sG.cjs} +3 -7
- package/docs/mcp-proxy.md +34 -0
- package/docs/stability.md +3 -2
- package/package.json +1 -1
- package/skills/chain-insights-cypher/SKILL.md +3 -0
- package/dist/dex-tool-ib_ICiyV.mjs.map +0 -1
- package/dist/print-result-BtEAn2Wl.mjs.map +0 -1
- package/dist/robinhood-CCTMagwM.mjs.map +0 -1
- package/dist/tool-visibility-zcmwMSbn.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as PACKAGE_INFO, r as printMcpTextContent, u as PACKAGE_VERSION } from "./print-result-IFARsMnL.mjs";
|
|
2
2
|
import { Command, Option } from "commander";
|
|
3
3
|
import { execFileSync } from "node:child_process";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import path from "node:path";
|
|
6
|
-
|
|
6
|
+
// src/investigation/workflows.ts
|
|
7
7
|
const CIA_WORKFLOWS = [{
|
|
8
8
|
name: "aml-address-risk",
|
|
9
9
|
tool: "aml_address_risk",
|
|
@@ -44,14 +44,13 @@ function formatCiaWorkflows(workflows) {
|
|
|
44
44
|
...rows
|
|
45
45
|
].join("\n");
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
//#region src/subscription/cli.ts
|
|
47
|
+
// src/subscription/cli.ts
|
|
49
48
|
/** One MCP session to the configured graph endpoint, for the status reads. */
|
|
50
49
|
async function withStatusReader(fn) {
|
|
51
|
-
const { loadConfig } = await import("./config-
|
|
50
|
+
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
52
51
|
const config = await loadConfig();
|
|
53
|
-
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-
|
|
54
|
-
const { toGraphMcpEndpointError } = await import("./transport-error-
|
|
52
|
+
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-BaHAIidE.mjs").then((n) => n.r);
|
|
53
|
+
const { toGraphMcpEndpointError } = await import("./transport-error-68G35VPH.mjs");
|
|
55
54
|
const endpoint = resolveGraphMcpEndpoint(config);
|
|
56
55
|
const fetchImpl = await createConfiguredGraphMcpFetch(config);
|
|
57
56
|
const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
|
|
@@ -66,11 +65,11 @@ async function withStatusReader(fn) {
|
|
|
66
65
|
throw toGraphMcpEndpointError(err, endpoint);
|
|
67
66
|
}
|
|
68
67
|
try {
|
|
69
|
-
const { parseSubscriptionStatusToolResult, subscriptionStatusArguments, subscriptionStatusNeedsWallet } = await import("./subscription-status-
|
|
68
|
+
const { parseSubscriptionStatusToolResult, subscriptionStatusArguments, subscriptionStatusNeedsWallet } = await import("./subscription-status-5WfPhSep.mjs").then((n) => n.r);
|
|
70
69
|
const remote = (await client.listTools()).tools.find((tool) => tool.name === "subscription_status");
|
|
71
70
|
let wallet = null;
|
|
72
71
|
if (remote && subscriptionStatusNeedsWallet(remote)) {
|
|
73
|
-
const { getWalletAccount } = await import("./tools-
|
|
72
|
+
const { getWalletAccount } = await import("./tools-6pZo4h_p.mjs").then((n) => n.p);
|
|
74
73
|
wallet = (await getWalletAccount()).address;
|
|
75
74
|
}
|
|
76
75
|
let lastError = remote ? null : `${endpoint} serves no subscription_status tool.`;
|
|
@@ -120,22 +119,22 @@ function fail(err) {
|
|
|
120
119
|
function registerSubscriptionCommands(program, command) {
|
|
121
120
|
program.command("subscription").description("Buy and check the Chain Insights subscription, paid in $CIA on Robinhood Chain").addCommand(command("topup").description("Show the wallet address and QR code to fund with $CIA and ETH on Robinhood Chain").option("--no-open", "Print the top-up page URL without opening a browser").option("--json", "Print machine-readable top-up facts").action(async (opts) => {
|
|
122
121
|
try {
|
|
123
|
-
const { runSubscriptionTopup } = await import("./topup
|
|
122
|
+
const { runSubscriptionTopup } = await import("./topup--7JTo4UQ.mjs");
|
|
124
123
|
await runSubscriptionTopup(opts);
|
|
125
124
|
} catch (err) {
|
|
126
125
|
fail(err);
|
|
127
126
|
}
|
|
128
127
|
})).addCommand(command("buy").description("Buy subscription days: approve and pay $CIA on Robinhood Chain, after your yes").requiredOption("--days <n>", "Days to buy, a whole number; a wallet holds at most 90 days").option("--yes", "Skip the typed yes (for a run with no terminal)").option("--json", "Print the outcome as JSON").action(async (opts) => {
|
|
129
128
|
try {
|
|
130
|
-
const { assertDays, fetchCiaUsdPrice } = await import("./quote-
|
|
131
|
-
const { assertConfirmable, executeBuy, formatBuyResult } = await import("./buy-
|
|
129
|
+
const { assertDays, fetchCiaUsdPrice } = await import("./quote-41CbMc37.mjs");
|
|
130
|
+
const { assertConfirmable, executeBuy, formatBuyResult } = await import("./buy-B2luUbWF.mjs");
|
|
132
131
|
const days = Number(opts.days);
|
|
133
132
|
assertDays(days);
|
|
134
133
|
assertConfirmable({
|
|
135
134
|
stdinIsTTY: process.stdin.isTTY === true,
|
|
136
135
|
yes: opts.yes === true
|
|
137
136
|
});
|
|
138
|
-
const { assertWalletKeyNotPublic, getWalletAccount } = await import("./tools-
|
|
137
|
+
const { assertWalletKeyNotPublic, getWalletAccount } = await import("./tools-6pZo4h_p.mjs").then((n) => n.p);
|
|
139
138
|
const account = await getWalletAccount();
|
|
140
139
|
assertWalletKeyNotPublic(account);
|
|
141
140
|
const result = await withStatusReader((reader) => executeBuy({
|
|
@@ -156,7 +155,7 @@ function registerSubscriptionCommands(program, command) {
|
|
|
156
155
|
}
|
|
157
156
|
})).addCommand(command("status").description("Show the subscription of this wallet, read by the wallet's proof").option("--json", "Print the status facts as JSON").action(async (opts) => {
|
|
158
157
|
try {
|
|
159
|
-
const { formatSubscriptionStatus } = await import("./subscription-status-
|
|
158
|
+
const { formatSubscriptionStatus } = await import("./subscription-status-5WfPhSep.mjs").then((n) => n.r);
|
|
160
159
|
await withStatusReader(async (reader) => {
|
|
161
160
|
const facts = await reader.read();
|
|
162
161
|
if (!facts) throw new Error(`Subscription status unavailable: ${reader.lastError() ?? "no answer"}`);
|
|
@@ -167,8 +166,7 @@ function registerSubscriptionCommands(program, command) {
|
|
|
167
166
|
}
|
|
168
167
|
}));
|
|
169
168
|
}
|
|
170
|
-
|
|
171
|
-
//#region src/cli.ts
|
|
169
|
+
// src/cli.ts
|
|
172
170
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
173
171
|
const installerPath = path.resolve(__dirname, "..", "bin", "install.cjs");
|
|
174
172
|
const program = new Command();
|
|
@@ -212,10 +210,10 @@ function runInstaller(flag) {
|
|
|
212
210
|
}
|
|
213
211
|
}
|
|
214
212
|
async function withGraphMcpClient(name, fn) {
|
|
215
|
-
const { loadConfig } = await import("./config-
|
|
213
|
+
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
216
214
|
const config = await loadConfig();
|
|
217
|
-
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-
|
|
218
|
-
const { toGraphMcpEndpointError } = await import("./transport-error-
|
|
215
|
+
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-BaHAIidE.mjs").then((n) => n.r);
|
|
216
|
+
const { toGraphMcpEndpointError } = await import("./transport-error-68G35VPH.mjs");
|
|
219
217
|
const endpoint = resolveGraphMcpEndpoint(config);
|
|
220
218
|
const paymentFetch = await createConfiguredGraphMcpFetch(config);
|
|
221
219
|
const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
|
|
@@ -229,7 +227,7 @@ async function withGraphMcpClient(name, fn) {
|
|
|
229
227
|
} catch (err) {
|
|
230
228
|
throw toGraphMcpEndpointError(err, endpoint);
|
|
231
229
|
}
|
|
232
|
-
const { installActionLogging } = await import("./action-log-
|
|
230
|
+
const { installActionLogging } = await import("./action-log-Byv9Ln_6.mjs").then((n) => n.n);
|
|
233
231
|
installActionLogging(client);
|
|
234
232
|
try {
|
|
235
233
|
return await fn(client, config);
|
|
@@ -240,22 +238,22 @@ async function withGraphMcpClient(name, fn) {
|
|
|
240
238
|
}
|
|
241
239
|
}
|
|
242
240
|
async function printNetworkCapabilities(opts) {
|
|
243
|
-
const { loadConfig } = await import("./config-
|
|
244
|
-
const { fetchNetworkCapabilities, formatNetworkCapabilities } = await import("./capabilities-
|
|
241
|
+
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
242
|
+
const { fetchNetworkCapabilities, formatNetworkCapabilities } = await import("./capabilities-BRNHcabF.mjs").then((n) => n.t);
|
|
245
243
|
const document = await fetchNetworkCapabilities(await loadConfig());
|
|
246
244
|
if (opts.json) console.log(JSON.stringify(document, null, 2));
|
|
247
245
|
else console.log(formatNetworkCapabilities(document));
|
|
248
246
|
}
|
|
249
247
|
async function printNetworkOverview(opts) {
|
|
250
|
-
const { loadConfig } = await import("./config-
|
|
251
|
-
const { fetchNetworkCapabilities, formatNetworkOverview } = await import("./capabilities-
|
|
248
|
+
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
249
|
+
const { fetchNetworkCapabilities, formatNetworkOverview } = await import("./capabilities-BRNHcabF.mjs").then((n) => n.t);
|
|
252
250
|
const document = await fetchNetworkCapabilities(await loadConfig());
|
|
253
251
|
if (opts.json) console.log(JSON.stringify(document, null, 2));
|
|
254
252
|
else console.log(formatNetworkOverview(document));
|
|
255
253
|
}
|
|
256
254
|
async function printNetworkCapability(name, opts) {
|
|
257
|
-
const { loadConfig } = await import("./config-
|
|
258
|
-
const { fetchNetworkCapabilities, findNetworkCapability, formatNetworkCapability } = await import("./capabilities-
|
|
255
|
+
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
256
|
+
const { fetchNetworkCapabilities, findNetworkCapability, formatNetworkCapability } = await import("./capabilities-BRNHcabF.mjs").then((n) => n.t);
|
|
259
257
|
const document = await fetchNetworkCapabilities(await loadConfig());
|
|
260
258
|
const network = findNetworkCapability(document, name);
|
|
261
259
|
if (!network) {
|
|
@@ -271,9 +269,9 @@ async function printNetworkCapability(name, opts) {
|
|
|
271
269
|
* no request; a build opens one session and reads through it.
|
|
272
270
|
*/
|
|
273
271
|
async function printNetworkSchema(name, opts) {
|
|
274
|
-
const { loadConfig } = await import("./config-
|
|
275
|
-
const { resolveGraphMcpEndpoint } = await import("./client-
|
|
276
|
-
const { formatGraphSchemaText, getGraphSchema } = await import("./graph-schema-
|
|
272
|
+
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
273
|
+
const { resolveGraphMcpEndpoint } = await import("./client-BaHAIidE.mjs").then((n) => n.r);
|
|
274
|
+
const { formatGraphSchemaText, getGraphSchema } = await import("./graph-schema-D4LAefGf.mjs").then((n) => n.i);
|
|
277
275
|
const config = await loadConfig();
|
|
278
276
|
const schema = await getGraphSchema({
|
|
279
277
|
network: name,
|
|
@@ -286,11 +284,11 @@ async function printNetworkSchema(name, opts) {
|
|
|
286
284
|
function addAmlAddressRiskCommand(parent, networksCommand) {
|
|
287
285
|
parent.addCommand(createCliCommand("aml-address-risk").description("CIA workflow: 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 \`${networksCommand}\` for supported networks.`).option("--compare-address <address>", "Optional second address to compare against the screened address").option("--json", "Print machine-readable JSON output").option("--version <version>", "AML tool contract version. Omit to use the latest version (currently v1)").addOption(new Option("--tool-version <version>", "Internal alias for the AML tool version").hideHelp()).action(async (opts) => {
|
|
288
286
|
try {
|
|
289
|
-
const { resolveAmlAddressRiskVersion } = await import("./public-tools-
|
|
287
|
+
const { resolveAmlAddressRiskVersion } = await import("./public-tools-DXlZcanX.mjs");
|
|
290
288
|
const requestedVersion = opts.toolVersion ?? opts.version;
|
|
291
289
|
resolveAmlAddressRiskVersion(requestedVersion);
|
|
292
290
|
await withGraphMcpClient("chain-insights-cli-aml-address-risk", async (client) => {
|
|
293
|
-
const { runAmlAddressRisk } = await import("./public-tools-
|
|
291
|
+
const { runAmlAddressRisk } = await import("./public-tools-DXlZcanX.mjs");
|
|
294
292
|
const result = await runAmlAddressRisk(client, {
|
|
295
293
|
address: opts.address,
|
|
296
294
|
network: opts.network,
|
|
@@ -331,7 +329,7 @@ program.command("workflows").description("List CIA workflow tools").option("--js
|
|
|
331
329
|
});
|
|
332
330
|
addAmlAddressRiskCommand(program.command("workflow").description("Run a high-level CIA workflow"), "cia networks");
|
|
333
331
|
program.command("status").description("Show toolkit status and configuration").action(async () => {
|
|
334
|
-
const { loadConfig } = await import("./config-
|
|
332
|
+
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
335
333
|
const config = await loadConfig();
|
|
336
334
|
const graphMcpStatus = config.graphMcpMode === "debug" && config.graphMcpAuthToken?.trim() ? "bearer access mode" : `${config.graphMcpMode} mode`;
|
|
337
335
|
console.log("Config: ", config.dataDir);
|
|
@@ -340,7 +338,7 @@ program.command("status").description("Show toolkit status and configuration").a
|
|
|
340
338
|
});
|
|
341
339
|
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) => {
|
|
342
340
|
try {
|
|
343
|
-
const { checkForUpdate, runPackageUpdate } = await import("./update-
|
|
341
|
+
const { checkForUpdate, runPackageUpdate } = await import("./update-BH8F4cQ2.mjs");
|
|
344
342
|
const result = await checkForUpdate();
|
|
345
343
|
if (result.error) throw new Error(`Could not check npmjs for updates: ${result.error}`);
|
|
346
344
|
if (!result.updateAvailable || !result.latestVersion) {
|
|
@@ -365,7 +363,7 @@ program.command("update").description("Check npmjs for a newer Chain Insights re
|
|
|
365
363
|
});
|
|
366
364
|
program.command("debug").description("Configure Chain Insights Graph debug mode").addCommand(createCliCommand("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) => {
|
|
367
365
|
try {
|
|
368
|
-
const { saveConfig } = await import("./config-
|
|
366
|
+
const { saveConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
369
367
|
await saveConfig({
|
|
370
368
|
graphMcpMode: "debug",
|
|
371
369
|
graphMcpAuthToken: opts.token,
|
|
@@ -380,7 +378,7 @@ program.command("debug").description("Configure Chain Insights Graph debug mode"
|
|
|
380
378
|
}
|
|
381
379
|
})).addCommand(createCliCommand("off").description("Disable Chain Insights Graph debug mode and use paid x402 calls").action(async () => {
|
|
382
380
|
try {
|
|
383
|
-
const { saveConfig } = await import("./config-
|
|
381
|
+
const { saveConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
384
382
|
await saveConfig({
|
|
385
383
|
graphMcpMode: "paid",
|
|
386
384
|
graphMcpAuthToken: ""
|
|
@@ -393,7 +391,7 @@ program.command("debug").description("Configure Chain Insights Graph debug mode"
|
|
|
393
391
|
}
|
|
394
392
|
})).addCommand(createCliCommand("status").description("Show Chain Insights Graph payment/debug mode").action(async () => {
|
|
395
393
|
try {
|
|
396
|
-
const { loadConfig } = await import("./config-
|
|
394
|
+
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
397
395
|
const config = await loadConfig();
|
|
398
396
|
console.log(`Chain Insights Graph mode: ${config.graphMcpMode}`);
|
|
399
397
|
console.log(`Graph endpoint: ${config.graphMcpEndpoint}`);
|
|
@@ -408,7 +406,7 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
408
406
|
try {
|
|
409
407
|
const normalizedKey = key.trim();
|
|
410
408
|
if (!normalizedKey) throw new Error("Test access key is required");
|
|
411
|
-
const { saveConfig } = await import("./config-
|
|
409
|
+
const { saveConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
412
410
|
await saveConfig({
|
|
413
411
|
graphMcpMode: "debug",
|
|
414
412
|
graphMcpAuthToken: normalizedKey,
|
|
@@ -423,7 +421,7 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
423
421
|
}
|
|
424
422
|
})).addCommand(createCliCommand("clear").description("Remove the Chain Insights Graph test access key and use paid x402 calls").action(async () => {
|
|
425
423
|
try {
|
|
426
|
-
const { saveConfig } = await import("./config-
|
|
424
|
+
const { saveConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
427
425
|
await saveConfig({
|
|
428
426
|
graphMcpMode: "paid",
|
|
429
427
|
graphMcpAuthToken: ""
|
|
@@ -436,7 +434,7 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
436
434
|
}
|
|
437
435
|
})).addCommand(createCliCommand("status").description("Show Chain Insights Graph test access key status").action(async () => {
|
|
438
436
|
try {
|
|
439
|
-
const { loadConfig } = await import("./config-
|
|
437
|
+
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
440
438
|
const config = await loadConfig();
|
|
441
439
|
console.log(`Graph endpoint: ${config.graphMcpEndpoint}`);
|
|
442
440
|
console.log(`Access key: ${config.graphMcpAuthToken?.trim() ? "configured" : "not configured"}`);
|
|
@@ -459,8 +457,8 @@ program.command("setup").description("Configure external MCP clients").addComman
|
|
|
459
457
|
runInstaller("--hermes");
|
|
460
458
|
}));
|
|
461
459
|
program.command("config").description("Read or write configuration values").addCommand(createCliCommand("get").description("Read one Chain Insights configuration value").argument("<key>", "Config key to read").action(async (key) => {
|
|
462
|
-
const { loadConfig } = await import("./config-
|
|
463
|
-
const { CONFIG_KEYS } = await import("./schema-
|
|
460
|
+
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
461
|
+
const { CONFIG_KEYS } = await import("./schema-CKnQsdw9.mjs").then((n) => n.r);
|
|
464
462
|
if (!CONFIG_KEYS.includes(key)) {
|
|
465
463
|
console.error(`Unknown config key: ${key}`);
|
|
466
464
|
process.exit(1);
|
|
@@ -469,7 +467,7 @@ program.command("config").description("Read or write configuration values").addC
|
|
|
469
467
|
console.log(value ?? "");
|
|
470
468
|
})).addCommand(createCliCommand("reset").description("Put every setting back to its default (production endpoint, paid mode, no test key); the wallet stays").action(async () => {
|
|
471
469
|
try {
|
|
472
|
-
const { resetConfig, loadConfig } = await import("./config-
|
|
470
|
+
const { resetConfig, loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
473
471
|
const { backupPath } = await resetConfig();
|
|
474
472
|
const config = await loadConfig();
|
|
475
473
|
if (backupPath) console.log(`Previous settings saved to ${backupPath}`);
|
|
@@ -485,7 +483,7 @@ program.command("config").description("Read or write configuration values").addC
|
|
|
485
483
|
})).addCommand(createCliCommand("set").description("Write one Chain Insights configuration value").argument("<key>", "Config key to write").argument("<value>", "Value to set").action(async (key, value) => {
|
|
486
484
|
if (key === "walletPrivateKey") {
|
|
487
485
|
try {
|
|
488
|
-
const { setWalletPrivateKey } = await import("./wallet-
|
|
486
|
+
const { setWalletPrivateKey } = await import("./wallet-B1M0HdQh.mjs").then((n) => n.s);
|
|
489
487
|
const address = await setWalletPrivateKey(value);
|
|
490
488
|
console.log("Wallet private key encrypted and stored in ~/.chain-insights/wallet.json");
|
|
491
489
|
console.log(`Wallet address: ${address}`);
|
|
@@ -495,8 +493,8 @@ program.command("config").description("Read or write configuration values").addC
|
|
|
495
493
|
}
|
|
496
494
|
return;
|
|
497
495
|
}
|
|
498
|
-
const { loadConfig, saveConfig } = await import("./config-
|
|
499
|
-
const { CONFIG_KEYS, DEFAULT_CONFIG } = await import("./schema-
|
|
496
|
+
const { loadConfig, saveConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
497
|
+
const { CONFIG_KEYS, DEFAULT_CONFIG } = await import("./schema-CKnQsdw9.mjs").then((n) => n.r);
|
|
500
498
|
const current = await loadConfig();
|
|
501
499
|
if (!CONFIG_KEYS.includes(key)) {
|
|
502
500
|
console.error(`Unknown config key: ${key}`);
|
|
@@ -511,9 +509,9 @@ program.command("config").description("Read or write configuration values").addC
|
|
|
511
509
|
}));
|
|
512
510
|
program.command("wallet").description("Manage the local Base USDC payment wallet").addCommand(createCliCommand("create").description("Generate a new local Base payment wallet").option("--replace", "Replace a wallet whose key is public (the old file is backed up next to wallet.json)").action(async (opts) => {
|
|
513
511
|
try {
|
|
514
|
-
const { assertStoredWalletReplaceable, isWalletConfigured, replacePublicWallet, setWalletPrivateKey, storedWalletKeyIsPublic, walletPath } = await import("./wallet-
|
|
512
|
+
const { assertStoredWalletReplaceable, isWalletConfigured, replacePublicWallet, setWalletPrivateKey, storedWalletKeyIsPublic, walletPath } = await import("./wallet-B1M0HdQh.mjs").then((n) => n.s);
|
|
515
513
|
const { createInterface } = await import("node:readline/promises");
|
|
516
|
-
const { formatWalletBackupWarning, generateWalletPrivateKey, isWalletBackupConfirmed } = await import("./create-
|
|
514
|
+
const { formatWalletBackupWarning, generateWalletPrivateKey, isWalletBackupConfirmed } = await import("./create-CluDZkuF.mjs").then((n) => n.t);
|
|
517
515
|
if (opts.replace === true) await assertStoredWalletReplaceable();
|
|
518
516
|
else if (await isWalletConfigured()) throw new Error(await storedWalletKeyIsPublic() === true ? "A payment wallet already exists, and its key is public: anything sent to it is taken within seconds. Run `cia wallet create --replace`." : "A payment wallet already exists. Run `cia wallet address` to view it or use `cia wallet import <private-key> --force` to replace it.");
|
|
519
517
|
const privateKey = generateWalletPrivateKey();
|
|
@@ -542,7 +540,7 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
542
540
|
}
|
|
543
541
|
})).addCommand(createCliCommand("import").description("Import a Base payment wallet").argument("<private-key>", "0x-prefixed EVM private key").option("--force", "Replace an existing wallet (the previous key is backed up next to wallet.json)").action(async (privateKey, opts) => {
|
|
544
542
|
try {
|
|
545
|
-
const { setWalletPrivateKey, isWalletConfigured } = await import("./wallet-
|
|
543
|
+
const { setWalletPrivateKey, isWalletConfigured } = await import("./wallet-B1M0HdQh.mjs").then((n) => n.s);
|
|
546
544
|
const replacing = opts.force === true && await isWalletConfigured();
|
|
547
545
|
const address = await setWalletPrivateKey(privateKey, { force: opts.force });
|
|
548
546
|
if (replacing) console.log("Previous wallet key backed up next to ~/.chain-insights/wallet.json");
|
|
@@ -556,7 +554,7 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
556
554
|
}
|
|
557
555
|
})).addCommand(createCliCommand("address").description("Print the local payment wallet address").action(async () => {
|
|
558
556
|
try {
|
|
559
|
-
const { getWalletAccount } = await import("./tools-
|
|
557
|
+
const { getWalletAccount } = await import("./tools-6pZo4h_p.mjs").then((n) => n.p);
|
|
560
558
|
const account = await getWalletAccount();
|
|
561
559
|
console.log(account.address);
|
|
562
560
|
} catch (err) {
|
|
@@ -565,7 +563,7 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
565
563
|
}
|
|
566
564
|
})).addCommand(createCliCommand("balance").description("Show the local payment wallet Base USDC balance").action(async () => {
|
|
567
565
|
try {
|
|
568
|
-
const { getWalletBalanceText } = await import("./tools-
|
|
566
|
+
const { getWalletBalanceText } = await import("./tools-6pZo4h_p.mjs").then((n) => n.p);
|
|
569
567
|
console.log(await getWalletBalanceText());
|
|
570
568
|
} catch (err) {
|
|
571
569
|
console.error(err.message);
|
|
@@ -573,7 +571,7 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
573
571
|
}
|
|
574
572
|
})).addCommand(createCliCommand("ready").description("Check and prepare the wallet for paid Chain Insights Graph calls").option("--check-only", "Only check readiness; do not submit the one-time payment setup").addOption(new Option("--no-approve", "Deprecated alias for --check-only").hideHelp()).option("--payment-usdc <amount>", "USDC setup cap to prepare for paid calls", "1").addOption(new Option("--approval-usdc <amount>", "Deprecated alias for --payment-usdc").hideHelp()).option("--json", "Print machine-readable readiness metadata").action(async (opts) => {
|
|
575
573
|
try {
|
|
576
|
-
const { formatWalletReadiness, parsePaymentApprovalUnits, prepareWalletForPaidCalls } = await import("./tools-
|
|
574
|
+
const { formatWalletReadiness, parsePaymentApprovalUnits, prepareWalletForPaidCalls } = await import("./tools-6pZo4h_p.mjs").then((n) => n.p);
|
|
577
575
|
const result = await prepareWalletForPaidCalls({
|
|
578
576
|
minimumApprovalUnits: parsePaymentApprovalUnits(opts.paymentUsdc ?? opts.approvalUsdc ?? "1"),
|
|
579
577
|
approve: opts.checkOnly ? false : opts.approve !== false
|
|
@@ -589,8 +587,8 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
589
587
|
}
|
|
590
588
|
})).addCommand(createCliCommand("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) => {
|
|
591
589
|
try {
|
|
592
|
-
const { assertWalletKeyNotPublic, buildTopupInfo, getWalletAccount } = await import("./tools-
|
|
593
|
-
const { startTopupServer } = await import("./topup-server-
|
|
590
|
+
const { assertWalletKeyNotPublic, buildTopupInfo, getWalletAccount } = await import("./tools-6pZo4h_p.mjs").then((n) => n.p);
|
|
591
|
+
const { startTopupServer } = await import("./topup-server-DlwzFEF1.mjs").then((n) => n.r);
|
|
594
592
|
const account = await getWalletAccount();
|
|
595
593
|
assertWalletKeyNotPublic(account);
|
|
596
594
|
const url = await startTopupServer(account);
|
|
@@ -622,11 +620,11 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
622
620
|
}
|
|
623
621
|
})).addCommand(createCliCommand("tools").description("List the remote GraphRAG MCP tools (cached for 24 hours)").option("--refresh", "Force refresh schema cache").action(async (opts) => {
|
|
624
622
|
try {
|
|
625
|
-
const { loadSchema, saveSchema } = await import("./schema-cache-
|
|
626
|
-
const { formatToolsTable } = await import("./format-
|
|
627
|
-
const { visibleRemoteTools } = await import("./tool-visibility-
|
|
628
|
-
const { loadConfig } = await import("./config-
|
|
629
|
-
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-
|
|
623
|
+
const { loadSchema, saveSchema } = await import("./schema-cache-BfKHodDY.mjs");
|
|
624
|
+
const { formatToolsTable } = await import("./format-CsnW5M4D.mjs");
|
|
625
|
+
const { visibleRemoteTools } = await import("./tool-visibility-Dy3psowS.mjs").then((n) => n.a);
|
|
626
|
+
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
627
|
+
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-BaHAIidE.mjs").then((n) => n.r);
|
|
630
628
|
const config = await loadConfig();
|
|
631
629
|
const graphMcpEndpoint = resolveGraphMcpEndpoint(config);
|
|
632
630
|
let tools = opts.refresh ? null : await loadSchema(graphMcpEndpoint);
|
|
@@ -647,11 +645,15 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
647
645
|
}
|
|
648
646
|
}
|
|
649
647
|
console.log(formatToolsTable(visibleRemoteTools(tools)));
|
|
650
|
-
const { META_DEX_LOOKUP_DESCRIPTION, META_DEX_LOOKUP_TITLE, META_DEX_LOOKUP_TOOL } = await import("./dex-tool-
|
|
648
|
+
const { META_DEX_LOOKUP_DESCRIPTION, META_DEX_LOOKUP_TITLE, META_DEX_LOOKUP_TOOL } = await import("./dex-tool-BoAYqhZO.mjs").then((n) => n.a);
|
|
649
|
+
const { META_TOKEN_LOOKUP_DESCRIPTION, META_TOKEN_LOOKUP_TITLE, META_TOKEN_LOOKUP_TOOL } = await import("./token-lookup-XnyisLQW.mjs").then((n) => n.s);
|
|
651
650
|
console.log("");
|
|
652
651
|
console.log(formatToolsTable([{
|
|
653
652
|
name: META_DEX_LOOKUP_TOOL,
|
|
654
653
|
description: `${META_DEX_LOOKUP_TITLE}. ${META_DEX_LOOKUP_DESCRIPTION}`
|
|
654
|
+
}, {
|
|
655
|
+
name: META_TOKEN_LOOKUP_TOOL,
|
|
656
|
+
description: `${META_TOKEN_LOOKUP_TITLE}. ${META_TOKEN_LOOKUP_DESCRIPTION}`
|
|
655
657
|
}], "Local proxy tool"));
|
|
656
658
|
} catch (err) {
|
|
657
659
|
console.error(err.message);
|
|
@@ -659,13 +661,13 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
659
661
|
}
|
|
660
662
|
})).addCommand(createCliCommand("call").description("Call a low-level MCP tool directly (advanced)").option("--json", "Print machine-readable JSON output").argument("<tool>", "Tool name to call").argument("[args...]", "Key=value arguments (e.g. address=0x1234... network=robinhood)").action(async (tool, rawArgs, opts) => {
|
|
661
663
|
try {
|
|
662
|
-
const { parseMcpCallArgs } = await import("./call-args-
|
|
663
|
-
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await import("./tool-visibility-
|
|
664
|
+
const { parseMcpCallArgs } = await import("./call-args-CBqbYfOE.mjs");
|
|
665
|
+
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await import("./tool-visibility-Dy3psowS.mjs").then((n) => n.a);
|
|
664
666
|
let args = parseMcpCallArgs(rawArgs);
|
|
665
667
|
assertPublicMcpToolName(tool);
|
|
666
668
|
validatePublicMcpToolArguments(tool, args);
|
|
667
669
|
if (tool === "wallet_balance") {
|
|
668
|
-
const { getWalletBalanceText } = await import("./tools-
|
|
670
|
+
const { getWalletBalanceText } = await import("./tools-6pZo4h_p.mjs").then((n) => n.p);
|
|
669
671
|
console.log(await getWalletBalanceText());
|
|
670
672
|
return;
|
|
671
673
|
}
|
|
@@ -681,9 +683,9 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
681
683
|
return;
|
|
682
684
|
}
|
|
683
685
|
if (tool === "meta_dex_lookup") {
|
|
684
|
-
const { handleMetaDexLookup } = await import("./dex-tool-
|
|
685
|
-
const { loadRegistry } = await import("./dex-registry-
|
|
686
|
-
const { metaDexLookupArgs } = await import("./call-args-
|
|
686
|
+
const { handleMetaDexLookup } = await import("./dex-tool-BoAYqhZO.mjs").then((n) => n.a);
|
|
687
|
+
const { loadRegistry } = await import("./dex-registry-D6Xxi_vr.mjs").then((n) => n.n);
|
|
688
|
+
const { metaDexLookupArgs } = await import("./call-args-CBqbYfOE.mjs");
|
|
687
689
|
const result = await withGraphMcpClient("chain-insights-cli-dex-lookup", (client) => handleMetaDexLookup(metaDexLookupArgs(args), {
|
|
688
690
|
loadRegistry: (network) => loadRegistry(network),
|
|
689
691
|
graphQueryBatch: async (batchArgs) => await client.callTool({
|
|
@@ -696,6 +698,24 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
696
698
|
if (result.isError) process.exitCode = 1;
|
|
697
699
|
return;
|
|
698
700
|
}
|
|
701
|
+
if (tool === "meta_token_lookup") {
|
|
702
|
+
const { handleMetaTokenLookup } = await import("./token-lookup-XnyisLQW.mjs").then((n) => n.s);
|
|
703
|
+
const { metaTokenLookupArgs } = await import("./call-args-CBqbYfOE.mjs");
|
|
704
|
+
const result = await withGraphMcpClient("chain-insights-cli-token-lookup", (client) => handleMetaTokenLookup(metaTokenLookupArgs(args), {
|
|
705
|
+
graphQuery: async (queryArgs) => await client.callTool({
|
|
706
|
+
name: "graph_query",
|
|
707
|
+
arguments: queryArgs
|
|
708
|
+
}),
|
|
709
|
+
graphQueryBatch: async (batchArgs) => await client.callTool({
|
|
710
|
+
name: "graph_query_batch",
|
|
711
|
+
arguments: batchArgs
|
|
712
|
+
}),
|
|
713
|
+
describeFailure: (err) => err.message
|
|
714
|
+
}));
|
|
715
|
+
console.log(result.content[0]?.text ?? "");
|
|
716
|
+
if (result.isError) process.exitCode = 1;
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
699
719
|
if (tool === "graph_expand") throw new Error("graph_expand is used only by the Chain Insights view in Claude. Run `cia mcp call graph_query` with your own query instead.");
|
|
700
720
|
if (tool === "meta_help") {
|
|
701
721
|
console.log("Graph tools: graph_query and graph_query_batch. Metadata and payment tools: meta_* and wallet_balance.");
|
|
@@ -713,20 +733,20 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
713
733
|
json: opts.json
|
|
714
734
|
});
|
|
715
735
|
} catch (err) {
|
|
716
|
-
const { isMissingUsageStatusToolError, primitiveBackendUsageStatus, usageStatusText } = await import("./usage-status-
|
|
736
|
+
const { isMissingUsageStatusToolError, primitiveBackendUsageStatus, usageStatusText } = await import("./usage-status-BUZgRl4r.mjs").then((n) => n.r);
|
|
717
737
|
if (!isMissingUsageStatusToolError(err)) throw err;
|
|
718
|
-
const { resolveGraphMcpEndpoint } = await import("./client-
|
|
738
|
+
const { resolveGraphMcpEndpoint } = await import("./client-BaHAIidE.mjs").then((n) => n.r);
|
|
719
739
|
console.log(usageStatusText(primitiveBackendUsageStatus(resolveGraphMcpEndpoint(config))));
|
|
720
740
|
}
|
|
721
741
|
return;
|
|
722
742
|
}
|
|
723
743
|
if (tool === "meta_subscription_status") {
|
|
724
744
|
try {
|
|
725
|
-
const { subscriptionStatusArguments, subscriptionStatusNeedsWallet } = await import("./subscription-status-
|
|
745
|
+
const { subscriptionStatusArguments, subscriptionStatusNeedsWallet } = await import("./subscription-status-5WfPhSep.mjs").then((n) => n.r);
|
|
726
746
|
const remote = (await client.listTools()).tools.find((t) => t.name === "subscription_status");
|
|
727
747
|
let wallet = null;
|
|
728
748
|
if (subscriptionStatusNeedsWallet(remote)) {
|
|
729
|
-
const { getWalletAccount } = await import("./tools-
|
|
749
|
+
const { getWalletAccount } = await import("./tools-6pZo4h_p.mjs").then((n) => n.p);
|
|
730
750
|
wallet = (await getWalletAccount()).address;
|
|
731
751
|
}
|
|
732
752
|
const result = await client.callTool({
|
|
@@ -738,16 +758,16 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
738
758
|
json: opts.json
|
|
739
759
|
});
|
|
740
760
|
} catch (err) {
|
|
741
|
-
const { isMissingSubscriptionStatusToolError, unavailableSubscriptionStatus, subscriptionStatusText } = await import("./subscription-status-
|
|
761
|
+
const { isMissingSubscriptionStatusToolError, unavailableSubscriptionStatus, subscriptionStatusText } = await import("./subscription-status-5WfPhSep.mjs").then((n) => n.r);
|
|
742
762
|
if (!isMissingSubscriptionStatusToolError(err)) throw err;
|
|
743
|
-
const { resolveGraphMcpEndpoint } = await import("./client-
|
|
763
|
+
const { resolveGraphMcpEndpoint } = await import("./client-BaHAIidE.mjs").then((n) => n.r);
|
|
744
764
|
console.log(subscriptionStatusText(unavailableSubscriptionStatus(resolveGraphMcpEndpoint(config), `subscription_status failed: ${err.message}`)));
|
|
745
765
|
}
|
|
746
766
|
return;
|
|
747
767
|
}
|
|
748
|
-
const { graphToolRequestOptions } = await import("./request-timeout-
|
|
768
|
+
const { graphToolRequestOptions } = await import("./request-timeout-K3ljP0pa.mjs");
|
|
749
769
|
const requestOptions = graphToolRequestOptions(tool);
|
|
750
|
-
const { withoutUtcProperties } = await import("./print-result-
|
|
770
|
+
const { withoutUtcProperties } = await import("./print-result-IFARsMnL.mjs").then((n) => n.a);
|
|
751
771
|
args = withoutUtcProperties(tool, args);
|
|
752
772
|
const result = requestOptions ? await client.callTool({
|
|
753
773
|
name: tool,
|
|
@@ -762,7 +782,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
762
782
|
});
|
|
763
783
|
});
|
|
764
784
|
} catch (err) {
|
|
765
|
-
const { formatMcpCallError } = await import("./tool-visibility-
|
|
785
|
+
const { formatMcpCallError } = await import("./tool-visibility-Dy3psowS.mjs").then((n) => n.a);
|
|
766
786
|
console.error(formatMcpCallError(tool, err));
|
|
767
787
|
process.exit(1);
|
|
768
788
|
}
|
|
@@ -771,7 +791,6 @@ program.parseAsync(normalizeAmlToolVersionArgv(process.argv)).catch((err) => {
|
|
|
771
791
|
console.error(err.message);
|
|
772
792
|
process.exit(1);
|
|
773
793
|
});
|
|
774
|
-
//#endregion
|
|
775
794
|
export {};
|
|
776
795
|
|
|
777
796
|
//# sourceMappingURL=cli.mjs.map
|