chain-insights 0.73.3 → 0.74.1

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.
Files changed (51) hide show
  1. package/dist/cli.cjs +10 -10
  2. package/dist/cli.mjs +10 -10
  3. package/dist/index.cjs +2 -2
  4. package/dist/index.d.cts +13 -2
  5. package/dist/index.d.cts.map +1 -1
  6. package/dist/index.d.mts +13 -2
  7. package/dist/index.d.mts.map +1 -1
  8. package/dist/index.mjs +2 -2
  9. package/dist/mcp-proxy.cjs +8 -6
  10. package/dist/mcp-proxy.d.cts +1 -0
  11. package/dist/mcp-proxy.d.cts.map +1 -1
  12. package/dist/mcp-proxy.d.mts +1 -0
  13. package/dist/mcp-proxy.d.mts.map +1 -1
  14. package/dist/mcp-proxy.mjs +8 -7
  15. package/dist/mcp-proxy.mjs.map +1 -1
  16. package/dist/{print-result-CJ8d7lmz.mjs → print-result-C3YazZBw.mjs} +2 -1
  17. package/dist/print-result-C3YazZBw.mjs.map +1 -0
  18. package/dist/{print-result-qVhhuSdo.cjs → print-result-Cyqrlx8P.cjs} +1 -0
  19. package/dist/{tool-visibility-D-pFpuoz.mjs → tool-visibility-B6983rxo.mjs} +2 -2
  20. package/dist/{tool-visibility-D-pFpuoz.mjs.map → tool-visibility-B6983rxo.mjs.map} +1 -1
  21. package/dist/{tool-visibility-DvKqmHo3.cjs → tool-visibility-BNwvcuVx.cjs} +1 -1
  22. package/dist/{topup-C-Tczr2k.mjs → topup-B6gZbTmv.mjs} +3 -2
  23. package/dist/topup-B6gZbTmv.mjs.map +1 -0
  24. package/dist/{topup-Do_4EAld.cjs → topup-DVTCU2le.cjs} +3 -2
  25. package/dist/{topup-server-qdruzcre.mjs → topup-server-BcT7DIpd.mjs} +12 -6
  26. package/dist/topup-server-BcT7DIpd.mjs.map +1 -0
  27. package/dist/{topup-server-CSF5EjNt.mjs → topup-server-KQDviFXG.mjs} +32 -8
  28. package/dist/topup-server-KQDviFXG.mjs.map +1 -0
  29. package/dist/{topup-server-DH3qVMvO.cjs → topup-server-ShuYSyBY.cjs} +31 -7
  30. package/dist/{topup-server-B1cdQDFT.cjs → topup-server-f4Gx0vji.cjs} +11 -5
  31. package/dist/{transport-error-nSrFW47U.cjs → transport-error-CgISST8l.cjs} +1 -1
  32. package/dist/{transport-error-BP6bZVDs.mjs → transport-error-D4hmpkqL.mjs} +2 -2
  33. package/dist/{transport-error-BP6bZVDs.mjs.map → transport-error-D4hmpkqL.mjs.map} +1 -1
  34. package/dist/{update-S6j1hT_S.mjs → update-CZDHSi_u.mjs} +2 -2
  35. package/dist/{update-S6j1hT_S.mjs.map → update-CZDHSi_u.mjs.map} +1 -1
  36. package/dist/{update-BDCDRozR.cjs → update-DGyRlm3J.cjs} +1 -1
  37. package/docs/graph-query-compatibility.md +5 -4
  38. package/docs/graph-tools.md +16 -10
  39. package/package.json +2 -2
  40. package/registry/README.md +2 -2
  41. package/registry/robinhood.json +86 -6
  42. package/registry/robinhood.md +25 -2
  43. package/skills/chain-insights-cypher/SKILL.md +2 -1
  44. package/skills/chain-insights-dex/SKILL.md +5 -2
  45. package/skills/chain-insights-dex-launchpad/SKILL.md +17 -7
  46. package/skills/chain-insights-dex-vault/SKILL.md +9 -1
  47. package/skills/chain-insights-virtuals/SKILL.md +1 -1
  48. package/dist/print-result-CJ8d7lmz.mjs.map +0 -1
  49. package/dist/topup-C-Tczr2k.mjs.map +0 -1
  50. package/dist/topup-server-CSF5EjNt.mjs.map +0 -1
  51. package/dist/topup-server-qdruzcre.mjs.map +0 -1
