chain-insights 0.74.1 → 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 +3 -2
- 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-DsaAIa-a.mjs → dex-tool-BoAYqhZO.mjs} +13 -67
- package/dist/dex-tool-BoAYqhZO.mjs.map +1 -0
- package/dist/{dex-tool-DLWnff1n.cjs → dex-tool-DsM-pSku.cjs} +17 -77
- 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-BGbJumCY.cjs → graph-schema-C8Pi6r7c.cjs} +12 -29
- package/dist/{graph-schema-ClqjzgrM.mjs → graph-schema-D4LAefGf.mjs} +13 -30
- package/dist/graph-schema-D4LAefGf.mjs.map +1 -0
- 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 +83 -57
- 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 +81 -56
- package/dist/mcp-proxy.mjs.map +1 -1
- package/dist/{print-result-Cyqrlx8P.cjs → print-result-BYppJlUi.cjs} +20 -20
- package/dist/{print-result-C3YazZBw.mjs → print-result-IFARsMnL.mjs} +10 -22
- package/dist/print-result-IFARsMnL.mjs.map +1 -0
- package/dist/{public-tools-Bl_l_rKK.cjs → public-tools-Cfc1OPNS.cjs} +16 -21
- package/dist/{public-tools-CQjGt7_q.mjs → public-tools-DXlZcanX.mjs} +16 -21
- package/dist/public-tools-DXlZcanX.mjs.map +1 -0
- 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-BNwvcuVx.cjs → tool-visibility-DIpgPULN.cjs} +5 -10
- package/dist/{tool-visibility-B6983rxo.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-D4hmpkqL.mjs → transport-error-68G35VPH.mjs} +3 -4
- package/dist/{transport-error-D4hmpkqL.mjs.map → transport-error-68G35VPH.mjs.map} +1 -1
- package/dist/{transport-error-CgISST8l.cjs → transport-error-DXy1iTpS.cjs} +2 -3
- package/dist/{update-CZDHSi_u.mjs → update-BH8F4cQ2.mjs} +3 -4
- package/dist/{update-CZDHSi_u.mjs.map → update-BH8F4cQ2.mjs.map} +1 -1
- package/dist/{update-DGyRlm3J.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/graph-query-compatibility.md +13 -13
- package/docs/graph-tools.md +22 -22
- package/docs/mcp-proxy.md +35 -1
- package/docs/stability.md +3 -2
- package/package.json +1 -1
- package/skills/chain-insights-cypher/SKILL.md +30 -27
- package/skills/chain-insights-dex/SKILL.md +2 -2
- package/skills/chain-insights-dex/reference.md +1 -1
- package/skills/chain-insights-dex-gauge/SKILL.md +4 -4
- package/skills/chain-insights-dex-launchpad/SKILL.md +2 -2
- package/skills/chain-insights-virtuals/reference.md +5 -5
- package/dist/dex-tool-DsaAIa-a.mjs.map +0 -1
- package/dist/graph-schema-ClqjzgrM.mjs.map +0 -1
- package/dist/print-result-C3YazZBw.mjs.map +0 -1
- package/dist/public-tools-CQjGt7_q.mjs.map +0 -1
- package/dist/robinhood-CCTMagwM.mjs.map +0 -1
- package/dist/tool-visibility-B6983rxo.mjs.map +0 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_print_result = require("./print-result-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
|
|
2
|
+
const require_print_result = require("./print-result-BYppJlUi.cjs");
|
|
3
3
|
let commander = require("commander");
|
|
4
4
|
let node_child_process = require("node:child_process");
|
|
5
5
|
let node_url = require("node:url");
|
|
6
6
|
let node_path = require("node:path");
|
|
7
7
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
8
|
-
|
|
8
|
+
// src/investigation/workflows.ts
|
|
9
9
|
const CIA_WORKFLOWS = [{
|
|
10
10
|
name: "aml-address-risk",
|
|
11
11
|
tool: "aml_address_risk",
|
|
@@ -46,14 +46,13 @@ function formatCiaWorkflows(workflows) {
|
|
|
46
46
|
...rows
|
|
47
47
|
].join("\n");
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
//#region src/subscription/cli.ts
|
|
49
|
+
// src/subscription/cli.ts
|
|
51
50
|
/** One MCP session to the configured graph endpoint, for the status reads. */
|
|
52
51
|
async function withStatusReader(fn) {
|
|
53
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
52
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
54
53
|
const config = await loadConfig();
|
|
55
|
-
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-
|
|
56
|
-
const { toGraphMcpEndpointError } = await Promise.resolve().then(() => require("./transport-error-
|
|
54
|
+
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-Ddk4X9Ko.cjs")).then((n) => n.client_exports);
|
|
55
|
+
const { toGraphMcpEndpointError } = await Promise.resolve().then(() => require("./transport-error-DXy1iTpS.cjs"));
|
|
57
56
|
const endpoint = resolveGraphMcpEndpoint(config);
|
|
58
57
|
const fetchImpl = await createConfiguredGraphMcpFetch(config);
|
|
59
58
|
const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
|
|
@@ -68,11 +67,11 @@ async function withStatusReader(fn) {
|
|
|
68
67
|
throw toGraphMcpEndpointError(err, endpoint);
|
|
69
68
|
}
|
|
70
69
|
try {
|
|
71
|
-
const { parseSubscriptionStatusToolResult, subscriptionStatusArguments, subscriptionStatusNeedsWallet } = await Promise.resolve().then(() => require("./subscription-status-
|
|
70
|
+
const { parseSubscriptionStatusToolResult, subscriptionStatusArguments, subscriptionStatusNeedsWallet } = await Promise.resolve().then(() => require("./subscription-status-w4zI2KCK.cjs")).then((n) => n.subscription_status_exports);
|
|
72
71
|
const remote = (await client.listTools()).tools.find((tool) => tool.name === "subscription_status");
|
|
73
72
|
let wallet = null;
|
|
74
73
|
if (remote && subscriptionStatusNeedsWallet(remote)) {
|
|
75
|
-
const { getWalletAccount } = await Promise.resolve().then(() => require("./tools-
|
|
74
|
+
const { getWalletAccount } = await Promise.resolve().then(() => require("./tools-DZLizem9.cjs")).then((n) => n.tools_exports);
|
|
76
75
|
wallet = (await getWalletAccount()).address;
|
|
77
76
|
}
|
|
78
77
|
let lastError = remote ? null : `${endpoint} serves no subscription_status tool.`;
|
|
@@ -122,22 +121,22 @@ function fail(err) {
|
|
|
122
121
|
function registerSubscriptionCommands(program, command) {
|
|
123
122
|
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) => {
|
|
124
123
|
try {
|
|
125
|
-
const { runSubscriptionTopup } = await Promise.resolve().then(() => require("./topup-
|
|
124
|
+
const { runSubscriptionTopup } = await Promise.resolve().then(() => require("./topup-BgI9OcUd.cjs"));
|
|
126
125
|
await runSubscriptionTopup(opts);
|
|
127
126
|
} catch (err) {
|
|
128
127
|
fail(err);
|
|
129
128
|
}
|
|
130
129
|
})).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) => {
|
|
131
130
|
try {
|
|
132
|
-
const { assertDays, fetchCiaUsdPrice } = await Promise.resolve().then(() => require("./quote-
|
|
133
|
-
const { assertConfirmable, executeBuy, formatBuyResult } = await Promise.resolve().then(() => require("./buy-
|
|
131
|
+
const { assertDays, fetchCiaUsdPrice } = await Promise.resolve().then(() => require("./quote-pFKcSvMv.cjs"));
|
|
132
|
+
const { assertConfirmable, executeBuy, formatBuyResult } = await Promise.resolve().then(() => require("./buy-DEoGITbT.cjs"));
|
|
134
133
|
const days = Number(opts.days);
|
|
135
134
|
assertDays(days);
|
|
136
135
|
assertConfirmable({
|
|
137
136
|
stdinIsTTY: process.stdin.isTTY === true,
|
|
138
137
|
yes: opts.yes === true
|
|
139
138
|
});
|
|
140
|
-
const { assertWalletKeyNotPublic, getWalletAccount } = await Promise.resolve().then(() => require("./tools-
|
|
139
|
+
const { assertWalletKeyNotPublic, getWalletAccount } = await Promise.resolve().then(() => require("./tools-DZLizem9.cjs")).then((n) => n.tools_exports);
|
|
141
140
|
const account = await getWalletAccount();
|
|
142
141
|
assertWalletKeyNotPublic(account);
|
|
143
142
|
const result = await withStatusReader((reader) => executeBuy({
|
|
@@ -158,7 +157,7 @@ function registerSubscriptionCommands(program, command) {
|
|
|
158
157
|
}
|
|
159
158
|
})).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) => {
|
|
160
159
|
try {
|
|
161
|
-
const { formatSubscriptionStatus } = await Promise.resolve().then(() => require("./subscription-status-
|
|
160
|
+
const { formatSubscriptionStatus } = await Promise.resolve().then(() => require("./subscription-status-w4zI2KCK.cjs")).then((n) => n.subscription_status_exports);
|
|
162
161
|
await withStatusReader(async (reader) => {
|
|
163
162
|
const facts = await reader.read();
|
|
164
163
|
if (!facts) throw new Error(`Subscription status unavailable: ${reader.lastError() ?? "no answer"}`);
|
|
@@ -169,8 +168,7 @@ function registerSubscriptionCommands(program, command) {
|
|
|
169
168
|
}
|
|
170
169
|
}));
|
|
171
170
|
}
|
|
172
|
-
|
|
173
|
-
//#region src/cli.ts
|
|
171
|
+
// src/cli.ts
|
|
174
172
|
const __dirname$1 = node_path.default.dirname((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
175
173
|
const installerPath = node_path.default.resolve(__dirname$1, "..", "bin", "install.cjs");
|
|
176
174
|
const program = new commander.Command();
|
|
@@ -214,10 +212,10 @@ function runInstaller(flag) {
|
|
|
214
212
|
}
|
|
215
213
|
}
|
|
216
214
|
async function withGraphMcpClient(name, fn) {
|
|
217
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
215
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
218
216
|
const config = await loadConfig();
|
|
219
|
-
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-
|
|
220
|
-
const { toGraphMcpEndpointError } = await Promise.resolve().then(() => require("./transport-error-
|
|
217
|
+
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-Ddk4X9Ko.cjs")).then((n) => n.client_exports);
|
|
218
|
+
const { toGraphMcpEndpointError } = await Promise.resolve().then(() => require("./transport-error-DXy1iTpS.cjs"));
|
|
221
219
|
const endpoint = resolveGraphMcpEndpoint(config);
|
|
222
220
|
const paymentFetch = await createConfiguredGraphMcpFetch(config);
|
|
223
221
|
const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
|
|
@@ -231,7 +229,7 @@ async function withGraphMcpClient(name, fn) {
|
|
|
231
229
|
} catch (err) {
|
|
232
230
|
throw toGraphMcpEndpointError(err, endpoint);
|
|
233
231
|
}
|
|
234
|
-
const { installActionLogging } = await Promise.resolve().then(() => require("./action-log-
|
|
232
|
+
const { installActionLogging } = await Promise.resolve().then(() => require("./action-log-WMW6xFMx.cjs")).then((n) => n.action_log_exports);
|
|
235
233
|
installActionLogging(client);
|
|
236
234
|
try {
|
|
237
235
|
return await fn(client, config);
|
|
@@ -242,22 +240,22 @@ async function withGraphMcpClient(name, fn) {
|
|
|
242
240
|
}
|
|
243
241
|
}
|
|
244
242
|
async function printNetworkCapabilities(opts) {
|
|
245
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
246
|
-
const { fetchNetworkCapabilities, formatNetworkCapabilities } = await Promise.resolve().then(() => require("./capabilities-
|
|
243
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
244
|
+
const { fetchNetworkCapabilities, formatNetworkCapabilities } = await Promise.resolve().then(() => require("./capabilities-DalimVY2.cjs")).then((n) => n.capabilities_exports);
|
|
247
245
|
const document = await fetchNetworkCapabilities(await loadConfig());
|
|
248
246
|
if (opts.json) console.log(JSON.stringify(document, null, 2));
|
|
249
247
|
else console.log(formatNetworkCapabilities(document));
|
|
250
248
|
}
|
|
251
249
|
async function printNetworkOverview(opts) {
|
|
252
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
253
|
-
const { fetchNetworkCapabilities, formatNetworkOverview } = await Promise.resolve().then(() => require("./capabilities-
|
|
250
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
251
|
+
const { fetchNetworkCapabilities, formatNetworkOverview } = await Promise.resolve().then(() => require("./capabilities-DalimVY2.cjs")).then((n) => n.capabilities_exports);
|
|
254
252
|
const document = await fetchNetworkCapabilities(await loadConfig());
|
|
255
253
|
if (opts.json) console.log(JSON.stringify(document, null, 2));
|
|
256
254
|
else console.log(formatNetworkOverview(document));
|
|
257
255
|
}
|
|
258
256
|
async function printNetworkCapability(name, opts) {
|
|
259
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
260
|
-
const { fetchNetworkCapabilities, findNetworkCapability, formatNetworkCapability } = await Promise.resolve().then(() => require("./capabilities-
|
|
257
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
258
|
+
const { fetchNetworkCapabilities, findNetworkCapability, formatNetworkCapability } = await Promise.resolve().then(() => require("./capabilities-DalimVY2.cjs")).then((n) => n.capabilities_exports);
|
|
261
259
|
const document = await fetchNetworkCapabilities(await loadConfig());
|
|
262
260
|
const network = findNetworkCapability(document, name);
|
|
263
261
|
if (!network) {
|
|
@@ -273,9 +271,9 @@ async function printNetworkCapability(name, opts) {
|
|
|
273
271
|
* no request; a build opens one session and reads through it.
|
|
274
272
|
*/
|
|
275
273
|
async function printNetworkSchema(name, opts) {
|
|
276
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
277
|
-
const { resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-
|
|
278
|
-
const { formatGraphSchemaText, getGraphSchema } = await Promise.resolve().then(() => require("./graph-schema-
|
|
274
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
275
|
+
const { resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-Ddk4X9Ko.cjs")).then((n) => n.client_exports);
|
|
276
|
+
const { formatGraphSchemaText, getGraphSchema } = await Promise.resolve().then(() => require("./graph-schema-C8Pi6r7c.cjs")).then((n) => n.graph_schema_exports);
|
|
279
277
|
const config = await loadConfig();
|
|
280
278
|
const schema = await getGraphSchema({
|
|
281
279
|
network: name,
|
|
@@ -288,11 +286,11 @@ async function printNetworkSchema(name, opts) {
|
|
|
288
286
|
function addAmlAddressRiskCommand(parent, networksCommand) {
|
|
289
287
|
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 commander.Option("--tool-version <version>", "Internal alias for the AML tool version").hideHelp()).action(async (opts) => {
|
|
290
288
|
try {
|
|
291
|
-
const { resolveAmlAddressRiskVersion } = await Promise.resolve().then(() => require("./public-tools-
|
|
289
|
+
const { resolveAmlAddressRiskVersion } = await Promise.resolve().then(() => require("./public-tools-Cfc1OPNS.cjs"));
|
|
292
290
|
const requestedVersion = opts.toolVersion ?? opts.version;
|
|
293
291
|
resolveAmlAddressRiskVersion(requestedVersion);
|
|
294
292
|
await withGraphMcpClient("chain-insights-cli-aml-address-risk", async (client) => {
|
|
295
|
-
const { runAmlAddressRisk } = await Promise.resolve().then(() => require("./public-tools-
|
|
293
|
+
const { runAmlAddressRisk } = await Promise.resolve().then(() => require("./public-tools-Cfc1OPNS.cjs"));
|
|
296
294
|
const result = await runAmlAddressRisk(client, {
|
|
297
295
|
address: opts.address,
|
|
298
296
|
network: opts.network,
|
|
@@ -333,7 +331,7 @@ program.command("workflows").description("List CIA workflow tools").option("--js
|
|
|
333
331
|
});
|
|
334
332
|
addAmlAddressRiskCommand(program.command("workflow").description("Run a high-level CIA workflow"), "cia networks");
|
|
335
333
|
program.command("status").description("Show toolkit status and configuration").action(async () => {
|
|
336
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
334
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
337
335
|
const config = await loadConfig();
|
|
338
336
|
const graphMcpStatus = config.graphMcpMode === "debug" && config.graphMcpAuthToken?.trim() ? "bearer access mode" : `${config.graphMcpMode} mode`;
|
|
339
337
|
console.log("Config: ", config.dataDir);
|
|
@@ -342,7 +340,7 @@ program.command("status").description("Show toolkit status and configuration").a
|
|
|
342
340
|
});
|
|
343
341
|
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) => {
|
|
344
342
|
try {
|
|
345
|
-
const { checkForUpdate, runPackageUpdate } = await Promise.resolve().then(() => require("./update-
|
|
343
|
+
const { checkForUpdate, runPackageUpdate } = await Promise.resolve().then(() => require("./update-DUDdQSEU.cjs"));
|
|
346
344
|
const result = await checkForUpdate();
|
|
347
345
|
if (result.error) throw new Error(`Could not check npmjs for updates: ${result.error}`);
|
|
348
346
|
if (!result.updateAvailable || !result.latestVersion) {
|
|
@@ -367,7 +365,7 @@ program.command("update").description("Check npmjs for a newer Chain Insights re
|
|
|
367
365
|
});
|
|
368
366
|
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) => {
|
|
369
367
|
try {
|
|
370
|
-
const { saveConfig } = await Promise.resolve().then(() => require("./config-
|
|
368
|
+
const { saveConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
371
369
|
await saveConfig({
|
|
372
370
|
graphMcpMode: "debug",
|
|
373
371
|
graphMcpAuthToken: opts.token,
|
|
@@ -382,7 +380,7 @@ program.command("debug").description("Configure Chain Insights Graph debug mode"
|
|
|
382
380
|
}
|
|
383
381
|
})).addCommand(createCliCommand("off").description("Disable Chain Insights Graph debug mode and use paid x402 calls").action(async () => {
|
|
384
382
|
try {
|
|
385
|
-
const { saveConfig } = await Promise.resolve().then(() => require("./config-
|
|
383
|
+
const { saveConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
386
384
|
await saveConfig({
|
|
387
385
|
graphMcpMode: "paid",
|
|
388
386
|
graphMcpAuthToken: ""
|
|
@@ -395,7 +393,7 @@ program.command("debug").description("Configure Chain Insights Graph debug mode"
|
|
|
395
393
|
}
|
|
396
394
|
})).addCommand(createCliCommand("status").description("Show Chain Insights Graph payment/debug mode").action(async () => {
|
|
397
395
|
try {
|
|
398
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
396
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
399
397
|
const config = await loadConfig();
|
|
400
398
|
console.log(`Chain Insights Graph mode: ${config.graphMcpMode}`);
|
|
401
399
|
console.log(`Graph endpoint: ${config.graphMcpEndpoint}`);
|
|
@@ -410,7 +408,7 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
410
408
|
try {
|
|
411
409
|
const normalizedKey = key.trim();
|
|
412
410
|
if (!normalizedKey) throw new Error("Test access key is required");
|
|
413
|
-
const { saveConfig } = await Promise.resolve().then(() => require("./config-
|
|
411
|
+
const { saveConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
414
412
|
await saveConfig({
|
|
415
413
|
graphMcpMode: "debug",
|
|
416
414
|
graphMcpAuthToken: normalizedKey,
|
|
@@ -425,7 +423,7 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
425
423
|
}
|
|
426
424
|
})).addCommand(createCliCommand("clear").description("Remove the Chain Insights Graph test access key and use paid x402 calls").action(async () => {
|
|
427
425
|
try {
|
|
428
|
-
const { saveConfig } = await Promise.resolve().then(() => require("./config-
|
|
426
|
+
const { saveConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
429
427
|
await saveConfig({
|
|
430
428
|
graphMcpMode: "paid",
|
|
431
429
|
graphMcpAuthToken: ""
|
|
@@ -438,7 +436,7 @@ program.command("access-key").description("Configure Chain Insights Graph test a
|
|
|
438
436
|
}
|
|
439
437
|
})).addCommand(createCliCommand("status").description("Show Chain Insights Graph test access key status").action(async () => {
|
|
440
438
|
try {
|
|
441
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
439
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
442
440
|
const config = await loadConfig();
|
|
443
441
|
console.log(`Graph endpoint: ${config.graphMcpEndpoint}`);
|
|
444
442
|
console.log(`Access key: ${config.graphMcpAuthToken?.trim() ? "configured" : "not configured"}`);
|
|
@@ -461,8 +459,8 @@ program.command("setup").description("Configure external MCP clients").addComman
|
|
|
461
459
|
runInstaller("--hermes");
|
|
462
460
|
}));
|
|
463
461
|
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) => {
|
|
464
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
465
|
-
const { CONFIG_KEYS } = await Promise.resolve().then(() => require("./schema-
|
|
462
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
463
|
+
const { CONFIG_KEYS } = await Promise.resolve().then(() => require("./schema-CSESfCvA.cjs")).then((n) => n.schema_exports);
|
|
466
464
|
if (!CONFIG_KEYS.includes(key)) {
|
|
467
465
|
console.error(`Unknown config key: ${key}`);
|
|
468
466
|
process.exit(1);
|
|
@@ -471,7 +469,7 @@ program.command("config").description("Read or write configuration values").addC
|
|
|
471
469
|
console.log(value ?? "");
|
|
472
470
|
})).addCommand(createCliCommand("reset").description("Put every setting back to its default (production endpoint, paid mode, no test key); the wallet stays").action(async () => {
|
|
473
471
|
try {
|
|
474
|
-
const { resetConfig, loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
472
|
+
const { resetConfig, loadConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
475
473
|
const { backupPath } = await resetConfig();
|
|
476
474
|
const config = await loadConfig();
|
|
477
475
|
if (backupPath) console.log(`Previous settings saved to ${backupPath}`);
|
|
@@ -487,7 +485,7 @@ program.command("config").description("Read or write configuration values").addC
|
|
|
487
485
|
})).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) => {
|
|
488
486
|
if (key === "walletPrivateKey") {
|
|
489
487
|
try {
|
|
490
|
-
const { setWalletPrivateKey } = await Promise.resolve().then(() => require("./wallet-
|
|
488
|
+
const { setWalletPrivateKey } = await Promise.resolve().then(() => require("./wallet-BubGd_sG.cjs")).then((n) => n.wallet_exports);
|
|
491
489
|
const address = await setWalletPrivateKey(value);
|
|
492
490
|
console.log("Wallet private key encrypted and stored in ~/.chain-insights/wallet.json");
|
|
493
491
|
console.log(`Wallet address: ${address}`);
|
|
@@ -497,8 +495,8 @@ program.command("config").description("Read or write configuration values").addC
|
|
|
497
495
|
}
|
|
498
496
|
return;
|
|
499
497
|
}
|
|
500
|
-
const { loadConfig, saveConfig } = await Promise.resolve().then(() => require("./config-
|
|
501
|
-
const { CONFIG_KEYS, DEFAULT_CONFIG } = await Promise.resolve().then(() => require("./schema-
|
|
498
|
+
const { loadConfig, saveConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
499
|
+
const { CONFIG_KEYS, DEFAULT_CONFIG } = await Promise.resolve().then(() => require("./schema-CSESfCvA.cjs")).then((n) => n.schema_exports);
|
|
502
500
|
const current = await loadConfig();
|
|
503
501
|
if (!CONFIG_KEYS.includes(key)) {
|
|
504
502
|
console.error(`Unknown config key: ${key}`);
|
|
@@ -513,9 +511,9 @@ program.command("config").description("Read or write configuration values").addC
|
|
|
513
511
|
}));
|
|
514
512
|
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) => {
|
|
515
513
|
try {
|
|
516
|
-
const { assertStoredWalletReplaceable, isWalletConfigured, replacePublicWallet, setWalletPrivateKey, storedWalletKeyIsPublic, walletPath } = await Promise.resolve().then(() => require("./wallet-
|
|
514
|
+
const { assertStoredWalletReplaceable, isWalletConfigured, replacePublicWallet, setWalletPrivateKey, storedWalletKeyIsPublic, walletPath } = await Promise.resolve().then(() => require("./wallet-BubGd_sG.cjs")).then((n) => n.wallet_exports);
|
|
517
515
|
const { createInterface } = await import("node:readline/promises");
|
|
518
|
-
const { formatWalletBackupWarning, generateWalletPrivateKey, isWalletBackupConfirmed } = await Promise.resolve().then(() => require("./create-
|
|
516
|
+
const { formatWalletBackupWarning, generateWalletPrivateKey, isWalletBackupConfirmed } = await Promise.resolve().then(() => require("./create-DvBumvHn.cjs")).then((n) => n.create_exports);
|
|
519
517
|
if (opts.replace === true) await assertStoredWalletReplaceable();
|
|
520
518
|
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.");
|
|
521
519
|
const privateKey = generateWalletPrivateKey();
|
|
@@ -544,7 +542,7 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
544
542
|
}
|
|
545
543
|
})).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) => {
|
|
546
544
|
try {
|
|
547
|
-
const { setWalletPrivateKey, isWalletConfigured } = await Promise.resolve().then(() => require("./wallet-
|
|
545
|
+
const { setWalletPrivateKey, isWalletConfigured } = await Promise.resolve().then(() => require("./wallet-BubGd_sG.cjs")).then((n) => n.wallet_exports);
|
|
548
546
|
const replacing = opts.force === true && await isWalletConfigured();
|
|
549
547
|
const address = await setWalletPrivateKey(privateKey, { force: opts.force });
|
|
550
548
|
if (replacing) console.log("Previous wallet key backed up next to ~/.chain-insights/wallet.json");
|
|
@@ -558,7 +556,7 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
558
556
|
}
|
|
559
557
|
})).addCommand(createCliCommand("address").description("Print the local payment wallet address").action(async () => {
|
|
560
558
|
try {
|
|
561
|
-
const { getWalletAccount } = await Promise.resolve().then(() => require("./tools-
|
|
559
|
+
const { getWalletAccount } = await Promise.resolve().then(() => require("./tools-DZLizem9.cjs")).then((n) => n.tools_exports);
|
|
562
560
|
const account = await getWalletAccount();
|
|
563
561
|
console.log(account.address);
|
|
564
562
|
} catch (err) {
|
|
@@ -567,7 +565,7 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
567
565
|
}
|
|
568
566
|
})).addCommand(createCliCommand("balance").description("Show the local payment wallet Base USDC balance").action(async () => {
|
|
569
567
|
try {
|
|
570
|
-
const { getWalletBalanceText } = await Promise.resolve().then(() => require("./tools-
|
|
568
|
+
const { getWalletBalanceText } = await Promise.resolve().then(() => require("./tools-DZLizem9.cjs")).then((n) => n.tools_exports);
|
|
571
569
|
console.log(await getWalletBalanceText());
|
|
572
570
|
} catch (err) {
|
|
573
571
|
console.error(err.message);
|
|
@@ -575,7 +573,7 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
575
573
|
}
|
|
576
574
|
})).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 commander.Option("--no-approve", "Deprecated alias for --check-only").hideHelp()).option("--payment-usdc <amount>", "USDC setup cap to prepare for paid calls", "1").addOption(new commander.Option("--approval-usdc <amount>", "Deprecated alias for --payment-usdc").hideHelp()).option("--json", "Print machine-readable readiness metadata").action(async (opts) => {
|
|
577
575
|
try {
|
|
578
|
-
const { formatWalletReadiness, parsePaymentApprovalUnits, prepareWalletForPaidCalls } = await Promise.resolve().then(() => require("./tools-
|
|
576
|
+
const { formatWalletReadiness, parsePaymentApprovalUnits, prepareWalletForPaidCalls } = await Promise.resolve().then(() => require("./tools-DZLizem9.cjs")).then((n) => n.tools_exports);
|
|
579
577
|
const result = await prepareWalletForPaidCalls({
|
|
580
578
|
minimumApprovalUnits: parsePaymentApprovalUnits(opts.paymentUsdc ?? opts.approvalUsdc ?? "1"),
|
|
581
579
|
approve: opts.checkOnly ? false : opts.approve !== false
|
|
@@ -591,8 +589,8 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
591
589
|
}
|
|
592
590
|
})).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) => {
|
|
593
591
|
try {
|
|
594
|
-
const { assertWalletKeyNotPublic, buildTopupInfo, getWalletAccount } = await Promise.resolve().then(() => require("./tools-
|
|
595
|
-
const { startTopupServer } = await Promise.resolve().then(() => require("./topup-server-
|
|
592
|
+
const { assertWalletKeyNotPublic, buildTopupInfo, getWalletAccount } = await Promise.resolve().then(() => require("./tools-DZLizem9.cjs")).then((n) => n.tools_exports);
|
|
593
|
+
const { startTopupServer } = await Promise.resolve().then(() => require("./topup-server-H1M_7PJK.cjs")).then((n) => n.topup_server_exports);
|
|
596
594
|
const account = await getWalletAccount();
|
|
597
595
|
assertWalletKeyNotPublic(account);
|
|
598
596
|
const url = await startTopupServer(account);
|
|
@@ -624,11 +622,11 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
624
622
|
}
|
|
625
623
|
})).addCommand(createCliCommand("tools").description("List the remote GraphRAG MCP tools (cached for 24 hours)").option("--refresh", "Force refresh schema cache").action(async (opts) => {
|
|
626
624
|
try {
|
|
627
|
-
const { loadSchema, saveSchema } = await Promise.resolve().then(() => require("./schema-cache-
|
|
628
|
-
const { formatToolsTable } = await Promise.resolve().then(() => require("./format-
|
|
629
|
-
const { visibleRemoteTools } = await Promise.resolve().then(() => require("./tool-visibility-
|
|
630
|
-
const { loadConfig } = await Promise.resolve().then(() => require("./config-
|
|
631
|
-
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-
|
|
625
|
+
const { loadSchema, saveSchema } = await Promise.resolve().then(() => require("./schema-cache-NLgJmh4X.cjs"));
|
|
626
|
+
const { formatToolsTable } = await Promise.resolve().then(() => require("./format-DUzmoeaE.cjs"));
|
|
627
|
+
const { visibleRemoteTools } = await Promise.resolve().then(() => require("./tool-visibility-DIpgPULN.cjs")).then((n) => n.tool_visibility_exports);
|
|
628
|
+
const { loadConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
629
|
+
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-Ddk4X9Ko.cjs")).then((n) => n.client_exports);
|
|
632
630
|
const config = await loadConfig();
|
|
633
631
|
const graphMcpEndpoint = resolveGraphMcpEndpoint(config);
|
|
634
632
|
let tools = opts.refresh ? null : await loadSchema(graphMcpEndpoint);
|
|
@@ -649,11 +647,15 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
649
647
|
}
|
|
650
648
|
}
|
|
651
649
|
console.log(formatToolsTable(visibleRemoteTools(tools)));
|
|
652
|
-
const { META_DEX_LOOKUP_DESCRIPTION, META_DEX_LOOKUP_TITLE, META_DEX_LOOKUP_TOOL } = await Promise.resolve().then(() => require("./dex-tool-
|
|
650
|
+
const { META_DEX_LOOKUP_DESCRIPTION, META_DEX_LOOKUP_TITLE, META_DEX_LOOKUP_TOOL } = await Promise.resolve().then(() => require("./dex-tool-DsM-pSku.cjs")).then((n) => n.dex_tool_exports);
|
|
651
|
+
const { META_TOKEN_LOOKUP_DESCRIPTION, META_TOKEN_LOOKUP_TITLE, META_TOKEN_LOOKUP_TOOL } = await Promise.resolve().then(() => require("./token-lookup-BJ00JO9A.cjs")).then((n) => n.token_lookup_exports);
|
|
653
652
|
console.log("");
|
|
654
653
|
console.log(formatToolsTable([{
|
|
655
654
|
name: META_DEX_LOOKUP_TOOL,
|
|
656
655
|
description: `${META_DEX_LOOKUP_TITLE}. ${META_DEX_LOOKUP_DESCRIPTION}`
|
|
656
|
+
}, {
|
|
657
|
+
name: META_TOKEN_LOOKUP_TOOL,
|
|
658
|
+
description: `${META_TOKEN_LOOKUP_TITLE}. ${META_TOKEN_LOOKUP_DESCRIPTION}`
|
|
657
659
|
}], "Local proxy tool"));
|
|
658
660
|
} catch (err) {
|
|
659
661
|
console.error(err.message);
|
|
@@ -661,13 +663,13 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
661
663
|
}
|
|
662
664
|
})).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) => {
|
|
663
665
|
try {
|
|
664
|
-
const { parseMcpCallArgs } = await Promise.resolve().then(() => require("./call-args-
|
|
665
|
-
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await Promise.resolve().then(() => require("./tool-visibility-
|
|
666
|
+
const { parseMcpCallArgs } = await Promise.resolve().then(() => require("./call-args-DXEmPeE-.cjs"));
|
|
667
|
+
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await Promise.resolve().then(() => require("./tool-visibility-DIpgPULN.cjs")).then((n) => n.tool_visibility_exports);
|
|
666
668
|
let args = parseMcpCallArgs(rawArgs);
|
|
667
669
|
assertPublicMcpToolName(tool);
|
|
668
670
|
validatePublicMcpToolArguments(tool, args);
|
|
669
671
|
if (tool === "wallet_balance") {
|
|
670
|
-
const { getWalletBalanceText } = await Promise.resolve().then(() => require("./tools-
|
|
672
|
+
const { getWalletBalanceText } = await Promise.resolve().then(() => require("./tools-DZLizem9.cjs")).then((n) => n.tools_exports);
|
|
671
673
|
console.log(await getWalletBalanceText());
|
|
672
674
|
return;
|
|
673
675
|
}
|
|
@@ -683,9 +685,9 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
683
685
|
return;
|
|
684
686
|
}
|
|
685
687
|
if (tool === "meta_dex_lookup") {
|
|
686
|
-
const { handleMetaDexLookup } = await Promise.resolve().then(() => require("./dex-tool-
|
|
687
|
-
const { loadRegistry } = await Promise.resolve().then(() => require("./dex-registry-
|
|
688
|
-
const { metaDexLookupArgs } = await Promise.resolve().then(() => require("./call-args-
|
|
688
|
+
const { handleMetaDexLookup } = await Promise.resolve().then(() => require("./dex-tool-DsM-pSku.cjs")).then((n) => n.dex_tool_exports);
|
|
689
|
+
const { loadRegistry } = await Promise.resolve().then(() => require("./dex-registry-CZQB2YhU.cjs")).then((n) => n.dex_registry_exports);
|
|
690
|
+
const { metaDexLookupArgs } = await Promise.resolve().then(() => require("./call-args-DXEmPeE-.cjs"));
|
|
689
691
|
const result = await withGraphMcpClient("chain-insights-cli-dex-lookup", (client) => handleMetaDexLookup(metaDexLookupArgs(args), {
|
|
690
692
|
loadRegistry: (network) => loadRegistry(network),
|
|
691
693
|
graphQueryBatch: async (batchArgs) => await client.callTool({
|
|
@@ -698,6 +700,24 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
698
700
|
if (result.isError) process.exitCode = 1;
|
|
699
701
|
return;
|
|
700
702
|
}
|
|
703
|
+
if (tool === "meta_token_lookup") {
|
|
704
|
+
const { handleMetaTokenLookup } = await Promise.resolve().then(() => require("./token-lookup-BJ00JO9A.cjs")).then((n) => n.token_lookup_exports);
|
|
705
|
+
const { metaTokenLookupArgs } = await Promise.resolve().then(() => require("./call-args-DXEmPeE-.cjs"));
|
|
706
|
+
const result = await withGraphMcpClient("chain-insights-cli-token-lookup", (client) => handleMetaTokenLookup(metaTokenLookupArgs(args), {
|
|
707
|
+
graphQuery: async (queryArgs) => await client.callTool({
|
|
708
|
+
name: "graph_query",
|
|
709
|
+
arguments: queryArgs
|
|
710
|
+
}),
|
|
711
|
+
graphQueryBatch: async (batchArgs) => await client.callTool({
|
|
712
|
+
name: "graph_query_batch",
|
|
713
|
+
arguments: batchArgs
|
|
714
|
+
}),
|
|
715
|
+
describeFailure: (err) => err.message
|
|
716
|
+
}));
|
|
717
|
+
console.log(result.content[0]?.text ?? "");
|
|
718
|
+
if (result.isError) process.exitCode = 1;
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
701
721
|
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.");
|
|
702
722
|
if (tool === "meta_help") {
|
|
703
723
|
console.log("Graph tools: graph_query and graph_query_batch. Metadata and payment tools: meta_* and wallet_balance.");
|
|
@@ -715,20 +735,20 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
715
735
|
json: opts.json
|
|
716
736
|
});
|
|
717
737
|
} catch (err) {
|
|
718
|
-
const { isMissingUsageStatusToolError, primitiveBackendUsageStatus, usageStatusText } = await Promise.resolve().then(() => require("./usage-status-
|
|
738
|
+
const { isMissingUsageStatusToolError, primitiveBackendUsageStatus, usageStatusText } = await Promise.resolve().then(() => require("./usage-status-DnV3I3gX.cjs")).then((n) => n.usage_status_exports);
|
|
719
739
|
if (!isMissingUsageStatusToolError(err)) throw err;
|
|
720
|
-
const { resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-
|
|
740
|
+
const { resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-Ddk4X9Ko.cjs")).then((n) => n.client_exports);
|
|
721
741
|
console.log(usageStatusText(primitiveBackendUsageStatus(resolveGraphMcpEndpoint(config))));
|
|
722
742
|
}
|
|
723
743
|
return;
|
|
724
744
|
}
|
|
725
745
|
if (tool === "meta_subscription_status") {
|
|
726
746
|
try {
|
|
727
|
-
const { subscriptionStatusArguments, subscriptionStatusNeedsWallet } = await Promise.resolve().then(() => require("./subscription-status-
|
|
747
|
+
const { subscriptionStatusArguments, subscriptionStatusNeedsWallet } = await Promise.resolve().then(() => require("./subscription-status-w4zI2KCK.cjs")).then((n) => n.subscription_status_exports);
|
|
728
748
|
const remote = (await client.listTools()).tools.find((t) => t.name === "subscription_status");
|
|
729
749
|
let wallet = null;
|
|
730
750
|
if (subscriptionStatusNeedsWallet(remote)) {
|
|
731
|
-
const { getWalletAccount } = await Promise.resolve().then(() => require("./tools-
|
|
751
|
+
const { getWalletAccount } = await Promise.resolve().then(() => require("./tools-DZLizem9.cjs")).then((n) => n.tools_exports);
|
|
732
752
|
wallet = (await getWalletAccount()).address;
|
|
733
753
|
}
|
|
734
754
|
const result = await client.callTool({
|
|
@@ -740,16 +760,16 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
740
760
|
json: opts.json
|
|
741
761
|
});
|
|
742
762
|
} catch (err) {
|
|
743
|
-
const { isMissingSubscriptionStatusToolError, unavailableSubscriptionStatus, subscriptionStatusText } = await Promise.resolve().then(() => require("./subscription-status-
|
|
763
|
+
const { isMissingSubscriptionStatusToolError, unavailableSubscriptionStatus, subscriptionStatusText } = await Promise.resolve().then(() => require("./subscription-status-w4zI2KCK.cjs")).then((n) => n.subscription_status_exports);
|
|
744
764
|
if (!isMissingSubscriptionStatusToolError(err)) throw err;
|
|
745
|
-
const { resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-
|
|
765
|
+
const { resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-Ddk4X9Ko.cjs")).then((n) => n.client_exports);
|
|
746
766
|
console.log(subscriptionStatusText(unavailableSubscriptionStatus(resolveGraphMcpEndpoint(config), `subscription_status failed: ${err.message}`)));
|
|
747
767
|
}
|
|
748
768
|
return;
|
|
749
769
|
}
|
|
750
|
-
const { graphToolRequestOptions } = await Promise.resolve().then(() => require("./request-timeout-
|
|
770
|
+
const { graphToolRequestOptions } = await Promise.resolve().then(() => require("./request-timeout-DxwNijQD.cjs"));
|
|
751
771
|
const requestOptions = graphToolRequestOptions(tool);
|
|
752
|
-
const { withoutUtcProperties } = await Promise.resolve().then(() => require("./print-result-
|
|
772
|
+
const { withoutUtcProperties } = await Promise.resolve().then(() => require("./print-result-BYppJlUi.cjs")).then((n) => n.timestamp_text_exports);
|
|
753
773
|
args = withoutUtcProperties(tool, args);
|
|
754
774
|
const result = requestOptions ? await client.callTool({
|
|
755
775
|
name: tool,
|
|
@@ -764,7 +784,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
764
784
|
});
|
|
765
785
|
});
|
|
766
786
|
} catch (err) {
|
|
767
|
-
const { formatMcpCallError } = await Promise.resolve().then(() => require("./tool-visibility-
|
|
787
|
+
const { formatMcpCallError } = await Promise.resolve().then(() => require("./tool-visibility-DIpgPULN.cjs")).then((n) => n.tool_visibility_exports);
|
|
768
788
|
console.error(formatMcpCallError(tool, err));
|
|
769
789
|
process.exit(1);
|
|
770
790
|
}
|
|
@@ -773,4 +793,3 @@ program.parseAsync(normalizeAmlToolVersionArgv(process.argv)).catch((err) => {
|
|
|
773
793
|
console.error(err.message);
|
|
774
794
|
process.exit(1);
|
|
775
795
|
});
|
|
776
|
-
//#endregion
|