WebLN
v0.3.2
WebLN
v0.3.2
Overview
IntroductionGetting StartedUX Best Practices
Client API Reference
requestProviderwebln.getInfowebln.sendPaymentwebln.makeInvoicewebln.signMessagewebln.verifyMessageErrors
GitHub
Edit this page on GitHub
Edit

webln.signMessage

Request that the user sign an arbitrary string message. Returns a both the signed message and the original raw message. In case a provider does any type of manipulation to the original raw message, it's recommended you use the signed message that comes back from the call rather than the originally passed one.

Signed messages can either be verified server-side using the LND RPC method, or by clients with webln.verifyMessage.

Parameters

function signMessage(message: string): Promise<SignMessageResponse>;

Response

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

Demo

See source on GitHub