package/dist/cli.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
- const require_print_result = require("./print-result-qVhhuSdo.cjs");
2
+ const require_print_result = require("./print-result-Cyqrlx8P.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");
@@ -53,7 +53,7 @@ async function withStatusReader(fn) {
53
53
  const { loadConfig } = await Promise.resolve().then(() => require("./config-BxtMoo9c.cjs")).then((n) => n.config_exports);
54
54
  const config = await loadConfig();
55
55
  const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-C9uwHnBS.cjs")).then((n) => n.client_exports);
56
- const { toGraphMcpEndpointError } = await Promise.resolve().then(() => require("./transport-error-nSrFW47U.cjs"));
56
+ const { toGraphMcpEndpointError } = await Promise.resolve().then(() => require("./transport-error-CgISST8l.cjs"));
57
57
  const endpoint = resolveGraphMcpEndpoint(config);
58
58
  const fetchImpl = await createConfiguredGraphMcpFetch(config);
59
59
  const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
@@ -122,7 +122,7 @@ function fail(err) {
122
122
  function registerSubscriptionCommands(program, command) {
123
123
  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
124
  try {
125
- const { runSubscriptionTopup } = await Promise.resolve().then(() => require("./topup-Do_4EAld.cjs"));
125
+ const { runSubscriptionTopup } = await Promise.resolve().then(() => require("./topup-DVTCU2le.cjs"));
126
126
  await runSubscriptionTopup(opts);
127
127
  } catch (err) {
128
128
  fail(err);
@@ -217,7 +217,7 @@ async function withGraphMcpClient(name, fn) {
217
217
  const { loadConfig } = await Promise.resolve().then(() => require("./config-BxtMoo9c.cjs")).then((n) => n.config_exports);
218
218
  const config = await loadConfig();
219
219
  const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-C9uwHnBS.cjs")).then((n) => n.client_exports);
220
- const { toGraphMcpEndpointError } = await Promise.resolve().then(() => require("./transport-error-nSrFW47U.cjs"));
220
+ const { toGraphMcpEndpointError } = await Promise.resolve().then(() => require("./transport-error-CgISST8l.cjs"));
221
221
  const endpoint = resolveGraphMcpEndpoint(config);
222
222
  const paymentFetch = await createConfiguredGraphMcpFetch(config);
223
223
  const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
@@ -342,7 +342,7 @@ program.command("status").description("Show toolkit status and configuration").a
342
342
  });
343
343
  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
344
  try {
345
- const { checkForUpdate, runPackageUpdate } = await Promise.resolve().then(() => require("./update-BDCDRozR.cjs"));
345
+ const { checkForUpdate, runPackageUpdate } = await Promise.resolve().then(() => require("./update-DGyRlm3J.cjs"));
346
346
  const result = await checkForUpdate();
347
347
  if (result.error) throw new Error(`Could not check npmjs for updates: ${result.error}`);
348
348
  if (!result.updateAvailable || !result.latestVersion) {
@@ -592,7 +592,7 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
592
592
  })).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
593
  try {
594
594
  const { assertWalletKeyNotPublic, buildTopupInfo, getWalletAccount } = await Promise.resolve().then(() => require("./tools-Cmnq7yip.cjs")).then((n) => n.tools_exports);
595
- const { startTopupServer } = await Promise.resolve().then(() => require("./topup-server-B1cdQDFT.cjs")).then((n) => n.topup_server_exports);
595
+ const { startTopupServer } = await Promise.resolve().then(() => require("./topup-server-f4Gx0vji.cjs")).then((n) => n.topup_server_exports);
596
596
  const account = await getWalletAccount();
597
597
  assertWalletKeyNotPublic(account);
598
598
  const url = await startTopupServer(account);
@@ -626,7 +626,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
626
626
  try {
627
627
  const { loadSchema, saveSchema } = await Promise.resolve().then(() => require("./schema-cache-C7v9ml6S.cjs"));
628
628
  const { formatToolsTable } = await Promise.resolve().then(() => require("./format-DfhRQq4L.cjs"));
629
- const { visibleRemoteTools } = await Promise.resolve().then(() => require("./tool-visibility-DvKqmHo3.cjs")).then((n) => n.tool_visibility_exports);
629
+ const { visibleRemoteTools } = await Promise.resolve().then(() => require("./tool-visibility-BNwvcuVx.cjs")).then((n) => n.tool_visibility_exports);
630
630
  const { loadConfig } = await Promise.resolve().then(() => require("./config-BxtMoo9c.cjs")).then((n) => n.config_exports);
631
631
  const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-C9uwHnBS.cjs")).then((n) => n.client_exports);
632
632
  const config = await loadConfig();
@@ -662,7 +662,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
662
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) => {
663
663
  try {
664
664
  const { parseMcpCallArgs } = await Promise.resolve().then(() => require("./call-args-C8Gp5gco.cjs"));
665
- const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await Promise.resolve().then(() => require("./tool-visibility-DvKqmHo3.cjs")).then((n) => n.tool_visibility_exports);
665
+ const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await Promise.resolve().then(() => require("./tool-visibility-BNwvcuVx.cjs")).then((n) => n.tool_visibility_exports);
666
666
  let args = parseMcpCallArgs(rawArgs);
667
667
  assertPublicMcpToolName(tool);
668
668
  validatePublicMcpToolArguments(tool, args);
@@ -749,7 +749,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
749
749
  }
750
750
  const { graphToolRequestOptions } = await Promise.resolve().then(() => require("./request-timeout-CYmQF8N7.cjs"));
751
751
  const requestOptions = graphToolRequestOptions(tool);
752
- const { withoutUtcProperties } = await Promise.resolve().then(() => require("./print-result-qVhhuSdo.cjs")).then((n) => n.timestamp_text_exports);
752
+ const { withoutUtcProperties } = await Promise.resolve().then(() => require("./print-result-Cyqrlx8P.cjs")).then((n) => n.timestamp_text_exports);
753
753
  args = withoutUtcProperties(tool, args);
754
754
  const result = requestOptions ? await client.callTool({
755
755
  name: tool,
@@ -764,7 +764,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
764
764
  });
765
765
  });
766
766
  } catch (err) {
767
- const { formatMcpCallError } = await Promise.resolve().then(() => require("./tool-visibility-DvKqmHo3.cjs")).then((n) => n.tool_visibility_exports);
767
+ const { formatMcpCallError } = await Promise.resolve().then(() => require("./tool-visibility-BNwvcuVx.cjs")).then((n) => n.tool_visibility_exports);
768
768
  console.error(formatMcpCallError(tool, err));
769
769
  process.exit(1);
770
770
  }
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as PACKAGE_VERSION, r as printMcpTextContent, s as PACKAGE_INFO } from "./print-result-CJ8d7lmz.mjs";
1
+ import { c as PACKAGE_VERSION, r as printMcpTextContent, s as PACKAGE_INFO } from "./print-result-C3YazZBw.mjs";
2
2
  import { Command, Option } from "commander";
3
3
  import { execFileSync } from "node:child_process";
4
4
  import { fileURLToPath } from "node:url";
