chain-insights 0.78.0 → 0.80.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 -0
- package/dist/cli.cjs +72 -18
- package/dist/cli.mjs +72 -18
- package/dist/cli.mjs.map +1 -1
- package/dist/deployer-screen-BomgSBcq.cjs +446 -0
- package/dist/deployer-screen-ByQBZEsg.mjs +413 -0
- package/dist/deployer-screen-ByQBZEsg.mjs.map +1 -0
- package/dist/{dex-registry-sPTFuCrP.mjs → dex-registry-BY67f4Ul.mjs} +2 -2
- package/dist/{dex-registry-sPTFuCrP.mjs.map → dex-registry-BY67f4Ul.mjs.map} +1 -1
- package/dist/{dex-registry-DdXOg5On.cjs → dex-registry-BhGJUG9_.cjs} +36 -0
- package/dist/{dex-tool-CDmhhXfk.cjs → dex-tool-B6AymECb.cjs} +2 -2
- package/dist/{dex-tool-D61sIjpq.mjs → dex-tool-CjUZY19i.mjs} +3 -3
- package/dist/dex-tool-CjUZY19i.mjs.map +1 -0
- package/dist/exchange-deposit-check-CMGTPv-T.mjs +209 -0
- package/dist/exchange-deposit-check-CMGTPv-T.mjs.map +1 -0
- package/dist/exchange-deposit-check-hJGDHLz1.cjs +242 -0
- package/dist/exchange-registry-CT0rRW__.cjs +347 -0
- package/dist/exchange-registry-CoLgHw6d.mjs +319 -0
- package/dist/exchange-registry-CoLgHw6d.mjs.map +1 -0
- package/dist/exchange-tool-B2SMeC5f.cjs +218 -0
- package/dist/exchange-tool-Dc46SJ49.mjs +179 -0
- package/dist/exchange-tool-Dc46SJ49.mjs.map +1 -0
- package/dist/{graph-schema-D4LAefGf.mjs → graph-schema-B8KMeX75.mjs} +19 -3
- package/dist/{graph-schema-D4LAefGf.mjs.map → graph-schema-B8KMeX75.mjs.map} +1 -1
- package/dist/{graph-schema-C8Pi6r7c.cjs → graph-schema-D8rHCsBJ.cjs} +23 -1
- package/dist/mcp-proxy.cjs +78 -12
- package/dist/mcp-proxy.d.cts +1 -0
- package/dist/mcp-proxy.d.cts.map +1 -1
- package/dist/mcp-proxy.d.mts +1 -0
- package/dist/mcp-proxy.d.mts.map +1 -1
- package/dist/mcp-proxy.mjs +78 -13
- package/dist/mcp-proxy.mjs.map +1 -1
- package/dist/{public-tools-DXlZcanX.mjs → public-tools-CU1nukHW.mjs} +171 -10
- package/dist/public-tools-CU1nukHW.mjs.map +1 -0
- package/dist/{public-tools-Cfc1OPNS.cjs → public-tools-yvRiFSry.cjs} +170 -9
- package/dist/{token-lookup-DvgEyqcC.cjs → token-lookup-D-5GBEwF.cjs} +15 -2
- package/dist/{token-lookup-sH2DesLS.mjs → token-lookup-QpIv77P2.mjs} +5 -4
- package/dist/token-lookup-QpIv77P2.mjs.map +1 -0
- package/dist/{tool-visibility-DIpgPULN.cjs → tool-visibility-D8Up081E.cjs} +8 -1
- package/dist/{tool-visibility-Dy3psowS.mjs → tool-visibility-DuTds7V4.mjs} +9 -2
- package/dist/tool-visibility-DuTds7V4.mjs.map +1 -0
- package/docs/contributing.md +5 -2
- package/docs/development.md +5 -2
- package/docs/graph-query-compatibility.md +20 -4
- package/docs/graph-tools.md +22 -8
- package/docs/mcp-proxy.md +111 -5
- package/docs/stability.md +5 -2
- package/package.json +2 -2
- package/registry/README.md +42 -5
- package/registry/exchanges/ethereum.json +920 -0
- package/registry/exchanges/robinhood.json +87 -0
- package/registry/robinhood.json +7 -4
- package/registry/robinhood.md +9 -5
- package/skills/chain-insights-aml-exchange/SKILL.md +134 -0
- package/skills/chain-insights-aml-exchange/agents/openai.yaml +4 -0
- package/skills/chain-insights-cypher/SKILL.md +41 -11
- package/skills/chain-insights-dex/SKILL.md +3 -3
- package/skills/chain-insights-dex-gauge/SKILL.md +2 -0
- package/skills/chain-insights-dex-launchpad/SKILL.md +9 -10
- package/skills/chain-insights-dex-vault/SKILL.md +2 -0
- package/skills/chain-insights-virtuals/SKILL.md +1 -1
- package/dist/dex-tool-D61sIjpq.mjs.map +0 -1
- package/dist/public-tools-DXlZcanX.mjs.map +0 -1
- package/dist/token-lookup-sH2DesLS.mjs.map +0 -1
- package/dist/tool-visibility-Dy3psowS.mjs.map +0 -1
package/dist/mcp-proxy.cjs
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
|
|
3
3
|
const require_print_result = require("./print-result-BYppJlUi.cjs");
|
|
4
|
-
const require_tool_visibility = require("./tool-visibility-
|
|
4
|
+
const require_tool_visibility = require("./tool-visibility-D8Up081E.cjs");
|
|
5
5
|
const require_client = require("./client-Ddk4X9Ko.cjs");
|
|
6
6
|
const require_usage_status = require("./usage-status-DnV3I3gX.cjs");
|
|
7
7
|
const require_subscription_status = require("./subscription-status-w4zI2KCK.cjs");
|
|
8
8
|
const require_rules = require("./rules-BKwfmNsJ.cjs");
|
|
9
9
|
const require_capabilities = require("./capabilities-DalimVY2.cjs");
|
|
10
|
-
const require_graph_schema = require("./graph-schema-
|
|
10
|
+
const require_graph_schema = require("./graph-schema-D8rHCsBJ.cjs");
|
|
11
11
|
const require_action_log = require("./action-log-WMW6xFMx.cjs");
|
|
12
12
|
const require_answer_hint = require("./answer-hint-BlYEBq_Y.cjs");
|
|
13
|
-
const require_dex_tool = require("./dex-tool-
|
|
14
|
-
const require_dex_registry = require("./dex-registry-
|
|
15
|
-
const require_token_lookup = require("./token-lookup-
|
|
13
|
+
const require_dex_tool = require("./dex-tool-B6AymECb.cjs");
|
|
14
|
+
const require_dex_registry = require("./dex-registry-BhGJUG9_.cjs");
|
|
15
|
+
const require_token_lookup = require("./token-lookup-D-5GBEwF.cjs");
|
|
16
|
+
const require_deployer_screen = require("./deployer-screen-BomgSBcq.cjs");
|
|
17
|
+
const require_exchange_tool = require("./exchange-tool-B2SMeC5f.cjs");
|
|
18
|
+
const require_exchange_deposit_check = require("./exchange-deposit-check-hJGDHLz1.cjs");
|
|
19
|
+
const require_exchange_registry = require("./exchange-registry-CT0rRW__.cjs");
|
|
16
20
|
let node_url = require("node:url");
|
|
17
21
|
let node_path = require("node:path");
|
|
18
22
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
@@ -237,6 +241,11 @@ const ROUTING_TWO_FIT = "A transaction is a chain question: read it on `USE chai
|
|
|
237
241
|
/** The key that each layer hands to the next. Each key keeps its name. */
|
|
238
242
|
const ROUTING_HANDOFF = "The layers hand each other keys, and each key keeps its name. Topology gives the pair and the first and last seen time. Facts gives the `tx_id` and the `block_height`. Chain takes an `address`, a `tx_id`, a `block_height` or a `block_hash`, and gives the `block_date` of a transaction or a block.";
|
|
239
243
|
/**
|
|
244
|
+
* Where money entered an exchange: the link `SWEPT` (layer `cex_sweeps`, family
|
|
245
|
+
* annotations) and the node property `cex_role`. A trail ends at it.
|
|
246
|
+
*/
|
|
247
|
+
const ROUTING_SWEPT = "`SWEPT` runs from an exchange deposit to the hot wallet it swept into (layer `cex_sweeps`, family annotations), and `cex_role` on an `:Exchange` address says which wallet of its exchange it is: `deposit`, `hot_wallet`, `cold_wallet` or `withdrawal`. A trail that reaches a `SWEPT` link ends there: say the money entered the exchange at that deposit, swept n times into that hot wallet, name the exchange from `labels`, and never walk on past a hot wallet. Read `SWEPT` anchored on an address; call `aml_exchange_deposit_check` for one address and `meta_exchange_lookup` for an exchange by name.";
|
|
248
|
+
/**
|
|
240
249
|
* A whole-chain question is a time-bounded topology search, sent only when the
|
|
241
250
|
* family of its link type is close to the head; a refusal names the family.
|
|
242
251
|
*/
|
|
@@ -286,7 +295,7 @@ function routingHead() {
|
|
|
286
295
|
* one line of the served instructions.
|
|
287
296
|
*/
|
|
288
297
|
function routingHintLines() {
|
|
289
|
-
return [`- Pick the layer first. ${ROUTING_RULE} 1. ${ROUTING_LINES[0]} 2. ${ROUTING_LINES[1]} 3. ${ROUTING_LINES[2]} ${ROUTING_NOT_SERVED} ${ROUTING_ADDRESS_ON_CHAIN} ${ROUTING_TWO_FIT} ${ROUTING_HANDOFF} The lookups that USE chain serves are listed in chain_admission.lookups of meta_network_capabilities. Read every limit that the server publishes from meta_network_capabilities (chain_admission and, when the server sends them, topology_admission and facts_admission). Never write a limit down.`, `- Act on a refusal by its class. ${moveLines().join(" ")}`];
|
|
298
|
+
return [`- Pick the layer first. ${ROUTING_RULE} 1. ${ROUTING_LINES[0]} 2. ${ROUTING_LINES[1]} 3. ${ROUTING_LINES[2]} ${ROUTING_NOT_SERVED} ${ROUTING_ADDRESS_ON_CHAIN} ${ROUTING_TWO_FIT} ${ROUTING_HANDOFF} ${ROUTING_SWEPT} The lookups that USE chain serves are listed in chain_admission.lookups of meta_network_capabilities. Read every limit that the server publishes from meta_network_capabilities (chain_admission and, when the server sends them, topology_admission and facts_admission). Never write a limit down.`, `- Act on a refusal by its class. ${moveLines().join(" ")}`];
|
|
290
299
|
}
|
|
291
300
|
// src/mcp/view-server.ts
|
|
292
301
|
/**
|
|
@@ -551,6 +560,12 @@ const JUDGEMENT_CLAIMS = Object.freeze([
|
|
|
551
560
|
mark: "Scam",
|
|
552
561
|
plain: "the creator of a fake token"
|
|
553
562
|
},
|
|
563
|
+
{
|
|
564
|
+
value: "FAKE_TOKEN_LP",
|
|
565
|
+
property: "risk_claims",
|
|
566
|
+
mark: "Scam",
|
|
567
|
+
plain: "the wallet that seeded a fake token's pool and pulled its liquidity after the buyers paid"
|
|
568
|
+
},
|
|
554
569
|
{
|
|
555
570
|
value: "ADDRESS_POISONING",
|
|
556
571
|
property: "risk_claims",
|
|
@@ -821,6 +836,9 @@ const LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
821
836
|
"meta_rules",
|
|
822
837
|
require_dex_tool.META_DEX_LOOKUP_TOOL,
|
|
823
838
|
require_token_lookup.META_TOKEN_LOOKUP_TOOL,
|
|
839
|
+
require_deployer_screen.AML_DEPLOYER_SCREEN_TOOL,
|
|
840
|
+
require_exchange_tool.META_EXCHANGE_LOOKUP_TOOL,
|
|
841
|
+
require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_TOOL,
|
|
824
842
|
"wallet_balance",
|
|
825
843
|
"wallet_topup",
|
|
826
844
|
require_rules.SUBSCRIPTION_TOPUP_TOOL,
|
|
@@ -879,9 +897,10 @@ function resolveMcpProxyMode(env = process.env) {
|
|
|
879
897
|
if (raw === "no-workspace" || raw === "workspace-less") return "stateless";
|
|
880
898
|
throw new Error(`CHAIN_INSIGHTS_MCP_PROXY_MODE must be workspace or stateless; got "${raw}"`);
|
|
881
899
|
}
|
|
882
|
-
const GRAPH_LAYERS_TEXT = "Use USE topology for topology (address/FLOWED_TO/OPERATED_BY/LINKED graph with SWAPPED, ADDED_LIQUIDITY, REMOVED_LIQUIDITY, BRIDGED and the Pool, Token and
|
|
900
|
+
const GRAPH_LAYERS_TEXT = "Use USE topology for topology (address/FLOWED_TO/OPERATED_BY/LINKED graph with SWAPPED, ADDED_LIQUIDITY, REMOVED_LIQUIDITY, BRIDGED, SWEPT and the Pool, Token, NFT and Exchange 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.";
|
|
883
901
|
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.";
|
|
884
902
|
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.";
|
|
903
|
+
const GRAPH_QUERY_CEX_DOOR_SENTENCE = "A question that names a centralized exchange (Binance, OKX, Bitget) starts with meta_exchange_lookup; one address that may be its deposit goes to aml_exchange_deposit_check.";
|
|
885
904
|
const GRAPH_QUERY_TOKEN_DOOR_SENTENCE = "A question that names a token by its ticker or name and gives no contract starts with meta_token_lookup: tickers collide, so never guess the contract.";
|
|
886
905
|
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.";
|
|
887
906
|
const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
@@ -889,12 +908,15 @@ const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
|
889
908
|
meta_schema: require_graph_schema.META_SCHEMA_DESCRIPTION,
|
|
890
909
|
[require_dex_tool.META_DEX_LOOKUP_TOOL]: require_dex_tool.META_DEX_LOOKUP_DESCRIPTION,
|
|
891
910
|
[require_token_lookup.META_TOKEN_LOOKUP_TOOL]: require_token_lookup.META_TOKEN_LOOKUP_DESCRIPTION,
|
|
911
|
+
[require_deployer_screen.AML_DEPLOYER_SCREEN_TOOL]: require_deployer_screen.AML_DEPLOYER_SCREEN_DESCRIPTION,
|
|
912
|
+
[require_exchange_tool.META_EXCHANGE_LOOKUP_TOOL]: require_exchange_tool.META_EXCHANGE_LOOKUP_DESCRIPTION,
|
|
913
|
+
[require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_TOOL]: require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_DESCRIPTION,
|
|
892
914
|
meta_usage_status: "Return the caller's public free graph_query quota for the current UTC day.",
|
|
893
915
|
meta_subscription_status: require_rules.META_SUBSCRIPTION_STATUS_DESCRIPTION,
|
|
894
916
|
meta_help: "Show a short guide to Chain Insights tools and workflow.",
|
|
895
917
|
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 {}.",
|
|
896
918
|
wallet_balance: "Show the local Chain Insights payment wallet address, payment network, token, and amount.",
|
|
897
|
-
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_TOKEN_DOOR_SENTENCE} ${GRAPH_QUERY_ROLE_MARKS_SENTENCE} ${GRAPH_QUERY_JUDGEMENT_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 ….`,
|
|
919
|
+
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_CEX_DOOR_SENTENCE} ${GRAPH_QUERY_TOKEN_DOOR_SENTENCE} ${GRAPH_QUERY_ROLE_MARKS_SENTENCE} ${GRAPH_QUERY_JUDGEMENT_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 ….`,
|
|
898
920
|
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.`
|
|
899
921
|
};
|
|
900
922
|
const KNOWN_PUBLIC_TOOL_TITLES = {
|
|
@@ -938,7 +960,7 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
938
960
|
"- 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.",
|
|
939
961
|
"- 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.",
|
|
940
962
|
"- 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.",
|
|
941
|
-
"- Labels hold role words, never a claim code: 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. Why a judgement mark is there sits in a sorted claims list on the node, written by the labels layer: risk_claims on :Scam, :Poisoned and :Sanctioned, protection_claims on :Victim and :Targeted, traced_claims on :OnMoneyTrail, and suspect_labels for a mixer user. risk_claims: FAKE_TOKEN (a spoof token contract imitating a real one), FAKE_TOKEN_DEPLOYER (its creator), ADDRESS_POISONING (:Poisoned, never :Scam: a look-alike address that sent worthless dust so the target copies it), INBOUND_IMPERSONATION (a look-alike that paid the target to get into its history), PHANTOM_TRANSFER, PHANTOM_TRANSFER_EMITTER and PHANTOM_ENTRYPOINT (a contract that writes fake transfer events claiming a transfer from a look-alike that never happened), SWEEPER_DELEGATE and SWEEP_BENEFICIARY (an EIP-7702 delegate that empties accounts, and where the funds go), UNSAFE_DELEGATE (a delegate any caller can use to empty the account), APPROVAL_DRAINER and APPROVAL_DRAIN_BENEFICIARY (a spender that moved the tokens of at least three owners with their approval or Permit2 within 72 hours of the grant and paid nothing back, and the receiver), SANCTIONED. protection_claims: VICTIM (lost money to a scam the evidence walk traced: it paid the accused, was swept or was drained after the attempt; receiving a fake token or dust is never a victim) and the older ADDRESS_POISONING_TARGET (:Targeted, a target the walk has not proven lost money). traced_claims: LAUNDERED, RECEIVED, FUNDER and MIXED, the trail the evidence walk followed from an accused address. suspect_labels: MIXER_DEPOSITOR and MIXER_WITHDRAWER, the address itself used a mixer pool, a warning and not a theft. A risk question is answered from the marks and claims; a flow question gets no risk screen. Ask by mark, MATCH (a:Scam) WHERE \"FAKE_TOKEN\" IN a.risk_claims RETURN a.address AS address, a.risk_claims AS risk_claims LIMIT 25, or anchor on the address. The mark is the anchor and a WHERE on its own properties is allowed; a WHERE with no mark and no address is refused. The graph holds no link from an accused address to its victims, so answer per address. Say what a claim means in plain words, such as \"a fake-token scam\" or \"it lost money to a scam\", never the list name or the code.",
|
|
963
|
+
"- Labels hold role words, never a claim code: 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. Why a judgement mark is there sits in a sorted claims list on the node, written by the labels layer: risk_claims on :Scam, :Poisoned and :Sanctioned, protection_claims on :Victim and :Targeted, traced_claims on :OnMoneyTrail, and suspect_labels for a mixer user. risk_claims: FAKE_TOKEN (a spoof token contract imitating a real one), FAKE_TOKEN_DEPLOYER (its creator), FAKE_TOKEN_LP (the wallet that seeded its pool and pulled the liquidity after the buyers paid), ADDRESS_POISONING (:Poisoned, never :Scam: a look-alike address that sent worthless dust so the target copies it), INBOUND_IMPERSONATION (a look-alike that paid the target to get into its history), PHANTOM_TRANSFER, PHANTOM_TRANSFER_EMITTER and PHANTOM_ENTRYPOINT (a contract that writes fake transfer events claiming a transfer from a look-alike that never happened), SWEEPER_DELEGATE and SWEEP_BENEFICIARY (an EIP-7702 delegate that empties accounts, and where the funds go), UNSAFE_DELEGATE (a delegate any caller can use to empty the account), APPROVAL_DRAINER and APPROVAL_DRAIN_BENEFICIARY (a spender that moved the tokens of at least three owners with their approval or Permit2 within 72 hours of the grant and paid nothing back, and the receiver), SANCTIONED. protection_claims: VICTIM (lost money to a scam the evidence walk traced: it paid the accused, was swept or was drained after the attempt; receiving a fake token or dust is never a victim) and the older ADDRESS_POISONING_TARGET (:Targeted, a target the walk has not proven lost money). traced_claims: LAUNDERED, RECEIVED, FUNDER and MIXED, the trail the evidence walk followed from an accused address. suspect_labels: MIXER_DEPOSITOR and MIXER_WITHDRAWER, the address itself used a mixer pool, a warning and not a theft. A risk question is answered from the marks and claims; a flow question gets no risk screen. Ask by mark, MATCH (a:Scam) WHERE \"FAKE_TOKEN\" IN a.risk_claims RETURN a.address AS address, a.risk_claims AS risk_claims LIMIT 25, or anchor on the address. The mark is the anchor and a WHERE on its own properties is allowed; a WHERE with no mark and no address is refused. The graph holds no link from an accused address to its victims, so answer per address. Say what a claim means in plain words, such as \"a fake-token scam\" or \"it lost money to a scam\", never the list name or the code.",
|
|
942
964
|
"- 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). FLOWED_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.",
|
|
943
965
|
"- For actor-level exposure (AC11), UNION FLOWED_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:FLOWED_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.",
|
|
944
966
|
"- 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.",
|
|
@@ -954,13 +976,13 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
954
976
|
"- Pool trace rule, for every trace: 1. Enter a `:Pool` on any edge. 2. Leave a `:Pool` only on `REMOVED_LIQUIDITY`, to the address the liquidity was paid to. 3. Never leave a `:Pool` on `FLOWED_TO`. 4. Across a swap, follow `SWAPPED` from payer to recipient, between two different addresses. Do not walk through the pool. Rug-pull probe: MATCH (victim:Address {address: $addr})-[paid:FLOWED_TO]->(pool:Pool)-[removal:REMOVED_LIQUIDITY]->(receiver:Address) WHERE NOT victim:Pool AND NOT victim:Protocol AND NOT victim:System AND NOT victim.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND receiver.address <> victim.address RETURN pool.address AS pool_address, receiver.address AS receiver_address, sum(removal.usd) AS removed_usd, max(removal.receiver_added_usd) AS receiver_added_usd, max(removal.receiver_provided) AS receiver_provided LIMIT 25.",
|
|
955
977
|
"- USE facts serves the single events. (payer:Address)-[s:SWAP]->(recipient:Address) is one row per swap route, self swaps included, with strength, reason, route_id and the sold_ and bought_ asset, amount and usd columns. (provider:Address)-[:LIQUIDITY_ADD]->(pool:Address) and (pool:Address)-[:LIQUIDITY_REMOVE]->(receiver:Address) are one row per liquidity event, with party_state and evidence_state. (sender:Address)-[c:BRIDGE_CROSSING]->(recipient:Address) is one row per bridge event. SWAP, LIQUIDITY_* and BRIDGE_CROSSING take the same rule as TRANSFER: an address pair with one day. USD comes from the daily price services, never from a swap: with no price, USD is empty and the matching price_missing column is true (price_missing on TRANSFER, sold_price_missing and bought_price_missing on SWAP, amount0_price_missing and amount1_price_missing on LIQUIDITY_*). block_timestamp on TRANSFER, SWAP and LIQUIDITY_* rows is epoch milliseconds, in filters and in results; BRIDGE_CROSSING has none.",
|
|
956
978
|
"- A USE facts SWAP row carries no route: it has no pools and no families column. A read that names one of them, to return it, to filter on it or to order by it, is refused. The route of a swap stays a topology question. For the pools of the swaps of an address, read SWAPPED.pools and SWAPPED.families on USE topology, anchored on the payer or the recipient. SWAPPED has one link per payer, recipient, sold asset and bought asset, so its pools cover every route on the link, not one route.",
|
|
957
|
-
"- Traversal rule: for BFS, fixed-hop fallback, shortest-path, or manual FLOWED_TO traversal, exchange hot wallets are terminal endpoints only. Do not expand from
|
|
958
|
-
"- Pool guard: a trace walks FLOWED_TO and SWAPPED, so it crosses a swap from payer to recipient without passing through the pool. A walk may end at a Pool, but never starts at one or passes through one: its start and every address in its middle stay off a Pool. A walk of two or more hops also never starts at or passes through a Protocol contract or a System address. System is the kind of the mint and burn addresses 0x0000000000000000000000000000000000000000 and 0x000000000000000000000000000000000000dead; Protocol is shared infrastructure such as a PoolManager, a router or a bridge (the PoolManager 0x8366a39cc670b4001a1121b8f6a443a643e40951 is one, and it is no Pool). Each links millions of unrelated wallets, so a route through one connects nothing. Its start and every address in its middle carry NOT x:Pool AND NOT x:Protocol AND NOT x:System AND NOT x.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"], each its own AND term, never inside an OR. The graph does not write the System kind yet, so keep the address test too; it becomes redundant once System is written. A one-hop read of such an address needs no guard. A fixed-hop walk adds these terms for src and mid in its WHERE. A quantified or shortest-path walk puts the guards inside the path pattern, on the start and on up to 4 guarded hops before one last hop: MATCH p = SHORTEST 1 (a:Address {address: $from} WHERE NOT a:Pool AND NOT a:Protocol AND NOT a:System AND NOT a.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"]) (()-[:FLOWED_TO|SWAPPED]-(via:Address) WHERE NOT via:Pool AND NOT via:Protocol AND NOT via:System AND NOT via.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"]){0,4} ()-[:FLOWED_TO|SWAPPED]-(b:Address {address: $to}) RETURN [n IN nodes(p) | n.address] AS route LIMIT 5. ANY SHORTEST takes the same pattern. A route search asks for one path. An open target from one address: MATCH SHORTEST 1 (a:Address {address: $addr} WHERE NOT a:Pool AND NOT a:Protocol AND NOT a:System AND NOT a.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"]) (()-[:FLOWED_TO|SWAPPED]-(via:Address) WHERE NOT via:Pool AND NOT via:Protocol AND NOT via:System AND NOT via.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"]){0,4} ()-[:FLOWED_TO|SWAPPED]-(b:Address) RETURN b.address LIMIT 50. Use these shapes as written, changing only the addresses and the RETURN. A WHERE placed after a SHORTEST pattern runs after the shortest route is chosen, so it drops a route that crosses a pool or a system address instead of finding the route that avoids it.",
|
|
979
|
+
"- Traversal rule: for BFS, fixed-hop fallback, shortest-path, or manual FLOWED_TO traversal, exchange hot wallets are terminal endpoints only, and so are exchange deposits: every Exchange address (is_exchange set; cex_role says deposit, hot_wallet, cold_wallet or withdrawal) ends a walk. Do not expand from or through exchange nodes, or count them as suspect or intermediate candidates; filter every non-terminal node with is_exchange IS NULL, and in a quantified walk add NOT via:Exchange to every address in its middle. When a walk ends at a deposit, its SWEPT link names the hot wallet it was swept into: call aml_exchange_deposit_check with the deposit and name the exchange. is_exchange is absent unless true, so a labelled node with no is_exchange is walked through, and is_scam, is_victim and is_sanctioned do not end a walk. At a Pool, follow the pool trace rule above.",
|
|
980
|
+
"- Pool guard: a trace walks FLOWED_TO and SWAPPED, so it crosses a swap from payer to recipient without passing through the pool. A walk may end at a Pool, but never starts at one or passes through one: its start and every address in its middle stay off a Pool. A walk of two or more hops also never starts at or passes through a Protocol contract or a System address. System is the kind of the mint and burn addresses 0x0000000000000000000000000000000000000000 and 0x000000000000000000000000000000000000dead; Protocol is shared infrastructure such as a PoolManager, a router or a bridge (the PoolManager 0x8366a39cc670b4001a1121b8f6a443a643e40951 is one, and it is no Pool). Each links millions of unrelated wallets, so a route through one connects nothing. Its start and every address in its middle carry NOT x:Pool AND NOT x:Protocol AND NOT x:System AND NOT x.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"], each its own AND term, never inside an OR. The graph does not write the System kind yet, so keep the address test too; it becomes redundant once System is written. A one-hop read of such an address needs no guard. A fixed-hop walk adds these terms for src and mid in its WHERE. A quantified or shortest-path walk puts the guards inside the path pattern, on the start and on up to 4 guarded hops before one last hop: MATCH p = SHORTEST 1 (a:Address {address: $from} WHERE NOT a:Pool AND NOT a:Protocol AND NOT a:System AND NOT a.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"]) (()-[:FLOWED_TO|SWAPPED]-(via:Address) WHERE NOT via:Pool AND NOT via:Protocol AND NOT via:System AND NOT via.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND NOT via:Exchange){0,4} ()-[:FLOWED_TO|SWAPPED]-(b:Address {address: $to}) RETURN [n IN nodes(p) | n.address] AS route LIMIT 5. ANY SHORTEST takes the same pattern. A route search asks for one path. An open target from one address: MATCH SHORTEST 1 (a:Address {address: $addr} WHERE NOT a:Pool AND NOT a:Protocol AND NOT a:System AND NOT a.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"]) (()-[:FLOWED_TO|SWAPPED]-(via:Address) WHERE NOT via:Pool AND NOT via:Protocol AND NOT via:System AND NOT via.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND NOT via:Exchange){0,4} ()-[:FLOWED_TO|SWAPPED]-(b:Address) RETURN b.address LIMIT 50. Use these shapes as written, changing only the addresses and the RETURN. A WHERE placed after a SHORTEST pattern runs after the shortest route is chosen, so it drops a route that crosses a pool or a system address instead of finding the route that avoids it.",
|
|
959
981
|
"- Call meta_schema {network} first when you need field names; it is cached for 24 hours. The two discovery reads below are the fallback.",
|
|
960
982
|
"- Start schema discovery with endpoint-safe property reads: MATCH (n:Address) RETURN n.address AS address, n.network AS network, n.labels AS labels, n.last_activity_timestamp AS last_activity_timestamp LIMIT 20",
|
|
961
983
|
"- Relationship discovery: MATCH (:Address)-[r:FLOWED_TO]->(:Address) RETURN r.amount_usd_sum AS amount_usd_sum, r.tx_count AS tx_count LIMIT 20",
|
|
962
984
|
"- Anchor every topology read that filters on a link property: put an address in its pattern. Without one, a read starts from every link of the type it names, and you should not count on the filter to narrow that: WHERE x.strength = 'swap' on SWAPPED checks every SWAPPED link, LIMIT stops the read only after enough rows match, and a filter that matches few or none can run to the 60 s topology limit and fail with query_timeout. Example: MATCH (a:Address {address: $addr})-[x:SWAPPED]->(b:Address) WHERE x.swap_count >= 2 RETURN b.address, x.swap_count LIMIT 25. Pick an address with few links: degree_out and degree_in are a rough guide, because they count neighbours, not links, and an address with hundreds of thousands of neighbours can fail the same way. Discovery probes with LIMIT and no filter stay valid. The queries of one batch share a 100 s budget; USE facts queries stop at 30 s.",
|
|
963
|
-
"- graph_query uses the active Chain Insights graph endpoint. Select the graph with USE topology for topology (address/FLOWED_TO/OPERATED_BY/LINKED graph with SWAPPED, ADDED_LIQUIDITY, REMOVED_LIQUIDITY, BRIDGED and the Pool, Token and
|
|
985
|
+
"- graph_query uses the active Chain Insights graph endpoint. Select the graph with USE topology for topology (address/FLOWED_TO/OPERATED_BY/LINKED graph with SWAPPED, ADDED_LIQUIDITY, REMOVED_LIQUIDITY, BRIDGED, SWEPT and the Pool, Token, NFT and Exchange 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 one keyed lookup on the chain node: a transaction by tx_id, a block by block_height or block_hash, an address at one block, or the head. On topology, address is the node grain, not the topology name.",
|
|
964
986
|
"- All graph_query calls are read-only. Never use CREATE, INSERT, MERGE, SET, DELETE, REMOVE, DROP, DETACH, ADD, CONNECT, DISCONNECT, ALTER, TRUNCATE, GRANT, or REVOKE.",
|
|
965
987
|
"- Use USE facts graph patterns for fact and enrichment reads. Do not query internal table namespaces directly."
|
|
966
988
|
].join("\n");
|
|
@@ -1681,6 +1703,43 @@ async function createProxy() {
|
|
|
1681
1703
|
},
|
|
1682
1704
|
annotations: require_token_lookup.META_TOKEN_LOOKUP_ANNOTATIONS
|
|
1683
1705
|
}, async (args) => require_token_lookup.handleMetaTokenLookup(args, tokenDependencies));
|
|
1706
|
+
server.registerTool(require_deployer_screen.AML_DEPLOYER_SCREEN_TOOL, {
|
|
1707
|
+
title: require_deployer_screen.AML_DEPLOYER_SCREEN_TITLE,
|
|
1708
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[require_deployer_screen.AML_DEPLOYER_SCREEN_TOOL],
|
|
1709
|
+
inputSchema: {
|
|
1710
|
+
network: NETWORK_SCHEMA,
|
|
1711
|
+
address: zod.string().min(1).describe("The token contract or the wallet to screen: 0x plus 40 hex characters, any case. A ticker is not an address: call meta_token_lookup first.")
|
|
1712
|
+
},
|
|
1713
|
+
annotations: require_deployer_screen.AML_DEPLOYER_SCREEN_ANNOTATIONS
|
|
1714
|
+
}, async (args) => require_deployer_screen.handleAmlDeployerScreen(args, tokenDependencies));
|
|
1715
|
+
const loadExchanges = (network) => require_exchange_registry.loadExchangeRegistry(network, { log: (line) => {
|
|
1716
|
+
logger.info("exchange_registry.fault", { line });
|
|
1717
|
+
} });
|
|
1718
|
+
server.registerTool(require_exchange_tool.META_EXCHANGE_LOOKUP_TOOL, {
|
|
1719
|
+
title: require_exchange_tool.META_EXCHANGE_LOOKUP_TITLE,
|
|
1720
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[require_exchange_tool.META_EXCHANGE_LOOKUP_TOOL],
|
|
1721
|
+
inputSchema: {
|
|
1722
|
+
network: NETWORK_SCHEMA,
|
|
1723
|
+
name: zod.string().optional().describe("The centralized exchange as the user wrote it: Binance, OKX, gate.io. With no name and no address, every listed exchange is returned."),
|
|
1724
|
+
address: zod.string().optional().describe("A wallet (0x plus 40 hex, any case) instead of a name: the exchange whose hot wallet or gas wallet it is. Not with name.")
|
|
1725
|
+
},
|
|
1726
|
+
annotations: require_exchange_tool.META_EXCHANGE_LOOKUP_ANNOTATIONS
|
|
1727
|
+
}, async (args) => require_exchange_tool.handleMetaExchangeLookup(args, { loadExchangeRegistry: loadExchanges }));
|
|
1728
|
+
const depositCheckDependencies = {
|
|
1729
|
+
loadExchangeRegistry: loadExchanges,
|
|
1730
|
+
graphQueryBatch: tokenDependencies.graphQueryBatch,
|
|
1731
|
+
unavailable: tokenDependencies.unavailable,
|
|
1732
|
+
describeFailure: dexDependencies.describeFailure
|
|
1733
|
+
};
|
|
1734
|
+
server.registerTool(require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_TOOL, {
|
|
1735
|
+
title: require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_TITLE,
|
|
1736
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_TOOL],
|
|
1737
|
+
inputSchema: {
|
|
1738
|
+
network: NETWORK_SCHEMA,
|
|
1739
|
+
address: zod.string().min(1).describe("The address to check: 0x plus 40 hex characters, any case. An exchange name is not an address: call meta_exchange_lookup first.")
|
|
1740
|
+
},
|
|
1741
|
+
annotations: require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_ANNOTATIONS
|
|
1742
|
+
}, async (args) => require_exchange_deposit_check.handleAmlExchangeDepositCheck(args, depositCheckDependencies));
|
|
1684
1743
|
const readUsageStatus = async () => {
|
|
1685
1744
|
try {
|
|
1686
1745
|
await ensureRemote();
|
|
@@ -1929,6 +1988,9 @@ async function createProxy() {
|
|
|
1929
1988
|
"- meta_schema: read the live graph schema of one network: labels, link types and field names. Cached for 24 hours.",
|
|
1930
1989
|
"- meta_dex_lookup: turn an exchange name (Aero, Uniswap, Virtuals) into its factories, routers, pools and first reads. Call it first when a question names an exchange and gives no address.",
|
|
1931
1990
|
"- meta_token_lookup: turn a ticker or a token name (TCITY, USDG) into every contract that carries it, with its creator. Call it first when a question names a token and gives no contract; tickers collide.",
|
|
1991
|
+
"- aml_deployer_screen: who is behind a token or a wallet, as facts: the launcher, its first funder and what kind of wallet that is, their labels and the first inbound bridge deposit. No score, no verdict.",
|
|
1992
|
+
"- meta_exchange_lookup: turn a centralized exchange name (Binance, OKX, Bitget) into its hot wallets, each proven on the chain. Call it first when a question names one.",
|
|
1993
|
+
"- aml_exchange_deposit_check: is this address an exchange deposit, of which exchange, and into which hot wallet was it swept. A trail ends at a deposit.",
|
|
1932
1994
|
"- meta_usage_status: check the caller public free graph_query quota.",
|
|
1933
1995
|
"- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
|
|
1934
1996
|
"- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
|
|
@@ -1950,6 +2012,9 @@ async function createProxy() {
|
|
|
1950
2012
|
"- meta_schema: read the live graph schema of one network: labels, link types and field names. Cached for 24 hours.",
|
|
1951
2013
|
"- meta_dex_lookup: turn an exchange name (Aero, Uniswap, Virtuals) into its factories, routers, pools and first reads. Call it first when a question names an exchange and gives no address.",
|
|
1952
2014
|
"- meta_token_lookup: turn a ticker or a token name (TCITY, USDG) into every contract that carries it, with its creator. Call it first when a question names a token and gives no contract; tickers collide.",
|
|
2015
|
+
"- aml_deployer_screen: who is behind a token or a wallet, as facts: the launcher, its first funder and what kind of wallet that is, their labels and the first inbound bridge deposit. No score, no verdict.",
|
|
2016
|
+
"- meta_exchange_lookup: turn a centralized exchange name (Binance, OKX, Bitget) into its hot wallets, each proven on the chain. Call it first when a question names one.",
|
|
2017
|
+
"- aml_exchange_deposit_check: is this address an exchange deposit, of which exchange, and into which hot wallet was it swept. A trail ends at a deposit.",
|
|
1953
2018
|
"- meta_usage_status: check the caller public free graph_query quota.",
|
|
1954
2019
|
"- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
|
|
1955
2020
|
"- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
|
|
@@ -2061,6 +2126,7 @@ if (process.argv[1] && require("url").pathToFileURL(__filename).href.includes(pr
|
|
|
2061
2126
|
});
|
|
2062
2127
|
exports.APP_ONLY_LOCAL_TOOL_NAMES = APP_ONLY_LOCAL_TOOL_NAMES;
|
|
2063
2128
|
exports.CLAUDE_VIEW_URI = CLAUDE_VIEW_URI;
|
|
2129
|
+
exports.GRAPH_QUERY_CEX_DOOR_SENTENCE = GRAPH_QUERY_CEX_DOOR_SENTENCE;
|
|
2064
2130
|
exports.GRAPH_QUERY_DEX_DOOR_SENTENCE = GRAPH_QUERY_DEX_DOOR_SENTENCE;
|
|
2065
2131
|
exports.GRAPH_QUERY_ROLE_MARKS_SENTENCE = GRAPH_QUERY_ROLE_MARKS_SENTENCE;
|
|
2066
2132
|
exports.GRAPH_QUERY_TOKEN_DOOR_SENTENCE = GRAPH_QUERY_TOKEN_DOOR_SENTENCE;
|
package/dist/mcp-proxy.d.cts
CHANGED
|
@@ -13,6 +13,7 @@ export declare function readClaudeViewHtml(): string;
|
|
|
13
13
|
export type McpProxyMode = 'workspace' | 'stateless';
|
|
14
14
|
export declare function resolveMcpProxyMode(env?: NodeJS.ProcessEnv): McpProxyMode;
|
|
15
15
|
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.";
|
|
16
|
+
export declare const GRAPH_QUERY_CEX_DOOR_SENTENCE = "A question that names a centralized exchange (Binance, OKX, Bitget) starts with meta_exchange_lookup; one address that may be its deposit goes to aml_exchange_deposit_check.";
|
|
16
17
|
export declare const GRAPH_QUERY_TOKEN_DOOR_SENTENCE = "A question that names a token by its ticker or name and gives no contract starts with meta_token_lookup: tickers collide, so never guess the contract.";
|
|
17
18
|
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.";
|
|
18
19
|
export declare const KNOWN_PUBLIC_TOOL_DESCRIPTIONS: Record<string, string>;
|
package/dist/mcp-proxy.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-proxy.d.cts","names":[],"sources":["../src/mcp/proxy.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"mcp-proxy.d.cts","names":[],"sources":["../src/mcp/proxy.ts"],"mappings":";qBAoGa,kBAAgB;qBAkBhB,2BAAyB;;qBAEzB;qBAUA;qBACA;;;;;wBAyBG;YAkBJ;wBAEI,oBAAoB,MAAK,OAAO,aAA2B;qBAiB9D;qBAIA;qBAIA;qBAKA;qBAGA,gCAAgC;KA0BxC,iBAAiB,eAAe,EAAE;qBAgB1B;wBA2GG,2BAA2B,mBAAmB;;;;;;;;wBAomBxC,eAAe"}
|
package/dist/mcp-proxy.d.mts
CHANGED
|
@@ -13,6 +13,7 @@ export declare function readClaudeViewHtml(): string;
|
|
|
13
13
|
export type McpProxyMode = 'workspace' | 'stateless';
|
|
14
14
|
export declare function resolveMcpProxyMode(env?: NodeJS.ProcessEnv): McpProxyMode;
|
|
15
15
|
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.";
|
|
16
|
+
export declare const GRAPH_QUERY_CEX_DOOR_SENTENCE = "A question that names a centralized exchange (Binance, OKX, Bitget) starts with meta_exchange_lookup; one address that may be its deposit goes to aml_exchange_deposit_check.";
|
|
16
17
|
export declare const GRAPH_QUERY_TOKEN_DOOR_SENTENCE = "A question that names a token by its ticker or name and gives no contract starts with meta_token_lookup: tickers collide, so never guess the contract.";
|
|
17
18
|
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.";
|
|
18
19
|
export declare const KNOWN_PUBLIC_TOOL_DESCRIPTIONS: Record<string, string>;
|
package/dist/mcp-proxy.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-proxy.d.mts","names":[],"sources":["../src/mcp/proxy.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"mcp-proxy.d.mts","names":[],"sources":["../src/mcp/proxy.ts"],"mappings":";qBAoGa,kBAAgB;qBAkBhB,2BAAyB;;qBAEzB;qBAUA;qBACA;;;;;wBAyBG;YAkBJ;wBAEI,oBAAoB,MAAK,OAAO,aAA2B;qBAiB9D;qBAIA;qBAIA;qBAKA;qBAGA,gCAAgC;KA0BxC,iBAAiB,eAAe,EAAE;qBAgB1B;wBA2GG,2BAA2B,mBAAmB;;;;;;;;wBAomBxC,eAAe"}
|
package/dist/mcp-proxy.mjs
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { c as withoutUtcProperties, s as withTimestampTextResult, u as PACKAGE_VERSION } from "./print-result-IFARsMnL.mjs";
|
|
2
|
-
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-
|
|
2
|
+
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-DuTds7V4.mjs";
|
|
3
3
|
import { t as PaymentRequiredError } from "./client-BaHAIidE.mjs";
|
|
4
4
|
import { n as primitiveBackendUsageStatus, t as freeTierSpentText } from "./usage-status-BUZgRl4r.mjs";
|
|
5
5
|
import { i as unavailableSubscriptionStatus, n as subscriptionStatusNeedsWallet, t as subscriptionStatusArguments } from "./subscription-status-5WfPhSep.mjs";
|
|
6
6
|
import { r as SUBSCRIPTION_TOPUP_TOOL, t as META_SUBSCRIPTION_STATUS_DESCRIPTION } from "./rules-B3w9pCeQ.mjs";
|
|
7
7
|
import { r as mirrorGraphNetworkCapabilities } from "./capabilities-BRNHcabF.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { c as GRAPH_EXPAND_DESCRIPTION, d as TRANSFERS_MAX, f as handleGraphExpand, i as META_SCHEMA_TITLE, l as GRAPH_EXPAND_TITLE, n as GraphSchemaError, o as handleMetaSchema, r as META_SCHEMA_DESCRIPTION, s as FLOWS_MAX_OFFSET, u as GRAPH_EXPAND_TOOL } from "./graph-schema-B8KMeX75.mjs";
|
|
9
9
|
import { r as appendActionLog, t as actionLogSignalsFromResult } from "./action-log-Byv9Ln_6.mjs";
|
|
10
10
|
import { n as withAnswerHintResult } from "./answer-hint-vOE1O6Lf.mjs";
|
|
11
|
-
import { i as META_DEX_LOOKUP_TOOL, n as META_DEX_LOOKUP_DESCRIPTION, o as handleMetaDexLookup, r as META_DEX_LOOKUP_TITLE, t as META_DEX_LOOKUP_ANNOTATIONS } from "./dex-tool-
|
|
12
|
-
import {
|
|
13
|
-
import { a as SYMBOL_MAX, i as META_TOKEN_LOOKUP_TOOL, n as META_TOKEN_LOOKUP_DESCRIPTION, o as handleMetaTokenLookup, r as META_TOKEN_LOOKUP_TITLE, t as META_TOKEN_LOOKUP_ANNOTATIONS } from "./token-lookup-
|
|
11
|
+
import { i as META_DEX_LOOKUP_TOOL, n as META_DEX_LOOKUP_DESCRIPTION, o as handleMetaDexLookup, r as META_DEX_LOOKUP_TITLE, t as META_DEX_LOOKUP_ANNOTATIONS } from "./dex-tool-CjUZY19i.mjs";
|
|
12
|
+
import { c as loadRegistry } from "./dex-registry-BY67f4Ul.mjs";
|
|
13
|
+
import { a as SYMBOL_MAX, i as META_TOKEN_LOOKUP_TOOL, n as META_TOKEN_LOOKUP_DESCRIPTION, o as handleMetaTokenLookup, r as META_TOKEN_LOOKUP_TITLE, t as META_TOKEN_LOOKUP_ANNOTATIONS } from "./token-lookup-QpIv77P2.mjs";
|
|
14
|
+
import { i as AML_DEPLOYER_SCREEN_TOOL, n as AML_DEPLOYER_SCREEN_DESCRIPTION, o as handleAmlDeployerScreen, r as AML_DEPLOYER_SCREEN_TITLE, t as AML_DEPLOYER_SCREEN_ANNOTATIONS } from "./deployer-screen-ByQBZEsg.mjs";
|
|
15
|
+
import { a as META_EXCHANGE_LOOKUP_TOOL, i as META_EXCHANGE_LOOKUP_TITLE, n as META_EXCHANGE_LOOKUP_ANNOTATIONS, r as META_EXCHANGE_LOOKUP_DESCRIPTION, s as handleMetaExchangeLookup } from "./exchange-tool-Dc46SJ49.mjs";
|
|
16
|
+
import { i as AML_EXCHANGE_DEPOSIT_CHECK_TOOL, n as AML_EXCHANGE_DEPOSIT_CHECK_DESCRIPTION, o as handleAmlExchangeDepositCheck, r as AML_EXCHANGE_DEPOSIT_CHECK_TITLE, t as AML_EXCHANGE_DEPOSIT_CHECK_ANNOTATIONS } from "./exchange-deposit-check-CMGTPv-T.mjs";
|
|
17
|
+
import { i as loadExchangeRegistry } from "./exchange-registry-CoLgHw6d.mjs";
|
|
14
18
|
import { fileURLToPath } from "node:url";
|
|
15
19
|
import path from "node:path";
|
|
16
20
|
import { readFileSync } from "node:fs";
|
|
@@ -233,6 +237,11 @@ const ROUTING_TWO_FIT = "A transaction is a chain question: read it on `USE chai
|
|
|
233
237
|
/** The key that each layer hands to the next. Each key keeps its name. */
|
|
234
238
|
const ROUTING_HANDOFF = "The layers hand each other keys, and each key keeps its name. Topology gives the pair and the first and last seen time. Facts gives the `tx_id` and the `block_height`. Chain takes an `address`, a `tx_id`, a `block_height` or a `block_hash`, and gives the `block_date` of a transaction or a block.";
|
|
235
239
|
/**
|
|
240
|
+
* Where money entered an exchange: the link `SWEPT` (layer `cex_sweeps`, family
|
|
241
|
+
* annotations) and the node property `cex_role`. A trail ends at it.
|
|
242
|
+
*/
|
|
243
|
+
const ROUTING_SWEPT = "`SWEPT` runs from an exchange deposit to the hot wallet it swept into (layer `cex_sweeps`, family annotations), and `cex_role` on an `:Exchange` address says which wallet of its exchange it is: `deposit`, `hot_wallet`, `cold_wallet` or `withdrawal`. A trail that reaches a `SWEPT` link ends there: say the money entered the exchange at that deposit, swept n times into that hot wallet, name the exchange from `labels`, and never walk on past a hot wallet. Read `SWEPT` anchored on an address; call `aml_exchange_deposit_check` for one address and `meta_exchange_lookup` for an exchange by name.";
|
|
244
|
+
/**
|
|
236
245
|
* A whole-chain question is a time-bounded topology search, sent only when the
|
|
237
246
|
* family of its link type is close to the head; a refusal names the family.
|
|
238
247
|
*/
|
|
@@ -282,7 +291,7 @@ function routingHead() {
|
|
|
282
291
|
* one line of the served instructions.
|
|
283
292
|
*/
|
|
284
293
|
function routingHintLines() {
|
|
285
|
-
return [`- Pick the layer first. ${ROUTING_RULE} 1. ${ROUTING_LINES[0]} 2. ${ROUTING_LINES[1]} 3. ${ROUTING_LINES[2]} ${ROUTING_NOT_SERVED} ${ROUTING_ADDRESS_ON_CHAIN} ${ROUTING_TWO_FIT} ${ROUTING_HANDOFF} The lookups that USE chain serves are listed in chain_admission.lookups of meta_network_capabilities. Read every limit that the server publishes from meta_network_capabilities (chain_admission and, when the server sends them, topology_admission and facts_admission). Never write a limit down.`, `- Act on a refusal by its class. ${moveLines().join(" ")}`];
|
|
294
|
+
return [`- Pick the layer first. ${ROUTING_RULE} 1. ${ROUTING_LINES[0]} 2. ${ROUTING_LINES[1]} 3. ${ROUTING_LINES[2]} ${ROUTING_NOT_SERVED} ${ROUTING_ADDRESS_ON_CHAIN} ${ROUTING_TWO_FIT} ${ROUTING_HANDOFF} ${ROUTING_SWEPT} The lookups that USE chain serves are listed in chain_admission.lookups of meta_network_capabilities. Read every limit that the server publishes from meta_network_capabilities (chain_admission and, when the server sends them, topology_admission and facts_admission). Never write a limit down.`, `- Act on a refusal by its class. ${moveLines().join(" ")}`];
|
|
286
295
|
}
|
|
287
296
|
// src/mcp/view-server.ts
|
|
288
297
|
/**
|
|
@@ -547,6 +556,12 @@ const JUDGEMENT_CLAIMS = Object.freeze([
|
|
|
547
556
|
mark: "Scam",
|
|
548
557
|
plain: "the creator of a fake token"
|
|
549
558
|
},
|
|
559
|
+
{
|
|
560
|
+
value: "FAKE_TOKEN_LP",
|
|
561
|
+
property: "risk_claims",
|
|
562
|
+
mark: "Scam",
|
|
563
|
+
plain: "the wallet that seeded a fake token's pool and pulled its liquidity after the buyers paid"
|
|
564
|
+
},
|
|
550
565
|
{
|
|
551
566
|
value: "ADDRESS_POISONING",
|
|
552
567
|
property: "risk_claims",
|
|
@@ -817,6 +832,9 @@ const LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
817
832
|
"meta_rules",
|
|
818
833
|
META_DEX_LOOKUP_TOOL,
|
|
819
834
|
META_TOKEN_LOOKUP_TOOL,
|
|
835
|
+
AML_DEPLOYER_SCREEN_TOOL,
|
|
836
|
+
META_EXCHANGE_LOOKUP_TOOL,
|
|
837
|
+
AML_EXCHANGE_DEPOSIT_CHECK_TOOL,
|
|
820
838
|
"wallet_balance",
|
|
821
839
|
"wallet_topup",
|
|
822
840
|
SUBSCRIPTION_TOPUP_TOOL,
|
|
@@ -875,9 +893,10 @@ function resolveMcpProxyMode(env = process.env) {
|
|
|
875
893
|
if (raw === "no-workspace" || raw === "workspace-less") return "stateless";
|
|
876
894
|
throw new Error(`CHAIN_INSIGHTS_MCP_PROXY_MODE must be workspace or stateless; got "${raw}"`);
|
|
877
895
|
}
|
|
878
|
-
const GRAPH_LAYERS_TEXT = "Use USE topology for topology (address/FLOWED_TO/OPERATED_BY/LINKED graph with SWAPPED, ADDED_LIQUIDITY, REMOVED_LIQUIDITY, BRIDGED and the Pool, Token and
|
|
896
|
+
const GRAPH_LAYERS_TEXT = "Use USE topology for topology (address/FLOWED_TO/OPERATED_BY/LINKED graph with SWAPPED, ADDED_LIQUIDITY, REMOVED_LIQUIDITY, BRIDGED, SWEPT and the Pool, Token, NFT and Exchange 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.";
|
|
879
897
|
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.";
|
|
880
898
|
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.";
|
|
899
|
+
const GRAPH_QUERY_CEX_DOOR_SENTENCE = "A question that names a centralized exchange (Binance, OKX, Bitget) starts with meta_exchange_lookup; one address that may be its deposit goes to aml_exchange_deposit_check.";
|
|
881
900
|
const GRAPH_QUERY_TOKEN_DOOR_SENTENCE = "A question that names a token by its ticker or name and gives no contract starts with meta_token_lookup: tickers collide, so never guess the contract.";
|
|
882
901
|
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.";
|
|
883
902
|
const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
@@ -885,12 +904,15 @@ const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
|
885
904
|
meta_schema: META_SCHEMA_DESCRIPTION,
|
|
886
905
|
[META_DEX_LOOKUP_TOOL]: META_DEX_LOOKUP_DESCRIPTION,
|
|
887
906
|
[META_TOKEN_LOOKUP_TOOL]: META_TOKEN_LOOKUP_DESCRIPTION,
|
|
907
|
+
[AML_DEPLOYER_SCREEN_TOOL]: AML_DEPLOYER_SCREEN_DESCRIPTION,
|
|
908
|
+
[META_EXCHANGE_LOOKUP_TOOL]: META_EXCHANGE_LOOKUP_DESCRIPTION,
|
|
909
|
+
[AML_EXCHANGE_DEPOSIT_CHECK_TOOL]: AML_EXCHANGE_DEPOSIT_CHECK_DESCRIPTION,
|
|
888
910
|
meta_usage_status: "Return the caller's public free graph_query quota for the current UTC day.",
|
|
889
911
|
meta_subscription_status: META_SUBSCRIPTION_STATUS_DESCRIPTION,
|
|
890
912
|
meta_help: "Show a short guide to Chain Insights tools and workflow.",
|
|
891
913
|
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 {}.",
|
|
892
914
|
wallet_balance: "Show the local Chain Insights payment wallet address, payment network, token, and amount.",
|
|
893
|
-
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_TOKEN_DOOR_SENTENCE} ${GRAPH_QUERY_ROLE_MARKS_SENTENCE} ${GRAPH_QUERY_JUDGEMENT_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 ….`,
|
|
915
|
+
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_CEX_DOOR_SENTENCE} ${GRAPH_QUERY_TOKEN_DOOR_SENTENCE} ${GRAPH_QUERY_ROLE_MARKS_SENTENCE} ${GRAPH_QUERY_JUDGEMENT_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 ….`,
|
|
894
916
|
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.`
|
|
895
917
|
};
|
|
896
918
|
const KNOWN_PUBLIC_TOOL_TITLES = {
|
|
@@ -934,7 +956,7 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
934
956
|
"- 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.",
|
|
935
957
|
"- 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.",
|
|
936
958
|
"- 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.",
|
|
937
|
-
"- Labels hold role words, never a claim code: 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. Why a judgement mark is there sits in a sorted claims list on the node, written by the labels layer: risk_claims on :Scam, :Poisoned and :Sanctioned, protection_claims on :Victim and :Targeted, traced_claims on :OnMoneyTrail, and suspect_labels for a mixer user. risk_claims: FAKE_TOKEN (a spoof token contract imitating a real one), FAKE_TOKEN_DEPLOYER (its creator), ADDRESS_POISONING (:Poisoned, never :Scam: a look-alike address that sent worthless dust so the target copies it), INBOUND_IMPERSONATION (a look-alike that paid the target to get into its history), PHANTOM_TRANSFER, PHANTOM_TRANSFER_EMITTER and PHANTOM_ENTRYPOINT (a contract that writes fake transfer events claiming a transfer from a look-alike that never happened), SWEEPER_DELEGATE and SWEEP_BENEFICIARY (an EIP-7702 delegate that empties accounts, and where the funds go), UNSAFE_DELEGATE (a delegate any caller can use to empty the account), APPROVAL_DRAINER and APPROVAL_DRAIN_BENEFICIARY (a spender that moved the tokens of at least three owners with their approval or Permit2 within 72 hours of the grant and paid nothing back, and the receiver), SANCTIONED. protection_claims: VICTIM (lost money to a scam the evidence walk traced: it paid the accused, was swept or was drained after the attempt; receiving a fake token or dust is never a victim) and the older ADDRESS_POISONING_TARGET (:Targeted, a target the walk has not proven lost money). traced_claims: LAUNDERED, RECEIVED, FUNDER and MIXED, the trail the evidence walk followed from an accused address. suspect_labels: MIXER_DEPOSITOR and MIXER_WITHDRAWER, the address itself used a mixer pool, a warning and not a theft. A risk question is answered from the marks and claims; a flow question gets no risk screen. Ask by mark, MATCH (a:Scam) WHERE \"FAKE_TOKEN\" IN a.risk_claims RETURN a.address AS address, a.risk_claims AS risk_claims LIMIT 25, or anchor on the address. The mark is the anchor and a WHERE on its own properties is allowed; a WHERE with no mark and no address is refused. The graph holds no link from an accused address to its victims, so answer per address. Say what a claim means in plain words, such as \"a fake-token scam\" or \"it lost money to a scam\", never the list name or the code.",
|
|
959
|
+
"- Labels hold role words, never a claim code: 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. Why a judgement mark is there sits in a sorted claims list on the node, written by the labels layer: risk_claims on :Scam, :Poisoned and :Sanctioned, protection_claims on :Victim and :Targeted, traced_claims on :OnMoneyTrail, and suspect_labels for a mixer user. risk_claims: FAKE_TOKEN (a spoof token contract imitating a real one), FAKE_TOKEN_DEPLOYER (its creator), FAKE_TOKEN_LP (the wallet that seeded its pool and pulled the liquidity after the buyers paid), ADDRESS_POISONING (:Poisoned, never :Scam: a look-alike address that sent worthless dust so the target copies it), INBOUND_IMPERSONATION (a look-alike that paid the target to get into its history), PHANTOM_TRANSFER, PHANTOM_TRANSFER_EMITTER and PHANTOM_ENTRYPOINT (a contract that writes fake transfer events claiming a transfer from a look-alike that never happened), SWEEPER_DELEGATE and SWEEP_BENEFICIARY (an EIP-7702 delegate that empties accounts, and where the funds go), UNSAFE_DELEGATE (a delegate any caller can use to empty the account), APPROVAL_DRAINER and APPROVAL_DRAIN_BENEFICIARY (a spender that moved the tokens of at least three owners with their approval or Permit2 within 72 hours of the grant and paid nothing back, and the receiver), SANCTIONED. protection_claims: VICTIM (lost money to a scam the evidence walk traced: it paid the accused, was swept or was drained after the attempt; receiving a fake token or dust is never a victim) and the older ADDRESS_POISONING_TARGET (:Targeted, a target the walk has not proven lost money). traced_claims: LAUNDERED, RECEIVED, FUNDER and MIXED, the trail the evidence walk followed from an accused address. suspect_labels: MIXER_DEPOSITOR and MIXER_WITHDRAWER, the address itself used a mixer pool, a warning and not a theft. A risk question is answered from the marks and claims; a flow question gets no risk screen. Ask by mark, MATCH (a:Scam) WHERE \"FAKE_TOKEN\" IN a.risk_claims RETURN a.address AS address, a.risk_claims AS risk_claims LIMIT 25, or anchor on the address. The mark is the anchor and a WHERE on its own properties is allowed; a WHERE with no mark and no address is refused. The graph holds no link from an accused address to its victims, so answer per address. Say what a claim means in plain words, such as \"a fake-token scam\" or \"it lost money to a scam\", never the list name or the code.",
|
|
938
960
|
"- 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). FLOWED_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.",
|
|
939
961
|
"- For actor-level exposure (AC11), UNION FLOWED_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:FLOWED_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.",
|
|
940
962
|
"- 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.",
|
|
@@ -950,13 +972,13 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
950
972
|
"- Pool trace rule, for every trace: 1. Enter a `:Pool` on any edge. 2. Leave a `:Pool` only on `REMOVED_LIQUIDITY`, to the address the liquidity was paid to. 3. Never leave a `:Pool` on `FLOWED_TO`. 4. Across a swap, follow `SWAPPED` from payer to recipient, between two different addresses. Do not walk through the pool. Rug-pull probe: MATCH (victim:Address {address: $addr})-[paid:FLOWED_TO]->(pool:Pool)-[removal:REMOVED_LIQUIDITY]->(receiver:Address) WHERE NOT victim:Pool AND NOT victim:Protocol AND NOT victim:System AND NOT victim.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND receiver.address <> victim.address RETURN pool.address AS pool_address, receiver.address AS receiver_address, sum(removal.usd) AS removed_usd, max(removal.receiver_added_usd) AS receiver_added_usd, max(removal.receiver_provided) AS receiver_provided LIMIT 25.",
|
|
951
973
|
"- USE facts serves the single events. (payer:Address)-[s:SWAP]->(recipient:Address) is one row per swap route, self swaps included, with strength, reason, route_id and the sold_ and bought_ asset, amount and usd columns. (provider:Address)-[:LIQUIDITY_ADD]->(pool:Address) and (pool:Address)-[:LIQUIDITY_REMOVE]->(receiver:Address) are one row per liquidity event, with party_state and evidence_state. (sender:Address)-[c:BRIDGE_CROSSING]->(recipient:Address) is one row per bridge event. SWAP, LIQUIDITY_* and BRIDGE_CROSSING take the same rule as TRANSFER: an address pair with one day. USD comes from the daily price services, never from a swap: with no price, USD is empty and the matching price_missing column is true (price_missing on TRANSFER, sold_price_missing and bought_price_missing on SWAP, amount0_price_missing and amount1_price_missing on LIQUIDITY_*). block_timestamp on TRANSFER, SWAP and LIQUIDITY_* rows is epoch milliseconds, in filters and in results; BRIDGE_CROSSING has none.",
|
|
952
974
|
"- A USE facts SWAP row carries no route: it has no pools and no families column. A read that names one of them, to return it, to filter on it or to order by it, is refused. The route of a swap stays a topology question. For the pools of the swaps of an address, read SWAPPED.pools and SWAPPED.families on USE topology, anchored on the payer or the recipient. SWAPPED has one link per payer, recipient, sold asset and bought asset, so its pools cover every route on the link, not one route.",
|
|
953
|
-
"- Traversal rule: for BFS, fixed-hop fallback, shortest-path, or manual FLOWED_TO traversal, exchange hot wallets are terminal endpoints only. Do not expand from
|
|
954
|
-
"- Pool guard: a trace walks FLOWED_TO and SWAPPED, so it crosses a swap from payer to recipient without passing through the pool. A walk may end at a Pool, but never starts at one or passes through one: its start and every address in its middle stay off a Pool. A walk of two or more hops also never starts at or passes through a Protocol contract or a System address. System is the kind of the mint and burn addresses 0x0000000000000000000000000000000000000000 and 0x000000000000000000000000000000000000dead; Protocol is shared infrastructure such as a PoolManager, a router or a bridge (the PoolManager 0x8366a39cc670b4001a1121b8f6a443a643e40951 is one, and it is no Pool). Each links millions of unrelated wallets, so a route through one connects nothing. Its start and every address in its middle carry NOT x:Pool AND NOT x:Protocol AND NOT x:System AND NOT x.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"], each its own AND term, never inside an OR. The graph does not write the System kind yet, so keep the address test too; it becomes redundant once System is written. A one-hop read of such an address needs no guard. A fixed-hop walk adds these terms for src and mid in its WHERE. A quantified or shortest-path walk puts the guards inside the path pattern, on the start and on up to 4 guarded hops before one last hop: MATCH p = SHORTEST 1 (a:Address {address: $from} WHERE NOT a:Pool AND NOT a:Protocol AND NOT a:System AND NOT a.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"]) (()-[:FLOWED_TO|SWAPPED]-(via:Address) WHERE NOT via:Pool AND NOT via:Protocol AND NOT via:System AND NOT via.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"]){0,4} ()-[:FLOWED_TO|SWAPPED]-(b:Address {address: $to}) RETURN [n IN nodes(p) | n.address] AS route LIMIT 5. ANY SHORTEST takes the same pattern. A route search asks for one path. An open target from one address: MATCH SHORTEST 1 (a:Address {address: $addr} WHERE NOT a:Pool AND NOT a:Protocol AND NOT a:System AND NOT a.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"]) (()-[:FLOWED_TO|SWAPPED]-(via:Address) WHERE NOT via:Pool AND NOT via:Protocol AND NOT via:System AND NOT via.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"]){0,4} ()-[:FLOWED_TO|SWAPPED]-(b:Address) RETURN b.address LIMIT 50. Use these shapes as written, changing only the addresses and the RETURN. A WHERE placed after a SHORTEST pattern runs after the shortest route is chosen, so it drops a route that crosses a pool or a system address instead of finding the route that avoids it.",
|
|
975
|
+
"- Traversal rule: for BFS, fixed-hop fallback, shortest-path, or manual FLOWED_TO traversal, exchange hot wallets are terminal endpoints only, and so are exchange deposits: every Exchange address (is_exchange set; cex_role says deposit, hot_wallet, cold_wallet or withdrawal) ends a walk. Do not expand from or through exchange nodes, or count them as suspect or intermediate candidates; filter every non-terminal node with is_exchange IS NULL, and in a quantified walk add NOT via:Exchange to every address in its middle. When a walk ends at a deposit, its SWEPT link names the hot wallet it was swept into: call aml_exchange_deposit_check with the deposit and name the exchange. is_exchange is absent unless true, so a labelled node with no is_exchange is walked through, and is_scam, is_victim and is_sanctioned do not end a walk. At a Pool, follow the pool trace rule above.",
|
|
976
|
+
"- Pool guard: a trace walks FLOWED_TO and SWAPPED, so it crosses a swap from payer to recipient without passing through the pool. A walk may end at a Pool, but never starts at one or passes through one: its start and every address in its middle stay off a Pool. A walk of two or more hops also never starts at or passes through a Protocol contract or a System address. System is the kind of the mint and burn addresses 0x0000000000000000000000000000000000000000 and 0x000000000000000000000000000000000000dead; Protocol is shared infrastructure such as a PoolManager, a router or a bridge (the PoolManager 0x8366a39cc670b4001a1121b8f6a443a643e40951 is one, and it is no Pool). Each links millions of unrelated wallets, so a route through one connects nothing. Its start and every address in its middle carry NOT x:Pool AND NOT x:Protocol AND NOT x:System AND NOT x.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"], each its own AND term, never inside an OR. The graph does not write the System kind yet, so keep the address test too; it becomes redundant once System is written. A one-hop read of such an address needs no guard. A fixed-hop walk adds these terms for src and mid in its WHERE. A quantified or shortest-path walk puts the guards inside the path pattern, on the start and on up to 4 guarded hops before one last hop: MATCH p = SHORTEST 1 (a:Address {address: $from} WHERE NOT a:Pool AND NOT a:Protocol AND NOT a:System AND NOT a.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"]) (()-[:FLOWED_TO|SWAPPED]-(via:Address) WHERE NOT via:Pool AND NOT via:Protocol AND NOT via:System AND NOT via.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND NOT via:Exchange){0,4} ()-[:FLOWED_TO|SWAPPED]-(b:Address {address: $to}) RETURN [n IN nodes(p) | n.address] AS route LIMIT 5. ANY SHORTEST takes the same pattern. A route search asks for one path. An open target from one address: MATCH SHORTEST 1 (a:Address {address: $addr} WHERE NOT a:Pool AND NOT a:Protocol AND NOT a:System AND NOT a.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"]) (()-[:FLOWED_TO|SWAPPED]-(via:Address) WHERE NOT via:Pool AND NOT via:Protocol AND NOT via:System AND NOT via.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND NOT via:Exchange){0,4} ()-[:FLOWED_TO|SWAPPED]-(b:Address) RETURN b.address LIMIT 50. Use these shapes as written, changing only the addresses and the RETURN. A WHERE placed after a SHORTEST pattern runs after the shortest route is chosen, so it drops a route that crosses a pool or a system address instead of finding the route that avoids it.",
|
|
955
977
|
"- Call meta_schema {network} first when you need field names; it is cached for 24 hours. The two discovery reads below are the fallback.",
|
|
956
978
|
"- Start schema discovery with endpoint-safe property reads: MATCH (n:Address) RETURN n.address AS address, n.network AS network, n.labels AS labels, n.last_activity_timestamp AS last_activity_timestamp LIMIT 20",
|
|
957
979
|
"- Relationship discovery: MATCH (:Address)-[r:FLOWED_TO]->(:Address) RETURN r.amount_usd_sum AS amount_usd_sum, r.tx_count AS tx_count LIMIT 20",
|
|
958
980
|
"- Anchor every topology read that filters on a link property: put an address in its pattern. Without one, a read starts from every link of the type it names, and you should not count on the filter to narrow that: WHERE x.strength = 'swap' on SWAPPED checks every SWAPPED link, LIMIT stops the read only after enough rows match, and a filter that matches few or none can run to the 60 s topology limit and fail with query_timeout. Example: MATCH (a:Address {address: $addr})-[x:SWAPPED]->(b:Address) WHERE x.swap_count >= 2 RETURN b.address, x.swap_count LIMIT 25. Pick an address with few links: degree_out and degree_in are a rough guide, because they count neighbours, not links, and an address with hundreds of thousands of neighbours can fail the same way. Discovery probes with LIMIT and no filter stay valid. The queries of one batch share a 100 s budget; USE facts queries stop at 30 s.",
|
|
959
|
-
"- graph_query uses the active Chain Insights graph endpoint. Select the graph with USE topology for topology (address/FLOWED_TO/OPERATED_BY/LINKED graph with SWAPPED, ADDED_LIQUIDITY, REMOVED_LIQUIDITY, BRIDGED and the Pool, Token and
|
|
981
|
+
"- graph_query uses the active Chain Insights graph endpoint. Select the graph with USE topology for topology (address/FLOWED_TO/OPERATED_BY/LINKED graph with SWAPPED, ADDED_LIQUIDITY, REMOVED_LIQUIDITY, BRIDGED, SWEPT and the Pool, Token, NFT and Exchange 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 one keyed lookup on the chain node: a transaction by tx_id, a block by block_height or block_hash, an address at one block, or the head. On topology, address is the node grain, not the topology name.",
|
|
960
982
|
"- All graph_query calls are read-only. Never use CREATE, INSERT, MERGE, SET, DELETE, REMOVE, DROP, DETACH, ADD, CONNECT, DISCONNECT, ALTER, TRUNCATE, GRANT, or REVOKE.",
|
|
961
983
|
"- Use USE facts graph patterns for fact and enrichment reads. Do not query internal table namespaces directly."
|
|
962
984
|
].join("\n");
|
|
@@ -1677,6 +1699,43 @@ async function createProxy() {
|
|
|
1677
1699
|
},
|
|
1678
1700
|
annotations: META_TOKEN_LOOKUP_ANNOTATIONS
|
|
1679
1701
|
}, async (args) => handleMetaTokenLookup(args, tokenDependencies));
|
|
1702
|
+
server.registerTool(AML_DEPLOYER_SCREEN_TOOL, {
|
|
1703
|
+
title: AML_DEPLOYER_SCREEN_TITLE,
|
|
1704
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[AML_DEPLOYER_SCREEN_TOOL],
|
|
1705
|
+
inputSchema: {
|
|
1706
|
+
network: NETWORK_SCHEMA,
|
|
1707
|
+
address: z.string().min(1).describe("The token contract or the wallet to screen: 0x plus 40 hex characters, any case. A ticker is not an address: call meta_token_lookup first.")
|
|
1708
|
+
},
|
|
1709
|
+
annotations: AML_DEPLOYER_SCREEN_ANNOTATIONS
|
|
1710
|
+
}, async (args) => handleAmlDeployerScreen(args, tokenDependencies));
|
|
1711
|
+
const loadExchanges = (network) => loadExchangeRegistry(network, { log: (line) => {
|
|
1712
|
+
logger.info("exchange_registry.fault", { line });
|
|
1713
|
+
} });
|
|
1714
|
+
server.registerTool(META_EXCHANGE_LOOKUP_TOOL, {
|
|
1715
|
+
title: META_EXCHANGE_LOOKUP_TITLE,
|
|
1716
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[META_EXCHANGE_LOOKUP_TOOL],
|
|
1717
|
+
inputSchema: {
|
|
1718
|
+
network: NETWORK_SCHEMA,
|
|
1719
|
+
name: z.string().optional().describe("The centralized exchange as the user wrote it: Binance, OKX, gate.io. With no name and no address, every listed exchange is returned."),
|
|
1720
|
+
address: z.string().optional().describe("A wallet (0x plus 40 hex, any case) instead of a name: the exchange whose hot wallet or gas wallet it is. Not with name.")
|
|
1721
|
+
},
|
|
1722
|
+
annotations: META_EXCHANGE_LOOKUP_ANNOTATIONS
|
|
1723
|
+
}, async (args) => handleMetaExchangeLookup(args, { loadExchangeRegistry: loadExchanges }));
|
|
1724
|
+
const depositCheckDependencies = {
|
|
1725
|
+
loadExchangeRegistry: loadExchanges,
|
|
1726
|
+
graphQueryBatch: tokenDependencies.graphQueryBatch,
|
|
1727
|
+
unavailable: tokenDependencies.unavailable,
|
|
1728
|
+
describeFailure: dexDependencies.describeFailure
|
|
1729
|
+
};
|
|
1730
|
+
server.registerTool(AML_EXCHANGE_DEPOSIT_CHECK_TOOL, {
|
|
1731
|
+
title: AML_EXCHANGE_DEPOSIT_CHECK_TITLE,
|
|
1732
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[AML_EXCHANGE_DEPOSIT_CHECK_TOOL],
|
|
1733
|
+
inputSchema: {
|
|
1734
|
+
network: NETWORK_SCHEMA,
|
|
1735
|
+
address: z.string().min(1).describe("The address to check: 0x plus 40 hex characters, any case. An exchange name is not an address: call meta_exchange_lookup first.")
|
|
1736
|
+
},
|
|
1737
|
+
annotations: AML_EXCHANGE_DEPOSIT_CHECK_ANNOTATIONS
|
|
1738
|
+
}, async (args) => handleAmlExchangeDepositCheck(args, depositCheckDependencies));
|
|
1680
1739
|
const readUsageStatus = async () => {
|
|
1681
1740
|
try {
|
|
1682
1741
|
await ensureRemote();
|
|
@@ -1925,6 +1984,9 @@ async function createProxy() {
|
|
|
1925
1984
|
"- meta_schema: read the live graph schema of one network: labels, link types and field names. Cached for 24 hours.",
|
|
1926
1985
|
"- meta_dex_lookup: turn an exchange name (Aero, Uniswap, Virtuals) into its factories, routers, pools and first reads. Call it first when a question names an exchange and gives no address.",
|
|
1927
1986
|
"- meta_token_lookup: turn a ticker or a token name (TCITY, USDG) into every contract that carries it, with its creator. Call it first when a question names a token and gives no contract; tickers collide.",
|
|
1987
|
+
"- aml_deployer_screen: who is behind a token or a wallet, as facts: the launcher, its first funder and what kind of wallet that is, their labels and the first inbound bridge deposit. No score, no verdict.",
|
|
1988
|
+
"- meta_exchange_lookup: turn a centralized exchange name (Binance, OKX, Bitget) into its hot wallets, each proven on the chain. Call it first when a question names one.",
|
|
1989
|
+
"- aml_exchange_deposit_check: is this address an exchange deposit, of which exchange, and into which hot wallet was it swept. A trail ends at a deposit.",
|
|
1928
1990
|
"- meta_usage_status: check the caller public free graph_query quota.",
|
|
1929
1991
|
"- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
|
|
1930
1992
|
"- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
|
|
@@ -1946,6 +2008,9 @@ async function createProxy() {
|
|
|
1946
2008
|
"- meta_schema: read the live graph schema of one network: labels, link types and field names. Cached for 24 hours.",
|
|
1947
2009
|
"- meta_dex_lookup: turn an exchange name (Aero, Uniswap, Virtuals) into its factories, routers, pools and first reads. Call it first when a question names an exchange and gives no address.",
|
|
1948
2010
|
"- meta_token_lookup: turn a ticker or a token name (TCITY, USDG) into every contract that carries it, with its creator. Call it first when a question names a token and gives no contract; tickers collide.",
|
|
2011
|
+
"- aml_deployer_screen: who is behind a token or a wallet, as facts: the launcher, its first funder and what kind of wallet that is, their labels and the first inbound bridge deposit. No score, no verdict.",
|
|
2012
|
+
"- meta_exchange_lookup: turn a centralized exchange name (Binance, OKX, Bitget) into its hot wallets, each proven on the chain. Call it first when a question names one.",
|
|
2013
|
+
"- aml_exchange_deposit_check: is this address an exchange deposit, of which exchange, and into which hot wallet was it swept. A trail ends at a deposit.",
|
|
1949
2014
|
"- meta_usage_status: check the caller public free graph_query quota.",
|
|
1950
2015
|
"- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
|
|
1951
2016
|
"- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
|
|
@@ -2055,6 +2120,6 @@ if (process.argv[1] && import.meta.url.includes(process.argv[1].replace(/\\/g, "
|
|
|
2055
2120
|
process.stderr.write(`Chain Insights MCP proxy startup failed: ${err.message}\n`);
|
|
2056
2121
|
process.exit(1);
|
|
2057
2122
|
});
|
|
2058
|
-
export { APP_ONLY_LOCAL_TOOL_NAMES, CLAUDE_VIEW_URI, GRAPH_QUERY_DEX_DOOR_SENTENCE, GRAPH_QUERY_ROLE_MARKS_SENTENCE, GRAPH_QUERY_TOKEN_DOOR_SENTENCE, KNOWN_PUBLIC_TOOL_DESCRIPTIONS, LOCAL_TOOL_NAMES, MCP_APP_MIME_TYPE, PICTURE_RULES, REFUSAL_SCHEMA, createProxy, knownPublicToolInputSchema, readClaudeViewHtml, resolveMcpProxyMode };
|
|
2123
|
+
export { APP_ONLY_LOCAL_TOOL_NAMES, CLAUDE_VIEW_URI, GRAPH_QUERY_CEX_DOOR_SENTENCE, GRAPH_QUERY_DEX_DOOR_SENTENCE, GRAPH_QUERY_ROLE_MARKS_SENTENCE, GRAPH_QUERY_TOKEN_DOOR_SENTENCE, KNOWN_PUBLIC_TOOL_DESCRIPTIONS, LOCAL_TOOL_NAMES, MCP_APP_MIME_TYPE, PICTURE_RULES, REFUSAL_SCHEMA, createProxy, knownPublicToolInputSchema, readClaudeViewHtml, resolveMcpProxyMode };
|
|
2059
2124
|
|
|
2060
2125
|
//# sourceMappingURL=mcp-proxy.mjs.map
|