provider_lookup_address
Retrieve the ENS name associated with a specific Ethereum address using this tool, simplifying blockchain address identification and enhancing wallet management.
Instructions
Lookup the ENS name for an address
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | The address to lookup |
Implementation Reference
- src/handlers/wallet.ts:666-685 (handler)The handler function that executes the provider.lookupAddress call to retrieve the ENS name for the given Ethereum address.export const lookupAddressHandler = async (input: any): Promise<ToolResultSchema> => { try { if (!input.address) { return createErrorResponse("Address is required"); } const provider = getProvider(); if (!provider) { return createErrorResponse("Provider is required to lookup ENS name, please set the provider URL"); } const name = await provider.lookupAddress(input.address); return createSuccessResponse( name ? `ENS name retrieved successfully Name: ${name} ` : "No ENS name found for this address"); } catch (error) { return createErrorResponse(`Failed to lookup ENS name: ${(error as Error).message}`); } };
- src/tools.ts:501-511 (schema)Input schema definition for the tool, specifying the required 'address' parameter.{ name: "provider_lookup_address", description: "Lookup the ENS name for an address", inputSchema: { type: "object", properties: { address: { type: "string", description: "The address to lookup" } }, required: ["address"] } },
- src/tools.ts:598-598 (registration)Maps the tool name 'provider_lookup_address' to its handler function in the handlers dictionary."provider_lookup_address": lookupAddressHandler,