@@ -51,7 +51,7 @@ async function withStatusReader(fn) {
51
51
  const { loadConfig } = await import("./config-9MabJh5R.mjs").then((n) => n.t);
52
52
  const config = await loadConfig();
53
53
  const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-7qOfAdpH.mjs").then((n) => n.r);
54
- const { toGraphMcpEndpointError } = await import("./transport-error-BP6bZVDs.mjs");
54
+ const { toGraphMcpEndpointError } = await import("./transport-error-D4hmpkqL.mjs");
55
55
  const endpoint = resolveGraphMcpEndpoint(config);
56
56
  const fetchImpl = await createConfiguredGraphMcpFetch(config);
57
57
  const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
@@ -120,7 +120,7 @@ function fail(err) {
120
120
  function registerSubscriptionCommands(program, command) {
121
121
  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
122
  try {
123
- const { runSubscriptionTopup } = await import("./topup-C-Tczr2k.mjs");
123
+ const { runSubscriptionTopup } = await import("./topup-B6gZbTmv.mjs");
124
124
  await runSubscriptionTopup(opts);
125
125
  } catch (err) {
126
126
  fail(err);
@@ -215,7 +215,7 @@ async function withGraphMcpClient(name, fn) {
215
215
  const { loadConfig } = await import("./config-9MabJh5R.mjs").then((n) => n.t);
216
216
  const config = await loadConfig();
217
217
  const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-7qOfAdpH.mjs").then((n) => n.r);
218
- const { toGraphMcpEndpointError } = await import("./transport-error-BP6bZVDs.mjs");
218
+ const { toGraphMcpEndpointError } = await import("./transport-error-D4hmpkqL.mjs");
219
219
  const endpoint = resolveGraphMcpEndpoint(config);
220
220
  const paymentFetch = await createConfiguredGraphMcpFetch(config);
221
221
  const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
@@ -340,7 +340,7 @@ program.command("status").description("Show toolkit status and configuration").a
340
340
  });
341
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) => {
342
342
  try {
343
- const { checkForUpdate, runPackageUpdate } = await import("./update-S6j1hT_S.mjs");
343
+ const { checkForUpdate, runPackageUpdate } = await import("./update-CZDHSi_u.mjs");
344
344
  const result = await checkForUpdate();
345
345
  if (result.error) throw new Error(`Could not check npmjs for updates: ${result.error}`);
346
346
  if (!result.updateAvailable || !result.latestVersion) {
@@ -590,7 +590,7 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
590
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) => {
591
591
  try {
592
592
  const { assertWalletKeyNotPublic, buildTopupInfo, getWalletAccount } = await import("./tools-D9ep9E7Q.mjs").then((n) => n.p);
593
- const { startTopupServer } = await import("./topup-server-qdruzcre.mjs").then((n) => n.r);
593
+ const { startTopupServer } = await import("./topup-server-BcT7DIpd.mjs").then((n) => n.r);
594
594
  const account = await getWalletAccount();
595
595
  assertWalletKeyNotPublic(account);
596
596
  const url = await startTopupServer(account);
@@ -624,7 +624,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
624
624
  try {
625
625
  const { loadSchema, saveSchema } = await import("./schema-cache-DRObKUvS.mjs");
626
626
  const { formatToolsTable } = await import("./format-CSesEBvS.mjs");
627
- const { visibleRemoteTools } = await import("./tool-visibility-D-pFpuoz.mjs").then((n) => n.a);
627
+ const { visibleRemoteTools } = await import("./tool-visibility-B6983rxo.mjs").then((n) => n.a);
628
628
  const { loadConfig } = await import("./config-9MabJh5R.mjs").then((n) => n.t);
629
629
  const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-7qOfAdpH.mjs").then((n) => n.r);
630
630
  const config = await loadConfig();
@@ -660,7 +660,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
660
660
  })).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
661
  try {
662
662
  const { parseMcpCallArgs } = await import("./call-args-B0oMK1-J.mjs");
663
- const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await import("./tool-visibility-D-pFpuoz.mjs").then((n) => n.a);
663
+ const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await import("./tool-visibility-B6983rxo.mjs").then((n) => n.a);
664
664
  let args = parseMcpCallArgs(rawArgs);
665
665
  assertPublicMcpToolName(tool);
666
666
  validatePublicMcpToolArguments(tool, args);
@@ -747,7 +747,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
747
747
  }
748
748
  const { graphToolRequestOptions } = await import("./request-timeout-lBBe0mGf.mjs");
749
749
  const requestOptions = graphToolRequestOptions(tool);
750
- const { withoutUtcProperties } = await import("./print-result-CJ8d7lmz.mjs").then((n) => n.i);
750
+ const { withoutUtcProperties } = await import("./print-result-C3YazZBw.mjs").then((n) => n.i);
751
751
  args = withoutUtcProperties(tool, args);
752
752
  const result = requestOptions ? await client.callTool({
753
753
  name: tool,
@@ -762,7 +762,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
762
762
  });
763
763
  });
764
764
  } catch (err) {
765
- const { formatMcpCallError } = await import("./tool-visibility-D-pFpuoz.mjs").then((n) => n.a);
765
+ const { formatMcpCallError } = await import("./tool-visibility-B6983rxo.mjs").then((n) => n.a);
766
766
  console.error(formatMcpCallError(tool, err));
767
767
  process.exit(1);
768
768
  }
package/dist/index.cjs CHANGED
@@ -3,8 +3,8 @@ const require_config = require("./config-BxtMoo9c.cjs");
3
3
  const require_wallet = require("./wallet-CgIAfdxL.cjs");
4
4
  const require_create = require("./create-DdggkF04.cjs");
5
5
  const require_tools = require("./tools-Cmnq7yip.cjs");
6
- const require_topup_server = require("./topup-server-DH3qVMvO.cjs");
7
- const require_topup_server$1 = require("./topup-server-B1cdQDFT.cjs");
6
+ const require_topup_server = require("./topup-server-ShuYSyBY.cjs");
7
+ const require_topup_server$1 = require("./topup-server-f4Gx0vji.cjs");
8
8
  const require_client = require("./client-C9uwHnBS.cjs");
9
9
  exports.buildTopupInfo = require_tools.buildTopupInfo;
10
10
  exports.createMcpFetchClient = require_client.createMcpFetchClient;
package/dist/index.d.cts CHANGED
@@ -119,11 +119,22 @@ export declare function getWalletBalanceText(account?: PaymentWalletAccount): Pr
119
119
  export declare function buildTopupInfo(address: string, topupUrl?: string): TopupInfo;
120
120
  //#endregion
121
121
  //#region src/wallet/mcp-proxy/topup-server.d.ts
122
- export declare function generateArtifactHtml(walletAddressInput: string, topupUrl: string): string;
122
+ /**
123
+ * The top-up rails. base-usdc funds pay-per-call queries with USDC on Base;
124
+ * robinhood-cia funds the subscription with $CIA and ETH on Robinhood Chain.
125
+ * One local server per rail.
126
+ */
127
+ type TopupRail = 'base-usdc' | 'robinhood-cia';
128
+ export declare function generateArtifactHtml(walletAddressInput: string, topupUrl: string, rail?: TopupRail): string;
123
129
  //#endregion
124
130
  //#region src/wallet/topup-server.d.ts
125
131
  export declare function getTopupUrl(): string | null;
126
- export declare function startTopupServer(account: PaymentWalletAccount | string): Promise<string>;
132
+ /**
133
+ * The browser top-up page of `cia wallet topup` (rail base-usdc) and of
134
+ * `cia subscription topup` (rail robinhood-cia): one page, only its text
135
+ * differs by rail.
136
+ */
137
+ export declare function startTopupServer(account: PaymentWalletAccount | string, rail?: TopupRail): Promise<string>;
127
138
  //#endregion
128
139
  //#region src/mcp/client.d.ts
129
140
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/config/schema.ts","../src/config/index.ts","../src/wallet/index.ts","../src/wallet/create.ts","../src/wallet/tools.ts","../src/wallet/mcp-proxy/topup-server.ts","../src/wallet/topup-server.ts","../src/mcp/client.ts"],"mappings":";;;cA4Da,cAAY,EAAA;;;;;;;;;;;;;;;;GAcvB,EAAA,KAAA;KAEU,qBAAqB,EAAE,aAAa;;;wBC3B1B,cAAc,QAAQ;wBAMtB,WAAW,SAAS,QAAQ,sBAAsB;wBAsDlD,oBAAoB;;;wBCnF1B,0BAA0B,gBAAgB;wBAO1C,4BAA4B,qBAAqB;;;;;;;;wBAW3C,WAAW,qBAAqB;UAwBrC;;EAEf;;;;;;;;wBAuCoB,oBACpB,oBACA,UAAS,6BACR,QAAQ;;;;;;;wBAkEW,cAAc;;;;;wBAwCd,sBAAsB;;;UCnN3B;EACf;EACA;;wBAGc,4BAA4B;wBAI5B,wBAAwB;wBAQxB,0BACd,oBACA,UAAS;;;cCXE;cACA;UAgDI;EACf,SAAS;EACT,YAAY;;EAEZ;;UAGe;EACf;EACA;EACA,iBAAiB;EACjB;EACA,uBAAuB;EACvB;;UAoDe;EACf,SAAS;EACT;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;IACE,QAAQ;;;;;;;;wBASU,oBAAoB,QAAQ;wBAoB5B,eACpB,SAAS,kBACT,8BACC;wBAsBmB,cACpB,SAAS,kBACT,8BACC;wBAuQa,oBACd,iBACA,qBACA;wBAaoB,uBACpB,UAAU,uBACT,QAAQ;wBAyBK,0BAA0B,QAAQ;wBAK5B,qBAAqB,UAAU,uBAAuB;wBAI5D,eAAe,iBAAiB,oBAAoB;;;wBCxUpD,qBAAqB,4BAA4B;;;wBCnFjD;wBAcM,iBAAiB,SAAS,gCAAgC;;;;;;;;;;;;;;;wBCkKhE,qBAAqB,2BAA2B,4BAAkB"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/config/schema.ts","../src/config/index.ts","../src/wallet/index.ts","../src/wallet/create.ts","../src/wallet/tools.ts","../src/wallet/mcp-proxy/topup-server.ts","../src/wallet/topup-server.ts","../src/mcp/client.ts"],"mappings":";;;cA4Da,cAAY,EAAA;;;;;;;;;;;;;;;;GAcvB,EAAA,KAAA;KAEU,qBAAqB,EAAE,aAAa;;;wBC3B1B,cAAc,QAAQ;wBAMtB,WAAW,SAAS,QAAQ,sBAAsB;wBAsDlD,oBAAoB;;;wBCnF1B,0BAA0B,gBAAgB;wBAO1C,4BAA4B,qBAAqB;;;;;;;;wBAW3C,WAAW,qBAAqB;UAwBrC;;EAEf;;;;;;;;wBAuCoB,oBACpB,oBACA,UAAS,6BACR,QAAQ;;;;;;;wBAkEW,cAAc;;;;;wBAwCd,sBAAsB;;;UCnN3B;EACf;EACA;;wBAGc,4BAA4B;wBAI5B,wBAAwB;wBAQxB,0BACd,oBACA,UAAS;;;cCXE;cACA;UAgDI;EACf,SAAS;EACT,YAAY;;EAEZ;;UAGe;EACf;EACA;EACA,iBAAiB;EACjB;EACA,uBAAuB;EACvB;;UAoDe;EACf,SAAS;EACT;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;IACE,QAAQ;;;;;;;;wBASU,oBAAoB,QAAQ;wBAoB5B,eACpB,SAAS,kBACT,8BACC;wBAsBmB,cACpB,SAAS,kBACT,8BACC;wBAuQa,oBACd,iBACA,qBACA;wBAaoB,uBACpB,UAAU,uBACT,QAAQ;wBAyBK,0BAA0B,QAAQ;wBAK5B,qBAAqB,UAAU,uBAAuB;wBAI5D,eAAe,iBAAiB,oBAAoB;;;;;;;;KC9cxD;wBAgKI,qBACd,4BACA,kBACA,OAAM;;;wBC9GQ;;;;;;wBAmBM,iBACpB,SAAS,+BACT,OAAM,YACL;;;;;;;;;;;;;;;wBCwJa,qBAAqB,2BAA2B,4BAAkB"}
package/dist/index.d.mts CHANGED
@@ -119,11 +119,22 @@ export declare function getWalletBalanceText(account?: PaymentWalletAccount): Pr
119
119
  export declare function buildTopupInfo(address: string, topupUrl?: string): TopupInfo;
