hyperd.wallet.risk
Assess wallet risk by combining Chainalysis sanctions screening with GoPlus heuristics. Returns a sanctioned flag and a 0-100 heuristic score for phishing, mixers, and scams.
Instructions
Check a wallet's risk profile. Combines Chainalysis Sanctions Oracle (OFAC SDN authoritative) with GoPlus address heuristics (mixers, phishing, scams). Returns sanctioned flag + 0-100 heuristic score. Costs $0.10 in USDC.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | 0x EVM wallet address | |
| chain | No | Chain. Default 'base'. | |
| deep | No | Cross-check across multiple chains. Default false. |
Implementation Reference
- src/server.ts:258-267 (registration)Registration of the 'hyperd.wallet.risk' tool via server.tool() with the MCP McpServer instance. Defines tool name, description, input schema (address, chain, deep), and handler.
server.tool( "hyperd.wallet.risk", "Check a wallet's risk profile. Combines Chainalysis Sanctions Oracle (OFAC SDN authoritative) with GoPlus address heuristics (mixers, phishing, scams). Returns sanctioned flag + 0-100 heuristic score. Costs $0.10 in USDC.", { address: z.string().describe("0x EVM wallet address"), chain: z.string().optional().describe("Chain. Default 'base'."), deep: z.boolean().optional().describe("Cross-check across multiple chains. Default false."), }, async (args) => asText(await paidGet("/api/risk/wallet", args)), ); - src/server.ts:266-267 (handler)Handler function for the tool. Calls paidGet('/api/risk/wallet', args) which executes the x402 paid HTTP request, then formats the JSON response as text via asText().
async (args) => asText(await paidGet("/api/risk/wallet", args)), ); - src/server.ts:261-265 (schema)Input schema for the tool defined with zod: address (required string), chain (optional string, default 'base'), deep (optional boolean, default false).
{ address: z.string().describe("0x EVM wallet address"), chain: z.string().optional().describe("Chain. Default 'base'."), deep: z.boolean().optional().describe("Cross-check across multiple chains. Default false."), }, - src/server.ts:79-92 (helper)The paidGet() helper function that performs the x402 payment flow: builds the URL with query params, executes paidRequest() which handles the 402 Payment Required dance with x402/EIP-3009.
async function paidGet( path: string, query: Record<string, string | number | boolean | undefined>, ): Promise<unknown> { if (!httpClient) { throw new Error(WALLET_NOT_CONFIGURED_MSG); } const url = new URL(`${API_BASE}${path}`); for (const [k, v] of Object.entries(query)) { if (v !== undefined && v !== "" && v !== null) url.searchParams.set(k, String(v)); } return paidRequest("GET", url, undefined); } - src/server.ts:155-157 (helper)The asText() helper that wraps the API response JSON into the MCP text content format.
function asText(data: unknown) { return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] }; }