checkWalletExists
Verify if a wallet exists on an Ethereum network by specifying a provider like a network name or custom RPC URL. Use to validate wallet presence before transactions or queries.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| provider | No | Optional. Either a network name or custom RPC URL. Use getAllNetworks to see available networks and their details, or getNetwork to get info about a specific network. You can use any network name returned by these tools as a provider value. |
Implementation Reference
- src/tools/core.ts:218-241 (handler)Full tool definition including registration, schema, and handler. The handler calls ethersService.getWalletInfo(provider) to check wallet existence and returns the info as JSON or error.server.tool( "checkWalletExists", { provider: z.string().optional().describe(PROVIDER_DESCRIPTION) }, async ({ provider }) => { try { const walletInfo = await ethersService.getWalletInfo(provider); return { content: [{ type: "text", text: JSON.stringify(walletInfo, null, 2) }] }; } catch (error) { return { isError: true, content: [{ type: "text", text: `Error checking wallet: ${error instanceof Error ? error.message : String(error)}` }] }; } }