120
120
  //#endregion
121
121
  //#region src/wallet/mcp-proxy/topup-server.d.ts
122
- export declare function generateArtifactHtml(walletAddressInput: string, topupUrl: string): string;
122
+ /**
123
+ * The top-up rails. base-usdc funds pay-per-call queries with USDC on Base;
124
+ * robinhood-cia funds the subscription with $CIA and ETH on Robinhood Chain.
125
+ * One local server per rail.
126
+ */
127
+ type TopupRail = 'base-usdc' | 'robinhood-cia';
128
+ export declare function generateArtifactHtml(walletAddressInput: string, topupUrl: string, rail?: TopupRail): string;
123
129
  //#endregion
124
130
  //#region src/wallet/topup-server.d.ts
125
131
  export declare function getTopupUrl(): string | null;
126
- export declare function startTopupServer(account: PaymentWalletAccount | string): Promise<string>;
132
+ /**
133
+ * The browser top-up page of `cia wallet topup` (rail base-usdc) and of
134
+ * `cia subscription topup` (rail robinhood-cia): one page, only its text
135
+ * differs by rail.
136
+ */
137
+ export declare function startTopupServer(account: PaymentWalletAccount | string, rail?: TopupRail): Promise<string>;
127
138
  //#endregion
128
139
  //#region src/mcp/client.d.ts
129
140
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/config/schema.ts","../src/config/index.ts","../src/wallet/index.ts","../src/wallet/create.ts","../src/wallet/tools.ts","../src/wallet/mcp-proxy/topup-server.ts","../src/wallet/topup-server.ts","../src/mcp/client.ts"],"mappings":";;;cA4Da,cAAY,EAAA;;;;;;;;;;;;;;;;GAcvB,EAAA,KAAA;KAEU,qBAAqB,EAAE,aAAa;;;wBC3B1B,cAAc,QAAQ;wBAMtB,WAAW,SAAS,QAAQ,sBAAsB;wBAsDlD,oBAAoB;;;wBCnF1B,0BAA0B,gBAAgB;wBAO1C,4BAA4B,qBAAqB;;;;;;;;wBAW3C,WAAW,qBAAqB;UAwBrC;;EAEf;;;;;;;;wBAuCoB,oBACpB,oBACA,UAAS,6BACR,QAAQ;;;;;;;wBAkEW,cAAc;;;;;wBAwCd,sBAAsB;;;UCnN3B;EACf;EACA;;wBAGc,4BAA4B;wBAI5B,wBAAwB;wBAQxB,0BACd,oBACA,UAAS;;;cCXE;cACA;UAgDI;EACf,SAAS;EACT,YAAY;;EAEZ;;UAGe;EACf;EACA;EACA,iBAAiB;EACjB;EACA,uBAAuB;EACvB;;UAoDe;EACf,SAAS;EACT;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;IACE,QAAQ;;;;;;;;wBASU,oBAAoB,QAAQ;wBAoB5B,eACpB,SAAS,kBACT,8BACC;wBAsBmB,cACpB,SAAS,kBACT,8BACC;wBAuQa,oBACd,iBACA,qBACA;wBAaoB,uBACpB,UAAU,uBACT,QAAQ;wBAyBK,0BAA0B,QAAQ;wBAK5B,qBAAqB,UAAU,uBAAuB;wBAI5D,eAAe,iBAAiB,oBAAoB;;;wBCxUpD,qBAAqB,4BAA4B;;;wBCnFjD;wBAcM,iBAAiB,SAAS,gCAAgC;;;;;;;;;;;;;;;wBCkKhE,qBAAqB,2BAA2B,4BAAkB"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/config/schema.ts","../src/config/index.ts","../src/wallet/index.ts","../src/wallet/create.ts","../src/wallet/tools.ts","../src/wallet/mcp-proxy/topup-server.ts","../src/wallet/topup-server.ts","../src/mcp/client.ts"],"mappings":";;;cA4Da,cAAY,EAAA;;;;;;;;;;;;;;;;GAcvB,EAAA,KAAA;KAEU,qBAAqB,EAAE,aAAa;;;wBC3B1B,cAAc,QAAQ;wBAMtB,WAAW,SAAS,QAAQ,sBAAsB;wBAsDlD,oBAAoB;;;wBCnF1B,0BAA0B,gBAAgB;wBAO1C,4BAA4B,qBAAqB;;;;;;;;wBAW3C,WAAW,qBAAqB;UAwBrC;;EAEf;;;;;;;;wBAuCoB,oBACpB,oBACA,UAAS,6BACR,QAAQ;;;;;;;wBAkEW,cAAc;;;;;wBAwCd,sBAAsB;;;UCnN3B;EACf;EACA;;wBAGc,4BAA4B;wBAI5B,wBAAwB;wBAQxB,0BACd,oBACA,UAAS;;;cCXE;cACA;UAgDI;EACf,SAAS;EACT,YAAY;;EAEZ;;UAGe;EACf;EACA;EACA,iBAAiB;EACjB;EACA,uBAAuB;EACvB;;UAoDe;EACf,SAAS;EACT;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;IACE,QAAQ;;;;;;;;wBASU,oBAAoB,QAAQ;wBAoB5B,eACpB,SAAS,kBACT,8BACC;wBAsBmB,cACpB,SAAS,kBACT,8BACC;wBAuQa,oBACd,iBACA,qBACA;wBAaoB,uBACpB,UAAU,uBACT,QAAQ;wBAyBK,0BAA0B,QAAQ;wBAK5B,qBAAqB,UAAU,uBAAuB;wBAI5D,eAAe,iBAAiB,oBAAoB;;;;;;;;KC9cxD;wBAgKI,qBACd,4BACA,kBACA,OAAM;;;wBC9GQ;;;;;;wBAmBM,iBACpB,SAAS,+BACT,OAAM,YACL;;;;;;;;;;;;;;;wBCwJa,qBAAqB,2BAA2B,4BAAkB"}
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { i as saveConfig, n as loadConfig, r as resetConfigCache } from "./confi
2
2
  import { a as setWalletPrivateKey, i as normalizeWalletPrivateKey, n as encryptKey, o as walletAddressFromPrivateKey, r as isWalletConfigured, t as decryptKey } from "./wallet-QTo5YCFR.mjs";
3
3
  import { i as isWalletBackupConfirmed, n as formatWalletBackupWarning, r as generateWalletPrivateKey } from "./create-CpfZq2fx.mjs";
4
4
  import { a as formatWalletBalanceResult, c as getWalletAccount, i as formatWalletBalance, l as getWalletBalanceResult, o as getBalanceEth, r as buildTopupInfo, s as getBalanceUsdc, u as getWalletBalanceText } from "./tools-D9ep9E7Q.mjs";
