Skip to main content

WebLN

WebLN Provider is used to call UKey Wallet's Lightning Network capabilities in web pages, such as reading node information, creating invoices, sending payments, and signing messages.

Mini Demo

const provider = window?.$ukey?.webln || window?.webln;
if (!provider) throw new Error("UKey Wallet WebLN Provider not detected");

await provider.enable();
const info = await provider.getInfo();

Events

Top Errors

  • 4001: User refuses authorization, payment or signature.
  • Invalid inputs/data: Check that the invoice, amount, and message format are as expected by WebLN.