/** * tokens.ts — lookup_token, add_custom_token, list_chain_tokens tools. * * Wraps agentwallet-sdk v6 TokenRegistry for MCP access. */ import { z } from 'zod'; export declare const LookupTokenSchema: z.ZodObject<{ symbol: z.ZodString; chainId: z.ZodNumber; }, z.core.$strip>; export type LookupTokenInput = z.infer; export declare const lookupTokenTool: { name: string; description: string; inputSchema: { type: "object"; properties: { symbol: { type: string; description: string; }; chainId: { type: string; description: string; }; }; required: string[]; }; }; export declare function handleLookupToken(input: LookupTokenInput): Promise<{ content: Array<{ type: 'text'; text: string; }>; isError?: boolean; }>; export declare const AddCustomTokenSchema: z.ZodObject<{ symbol: z.ZodString; address: z.ZodString; decimals: z.ZodNumber; chainId: z.ZodNumber; name: z.ZodOptional; }, z.core.$strip>; export type AddCustomTokenInput = z.infer; export declare const addCustomTokenTool: { name: string; description: string; inputSchema: { type: "object"; properties: { symbol: { type: string; description: string; }; address: { type: string; description: string; }; decimals: { type: string; description: string; }; chainId: { type: string; description: string; }; name: { type: string; description: string; }; }; required: string[]; }; }; /** Existing or incoming token identity used to decide registration. */ export type CustomTokenIdentity = { symbol: string; address: string; decimals: number; chainId: number; }; /** * Decide whether a custom token may be written into the process-global registry. * * send_token / swap_tokens convert human amounts with registry decimals * (`parseAmount("10", 18)` vs `parseAmount("10", 6)` is a 10^12 overpay for * USDC). Spend-policy scaling treats 1 whole token as 1 unit either way, so * a poisoned decimals value is not caught by budget checks. Refuse any * address or decimals change for an existing symbol+chain. Identical * re-registration is idempotent. A new symbol that reuses an existing * contract address with different decimals is also refused: send_token * of FAKEUSDC against USDC's address at 18 decimals overpays by 10^12. * Same-decimals aliases of an already-registered address are allowed. */ export declare function decideCustomTokenRegistration(existingBySymbol: CustomTokenIdentity | undefined, incoming: CustomTokenIdentity, existingByAddress?: CustomTokenIdentity): 'register' | 'idempotent'; export declare function handleAddCustomToken(input: AddCustomTokenInput): Promise<{ content: Array<{ type: 'text'; text: string; }>; isError?: boolean; }>; export declare const ListChainTokensSchema: z.ZodObject<{ chainId: z.ZodNumber; }, z.core.$strip>; export type ListChainTokensInput = z.infer; export declare const listChainTokensTool: { name: string; description: string; inputSchema: { type: "object"; properties: { chainId: { type: string; description: string; }; }; required: string[]; }; }; export declare function handleListChainTokens(input: ListChainTokensInput): Promise<{ content: Array<{ type: 'text'; text: string; }>; isError?: boolean; }>; //# sourceMappingURL=tokens.d.ts.map