5
- import { n as generateArtifactHtml } from "./topup-server-CSF5EjNt.mjs";
6
- import { n as startTopupServer, t as getTopupUrl } from "./topup-server-qdruzcre.mjs";
5
+ import { n as generateArtifactHtml } from "./topup-server-KQDviFXG.mjs";
6
+ import { n as startTopupServer, t as getTopupUrl } from "./topup-server-BcT7DIpd.mjs";
7
7
  import { i as createMcpFetchClient } from "./client-7qOfAdpH.mjs";
8
8
  export { buildTopupInfo, createMcpFetchClient, decryptKey, encryptKey, formatWalletBackupWarning, formatWalletBalance, formatWalletBalanceResult, generateArtifactHtml, generateWalletPrivateKey, getBalanceEth, getBalanceUsdc, getTopupUrl, getWalletAccount, getWalletBalanceResult, getWalletBalanceText, isWalletBackupConfirmed, isWalletConfigured, loadConfig, normalizeWalletPrivateKey, resetConfigCache, saveConfig, setWalletPrivateKey, startTopupServer, walletAddressFromPrivateKey };
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
3
- const require_print_result = require("./print-result-qVhhuSdo.cjs");
3
+ const require_print_result = require("./print-result-Cyqrlx8P.cjs");
4
4
  const require_rules = require("./rules-BD-cNHMX.cjs");
5
5
  const require_client = require("./client-C9uwHnBS.cjs");
6
- const require_tool_visibility = require("./tool-visibility-DvKqmHo3.cjs");
6
+ const require_tool_visibility = require("./tool-visibility-BNwvcuVx.cjs");
7
7
  const require_usage_status = require("./usage-status-DonwoLR3.cjs");
8
8
  const require_subscription_status = require("./subscription-status-9tMfD90J.cjs");
9
9
  const require_capabilities = require("./capabilities-Ds3320iS.cjs");
@@ -720,6 +720,7 @@ function resolveMcpProxyMode(env = process.env) {
720
720
  const GRAPH_LAYERS_TEXT = "Use USE topology for topology (address/FLOWS_TO/OPERATED_BY/LINKED graph with SWAPPED, ADDED_LIQUIDITY, REMOVED_LIQUIDITY, BRIDGED and the Pool, Token and NFT labels, unified recent+historical) and USE facts for bounded TRANSFER, SWAP, LIQUIDITY_ADD, LIQUIDITY_REMOVE and BRIDGE_CROSSING rows and enrichment, and USE chain for the chain node's own record of one known transaction, block, address or the head.";
721
721
  const TOOL_RULES_FIRST = "Rules first: if the chain-insights-cypher skill is not loaded in this chat, call meta_rules once before this tool. For a graph, alias the columns from_address and to_address; the host draws the picture from the answer itself. Never draw it again with another tool, such as a visualize or widget tool.";
722
722
  const GRAPH_QUERY_DEX_DOOR_SENTENCE = "A question that names an exchange and no address starts with meta_dex_lookup, never with a scan of :Protocol, :Pool or labels.";
723
+ const GRAPH_QUERY_ROLE_MARKS_SENTENCE = ":Sanctioned (is_sanctioned) means the address is on a sanctions list. :IssuerFrozen (is_issuer_frozen) means an issuer froze this wallet; the token in labels says which. Neither is :Scam.";
723
724
  const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
724
725
  meta_network_capabilities: "Return the current Chain Insights network and tool support matrix. Takes no arguments: send {}.",
725
726
  meta_schema: require_graph_schema.META_SCHEMA_DESCRIPTION,
@@ -729,7 +730,7 @@ const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
729
730
  meta_help: "Show a short guide to Chain Insights tools and workflow.",
730
731
  meta_rules: "Return the Chain Insights rules: how to write graph_query and graph_query_batch reads that are served, how to name columns so the answer is drawn as a graph, a time series or a table, and how to write the answer. Call it once per chat, before the first graph query, when the chain-insights-cypher skill is not loaded. Takes no arguments: send {}.",
731
732
  wallet_balance: "Show the local Chain Insights payment wallet address, payment network, token, and amount.",
732
- graph_query: `${TOOL_RULES_FIRST} Run a read-only GQL/Cypher query through the Chain Insights graph endpoint. ${GRAPH_LAYERS_TEXT} ${GRAPH_QUERY_DEX_DOOR_SENTENCE} ${ROUTING_NOT_SERVED} Preserve full addresses exactly, and write every address in full, all 42 characters, in your answer: never shorten one with ... or ….`,
733
+ graph_query: `${TOOL_RULES_FIRST} Run a read-only GQL/Cypher query through the Chain Insights graph endpoint. ${GRAPH_LAYERS_TEXT} ${GRAPH_QUERY_DEX_DOOR_SENTENCE} ${GRAPH_QUERY_ROLE_MARKS_SENTENCE} ${ROUTING_NOT_SERVED} Preserve full addresses exactly, and write every address in full, all 42 characters, in your answer: never shorten one with ... or ….`,
733
734
  graph_query_batch: `${TOOL_RULES_FIRST} Run multiple read-only GQL/Cypher queries through the Chain Insights graph endpoint in one paid batch. Prefer this for related topology/facts reads. For a time series across days, send one USE facts total per day with the query id set to the day, "YYYY-MM-DD": the view joins them into one series. Write every address in full in your answer, all 42 characters.`
734
735
  };
