Skip to main content
Glama

wallet_verify_message

Verify the authenticity of a signed message on the Ethereum blockchain by validating the signature against the original message and the claimed address.

Instructions

Verify a signed message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe address that supposedly signed the message
messageYesThe original message
signatureYesThe signature to verify

Implementation Reference

  • The main handler function that implements the wallet_verify_message tool. It uses ethers.utils.verifyMessage to recover the signer address from the message and signature, then checks if it matches the provided address.
    export const verifyMessageHandler = async (input: any): Promise<ToolResultSchema> => { try { if (!input.message || !input.signature || !input.address) { return createErrorResponse("Message, signature, and address are required"); } const recoveredAddress = ethers.utils.verifyMessage(input.message, input.signature); const isValid = recoveredAddress.toLowerCase() === input.address.toLowerCase(); return createSuccessResponse( isValid ? `Signature verified successfully Message: "${input.message}" Signature: ${input.signature} Address: ${input.address} ` : `Signature verification failed Message: "${input.message}" Signature: ${input.signature} Address: ${input.address} `); } catch (error) { return createErrorResponse(`Failed to verify message: ${(error as Error).message}`); } };
  • Input schema for the wallet_verify_message tool, defining the required parameters: message, signature, and address.
    { name: "wallet_verify_message", description: "Verify a signed message", inputSchema: { type: "object", properties: { message: { type: "string", description: "The original message" }, signature: { type: "string", description: "The signature to verify" }, address: { type: "string", description: "The address that supposedly signed the message" } }, required: ["message", "signature", "address"] } },
  • src/tools.ts:586-586 (registration)
    Maps the tool name 'wallet_verify_message' to its handler function verifyMessageHandler in the central handlers dictionary.
    "wallet_verify_message": verifyMessageHandler,

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dcSpark/mcp-cryptowallet-evm'

If you have feedback or need assistance with the MCP directory API, please join our Discord server