Skip to content

signMessage

The signMessage method is used to sign a message with the Alchemy Signer.

Usage

example.ts
import { signer } from "./signer";
 
const message = "Hello, world!";
const signature = await signer.signMessage(message);

Returns

Promise<Hex> -- on success returns the signature of the message.

Parameters

message: string | Uint8Array -- the message to sign