735
736
  const KNOWN_PUBLIC_TOOL_TITLES = {
@@ -772,8 +773,8 @@ const GRAPH_SCHEMA_HINTS = [
772
773
  "- Coverage is per kind of data. coverage.complete_through_block is the floor of USE facts: below it every raw relationship is indexed. graph_progress.complete_through_block is the floor of USE topology, and graph_progress.layers gives each link kind its own height. An empty answer above the floor may mean not indexed yet, not absent on chain. An absent chain_tip_block means the indexers are catching up: read freshness.max_data_age_seconds for the lag.",
773
774
  "- The graph is address-grain. The only topology money node label is Address, keyed by the raw chain-native H160 address on EVM networks, for example 0x1874a43d7c6d888f9eda3d22a3a49704e3cadb24. There is no separate identity key. network is the query's network on every node and relationship, never stored, except on :Chain, where it names the remote chain.",
774
775
  "- An Address carries a kind from chain facts. topology carries :Account or :Contract as a second label on an Address (:Contract:SmartAccount for a contract wallet), with is_contract kept beside :Contract, and an address that only received has none. facts serves no kind, and a facts read that names :Account or :Contract is refused: ask USE topology or USE chain. chain Address returns is_contract, nonce and delegated_to at the newest block, or at the block named by at_block. block_timestamp is epoch milliseconds on every layer.",
775
- "- Address nodes carry address, network, labels, and the role flags is_exchange, is_scam, is_victim and is_sanctioned. (:Address)-[:LINKED]-(:Address) is an undirected ownership-overlay edge (basis derived/associated, plus confidence, source_event, declared_owner, owner_state) asserting the two addresses are controlled by the same actor. LINKED is served on the topology graph only. Enumerate LINKED neighbors with MATCH (a:Address {address: $addr})-[l:LINKED]-(b:Address) RETURN b.address, b.network, l.basis, l.confidence LIMIT 25.",
776
- "- Labels hold role words, never detector names: Exchange (plus the exchange name), Scam, Victim and Sanctioned (plus the entity name). Each role is also a node label and a flag on the Address: :Exchange and is_exchange follow the exchange label, :Scam and is_scam the risk label, :Victim and is_victim the protection label, :Sanctioned and is_sanctioned the sanctioned label. Each flag is present only when true and absent otherwise, never false: test IS NOT NULL or IS NULL, not = false. A withdrawn label removes its node label and its flag.",
776
+ "- Address nodes carry address, network, labels, and the role flags is_exchange, is_scam, is_victim, is_sanctioned and is_issuer_frozen. (:Address)-[:LINKED]-(:Address) is an undirected ownership-overlay edge (basis derived/associated, plus confidence, source_event, declared_owner, owner_state) asserting the two addresses are controlled by the same actor. LINKED is served on the topology graph only. Enumerate LINKED neighbors with MATCH (a:Address {address: $addr})-[l:LINKED]-(b:Address) RETURN b.address, b.network, l.basis, l.confidence LIMIT 25.",
777
+ "- Labels hold role words, never detector names: Exchange (plus the exchange name), Scam, Victim, Sanctioned (plus the entity name) and IssuerFrozen (plus the token symbol). Each role is also a node label and a flag on the Address: :Exchange and is_exchange follow the exchange label, :Scam and is_scam the risk label, :Victim and is_victim the protection label, :Sanctioned and is_sanctioned the sanctioned label, :IssuerFrozen and is_issuer_frozen the issuer_frozen label: an issuer froze this wallet; the token in labels says which. Each flag is present only when true and absent otherwise, never false: test IS NOT NULL or IS NULL, not = false. A withdrawn label removes its node label and its flag.",
777
778
  "- Address nodes carry base activity rollups: degree_in/degree_out/degree_total (distinct counterparty addresses), tx_in_count/tx_out_count/tx_total_count, total_in_usd/total_out_usd/total_volume_usd, net_flow_usd (in minus out; positive = net receiver) — all computed from external flows only — and first_activity_timestamp/last_activity_timestamp/activity_span_days, which include all flows (self-loops included). FLOWS_TO edges carry exactly tx_count, amount_usd_sum (total money flow, token and native value merged), first_seen_timestamp, last_seen_timestamp. Lifetime aggregates are the only serving window. Averages are computed inline (amount_usd_sum / toFloat(tx_count)). tx_count counts token and native transfers plus internal native transfers (a contract sending ETH during a call), and amount_usd_sum prices them all. USE facts TRANSFER lists all three, so the rows of a pair are the transfers its link counts, up to the height the link was built to. A link covers all time and a USE facts read covers one day: read the transfers of a pair one day at a time. A transaction anchor of a pair resolves through USE facts, on the UTC day of the first_seen_timestamp or last_seen_timestamp of the link: MATCH (a:Address {address: $from})-[t:TRANSFER]->(b:Address {address: $to}) WHERE t.block_date = \"YYYY-MM-DD\" RETURN t.tx_id, t.block_timestamp LIMIT 1.",
778
779
  "- For actor-level exposure (AC11), UNION FLOWS_TO and SWAPPED reachability over one visible LINKED hop instead of expanding through the LINKED edge itself: MATCH (a:Address {address: $addr})-[:LINKED]-(owned:Address)-[r:FLOWS_TO|SWAPPED]-(b:Address) WHERE NOT a:Pool AND NOT a:Protocol AND NOT a:System AND NOT a.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND NOT owned:Pool AND NOT owned:Protocol AND NOT owned:System AND NOT owned.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND owned.address <> b.address AND a.address <> b.address RETURN owned.address, b.address, type(r), coalesce(r.amount_usd_sum, r.bought_usd) LIMIT 50.",
779
780
  "- Labels and per-label risk live on the address node: the labels array plus three parallel lists, label_risk_labels, label_risk_levels and label_risk_updated_timestamps, where entry i of each list is one label row. No overall risk score is served. USE facts serves bounded single-event rows (TRANSFER, SWAP, LIQUIDITY_ADD, LIQUIDITY_REMOVE and BRIDGE_CROSSING edges) only; lifetime address metrics (degrees, totals, activity window) are node properties on USE topology.",
@@ -1833,7 +1834,7 @@ async function createProxy() {
1833
1834
  };
1834
1835
  server.registerTool(tool.name, toolConfig, handler);
1835
1836
  }
1836
- const { registerTopupView, TOPUP_VIEW_URI } = await Promise.resolve().then(() => require("./topup-server-DH3qVMvO.cjs")).then((n) => n.topup_server_exports);
1837
+ const { registerTopupView, TOPUP_VIEW_URI } = await Promise.resolve().then(() => require("./topup-server-ShuYSyBY.cjs")).then((n) => n.topup_server_exports);
1837
1838
  await registerTopupView(server, { walletAddress: localTopupWalletAddress });
1838
1839
  server.registerResource("Chain Insights view", CLAUDE_VIEW_URI, {
1839
1840
  title: "Chain Insights view",
@@ -1872,6 +1873,7 @@ if (process.argv[1] && require("url").pathToFileURL(__filename).href.includes(pr
1872
1873
  exports.APP_ONLY_LOCAL_TOOL_NAMES = APP_ONLY_LOCAL_TOOL_NAMES;
1873
1874
  exports.CLAUDE_VIEW_URI = CLAUDE_VIEW_URI;
1874
1875
  exports.GRAPH_QUERY_DEX_DOOR_SENTENCE = GRAPH_QUERY_DEX_DOOR_SENTENCE;
1876
+ exports.GRAPH_QUERY_ROLE_MARKS_SENTENCE = GRAPH_QUERY_ROLE_MARKS_SENTENCE;
1875
1877
  exports.KNOWN_PUBLIC_TOOL_DESCRIPTIONS = KNOWN_PUBLIC_TOOL_DESCRIPTIONS;
1876
1878
  exports.LOCAL_TOOL_NAMES = LOCAL_TOOL_NAMES;
1877
1879
  exports.MCP_APP_MIME_TYPE = MCP_APP_MIME_TYPE;
@@ -14,6 +14,7 @@ export declare function readClaudeViewHtml(): string;
14
14
  export type McpProxyMode = 'workspace' | 'stateless';
15
15
  export declare function resolveMcpProxyMode(env?: NodeJS.ProcessEnv): McpProxyMode;
16
16
  export declare const GRAPH_QUERY_DEX_DOOR_SENTENCE = "A question that names an exchange and no address starts with meta_dex_lookup, never with a scan of :Protocol, :Pool or labels.";
17
+ export declare const GRAPH_QUERY_ROLE_MARKS_SENTENCE = ":Sanctioned (is_sanctioned) means the address is on a sanctions list. :IssuerFrozen (is_issuer_frozen) means an issuer froze this wallet; the token in labels says which. Neither is :Scam.";
17
18
  export declare const KNOWN_PUBLIC_TOOL_DESCRIPTIONS: Record<string, string>;
18
19
  type ToolInputShape = Record<string, z.ZodTypeAny>;
19
20
  export declare const PICTURE_RULES: string;
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-proxy.d.cts","names":[],"sources":["../src/mcp/proxy.ts"],"mappings":";;qBAkEa,kBAAgB;qBAchB,2BAAyB;;qBAEzB;qBAUA;qBACA;;;;;wBAyBG;YAkBJ;wBAEI,oBAAoB,MAAK,OAAO,aAA2B;qBAiB9D;qBAGA,gCAAgC;KAsBxC,iBAAiB,eAAe,EAAE;qBAgB1B;wBA2GG,2BAA2B,mBAAmB;;;;;;;;wBAomBxC,eAAe"}
1
+ {"version":3,"file":"mcp-proxy.d.cts","names":[],"sources":["../src/mcp/proxy.ts"],"mappings":";;qBAkEa,kBAAgB;qBAchB,2BAAyB;;qBAEzB;qBAUA;qBACA;;;;;wBAyBG;YAkBJ;wBAEI,oBAAoB,MAAK,OAAO,aAA2B;qBAiB9D;qBAKA;qBAGA,gCAAgC;KAsBxC,iBAAiB,eAAe,EAAE;qBAgB1B;wBA2GG,2BAA2B,mBAAmB;;;;;;;;wBAomBxC,eAAe"}
@@ -14,6 +14,7 @@ export declare function readClaudeViewHtml(): string;
14
14
  export type McpProxyMode = 'workspace' | 'stateless';
15
15
  export declare function resolveMcpProxyMode(env?: NodeJS.ProcessEnv): McpProxyMode;
16
16
  export declare const GRAPH_QUERY_DEX_DOOR_SENTENCE = "A question that names an exchange and no address starts with meta_dex_lookup, never with a scan of :Protocol, :Pool or labels.";
17
+ export declare const GRAPH_QUERY_ROLE_MARKS_SENTENCE = ":Sanctioned (is_sanctioned) means the address is on a sanctions list. :IssuerFrozen (is_issuer_frozen) means an issuer froze this wallet; the token in labels says which. Neither is :Scam.";
17
18
  export declare const KNOWN_PUBLIC_TOOL_DESCRIPTIONS: Record<string, string>;
18
19
  type ToolInputShape = Record<string, z.ZodTypeAny>;
19
20
  export declare const PICTURE_RULES: string;
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-proxy.d.mts","names":[],"sources":["../src/mcp/proxy.ts"],"mappings":";;qBAkEa,kBAAgB;qBAchB,2BAAyB;;qBAEzB;qBAUA;qBACA;;;;;wBAyBG;YAkBJ;wBAEI,oBAAoB,MAAK,OAAO,aAA2B;qBAiB9D;qBAGA,gCAAgC;KAsBxC,iBAAiB,eAAe,EAAE;qBAgB1B;wBA2GG,2BAA2B,mBAAmB;;;;;;;;wBAomBxC,eAAe"}
1
+ {"version":3,"file":"mcp-proxy.d.mts","names":[],"sources":["../src/mcp/proxy.ts"],"mappings":";;qBAkEa,kBAAgB;qBAchB,2BAAyB;;qBAEzB;qBAUA;qBACA;;;;;wBAyBG;YAkBJ;wBAEI,oBAAoB,MAAK,OAAO,aAA2B;qBAiB9D;qBAKA;qBAGA,gCAAgC;KAsBxC,iBAAiB,eAAe,EAAE;qBAgB1B;wBA2GG,2BAA2B,mBAAmB;;;;;;;;wBAomBxC,eAAe"}
@@ -1,7 +1,7 @@
1
- import { a as withTimestampTextResult, c as PACKAGE_VERSION, o as withoutUtcProperties } from "./print-result-CJ8d7lmz.mjs";
1
+ import { a as withTimestampTextResult, c as PACKAGE_VERSION, o as withoutUtcProperties } from "./print-result-C3YazZBw.mjs";
2
2
  import { r as SUBSCRIPTION_TOPUP_TOOL, t as META_SUBSCRIPTION_STATUS_DESCRIPTION } from "./rules-BWdbOtHi.mjs";
3
3
  import { t as PaymentRequiredError } from "./client-7qOfAdpH.mjs";
4
- import { i as isAppOnlyTool, n as PUBLIC_MCP_TOOL_ALLOWED_ARGS, r as PUBLIC_MCP_TOOL_REQUIRED_ARGS, t as HIDDEN_REMOTE_TOOL_NAMES } from "./tool-visibility-D-pFpuoz.mjs";
4
+ import { i as isAppOnlyTool, n as PUBLIC_MCP_TOOL_ALLOWED_ARGS, r as PUBLIC_MCP_TOOL_REQUIRED_ARGS, t as HIDDEN_REMOTE_TOOL_NAMES } from "./tool-visibility-B6983rxo.mjs";
5
5
  import { n as primitiveBackendUsageStatus, t as freeTierSpentText } from "./usage-status-Frot6fPG.mjs";
6
6
  import { i as unavailableSubscriptionStatus, n as subscriptionStatusNeedsWallet, t as subscriptionStatusArguments } from "./subscription-status-DIuH84fM.mjs";
7
7
  import { r as mirrorGraphNetworkCapabilities } from "./capabilities-DxojbX4D.mjs";
@@ -716,6 +716,7 @@ function resolveMcpProxyMode(env = process.env) {
716
716
  const GRAPH_LAYERS_TEXT = "Use USE topology for topology (address/FLOWS_TO/OPERATED_BY/LINKED graph with SWAPPED, ADDED_LIQUIDITY, REMOVED_LIQUIDITY, BRIDGED and the Pool, Token and NFT labels, unified recent+historical) and USE facts for bounded TRANSFER, SWAP, LIQUIDITY_ADD, LIQUIDITY_REMOVE and BRIDGE_CROSSING rows and enrichment, and USE chain for the chain node's own record of one known transaction, block, address or the head.";
717
717
  const TOOL_RULES_FIRST = "Rules first: if the chain-insights-cypher skill is not loaded in this chat, call meta_rules once before this tool. For a graph, alias the columns from_address and to_address; the host draws the picture from the answer itself. Never draw it again with another tool, such as a visualize or widget tool.";
718
718
  const GRAPH_QUERY_DEX_DOOR_SENTENCE = "A question that names an exchange and no address starts with meta_dex_lookup, never with a scan of :Protocol, :Pool or labels.";
719
+ const GRAPH_QUERY_ROLE_MARKS_SENTENCE = ":Sanctioned (is_sanctioned) means the address is on a sanctions list. :IssuerFrozen (is_issuer_frozen) means an issuer froze this wallet; the token in labels says which. Neither is :Scam.";
719
720
  const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
720
721
  meta_network_capabilities: "Return the current Chain Insights network and tool support matrix. Takes no arguments: send {}.",
721
722
  meta_schema: META_SCHEMA_DESCRIPTION,
@@ -725,7 +726,7 @@ const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
725
726
  meta_help: "Show a short guide to Chain Insights tools and workflow.",
726
727
  meta_rules: "Return the Chain Insights rules: how to write graph_query and graph_query_batch reads that are served, how to name columns so the answer is drawn as a graph, a time series or a table, and how to write the answer. Call it once per chat, before the first graph query, when the chain-insights-cypher skill is not loaded. Takes no arguments: send {}.",
727
728
  wallet_balance: "Show the local Chain Insights payment wallet address, payment network, token, and amount.",
728
- graph_query: `${TOOL_RULES_FIRST} Run a read-only GQL/Cypher query through the Chain Insights graph endpoint. ${GRAPH_LAYERS_TEXT} ${GRAPH_QUERY_DEX_DOOR_SENTENCE} ${ROUTING_NOT_SERVED} Preserve full addresses exactly, and write every address in full, all 42 characters, in your answer: never shorten one with ... or ….`,
729
+ graph_query: `${TOOL_RULES_FIRST} Run a read-only GQL/Cypher query through the Chain Insights graph endpoint. ${GRAPH_LAYERS_TEXT} ${GRAPH_QUERY_DEX_DOOR_SENTENCE} ${GRAPH_QUERY_ROLE_MARKS_SENTENCE} ${ROUTING_NOT_SERVED} Preserve full addresses exactly, and write every address in full, all 42 characters, in your answer: never shorten one with ... or ….`,
729
730
  graph_query_batch: `${TOOL_RULES_FIRST} Run multiple read-only GQL/Cypher queries through the Chain Insights graph endpoint in one paid batch. Prefer this for related topology/facts reads. For a time series across days, send one USE facts total per day with the query id set to the day, "YYYY-MM-DD": the view joins them into one series. Write every address in full in your answer, all 42 characters.`
730
731
  };
731
732
  const KNOWN_PUBLIC_TOOL_TITLES = {
@@ -768,8 +769,8 @@ const GRAPH_SCHEMA_HINTS = [
768
769
  "- Coverage is per kind of data. coverage.complete_through_block is the floor of USE facts: below it every raw relationship is indexed. graph_progress.complete_through_block is the floor of USE topology, and graph_progress.layers gives each link kind its own height. An empty answer above the floor may mean not indexed yet, not absent on chain. An absent chain_tip_block means the indexers are catching up: read freshness.max_data_age_seconds for the lag.",
769
770
  "- The graph is address-grain. The only topology money node label is Address, keyed by the raw chain-native H160 address on EVM networks, for example 0x1874a43d7c6d888f9eda3d22a3a49704e3cadb24. There is no separate identity key. network is the query's network on every node and relationship, never stored, except on :Chain, where it names the remote chain.",
770
771
  "- An Address carries a kind from chain facts. topology carries :Account or :Contract as a second label on an Address (:Contract:SmartAccount for a contract wallet), with is_contract kept beside :Contract, and an address that only received has none. facts serves no kind, and a facts read that names :Account or :Contract is refused: ask USE topology or USE chain. chain Address returns is_contract, nonce and delegated_to at the newest block, or at the block named by at_block. block_timestamp is epoch milliseconds on every layer.",
771
- "- Address nodes carry address, network, labels, and the role flags is_exchange, is_scam, is_victim and is_sanctioned. (:Address)-[:LINKED]-(:Address) is an undirected ownership-overlay edge (basis derived/associated, plus confidence, source_event, declared_owner, owner_state) asserting the two addresses are controlled by the same actor. LINKED is served on the topology graph only. Enumerate LINKED neighbors with MATCH (a:Address {address: $addr})-[l:LINKED]-(b:Address) RETURN b.address, b.network, l.basis, l.confidence LIMIT 25.",
772
- "- Labels hold role words, never detector names: Exchange (plus the exchange name), Scam, Victim and Sanctioned (plus the entity name). Each role is also a node label and a flag on the Address: :Exchange and is_exchange follow the exchange label, :Scam and is_scam the risk label, :Victim and is_victim the protection label, :Sanctioned and is_sanctioned the sanctioned label. Each flag is present only when true and absent otherwise, never false: test IS NOT NULL or IS NULL, not = false. A withdrawn label removes its node label and its flag.",
772
+ "- Address nodes carry address, network, labels, and the role flags is_exchange, is_scam, is_victim, is_sanctioned and is_issuer_frozen. (:Address)-[:LINKED]-(:Address) is an undirected ownership-overlay edge (basis derived/associated, plus confidence, source_event, declared_owner, owner_state) asserting the two addresses are controlled by the same actor. LINKED is served on the topology graph only. Enumerate LINKED neighbors with MATCH (a:Address {address: $addr})-[l:LINKED]-(b:Address) RETURN b.address, b.network, l.basis, l.confidence LIMIT 25.",
773
+ "- Labels hold role words, never detector names: Exchange (plus the exchange name), Scam, Victim, Sanctioned (plus the entity name) and IssuerFrozen (plus the token symbol). Each role is also a node label and a flag on the Address: :Exchange and is_exchange follow the exchange label, :Scam and is_scam the risk label, :Victim and is_victim the protection label, :Sanctioned and is_sanctioned the sanctioned label, :IssuerFrozen and is_issuer_frozen the issuer_frozen label: an issuer froze this wallet; the token in labels says which. Each flag is present only when true and absent otherwise, never false: test IS NOT NULL or IS NULL, not = false. A withdrawn label removes its node label and its flag.",
773
774
  "- Address nodes carry base activity rollups: degree_in/degree_out/degree_total (distinct counterparty addresses), tx_in_count/tx_out_count/tx_total_count, total_in_usd/total_out_usd/total_volume_usd, net_flow_usd (in minus out; positive = net receiver) — all computed from external flows only — and first_activity_timestamp/last_activity_timestamp/activity_span_days, which include all flows (self-loops included). FLOWS_TO edges carry exactly tx_count, amount_usd_sum (total money flow, token and native value merged), first_seen_timestamp, last_seen_timestamp. Lifetime aggregates are the only serving window. Averages are computed inline (amount_usd_sum / toFloat(tx_count)). tx_count counts token and native transfers plus internal native transfers (a contract sending ETH during a call), and amount_usd_sum prices them all. USE facts TRANSFER lists all three, so the rows of a pair are the transfers its link counts, up to the height the link was built to. A link covers all time and a USE facts read covers one day: read the transfers of a pair one day at a time. A transaction anchor of a pair resolves through USE facts, on the UTC day of the first_seen_timestamp or last_seen_timestamp of the link: MATCH (a:Address {address: $from})-[t:TRANSFER]->(b:Address {address: $to}) WHERE t.block_date = \"YYYY-MM-DD\" RETURN t.tx_id, t.block_timestamp LIMIT 1.",
774
775
  "- For actor-level exposure (AC11), UNION FLOWS_TO and SWAPPED reachability over one visible LINKED hop instead of expanding through the LINKED edge itself: MATCH (a:Address {address: $addr})-[:LINKED]-(owned:Address)-[r:FLOWS_TO|SWAPPED]-(b:Address) WHERE NOT a:Pool AND NOT a:Protocol AND NOT a:System AND NOT a.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND NOT owned:Pool AND NOT owned:Protocol AND NOT owned:System AND NOT owned.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND owned.address <> b.address AND a.address <> b.address RETURN owned.address, b.address, type(r), coalesce(r.amount_usd_sum, r.bought_usd) LIMIT 50.",
775
776
  "- Labels and per-label risk live on the address node: the labels array plus three parallel lists, label_risk_labels, label_risk_levels and label_risk_updated_timestamps, where entry i of each list is one label row. No overall risk score is served. USE facts serves bounded single-event rows (TRANSFER, SWAP, LIQUIDITY_ADD, LIQUIDITY_REMOVE and BRIDGE_CROSSING edges) only; lifetime address metrics (degrees, totals, activity window) are node properties on USE topology.",
@@ -1829,7 +1830,7 @@ async function createProxy() {
1829
1830
  };
1830
1831
  server.registerTool(tool.name, toolConfig, handler);
1831
1832
  }
1832
- const { registerTopupView, TOPUP_VIEW_URI } = await import("./topup-server-CSF5EjNt.mjs").then((n) => n.a);
1833
+ const { registerTopupView, TOPUP_VIEW_URI } = await import("./topup-server-KQDviFXG.mjs").then((n) => n.a);
1833
1834
  await registerTopupView(server, { walletAddress: localTopupWalletAddress });
1834
1835
  server.registerResource("Chain Insights view", CLAUDE_VIEW_URI, {
1835
1836
  title: "Chain Insights view",
@@ -1865,6 +1866,6 @@ if (process.argv[1] && import.meta.url.includes(process.argv[1].replace(/\\/g, "
1865
1866
  process.exit(1);
1866
1867
  });
1867
1868
  //#endregion
1868
- export { APP_ONLY_LOCAL_TOOL_NAMES, CLAUDE_VIEW_URI, GRAPH_QUERY_DEX_DOOR_SENTENCE, KNOWN_PUBLIC_TOOL_DESCRIPTIONS, LOCAL_TOOL_NAMES, MCP_APP_MIME_TYPE, PICTURE_RULES, REFUSAL_SCHEMA, createProxy, knownPublicToolInputSchema, readClaudeViewHtml, resolveMcpProxyMode };
1869
+ export { APP_ONLY_LOCAL_TOOL_NAMES, CLAUDE_VIEW_URI, GRAPH_QUERY_DEX_DOOR_SENTENCE, GRAPH_QUERY_ROLE_MARKS_SENTENCE, KNOWN_PUBLIC_TOOL_DESCRIPTIONS, LOCAL_TOOL_NAMES, MCP_APP_MIME_TYPE, PICTURE_RULES, REFUSAL_SCHEMA, createProxy, knownPublicToolInputSchema, readClaudeViewHtml, resolveMcpProxyMode };
1869
1870
 
1870
1871
  //# sourceMappingURL=mcp-proxy.mjs.map