verifyMessage

Request the client to verify if the signature is correct, with the results displayed on the client side.

Method

async function verifyMessage(signature: string, message: string): void

Example

const provider = (window.$onekey && window.$onekey.webln) || window.webln;

const message = "Plain Message";
await provider.enable();
const signature = await provider.signMessage(message)
await provider.verifyMessage(signature, message);

Demo

Last updated