Skip to content

signMessage

signMessage supports signing messages from the PassportSigner.

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

Usage

example.ts
import { createPassportSigner } from "./passport";

const passportSigner = await createPassportSigner();
 
const signedMessage = await passportSigner.signMessage("test");

Returns

Promise<Hex>

A Promise containing the signature of the message.

Parameters

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