webln.signMessage()
Request that the user signs an arbitrary string message.
Signed messages can either be verified server-side using the LND RPC method, or by clients with webln.verifyMessage.

Method

async function signMessage(message: string): SignMessageResponse;

Response

interface SignMessageResponse {
message: string;
signature: string;
}

Code Example

await webln.enable();
await webln.signMessage("Sample message");

Demo

Copy link
Edit on GitHub
On this page