chain-insights 0.85.2 → 0.92.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 +2 -0
- package/bin/install.cjs +2 -1
- package/dist/{active-q3yViZhc.cjs → active-COPA14FA.cjs} +2 -16
- package/dist/{active-D2aabYRF.mjs → active-CyC4jFka.mjs} +2 -7
- package/dist/{active-D2aabYRF.mjs.map → active-CyC4jFka.mjs.map} +1 -1
- package/dist/address-card-C-NB03XP.cjs +218 -0
- package/dist/address-card-LYaT5yz0.mjs +190 -0
- package/dist/address-card-LYaT5yz0.mjs.map +1 -0
- package/dist/address-risk-DPuXBsvH.cjs +806 -0
- package/dist/address-risk-Da6FsfGx.mjs +653 -0
- package/dist/address-risk-Da6FsfGx.mjs.map +1 -0
- package/dist/{capabilities-Mxa4oQdd.cjs → capabilities-DkNreyv7.cjs} +1 -1
- package/dist/{capabilities-bZOr5Ads.mjs → capabilities-w5bNR7F9.mjs} +2 -2
- package/dist/{capabilities-bZOr5Ads.mjs.map → capabilities-w5bNR7F9.mjs.map} +1 -1
- package/dist/cli.cjs +138 -46
- package/dist/cli.mjs +138 -46
- package/dist/cli.mjs.map +1 -1
- package/dist/{deployer-screen-B5yrXZGo.mjs → deployer-screen-Bkw_sz94.mjs} +3 -3
- package/dist/{deployer-screen-B5yrXZGo.mjs.map → deployer-screen-Bkw_sz94.mjs.map} +1 -1
- package/dist/{deployer-screen-0SOQ_HFf.cjs → deployer-screen-CFLi7OeH.cjs} +2 -2
- package/dist/{dex-registry-BY67f4Ul.mjs → dex-registry-Bkri0--q.mjs} +10 -2
- package/dist/{dex-registry-BY67f4Ul.mjs.map → dex-registry-Bkri0--q.mjs.map} +1 -1
- package/dist/{dex-registry-BhGJUG9_.cjs → dex-registry-CyR3GyRr.cjs} +20 -0
- package/dist/{dex-tool-7BK_gD6H.mjs → dex-tool-D0K_Qx4N.mjs} +4 -4
- package/dist/dex-tool-D0K_Qx4N.mjs.map +1 -0
- package/dist/{dex-tool-Be9NAuD8.cjs → dex-tool-DQ5Eg0LO.cjs} +3 -3
- package/dist/{exchange-deposit-check-C5MseGlZ.cjs → exchange-deposit-check-BNzkwQeW.cjs} +18 -18
- package/dist/{exchange-deposit-check-CXHZCHWW.mjs → exchange-deposit-check-DIALj2sm.mjs} +19 -19
- package/dist/exchange-deposit-check-DIALj2sm.mjs.map +1 -0
- package/dist/{exchange-registry-CT0rRW__.cjs → exchange-registry-CEgkeQV1.cjs} +16 -93
- package/dist/{exchange-registry-CoLgHw6d.mjs → exchange-registry-Dr5UtcT5.mjs} +17 -94
- package/dist/exchange-registry-Dr5UtcT5.mjs.map +1 -0
- package/dist/{exchange-tool-Dc46SJ49.mjs → exchange-tool-B7E29YoQ.mjs} +4 -4
- package/dist/exchange-tool-B7E29YoQ.mjs.map +1 -0
- package/dist/{exchange-tool-B2SMeC5f.cjs → exchange-tool-CXaUBAd2.cjs} +3 -3
- package/dist/{graph-schema-CcrYPpSv.cjs → graph-schema-Bn3txQCj.cjs} +115 -12
- package/dist/{graph-schema-CRQuKya1.mjs → graph-schema-DvABR1yl.mjs} +97 -12
- package/dist/graph-schema-DvABR1yl.mjs.map +1 -0
- package/dist/{layer-routing-YDj-ynG9.cjs → layer-routing-j48SQ8Wk.cjs} +2 -2
- package/dist/{layer-routing-DCJVNN6O.mjs → layer-routing-r4IbIQSr.mjs} +3 -3
- package/dist/layer-routing-r4IbIQSr.mjs.map +1 -0
- package/dist/mcp-proxy.cjs +62 -15
- package/dist/mcp-proxy.d.cts.map +1 -1
- package/dist/mcp-proxy.d.mts.map +1 -1
- package/dist/mcp-proxy.mjs +62 -15
- package/dist/mcp-proxy.mjs.map +1 -1
- package/dist/public-file-BISyAesm.mjs +133 -0
- package/dist/public-file-BISyAesm.mjs.map +1 -0
- package/dist/public-file-DDp2CrUl.cjs +138 -0
- package/dist/{request-timeout-DxwNijQD.cjs → request-timeout-BXiIt9Jy.cjs} +0 -1
- package/dist/{request-timeout-K3ljP0pa.mjs → request-timeout-DetG2xO4.mjs} +2 -2
- package/dist/{request-timeout-K3ljP0pa.mjs.map → request-timeout-DetG2xO4.mjs.map} +1 -1
- package/dist/{token-lookup-Cf59VdGe.mjs → token-lookup-Ck0q7crJ.mjs} +2 -2
- package/dist/{token-lookup-Cf59VdGe.mjs.map → token-lookup-Ck0q7crJ.mjs.map} +1 -1
- package/dist/{token-lookup-DqjSRIxd.cjs → token-lookup-DLe4erP9.cjs} +1 -1
- package/dist/token-risk-CpMfFRoY.cjs +1004 -0
- package/dist/token-risk-DhnJc2kJ.mjs +971 -0
- package/dist/token-risk-DhnJc2kJ.mjs.map +1 -0
- package/dist/{tool-visibility-D8Up081E.cjs → tool-visibility-BCa-tmyZ.cjs} +11 -2
- package/dist/{tool-visibility-DuTds7V4.mjs → tool-visibility-BstrSl4s.mjs} +12 -3
- package/dist/tool-visibility-BstrSl4s.mjs.map +1 -0
- package/docs/contributing.md +10 -8
- package/docs/development.md +5 -5
- package/docs/evals.md +16 -1
- package/docs/graph-query-compatibility.md +15 -2
- package/docs/graph-tools.md +44 -6
- package/docs/mcp-proxy.md +189 -8
- package/docs/stability.md +4 -5
- package/docs/testing.md +76 -0
- package/package.json +1 -1
- package/registry/README.md +20 -5
- package/registry/address-card.json +680 -0
- package/skills/chain-insights-address-risk/SKILL.md +61 -0
- package/skills/chain-insights-address-risk/agents/openai.yaml +4 -0
- package/skills/chain-insights-aml-exchange/SKILL.md +9 -7
- package/skills/chain-insights-cypher/SKILL.md +79 -3
- package/skills/chain-insights-token-risk/SKILL.md +81 -0
- package/skills/chain-insights-token-risk/agents/openai.yaml +4 -0
- package/skills/chain-insights-virtuals/reference.md +1 -1
- package/dist/dex-tool-7BK_gD6H.mjs.map +0 -1
- package/dist/exchange-deposit-check-CXHZCHWW.mjs.map +0 -1
- package/dist/exchange-registry-CoLgHw6d.mjs.map +0 -1
- package/dist/exchange-tool-Dc46SJ49.mjs.map +0 -1
- package/dist/graph-schema-CRQuKya1.mjs.map +0 -1
- package/dist/layer-routing-DCJVNN6O.mjs.map +0 -1
- package/dist/public-tools-CBszU2oX.cjs +0 -1334
- package/dist/public-tools-DVhUjSDV.mjs +0 -1333
- package/dist/public-tools-DVhUjSDV.mjs.map +0 -1
- package/dist/tool-visibility-DuTds7V4.mjs.map +0 -1
package/dist/mcp-proxy.cjs
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
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-BCa-tmyZ.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
|
-
const require_capabilities = require("./capabilities-
|
|
10
|
-
const require_layer_routing = require("./layer-routing-
|
|
11
|
-
const require_graph_schema = require("./graph-schema-
|
|
9
|
+
const require_capabilities = require("./capabilities-DkNreyv7.cjs");
|
|
10
|
+
const require_layer_routing = require("./layer-routing-j48SQ8Wk.cjs");
|
|
11
|
+
const require_graph_schema = require("./graph-schema-Bn3txQCj.cjs");
|
|
12
12
|
const require_action_log = require("./action-log-WMW6xFMx.cjs");
|
|
13
13
|
const require_answer_hint = require("./answer-hint-BlYEBq_Y.cjs");
|
|
14
|
-
const require_dex_tool = require("./dex-tool-
|
|
15
|
-
const require_dex_registry = require("./dex-registry-
|
|
16
|
-
const require_token_lookup = require("./token-lookup-
|
|
17
|
-
const require_deployer_screen = require("./deployer-screen-
|
|
18
|
-
const require_exchange_tool = require("./exchange-tool-
|
|
19
|
-
const require_exchange_deposit_check = require("./exchange-deposit-check-
|
|
20
|
-
const require_exchange_registry = require("./exchange-registry-
|
|
14
|
+
const require_dex_tool = require("./dex-tool-DQ5Eg0LO.cjs");
|
|
15
|
+
const require_dex_registry = require("./dex-registry-CyR3GyRr.cjs");
|
|
16
|
+
const require_token_lookup = require("./token-lookup-DLe4erP9.cjs");
|
|
17
|
+
const require_deployer_screen = require("./deployer-screen-CFLi7OeH.cjs");
|
|
18
|
+
const require_exchange_tool = require("./exchange-tool-CXaUBAd2.cjs");
|
|
19
|
+
const require_exchange_deposit_check = require("./exchange-deposit-check-BNzkwQeW.cjs");
|
|
20
|
+
const require_exchange_registry = require("./exchange-registry-CEgkeQV1.cjs");
|
|
21
|
+
const require_address_card = require("./address-card-C-NB03XP.cjs");
|
|
22
|
+
const require_address_risk = require("./address-risk-DPuXBsvH.cjs");
|
|
23
|
+
const require_token_risk = require("./token-risk-CpMfFRoY.cjs");
|
|
21
24
|
let node_url = require("node:url");
|
|
22
25
|
let node_path = require("node:path");
|
|
23
26
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
@@ -776,6 +779,8 @@ const LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
776
779
|
require_deployer_screen.AML_DEPLOYER_SCREEN_TOOL,
|
|
777
780
|
require_exchange_tool.META_EXCHANGE_LOOKUP_TOOL,
|
|
778
781
|
require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_TOOL,
|
|
782
|
+
require_address_risk.AML_ADDRESS_RISK_TOOL,
|
|
783
|
+
require_token_risk.AML_TOKEN_RISK_TOOL,
|
|
779
784
|
"wallet_balance",
|
|
780
785
|
"wallet_topup",
|
|
781
786
|
require_rules.SUBSCRIPTION_TOPUP_TOOL,
|
|
@@ -848,12 +853,14 @@ const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
|
848
853
|
[require_deployer_screen.AML_DEPLOYER_SCREEN_TOOL]: require_deployer_screen.AML_DEPLOYER_SCREEN_DESCRIPTION,
|
|
849
854
|
[require_exchange_tool.META_EXCHANGE_LOOKUP_TOOL]: require_exchange_tool.META_EXCHANGE_LOOKUP_DESCRIPTION,
|
|
850
855
|
[require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_TOOL]: require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_DESCRIPTION,
|
|
856
|
+
[require_address_risk.AML_ADDRESS_RISK_TOOL]: require_address_risk.AML_ADDRESS_RISK_DESCRIPTION,
|
|
857
|
+
[require_token_risk.AML_TOKEN_RISK_TOOL]: require_token_risk.AML_TOKEN_RISK_DESCRIPTION,
|
|
851
858
|
meta_usage_status: "Return the caller's public free graph_query quota for the current UTC day.",
|
|
852
859
|
meta_subscription_status: require_rules.META_SUBSCRIPTION_STATUS_DESCRIPTION,
|
|
853
860
|
meta_help: "Show a short guide to Chain Insights tools and workflow.",
|
|
854
861
|
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 {}.",
|
|
855
862
|
wallet_balance: "Show the local Chain Insights payment wallet address, payment network, token, and amount.",
|
|
856
|
-
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} ${require_graph_schema.GRAPH_QUERY_CONTRACT_READ_SENTENCE} ${GRAPH_QUERY_ROLE_MARKS_SENTENCE} ${GRAPH_QUERY_JUDGEMENT_MARKS_SENTENCE} ${require_layer_routing.levelLines().join(" ")} ${require_layer_routing.ROUTING_NOT_SERVED} Preserve full addresses exactly, and write every address in full, all 42 characters, in your answer: never shorten one with ... or ….`,
|
|
863
|
+
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} ${require_graph_schema.GRAPH_QUERY_CONTRACT_READ_SENTENCE} ${GRAPH_QUERY_ROLE_MARKS_SENTENCE} ${GRAPH_QUERY_JUDGEMENT_MARKS_SENTENCE} ${require_graph_schema.GRAPH_QUERY_BEHAVIOUR_SENTENCE} ${require_layer_routing.levelLines().join(" ")} ${require_layer_routing.ROUTING_NOT_SERVED} Preserve full addresses exactly, and write every address in full, all 42 characters, in your answer: never shorten one with ... or ….`,
|
|
857
864
|
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. ${require_graph_schema.GRAPH_QUERY_CONTRACT_READ_SENTENCE} Write every address in full in your answer, all 42 characters.`
|
|
858
865
|
};
|
|
859
866
|
const KNOWN_PUBLIC_TOOL_TITLES = {
|
|
@@ -899,6 +906,7 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
899
906
|
"- 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: a facts read that names :Account, or :Contract at an end of a relationship, is refused, so ask USE topology or USE chain. One Contract node read by its address is another read, see One contract by its address below. 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.",
|
|
900
907
|
"- 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.",
|
|
901
908
|
"- 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.",
|
|
909
|
+
require_graph_schema.BEHAVIOUR_HINT,
|
|
902
910
|
"- 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; on a lane whose money family lists ROUTED_TO they count funds between addresses (FLOWED_TO) only, not swaps, so what an address got from a swap is on its ROUTED_TO links (bought_usd_sum), and a pool, a pool manager or a bonding curve has none of these totals there: its trade is the sum of its SWAPPED links (sold_usd, swap_count) — 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.",
|
|
903
911
|
"- 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.",
|
|
904
912
|
"- 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) and one Contract by its address; lifetime address metrics (degrees, totals, activity window) are node properties on USE topology.",
|
|
@@ -915,7 +923,7 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
915
923
|
"- 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.",
|
|
916
924
|
"- 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.",
|
|
917
925
|
"- 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.",
|
|
918
|
-
"- 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;
|
|
926
|
+
"- 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; exchange_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.",
|
|
919
927
|
"- 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.",
|
|
920
928
|
"- Call meta_schema {network} first when you need field names; it is cached for 24 hours. The two discovery reads below are the fallback.",
|
|
921
929
|
"- 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",
|
|
@@ -1348,7 +1356,7 @@ function jsonTextResult(structuredContent) {
|
|
|
1348
1356
|
*/
|
|
1349
1357
|
async function createProxy() {
|
|
1350
1358
|
const { loadConfig } = await Promise.resolve().then(() => require("./config-BdE8LcF-.cjs")).then((n) => n.config_exports);
|
|
1351
|
-
const { activeDataDir, findActiveWorkspace } = await Promise.resolve().then(() => require("./active-
|
|
1359
|
+
const { activeDataDir, findActiveWorkspace } = await Promise.resolve().then(() => require("./active-COPA14FA.cjs"));
|
|
1352
1360
|
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-Ddk4X9Ko.cjs")).then((n) => n.client_exports);
|
|
1353
1361
|
const { loadSchema, saveSchema } = await Promise.resolve().then(() => require("./schema-cache-NLgJmh4X.cjs"));
|
|
1354
1362
|
const proxyMode = resolveMcpProxyMode();
|
|
@@ -1563,6 +1571,9 @@ async function createProxy() {
|
|
|
1563
1571
|
}
|
|
1564
1572
|
return jsonTextResult(cleanNetworkCapabilities(void 0));
|
|
1565
1573
|
});
|
|
1574
|
+
const loadCard = () => require_address_card.loadAddressCard({ log: (line) => {
|
|
1575
|
+
logger.info("address_card.fault", { line });
|
|
1576
|
+
} });
|
|
1566
1577
|
const schemaDependencies = {
|
|
1567
1578
|
endpoint: graphMcpEndpoint,
|
|
1568
1579
|
withClient: async (fn) => {
|
|
@@ -1570,7 +1581,8 @@ async function createProxy() {
|
|
|
1570
1581
|
if (!remoteConnected) throw new require_graph_schema.GraphSchemaError(`${remoteUnavailableMessage ?? `Chain Insights Graph is not connected at ${graphMcpEndpoint}`}. Restart the Chain Insights MCP proxy after the endpoint is reachable.`);
|
|
1571
1582
|
return fn(remoteClient);
|
|
1572
1583
|
},
|
|
1573
|
-
describeFailure: (err) => remoteCallFailureText("meta_schema", err)
|
|
1584
|
+
describeFailure: (err) => remoteCallFailureText("meta_schema", err),
|
|
1585
|
+
loadAddressCard: loadCard
|
|
1574
1586
|
};
|
|
1575
1587
|
server.registerTool("meta_schema", {
|
|
1576
1588
|
title: require_graph_schema.META_SCHEMA_TITLE,
|
|
@@ -1684,6 +1696,37 @@ async function createProxy() {
|
|
|
1684
1696
|
},
|
|
1685
1697
|
annotations: require_exchange_deposit_check.AML_EXCHANGE_DEPOSIT_CHECK_ANNOTATIONS
|
|
1686
1698
|
}, async (args) => require_exchange_deposit_check.handleAmlExchangeDepositCheck(args, depositCheckDependencies));
|
|
1699
|
+
const addressRiskDependencies = {
|
|
1700
|
+
loadAddressCard: loadCard,
|
|
1701
|
+
loadExchangeRegistry: loadExchanges,
|
|
1702
|
+
graphQueryBatch: tokenDependencies.graphQueryBatch,
|
|
1703
|
+
unavailable: tokenDependencies.unavailable,
|
|
1704
|
+
describeFailure: dexDependencies.describeFailure
|
|
1705
|
+
};
|
|
1706
|
+
server.registerTool(require_address_risk.AML_ADDRESS_RISK_TOOL, {
|
|
1707
|
+
title: require_address_risk.AML_ADDRESS_RISK_TITLE,
|
|
1708
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[require_address_risk.AML_ADDRESS_RISK_TOOL],
|
|
1709
|
+
inputSchema: {
|
|
1710
|
+
network: NETWORK_SCHEMA,
|
|
1711
|
+
address: zod.string().min(1).describe("The address to screen: 0x plus 40 hex characters, any case. A name or a ticker is not an address: call meta_token_lookup or meta_exchange_lookup first."),
|
|
1712
|
+
surroundings: zod.boolean().optional().describe("true adds the nodes and money links behind the answer, for a host that draws. Off unless asked for.")
|
|
1713
|
+
},
|
|
1714
|
+
annotations: require_address_risk.AML_ADDRESS_RISK_ANNOTATIONS
|
|
1715
|
+
}, async (args) => require_address_risk.handleAmlAddressRisk(args, addressRiskDependencies));
|
|
1716
|
+
const tokenRiskDependencies = {
|
|
1717
|
+
...addressRiskDependencies,
|
|
1718
|
+
loadDexRegistry: dexDependencies.loadRegistry
|
|
1719
|
+
};
|
|
1720
|
+
server.registerTool(require_token_risk.AML_TOKEN_RISK_TOOL, {
|
|
1721
|
+
title: require_token_risk.AML_TOKEN_RISK_TITLE,
|
|
1722
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[require_token_risk.AML_TOKEN_RISK_TOOL],
|
|
1723
|
+
inputSchema: {
|
|
1724
|
+
network: NETWORK_SCHEMA,
|
|
1725
|
+
address: zod.string().min(1).describe("The token contract or the pool: 0x plus 40 hex characters, any case. A ticker is not an address: call meta_token_lookup first. A wallet goes to aml_address_risk."),
|
|
1726
|
+
surroundings: zod.boolean().optional().describe("true adds the nodes and links behind the answer, for a host that draws. Off unless asked for.")
|
|
1727
|
+
},
|
|
1728
|
+
annotations: require_token_risk.AML_TOKEN_RISK_ANNOTATIONS
|
|
1729
|
+
}, async (args) => require_token_risk.handleAmlTokenRisk(args, tokenRiskDependencies));
|
|
1687
1730
|
const readUsageStatus = async () => {
|
|
1688
1731
|
try {
|
|
1689
1732
|
await ensureRemote();
|
|
@@ -1936,6 +1979,8 @@ async function createProxy() {
|
|
|
1936
1979
|
"- 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.",
|
|
1937
1980
|
"- 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.",
|
|
1938
1981
|
"- 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.",
|
|
1982
|
+
"- aml_address_risk: who one address is and how risky, as facts: its risk word (the higher of what labels prove and what the risk model predicts) with every reason, the model score, its risky partners and its exchange ends. No verdict.",
|
|
1983
|
+
"- aml_token_risk: what about a token or a pool, as facts: its founder, factory, gas wallets and pools with their biggest liquidity providers, each with its own risk word. The token word is the highest of the token, its founder and its pools. No verdict.",
|
|
1939
1984
|
"- meta_usage_status: check the caller public free graph_query quota.",
|
|
1940
1985
|
"- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
|
|
1941
1986
|
"- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
|
|
@@ -1960,6 +2005,8 @@ async function createProxy() {
|
|
|
1960
2005
|
"- 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.",
|
|
1961
2006
|
"- 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.",
|
|
1962
2007
|
"- 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.",
|
|
2008
|
+
"- aml_address_risk: who one address is and how risky, as facts: its risk word (the higher of what labels prove and what the risk model predicts) with every reason, the model score, its risky partners and its exchange ends. No verdict.",
|
|
2009
|
+
"- aml_token_risk: what about a token or a pool, as facts: its founder, factory, gas wallets and pools with their biggest liquidity providers, each with its own risk word. The token word is the highest of the token, its founder and its pools. No verdict.",
|
|
1963
2010
|
"- meta_usage_status: check the caller public free graph_query quota.",
|
|
1964
2011
|
"- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
|
|
1965
2012
|
"- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
|
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":";qBAgIa,kBAAgB;qBAoBhB,2BAAyB;;qBAEzB;qBAUA;qBACA;;;;;wBAyBG;YAkBJ;wBAEI,oBAAoB,MAAK,OAAO,aAA2B;qBAiB9D;qBAIA;qBAIA;qBAKA;qBAGA,gCAAgC;KA+BxC,iBAAiB,eAAe,EAAE;qBAgB1B;wBA6GG,2BAA2B,mBAAmB;;;;;;;;wBAomBxC,eAAe"}
|
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":";qBAgIa,kBAAgB;qBAoBhB,2BAAyB;;qBAEzB;qBAUA;qBACA;;;;;wBAyBG;YAkBJ;wBAEI,oBAAoB,MAAK,OAAO,aAA2B;qBAiB9D;qBAIA;qBAIA;qBAKA;qBAGA,gCAAgC;KA+BxC,iBAAiB,eAAe,EAAE;qBAgB1B;wBA6GG,2BAA2B,mBAAmB;;;;;;;;wBAomBxC,eAAe"}
|
package/dist/mcp-proxy.mjs
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
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-BstrSl4s.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
|
-
import { a as readSwapLinkShape, i as mirrorGraphNetworkCapabilities, r as keptSwapLinkShape } from "./capabilities-
|
|
8
|
-
import { a as routingHintLines, i as routingHead, n as ROUTING_NOT_SERVED, r as levelLines } from "./layer-routing-
|
|
9
|
-
import { c as
|
|
7
|
+
import { a as readSwapLinkShape, i as mirrorGraphNetworkCapabilities, r as keptSwapLinkShape } from "./capabilities-w5bNR7F9.mjs";
|
|
8
|
+
import { a as routingHintLines, i as routingHead, n as ROUTING_NOT_SERVED, r as levelLines } from "./layer-routing-r4IbIQSr.mjs";
|
|
9
|
+
import { _ as GRAPH_QUERY_BEHAVIOUR_SENTENCE, c as FLOWS_MAX_OFFSET, d as GRAPH_EXPAND_TOOL, f as TRANSFERS_MAX, g as BEHAVIOUR_HINT, h as GRAPH_QUERY_CONTRACT_READ_SENTENCE, i as META_SCHEMA_TITLE, l as GRAPH_EXPAND_DESCRIPTION, m as CONTRACT_READ_HINT, n as GraphSchemaError, p as handleGraphExpand, r as META_SCHEMA_DESCRIPTION, s as handleMetaSchema, u as GRAPH_EXPAND_TITLE } from "./graph-schema-DvABR1yl.mjs";
|
|
10
10
|
import { r as appendActionLog, t as actionLogSignalsFromResult } from "./action-log-Byv9Ln_6.mjs";
|
|
11
11
|
import { n as withAnswerHintResult } from "./answer-hint-vOE1O6Lf.mjs";
|
|
12
|
-
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-
|
|
13
|
-
import {
|
|
14
|
-
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-
|
|
15
|
-
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-
|
|
16
|
-
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-
|
|
17
|
-
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-
|
|
18
|
-
import { i as loadExchangeRegistry } from "./exchange-registry-
|
|
12
|
+
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-D0K_Qx4N.mjs";
|
|
13
|
+
import { u as loadRegistry } from "./dex-registry-Bkri0--q.mjs";
|
|
14
|
+
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-Ck0q7crJ.mjs";
|
|
15
|
+
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-Bkw_sz94.mjs";
|
|
16
|
+
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-B7E29YoQ.mjs";
|
|
17
|
+
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-DIALj2sm.mjs";
|
|
18
|
+
import { i as loadExchangeRegistry } from "./exchange-registry-Dr5UtcT5.mjs";
|
|
19
|
+
import { a as loadAddressCard } from "./address-card-LYaT5yz0.mjs";
|
|
20
|
+
import { a as AML_ADDRESS_RISK_TOOL, f as handleAmlAddressRisk, i as AML_ADDRESS_RISK_TITLE, n as AML_ADDRESS_RISK_ANNOTATIONS, r as AML_ADDRESS_RISK_DESCRIPTION } from "./address-risk-Da6FsfGx.mjs";
|
|
21
|
+
import { a as handleAmlTokenRisk, i as AML_TOKEN_RISK_TOOL, n as AML_TOKEN_RISK_DESCRIPTION, r as AML_TOKEN_RISK_TITLE, t as AML_TOKEN_RISK_ANNOTATIONS } from "./token-risk-DhnJc2kJ.mjs";
|
|
19
22
|
import { fileURLToPath } from "node:url";
|
|
20
23
|
import path from "node:path";
|
|
21
24
|
import { readFileSync } from "node:fs";
|
|
@@ -772,6 +775,8 @@ const LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
772
775
|
AML_DEPLOYER_SCREEN_TOOL,
|
|
773
776
|
META_EXCHANGE_LOOKUP_TOOL,
|
|
774
777
|
AML_EXCHANGE_DEPOSIT_CHECK_TOOL,
|
|
778
|
+
AML_ADDRESS_RISK_TOOL,
|
|
779
|
+
AML_TOKEN_RISK_TOOL,
|
|
775
780
|
"wallet_balance",
|
|
776
781
|
"wallet_topup",
|
|
777
782
|
SUBSCRIPTION_TOPUP_TOOL,
|
|
@@ -844,12 +849,14 @@ const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
|
844
849
|
[AML_DEPLOYER_SCREEN_TOOL]: AML_DEPLOYER_SCREEN_DESCRIPTION,
|
|
845
850
|
[META_EXCHANGE_LOOKUP_TOOL]: META_EXCHANGE_LOOKUP_DESCRIPTION,
|
|
846
851
|
[AML_EXCHANGE_DEPOSIT_CHECK_TOOL]: AML_EXCHANGE_DEPOSIT_CHECK_DESCRIPTION,
|
|
852
|
+
[AML_ADDRESS_RISK_TOOL]: AML_ADDRESS_RISK_DESCRIPTION,
|
|
853
|
+
[AML_TOKEN_RISK_TOOL]: AML_TOKEN_RISK_DESCRIPTION,
|
|
847
854
|
meta_usage_status: "Return the caller's public free graph_query quota for the current UTC day.",
|
|
848
855
|
meta_subscription_status: META_SUBSCRIPTION_STATUS_DESCRIPTION,
|
|
849
856
|
meta_help: "Show a short guide to Chain Insights tools and workflow.",
|
|
850
857
|
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 {}.",
|
|
851
858
|
wallet_balance: "Show the local Chain Insights payment wallet address, payment network, token, and amount.",
|
|
852
|
-
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_CONTRACT_READ_SENTENCE} ${GRAPH_QUERY_ROLE_MARKS_SENTENCE} ${GRAPH_QUERY_JUDGEMENT_MARKS_SENTENCE} ${levelLines().join(" ")} ${ROUTING_NOT_SERVED} Preserve full addresses exactly, and write every address in full, all 42 characters, in your answer: never shorten one with ... or ….`,
|
|
859
|
+
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_CONTRACT_READ_SENTENCE} ${GRAPH_QUERY_ROLE_MARKS_SENTENCE} ${GRAPH_QUERY_JUDGEMENT_MARKS_SENTENCE} ${GRAPH_QUERY_BEHAVIOUR_SENTENCE} ${levelLines().join(" ")} ${ROUTING_NOT_SERVED} Preserve full addresses exactly, and write every address in full, all 42 characters, in your answer: never shorten one with ... or ….`,
|
|
853
860
|
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. ${GRAPH_QUERY_CONTRACT_READ_SENTENCE} Write every address in full in your answer, all 42 characters.`
|
|
854
861
|
};
|
|
855
862
|
const KNOWN_PUBLIC_TOOL_TITLES = {
|
|
@@ -895,6 +902,7 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
895
902
|
"- 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: a facts read that names :Account, or :Contract at an end of a relationship, is refused, so ask USE topology or USE chain. One Contract node read by its address is another read, see One contract by its address below. 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.",
|
|
896
903
|
"- 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.",
|
|
897
904
|
"- 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.",
|
|
905
|
+
BEHAVIOUR_HINT,
|
|
898
906
|
"- 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; on a lane whose money family lists ROUTED_TO they count funds between addresses (FLOWED_TO) only, not swaps, so what an address got from a swap is on its ROUTED_TO links (bought_usd_sum), and a pool, a pool manager or a bonding curve has none of these totals there: its trade is the sum of its SWAPPED links (sold_usd, swap_count) — 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.",
|
|
899
907
|
"- 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.",
|
|
900
908
|
"- 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) and one Contract by its address; lifetime address metrics (degrees, totals, activity window) are node properties on USE topology.",
|
|
@@ -911,7 +919,7 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
911
919
|
"- 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.",
|
|
912
920
|
"- 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.",
|
|
913
921
|
"- 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.",
|
|
914
|
-
"- 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;
|
|
922
|
+
"- 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; exchange_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.",
|
|
915
923
|
"- 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.",
|
|
916
924
|
"- Call meta_schema {network} first when you need field names; it is cached for 24 hours. The two discovery reads below are the fallback.",
|
|
917
925
|
"- 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",
|
|
@@ -1344,7 +1352,7 @@ function jsonTextResult(structuredContent) {
|
|
|
1344
1352
|
*/
|
|
1345
1353
|
async function createProxy() {
|
|
1346
1354
|
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
1347
|
-
const { activeDataDir, findActiveWorkspace } = await import("./active-
|
|
1355
|
+
const { activeDataDir, findActiveWorkspace } = await import("./active-CyC4jFka.mjs");
|
|
1348
1356
|
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-BaHAIidE.mjs").then((n) => n.r);
|
|
1349
1357
|
const { loadSchema, saveSchema } = await import("./schema-cache-BfKHodDY.mjs");
|
|
1350
1358
|
const proxyMode = resolveMcpProxyMode();
|
|
@@ -1559,6 +1567,9 @@ async function createProxy() {
|
|
|
1559
1567
|
}
|
|
1560
1568
|
return jsonTextResult(cleanNetworkCapabilities(void 0));
|
|
1561
1569
|
});
|
|
1570
|
+
const loadCard = () => loadAddressCard({ log: (line) => {
|
|
1571
|
+
logger.info("address_card.fault", { line });
|
|
1572
|
+
} });
|
|
1562
1573
|
const schemaDependencies = {
|
|
1563
1574
|
endpoint: graphMcpEndpoint,
|
|
1564
1575
|
withClient: async (fn) => {
|
|
@@ -1566,7 +1577,8 @@ async function createProxy() {
|
|
|
1566
1577
|
if (!remoteConnected) throw new GraphSchemaError(`${remoteUnavailableMessage ?? `Chain Insights Graph is not connected at ${graphMcpEndpoint}`}. Restart the Chain Insights MCP proxy after the endpoint is reachable.`);
|
|
1567
1578
|
return fn(remoteClient);
|
|
1568
1579
|
},
|
|
1569
|
-
describeFailure: (err) => remoteCallFailureText("meta_schema", err)
|
|
1580
|
+
describeFailure: (err) => remoteCallFailureText("meta_schema", err),
|
|
1581
|
+
loadAddressCard: loadCard
|
|
1570
1582
|
};
|
|
1571
1583
|
server.registerTool("meta_schema", {
|
|
1572
1584
|
title: META_SCHEMA_TITLE,
|
|
@@ -1680,6 +1692,37 @@ async function createProxy() {
|
|
|
1680
1692
|
},
|
|
1681
1693
|
annotations: AML_EXCHANGE_DEPOSIT_CHECK_ANNOTATIONS
|
|
1682
1694
|
}, async (args) => handleAmlExchangeDepositCheck(args, depositCheckDependencies));
|
|
1695
|
+
const addressRiskDependencies = {
|
|
1696
|
+
loadAddressCard: loadCard,
|
|
1697
|
+
loadExchangeRegistry: loadExchanges,
|
|
1698
|
+
graphQueryBatch: tokenDependencies.graphQueryBatch,
|
|
1699
|
+
unavailable: tokenDependencies.unavailable,
|
|
1700
|
+
describeFailure: dexDependencies.describeFailure
|
|
1701
|
+
};
|
|
1702
|
+
server.registerTool(AML_ADDRESS_RISK_TOOL, {
|
|
1703
|
+
title: AML_ADDRESS_RISK_TITLE,
|
|
1704
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[AML_ADDRESS_RISK_TOOL],
|
|
1705
|
+
inputSchema: {
|
|
1706
|
+
network: NETWORK_SCHEMA,
|
|
1707
|
+
address: z.string().min(1).describe("The address to screen: 0x plus 40 hex characters, any case. A name or a ticker is not an address: call meta_token_lookup or meta_exchange_lookup first."),
|
|
1708
|
+
surroundings: z.boolean().optional().describe("true adds the nodes and money links behind the answer, for a host that draws. Off unless asked for.")
|
|
1709
|
+
},
|
|
1710
|
+
annotations: AML_ADDRESS_RISK_ANNOTATIONS
|
|
1711
|
+
}, async (args) => handleAmlAddressRisk(args, addressRiskDependencies));
|
|
1712
|
+
const tokenRiskDependencies = {
|
|
1713
|
+
...addressRiskDependencies,
|
|
1714
|
+
loadDexRegistry: dexDependencies.loadRegistry
|
|
1715
|
+
};
|
|
1716
|
+
server.registerTool(AML_TOKEN_RISK_TOOL, {
|
|
1717
|
+
title: AML_TOKEN_RISK_TITLE,
|
|
1718
|
+
description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[AML_TOKEN_RISK_TOOL],
|
|
1719
|
+
inputSchema: {
|
|
1720
|
+
network: NETWORK_SCHEMA,
|
|
1721
|
+
address: z.string().min(1).describe("The token contract or the pool: 0x plus 40 hex characters, any case. A ticker is not an address: call meta_token_lookup first. A wallet goes to aml_address_risk."),
|
|
1722
|
+
surroundings: z.boolean().optional().describe("true adds the nodes and links behind the answer, for a host that draws. Off unless asked for.")
|
|
1723
|
+
},
|
|
1724
|
+
annotations: AML_TOKEN_RISK_ANNOTATIONS
|
|
1725
|
+
}, async (args) => handleAmlTokenRisk(args, tokenRiskDependencies));
|
|
1683
1726
|
const readUsageStatus = async () => {
|
|
1684
1727
|
try {
|
|
1685
1728
|
await ensureRemote();
|
|
@@ -1932,6 +1975,8 @@ async function createProxy() {
|
|
|
1932
1975
|
"- 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.",
|
|
1933
1976
|
"- 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.",
|
|
1934
1977
|
"- 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.",
|
|
1978
|
+
"- aml_address_risk: who one address is and how risky, as facts: its risk word (the higher of what labels prove and what the risk model predicts) with every reason, the model score, its risky partners and its exchange ends. No verdict.",
|
|
1979
|
+
"- aml_token_risk: what about a token or a pool, as facts: its founder, factory, gas wallets and pools with their biggest liquidity providers, each with its own risk word. The token word is the highest of the token, its founder and its pools. No verdict.",
|
|
1935
1980
|
"- meta_usage_status: check the caller public free graph_query quota.",
|
|
1936
1981
|
"- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
|
|
1937
1982
|
"- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
|
|
@@ -1956,6 +2001,8 @@ async function createProxy() {
|
|
|
1956
2001
|
"- 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.",
|
|
1957
2002
|
"- 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.",
|
|
1958
2003
|
"- 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.",
|
|
2004
|
+
"- aml_address_risk: who one address is and how risky, as facts: its risk word (the higher of what labels prove and what the risk model predicts) with every reason, the model score, its risky partners and its exchange ends. No verdict.",
|
|
2005
|
+
"- aml_token_risk: what about a token or a pool, as facts: its founder, factory, gas wallets and pools with their biggest liquidity providers, each with its own risk word. The token word is the highest of the token, its founder and its pools. No verdict.",
|
|
1959
2006
|
"- meta_usage_status: check the caller public free graph_query quota.",
|
|
1960
2007
|
"- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
|
|
1961
2008
|
"- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
|