chain-insights 0.79.2 → 0.80.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.
- package/README.md +2 -0
- package/dist/cli.cjs +43 -13
- package/dist/cli.mjs +43 -13
- package/dist/cli.mjs.map +1 -1
- package/dist/{deployer-screen-4AxZhsrO.cjs → deployer-screen-BomgSBcq.cjs} +2 -2
- package/dist/{deployer-screen-eix6pvW7.mjs → deployer-screen-ByQBZEsg.mjs} +3 -3
- package/dist/{deployer-screen-eix6pvW7.mjs.map → deployer-screen-ByQBZEsg.mjs.map} +1 -1
- 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 +77 -17
- 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 +77 -18
- 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-DBN3Lxl7.cjs → token-lookup-D-5GBEwF.cjs} +1 -1
- package/dist/{token-lookup-Bv_Fviis.mjs → token-lookup-QpIv77P2.mjs} +2 -2
- package/dist/{token-lookup-Bv_Fviis.mjs.map → token-lookup-QpIv77P2.mjs.map} +1 -1
- package/dist/{tool-visibility-DwNr6Rp9.cjs → tool-visibility-D8Up081E.cjs} +7 -1
- package/dist/{tool-visibility-DlxA8R00.mjs → tool-visibility-DuTds7V4.mjs} +8 -2
- package/dist/tool-visibility-DuTds7V4.mjs.map +1 -0
- package/docs/contributing.md +4 -3
- package/docs/development.md +4 -2
- package/docs/graph-query-compatibility.md +24 -5
- package/docs/graph-tools.md +25 -12
- package/docs/mcp-proxy.md +62 -2
- package/docs/stability.md +4 -2
- package/package.json +1 -1
- package/registry/README.md +37 -0
- package/registry/exchanges/ethereum.json +920 -0
- package/registry/exchanges/robinhood.json +87 -0
- 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 +53 -13
- package/skills/chain-insights-dex/SKILL.md +1 -1
- package/skills/chain-insights-dex-gauge/SKILL.md +2 -0
- package/skills/chain-insights-dex-launchpad/SKILL.md +2 -0
- package/skills/chain-insights-dex-vault/SKILL.md +2 -0
- package/dist/dex-tool-D61sIjpq.mjs.map +0 -1
- package/dist/public-tools-DXlZcanX.mjs.map +0 -1
- package/dist/tool-visibility-DlxA8R00.mjs.map +0 -1
package/dist/mcp-proxy.cjs
CHANGED
|
@@ -1,19 +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-
|
|
16
|
-
const require_deployer_screen = require("./deployer-screen-
|
|
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");
|
|
17
20
|
let node_url = require("node:url");
|
|
18
21
|
let node_path = require("node:path");
|
|
19
22
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
@@ -238,6 +241,11 @@ const ROUTING_TWO_FIT = "A transaction is a chain question: read it on `USE chai
|
|
|
238
241
|
/** The key that each layer hands to the next. Each key keeps its name. */
|
|
239
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.";
|
|
240
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
|
+
/**
|
|
241
249
|
* A whole-chain question is a time-bounded topology search, sent only when the
|
|
242
250
|
* family of its link type is close to the head; a refusal names the family.
|
|
243
251
|
*/
|
|
@@ -287,7 +295,7 @@ function routingHead() {
|
|
|
287
295
|
* one line of the served instructions.
|
|
288
296
|
*/
|
|
289
297
|
function routingHintLines() {
|
|
290
|
-
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(" ")}`];
|
|
291
299
|
}
|
|
292
300
|
// src/mcp/view-server.ts
|
|
293
301
|
/**
|
|
@@ -544,13 +552,19 @@ const JUDGEMENT_CLAIMS = Object.freeze([
|
|
|
544
552
|
value: "FAKE_TOKEN",
|
|
545
553
|
property: "risk_claims",
|
|
546
554
|
mark: "Scam",
|
|
547
|
-
plain: "a fake
|
|
555
|
+
plain: "a fake-token scam: a token that copies a listed token and was sent to holders of the real token, or used as poisoning bait"
|
|
548
556
|
},
|
|
549
557
|
{
|
|
550
558
|
value: "FAKE_TOKEN_DEPLOYER",
|
|
551
559
|
property: "risk_claims",
|
|
552
560
|
mark: "Scam",
|
|
553
|
-
plain: "the
|
|
561
|
+
plain: "the sender of the transaction that created a fake-token scam, even through a factory"
|
|
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"
|
|
554
568
|
},
|
|
555
569
|
{
|
|
556
570
|
value: "ADDRESS_POISONING",
|
|
@@ -654,6 +668,12 @@ const JUDGEMENT_CLAIMS = Object.freeze([
|
|
|
654
668
|
mark: "OnMoneyTrail",
|
|
655
669
|
plain: "it received that money and paid it into a mixer pool, where the walk ends"
|
|
656
670
|
},
|
|
671
|
+
{
|
|
672
|
+
value: "FAKE_TOKEN",
|
|
673
|
+
property: "suspect_labels",
|
|
674
|
+
mark: null,
|
|
675
|
+
plain: "a copied name: a token that copies the name of a listed token, a record that accuses nobody and is no scam"
|
|
676
|
+
},
|
|
657
677
|
{
|
|
658
678
|
value: "MIXER_DEPOSITOR",
|
|
659
679
|
property: "suspect_labels",
|
|
@@ -693,8 +713,10 @@ function gloss(property) {
|
|
|
693
713
|
*/
|
|
694
714
|
const GRAPH_QUERY_JUDGEMENT_MARKS_SENTENCE = [
|
|
695
715
|
"A risk question (is this a scam, a fake token, a poisoner, a drainer, a sweeper, a victim, on a laundering trail) is answered from the judgement marks and the claims list beside each, never volunteered on a flow question.",
|
|
696
|
-
":Scam, :Poisoned and :Sanctioned carry risk_claims, :Victim and :Targeted protection_claims, :OnMoneyTrail traced_claims, and a
|
|
697
|
-
"
|
|
716
|
+
":Scam, :Poisoned and :Sanctioned carry risk_claims, :Victim and :Targeted protection_claims, :OnMoneyTrail traced_claims, and a warning or a record that accuses nobody suspect_labels, with no mark.",
|
|
717
|
+
"FAKE_TOKEN on :Scam, in risk_claims, is a fake token with a proven act: it was sent to holders of the real token, or used as poisoning bait. FAKE_TOKEN in suspect_labels is a copied name: it accuses nobody, has no :Scam and no is_scam, and is never called a scam.",
|
|
718
|
+
"Ask by mark (fake-token scams: USE topology 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 full address.",
|
|
719
|
+
"A fake-token list asks both lists and keeps them apart: the scams above, then the copied names (USE topology MATCH (a:Token) WHERE \"FAKE_TOKEN\" IN a.suspect_labels RETURN a.address AS address, a.suspect_labels AS suspect_labels LIMIT 25). The mark is the anchor, and a WHERE on its own properties is allowed; a WHERE with no mark and no address is refused.",
|
|
698
720
|
`risk_claims: ${gloss("risk_claims")}.`,
|
|
699
721
|
`protection_claims: ${gloss("protection_claims")}. Receiving a fake token or dust never makes a victim.`,
|
|
700
722
|
`traced_claims: ${gloss("traced_claims")}.`,
|
|
@@ -823,6 +845,8 @@ const LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
823
845
|
require_dex_tool.META_DEX_LOOKUP_TOOL,
|
|
824
846
|
require_token_lookup.META_TOKEN_LOOKUP_TOOL,
|
|
825
847
|
require_deployer_screen.AML_DEPLOYER_SCREEN_TOOL,
|
|
848
|
+
require_exchange_tool.META_EXCHANGE_LOOKUP_TOOL,
|
|
849
|
+
require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_TOOL,
|
|
826
850
|
"wallet_balance",
|
|
827
851
|
"wallet_topup",
|
|
828
852
|
require_rules.SUBSCRIPTION_TOPUP_TOOL,
|
|
@@ -881,9 +905,10 @@ function resolveMcpProxyMode(env = process.env) {
|
|
|
881
905
|
if (raw === "no-workspace" || raw === "workspace-less") return "stateless";
|
|
882
906
|
throw new Error(`CHAIN_INSIGHTS_MCP_PROXY_MODE must be workspace or stateless; got "${raw}"`);
|
|
883
907
|
}
|
|
884
|
-
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
|
|
908
|
+
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.";
|
|
885
909
|
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.";
|
|
886
910
|
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.";
|
|
911
|
+
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.";
|
|
887
912
|
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.";
|
|
888
913
|
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.";
|
|
889
914
|
const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
@@ -892,12 +917,14 @@ const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
|
892
917
|
[require_dex_tool.META_DEX_LOOKUP_TOOL]: require_dex_tool.META_DEX_LOOKUP_DESCRIPTION,
|
|
893
918
|
[require_token_lookup.META_TOKEN_LOOKUP_TOOL]: require_token_lookup.META_TOKEN_LOOKUP_DESCRIPTION,
|
|
894
919
|
[require_deployer_screen.AML_DEPLOYER_SCREEN_TOOL]: require_deployer_screen.AML_DEPLOYER_SCREEN_DESCRIPTION,
|
|
920
|
+
[require_exchange_tool.META_EXCHANGE_LOOKUP_TOOL]: require_exchange_tool.META_EXCHANGE_LOOKUP_DESCRIPTION,
|
|
921
|
+
[require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_TOOL]: require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_DESCRIPTION,
|
|
895
922
|
meta_usage_status: "Return the caller's public free graph_query quota for the current UTC day.",
|
|
896
923
|
meta_subscription_status: require_rules.META_SUBSCRIPTION_STATUS_DESCRIPTION,
|
|
897
924
|
meta_help: "Show a short guide to Chain Insights tools and workflow.",
|
|
898
925
|
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 {}.",
|
|
899
926
|
wallet_balance: "Show the local Chain Insights payment wallet address, payment network, token, and amount.",
|
|
900
|
-
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 ….`,
|
|
927
|
+
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 ….`,
|
|
901
928
|
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.`
|
|
902
929
|
};
|
|
903
930
|
const KNOWN_PUBLIC_TOOL_TITLES = {
|
|
@@ -941,7 +968,7 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
941
968
|
"- 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.",
|
|
942
969
|
"- 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.",
|
|
943
970
|
"- 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.",
|
|
944
|
-
"- 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
|
|
971
|
+
"- 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, with no mark, for a warning or a record that accuses nobody. risk_claims: FAKE_TOKEN (a fake-token scam: a token that copies a listed token and was sent to holders of the real token, or used as poisoning bait), FAKE_TOKEN_DEPLOYER (the sender of the transaction that created it, even through a factory), 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: FAKE_TOKEN (a copied name: a token that copies the name of a listed token, a record that accuses nobody, with no :Scam and no is_scam, never called a scam), 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. A fake-token list asks both lists and keeps them apart: the scams above, then the copied names, MATCH (a:Token) WHERE \"FAKE_TOKEN\" IN a.suspect_labels RETURN a.address AS address, a.suspect_labels AS suspect_labels LIMIT 25. 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.",
|
|
945
972
|
"- 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.",
|
|
946
973
|
"- 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.",
|
|
947
974
|
"- 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.",
|
|
@@ -957,13 +984,13 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
957
984
|
"- 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.",
|
|
958
985
|
"- 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.",
|
|
959
986
|
"- 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.",
|
|
960
|
-
"- 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
|
|
961
|
-
"- 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.",
|
|
987
|
+
"- 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.",
|
|
988
|
+
"- 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.",
|
|
962
989
|
"- Call meta_schema {network} first when you need field names; it is cached for 24 hours. The two discovery reads below are the fallback.",
|
|
963
990
|
"- 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",
|
|
964
991
|
"- 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",
|
|
965
992
|
"- 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.",
|
|
966
|
-
"- 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
|
|
993
|
+
"- 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.",
|
|
967
994
|
"- 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.",
|
|
968
995
|
"- Use USE facts graph patterns for fact and enrichment reads. Do not query internal table namespaces directly."
|
|
969
996
|
].join("\n");
|
|
@@ -1693,6 +1720,34 @@ async function createProxy() {
|
|
|
1693
1720
|
},
|
|
1694
1721
|
annotations: require_deployer_screen.AML_DEPLOYER_SCREEN_ANNOTATIONS
|
|
1695
1722
|
}, async (args) => require_deployer_screen.handleAmlDeployerScreen(args, tokenDependencies));
|
|
1723
|
+
const loadExchanges = (network) => require_exchange_registry.loadExchangeRegistry(network, { log: (line) => {
|
|
1724
|
+
logger.info("exchange_registry.fault", { line });
|
|
1725
|
+
} });
|
|
1726
|
+
server.registerTool(require_exchange_tool.META_EXCHANGE_LOOKUP_TOOL, {
|
|
1727
|
+
title: require_exchange_tool.META_EXCHANGE_LOOKUP_TITLE,
|
|
1728
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[require_exchange_tool.META_EXCHANGE_LOOKUP_TOOL],
|
|
1729
|
+
inputSchema: {
|
|
1730
|
+
network: NETWORK_SCHEMA,
|
|
1731
|
+
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."),
|
|
1732
|
+
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.")
|
|
1733
|
+
},
|
|
1734
|
+
annotations: require_exchange_tool.META_EXCHANGE_LOOKUP_ANNOTATIONS
|
|
1735
|
+
}, async (args) => require_exchange_tool.handleMetaExchangeLookup(args, { loadExchangeRegistry: loadExchanges }));
|
|
1736
|
+
const depositCheckDependencies = {
|
|
1737
|
+
loadExchangeRegistry: loadExchanges,
|
|
1738
|
+
graphQueryBatch: tokenDependencies.graphQueryBatch,
|
|
1739
|
+
unavailable: tokenDependencies.unavailable,
|
|
1740
|
+
describeFailure: dexDependencies.describeFailure
|
|
1741
|
+
};
|
|
1742
|
+
server.registerTool(require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_TOOL, {
|
|
1743
|
+
title: require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_TITLE,
|
|
1744
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_TOOL],
|
|
1745
|
+
inputSchema: {
|
|
1746
|
+
network: NETWORK_SCHEMA,
|
|
1747
|
+
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.")
|
|
1748
|
+
},
|
|
1749
|
+
annotations: require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_ANNOTATIONS
|
|
1750
|
+
}, async (args) => require_exchange_deposit_check.handleAmlExchangeDepositCheck(args, depositCheckDependencies));
|
|
1696
1751
|
const readUsageStatus = async () => {
|
|
1697
1752
|
try {
|
|
1698
1753
|
await ensureRemote();
|
|
@@ -1942,6 +1997,8 @@ async function createProxy() {
|
|
|
1942
1997
|
"- 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.",
|
|
1943
1998
|
"- 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.",
|
|
1944
1999
|
"- 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.",
|
|
2000
|
+
"- 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.",
|
|
2001
|
+
"- 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.",
|
|
1945
2002
|
"- meta_usage_status: check the caller public free graph_query quota.",
|
|
1946
2003
|
"- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
|
|
1947
2004
|
"- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
|
|
@@ -1964,6 +2021,8 @@ async function createProxy() {
|
|
|
1964
2021
|
"- 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.",
|
|
1965
2022
|
"- 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.",
|
|
1966
2023
|
"- 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.",
|
|
2024
|
+
"- 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.",
|
|
2025
|
+
"- 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.",
|
|
1967
2026
|
"- meta_usage_status: check the caller public free graph_query quota.",
|
|
1968
2027
|
"- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
|
|
1969
2028
|
"- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
|
|
@@ -2075,6 +2134,7 @@ if (process.argv[1] && require("url").pathToFileURL(__filename).href.includes(pr
|
|
|
2075
2134
|
});
|
|
2076
2135
|
exports.APP_ONLY_LOCAL_TOOL_NAMES = APP_ONLY_LOCAL_TOOL_NAMES;
|
|
2077
2136
|
exports.CLAUDE_VIEW_URI = CLAUDE_VIEW_URI;
|
|
2137
|
+
exports.GRAPH_QUERY_CEX_DOOR_SENTENCE = GRAPH_QUERY_CEX_DOOR_SENTENCE;
|
|
2078
2138
|
exports.GRAPH_QUERY_DEX_DOOR_SENTENCE = GRAPH_QUERY_DEX_DOOR_SENTENCE;
|
|
2079
2139
|
exports.GRAPH_QUERY_ROLE_MARKS_SENTENCE = GRAPH_QUERY_ROLE_MARKS_SENTENCE;
|
|
2080
2140
|
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,17 +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-
|
|
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-
|
|
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";
|
|
15
18
|
import { fileURLToPath } from "node:url";
|
|
16
19
|
import path from "node:path";
|
|
17
20
|
import { readFileSync } from "node:fs";
|
|
@@ -234,6 +237,11 @@ const ROUTING_TWO_FIT = "A transaction is a chain question: read it on `USE chai
|
|
|
234
237
|
/** The key that each layer hands to the next. Each key keeps its name. */
|
|
235
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.";
|
|
236
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
|
+
/**
|
|
237
245
|
* A whole-chain question is a time-bounded topology search, sent only when the
|
|
238
246
|
* family of its link type is close to the head; a refusal names the family.
|
|
239
247
|
*/
|
|
@@ -283,7 +291,7 @@ function routingHead() {
|
|
|
283
291
|
* one line of the served instructions.
|
|
284
292
|
*/
|
|
285
293
|
function routingHintLines() {
|
|
286
|
-
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(" ")}`];
|
|
287
295
|
}
|
|
288
296
|
// src/mcp/view-server.ts
|
|
289
297
|
/**
|
|
@@ -540,13 +548,19 @@ const JUDGEMENT_CLAIMS = Object.freeze([
|
|
|
540
548
|
value: "FAKE_TOKEN",
|
|
541
549
|
property: "risk_claims",
|
|
542
550
|
mark: "Scam",
|
|
543
|
-
plain: "a fake
|
|
551
|
+
plain: "a fake-token scam: a token that copies a listed token and was sent to holders of the real token, or used as poisoning bait"
|
|
544
552
|
},
|
|
545
553
|
{
|
|
546
554
|
value: "FAKE_TOKEN_DEPLOYER",
|
|
547
555
|
property: "risk_claims",
|
|
548
556
|
mark: "Scam",
|
|
549
|
-
plain: "the
|
|
557
|
+
plain: "the sender of the transaction that created a fake-token scam, even through a factory"
|
|
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"
|
|
550
564
|
},
|
|
551
565
|
{
|
|
552
566
|
value: "ADDRESS_POISONING",
|
|
@@ -650,6 +664,12 @@ const JUDGEMENT_CLAIMS = Object.freeze([
|
|
|
650
664
|
mark: "OnMoneyTrail",
|
|
651
665
|
plain: "it received that money and paid it into a mixer pool, where the walk ends"
|
|
652
666
|
},
|
|
667
|
+
{
|
|
668
|
+
value: "FAKE_TOKEN",
|
|
669
|
+
property: "suspect_labels",
|
|
670
|
+
mark: null,
|
|
671
|
+
plain: "a copied name: a token that copies the name of a listed token, a record that accuses nobody and is no scam"
|
|
672
|
+
},
|
|
653
673
|
{
|
|
654
674
|
value: "MIXER_DEPOSITOR",
|
|
655
675
|
property: "suspect_labels",
|
|
@@ -689,8 +709,10 @@ function gloss(property) {
|
|
|
689
709
|
*/
|
|
690
710
|
const GRAPH_QUERY_JUDGEMENT_MARKS_SENTENCE = [
|
|
691
711
|
"A risk question (is this a scam, a fake token, a poisoner, a drainer, a sweeper, a victim, on a laundering trail) is answered from the judgement marks and the claims list beside each, never volunteered on a flow question.",
|
|
692
|
-
":Scam, :Poisoned and :Sanctioned carry risk_claims, :Victim and :Targeted protection_claims, :OnMoneyTrail traced_claims, and a
|
|
693
|
-
"
|
|
712
|
+
":Scam, :Poisoned and :Sanctioned carry risk_claims, :Victim and :Targeted protection_claims, :OnMoneyTrail traced_claims, and a warning or a record that accuses nobody suspect_labels, with no mark.",
|
|
713
|
+
"FAKE_TOKEN on :Scam, in risk_claims, is a fake token with a proven act: it was sent to holders of the real token, or used as poisoning bait. FAKE_TOKEN in suspect_labels is a copied name: it accuses nobody, has no :Scam and no is_scam, and is never called a scam.",
|
|
714
|
+
"Ask by mark (fake-token scams: USE topology 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 full address.",
|
|
715
|
+
"A fake-token list asks both lists and keeps them apart: the scams above, then the copied names (USE topology MATCH (a:Token) WHERE \"FAKE_TOKEN\" IN a.suspect_labels RETURN a.address AS address, a.suspect_labels AS suspect_labels LIMIT 25). The mark is the anchor, and a WHERE on its own properties is allowed; a WHERE with no mark and no address is refused.",
|
|
694
716
|
`risk_claims: ${gloss("risk_claims")}.`,
|
|
695
717
|
`protection_claims: ${gloss("protection_claims")}. Receiving a fake token or dust never makes a victim.`,
|
|
696
718
|
`traced_claims: ${gloss("traced_claims")}.`,
|
|
@@ -819,6 +841,8 @@ const LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
819
841
|
META_DEX_LOOKUP_TOOL,
|
|
820
842
|
META_TOKEN_LOOKUP_TOOL,
|
|
821
843
|
AML_DEPLOYER_SCREEN_TOOL,
|
|
844
|
+
META_EXCHANGE_LOOKUP_TOOL,
|
|
845
|
+
AML_EXCHANGE_DEPOSIT_CHECK_TOOL,
|
|
822
846
|
"wallet_balance",
|
|
823
847
|
"wallet_topup",
|
|
824
848
|
SUBSCRIPTION_TOPUP_TOOL,
|
|
@@ -877,9 +901,10 @@ function resolveMcpProxyMode(env = process.env) {
|
|
|
877
901
|
if (raw === "no-workspace" || raw === "workspace-less") return "stateless";
|
|
878
902
|
throw new Error(`CHAIN_INSIGHTS_MCP_PROXY_MODE must be workspace or stateless; got "${raw}"`);
|
|
879
903
|
}
|
|
880
|
-
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
|
|
904
|
+
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.";
|
|
881
905
|
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.";
|
|
882
906
|
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.";
|
|
907
|
+
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.";
|
|
883
908
|
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.";
|
|
884
909
|
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.";
|
|
885
910
|
const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
@@ -888,12 +913,14 @@ const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
|
888
913
|
[META_DEX_LOOKUP_TOOL]: META_DEX_LOOKUP_DESCRIPTION,
|
|
889
914
|
[META_TOKEN_LOOKUP_TOOL]: META_TOKEN_LOOKUP_DESCRIPTION,
|
|
890
915
|
[AML_DEPLOYER_SCREEN_TOOL]: AML_DEPLOYER_SCREEN_DESCRIPTION,
|
|
916
|
+
[META_EXCHANGE_LOOKUP_TOOL]: META_EXCHANGE_LOOKUP_DESCRIPTION,
|
|
917
|
+
[AML_EXCHANGE_DEPOSIT_CHECK_TOOL]: AML_EXCHANGE_DEPOSIT_CHECK_DESCRIPTION,
|
|
891
918
|
meta_usage_status: "Return the caller's public free graph_query quota for the current UTC day.",
|
|
892
919
|
meta_subscription_status: META_SUBSCRIPTION_STATUS_DESCRIPTION,
|
|
893
920
|
meta_help: "Show a short guide to Chain Insights tools and workflow.",
|
|
894
921
|
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 {}.",
|
|
895
922
|
wallet_balance: "Show the local Chain Insights payment wallet address, payment network, token, and amount.",
|
|
896
|
-
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 ….`,
|
|
923
|
+
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 ….`,
|
|
897
924
|
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.`
|
|
898
925
|
};
|
|
899
926
|
const KNOWN_PUBLIC_TOOL_TITLES = {
|
|
@@ -937,7 +964,7 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
937
964
|
"- 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.",
|
|
938
965
|
"- 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.",
|
|
939
966
|
"- 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.",
|
|
940
|
-
"- 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
|
|
967
|
+
"- 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, with no mark, for a warning or a record that accuses nobody. risk_claims: FAKE_TOKEN (a fake-token scam: a token that copies a listed token and was sent to holders of the real token, or used as poisoning bait), FAKE_TOKEN_DEPLOYER (the sender of the transaction that created it, even through a factory), 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: FAKE_TOKEN (a copied name: a token that copies the name of a listed token, a record that accuses nobody, with no :Scam and no is_scam, never called a scam), 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. A fake-token list asks both lists and keeps them apart: the scams above, then the copied names, MATCH (a:Token) WHERE \"FAKE_TOKEN\" IN a.suspect_labels RETURN a.address AS address, a.suspect_labels AS suspect_labels LIMIT 25. 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.",
|
|
941
968
|
"- 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.",
|
|
942
969
|
"- 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.",
|
|
943
970
|
"- 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.",
|
|
@@ -953,13 +980,13 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
953
980
|
"- 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.",
|
|
954
981
|
"- 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.",
|
|
955
982
|
"- 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.",
|
|
956
|
-
"- 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
|
|
957
|
-
"- 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.",
|
|
983
|
+
"- 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.",
|
|
984
|
+
"- 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.",
|
|
958
985
|
"- Call meta_schema {network} first when you need field names; it is cached for 24 hours. The two discovery reads below are the fallback.",
|
|
959
986
|
"- 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",
|
|
960
987
|
"- 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",
|
|
961
988
|
"- 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.",
|
|
962
|
-
"- 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
|
|
989
|
+
"- 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.",
|
|
963
990
|
"- 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.",
|
|
964
991
|
"- Use USE facts graph patterns for fact and enrichment reads. Do not query internal table namespaces directly."
|
|
965
992
|
].join("\n");
|
|
@@ -1689,6 +1716,34 @@ async function createProxy() {
|
|
|
1689
1716
|
},
|
|
1690
1717
|
annotations: AML_DEPLOYER_SCREEN_ANNOTATIONS
|
|
1691
1718
|
}, async (args) => handleAmlDeployerScreen(args, tokenDependencies));
|
|
1719
|
+
const loadExchanges = (network) => loadExchangeRegistry(network, { log: (line) => {
|
|
1720
|
+
logger.info("exchange_registry.fault", { line });
|
|
1721
|
+
} });
|
|
1722
|
+
server.registerTool(META_EXCHANGE_LOOKUP_TOOL, {
|
|
1723
|
+
title: META_EXCHANGE_LOOKUP_TITLE,
|
|
1724
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[META_EXCHANGE_LOOKUP_TOOL],
|
|
1725
|
+
inputSchema: {
|
|
1726
|
+
network: NETWORK_SCHEMA,
|
|
1727
|
+
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."),
|
|
1728
|
+
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.")
|
|
1729
|
+
},
|
|
1730
|
+
annotations: META_EXCHANGE_LOOKUP_ANNOTATIONS
|
|
1731
|
+
}, async (args) => handleMetaExchangeLookup(args, { loadExchangeRegistry: loadExchanges }));
|
|
1732
|
+
const depositCheckDependencies = {
|
|
1733
|
+
loadExchangeRegistry: loadExchanges,
|
|
1734
|
+
graphQueryBatch: tokenDependencies.graphQueryBatch,
|
|
1735
|
+
unavailable: tokenDependencies.unavailable,
|
|
1736
|
+
describeFailure: dexDependencies.describeFailure
|
|
1737
|
+
};
|
|
1738
|
+
server.registerTool(AML_EXCHANGE_DEPOSIT_CHECK_TOOL, {
|
|
1739
|
+
title: AML_EXCHANGE_DEPOSIT_CHECK_TITLE,
|
|
1740
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[AML_EXCHANGE_DEPOSIT_CHECK_TOOL],
|
|
1741
|
+
inputSchema: {
|
|
1742
|
+
network: NETWORK_SCHEMA,
|
|
1743
|
+
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.")
|
|
1744
|
+
},
|
|
1745
|
+
annotations: AML_EXCHANGE_DEPOSIT_CHECK_ANNOTATIONS
|
|
1746
|
+
}, async (args) => handleAmlExchangeDepositCheck(args, depositCheckDependencies));
|
|
1692
1747
|
const readUsageStatus = async () => {
|
|
1693
1748
|
try {
|
|
1694
1749
|
await ensureRemote();
|
|
@@ -1938,6 +1993,8 @@ async function createProxy() {
|
|
|
1938
1993
|
"- 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.",
|
|
1939
1994
|
"- 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.",
|
|
1940
1995
|
"- 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.",
|
|
1996
|
+
"- 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.",
|
|
1997
|
+
"- 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.",
|
|
1941
1998
|
"- meta_usage_status: check the caller public free graph_query quota.",
|
|
1942
1999
|
"- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
|
|
1943
2000
|
"- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
|
|
@@ -1960,6 +2017,8 @@ async function createProxy() {
|
|
|
1960
2017
|
"- 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.",
|
|
1961
2018
|
"- 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.",
|
|
1962
2019
|
"- 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.",
|
|
2020
|
+
"- 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.",
|
|
2021
|
+
"- 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.",
|
|
1963
2022
|
"- meta_usage_status: check the caller public free graph_query quota.",
|
|
1964
2023
|
"- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
|
|
1965
2024
|
"- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
|
|
@@ -2069,6 +2128,6 @@ if (process.argv[1] && import.meta.url.includes(process.argv[1].replace(/\\/g, "
|
|
|
2069
2128
|
process.stderr.write(`Chain Insights MCP proxy startup failed: ${err.message}\n`);
|
|
2070
2129
|
process.exit(1);
|
|
2071
2130
|
});
|
|
2072
|
-
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 };
|
|
2131
|
+
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 };
|
|
2073
2132
|
|
|
2074
2133
|
//# sourceMappingURL=mcp-proxy.mjs.map
|