⚡
WebLN Guide
  • Introduction
    • 👋Welcome
    • â„šī¸What is WebLN
    • 🏅Benefits of WebLN
  • Building Lightning Apps
    • 👨‍đŸ’ģ👨đŸ’ģ Getting Started
    • đŸ’ģWebLN Reference
      • 🆕webln.isEnabled()
      • webln.enable()
      • webln.getInfo()
      • webln.keysend()
      • webln.makeInvoice()
      • webln.sendPayment()
      • 🆕webln.sendPaymentAsync()
      • webln.signMessage()
      • webln.verifyMessage()
      • 🆕webln.request()
      • 🆕webln.lnurl()
      • 🆕webln.on()
      • 🆕webln.off()
      • 🆕webln.getBalance()
      • Error handling
    • đŸ› ī¸Libraries and Tools
    • 🔆Best Practices
  • Ressources
    • ⚡WebLN Providers
    • 🚀Showcases
    • 👩‍đŸĢTutorials
    • 🌐Additional Resources
  • Contribute
    • đŸ—ī¸Working Group & Guidelines
    • 📖Glossary
Powered by GitBook
On this page
Edit on GitHub
  1. Building Lightning Apps
  2. WebLN Reference

webln.signMessage()

Last updated 1 year ago

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 .

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

uses webln.signMessage()for login. Users sign a message and prove ownership of a lightning node.

đŸ’ģ
https://amboss.space/
webln.verifyMessage