For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Example in the wild

https://amboss.space/ uses webln.signMessage()for login. Users sign a message and prove ownership of a lightning node.

Last updated

Was this helpful?