Skip to content

signMessage

signMessage supports signing messages from the LitSigner.

This method must be called after authenticate. Otherwise, this method will throw an error with the message Not Authenticated.

Usage

example.ts
import { createLitSignerWithAuthMethod } from "./lit";

 
const litSigner = new createLitSignerWithAuthMethod();
 
const signedMessage = await litSigner.signMessage("Hello World!");

Returns

Promise<Hex>

A Promise containing the signature of the message.

Parameters

msg: string | Uint8Array) -- the message to sign