What is Web LN

Share this article

The bitcoin network has forever changed the way we see digital value; its secure network continues to churn out blocks roughly every 10 minutes and provides us with a known monetary policy and a way to verify ownership of value on the internet. Now that we have a trustless base layer for value on the internet creating a payment network that can scale with the internet and provide new and unique use cases would naturally be a second step.

The Lightning Network, one of bitcoins’ many scaling solutions, is built with commerce and eCommerce in mind. Its fast and instant settlement, along with extremely low fees, make it the ideal environment for monetising previously uncompensated value on the internet and bringing new use cases to web commerce.

Adding this second layer solution frees up programmers and developers to create interesting ways to communicate with bitcoin and transfer value. Since bitcoin is programmable money, it can be integrated into standard web applications in various ways. Micropayments could not be done with fiat money and have kept web apps from monetising in unique ways. The Lightning network may have started with tipping and donations. Still, it’s developing into a more robust service with options like streaming payments, recurring payments, delayed payments with HODL invoices and much more.

While the Lightning network core features continue to expand, we also see additional protocols like LSATs and the building out of a web standard like WebLN; shape the building blocks for a new internet of value.

What is WebLN?

WebLN is a library and set of specifications that lightning apps and client providers can use to facilitate secure communication between apps and users’ Lightning nodes or custodial Lightning nodes. It provides a programmatic, permissioned interface for letting applications ask users to send payments, generates Lightning invoices to receive payments, signs into websites with LN-Auth and much more.

WebLN is a documentation standard for Lightning-driven applications and a guide on how to implement Lightning-based services with any web app or web service provider. As a developer, app builder or entrepreneur who is keen on adding Lightning support or looking for an option to conduct micro-payments, WebLN offers you a standard for how to integrate calls into your app that perform certain commands that the Lightning network understands.

WebLN code samples are provided in TypeScript, a statically-typed variant of JavaScript. WebLN is fully typed, and it’s highly recommended you use TypeScript when using it for the best developer experience.

Who would be interested in WebLN?

  • Have an application that accepts or makes Lightning payments with its users
  • Looking to add an easy one-clcik authentication in your application
  • Creating app that caters to bitcoiners
  • A Lightning node wallet and want to make it easier for your users to interact with Lightning web apps
  • A website that wants to accept lightning payments for content or eCommerce
  • An application that wants to allow users to log in anonymously
  • An app that wants to have a decentralised identity for users
  • An application that doesn’t want to have a hosted wallet but accepts Lightning payments

Give WebLN a test drive

If you’re still wrapping your head around the idea of WebLN and you’re looking for a practical example, then check out this demo video on LN paywalls.

How web LN can be added to a website to paywall content

Sources:

If you want to learn more about Web LN and dive down the rabbit hole, we recommend checking out the following resources.

Are you a bitcoin and lightning fan?

Have you been using Lightning to make micro-payments? Stream sats or engage with apps? Which app is your favourite? Have you tried all the forms of Lightning payments? Which one do you prefer? Let us know in the comments down below.

Disclaimer: This article should not be taken as, and is not intended to provide any investment advice. It is for educational and entertainment purposes only. As of the time posting, the writers may or may not have holdings in some of the coins or tokens they cover. Please conduct your own thorough research before investing in any cryptocurrency, as all investments contain risk. All opinions expressed in these articles are my own and are in no way a reflection of the opinions of The Bitcoin Manual

Related articles

You may also be interested in

on chain bitcoin analysis

What Is Bitcoin On-Chain Analysis?

The bitcoin time chain is an open distributed ledger; anyone can access the data stored on the chain, preferably doing it directly by running a

Sign up to our newsletter

Never Miss A Story

Get the latest bitcoin news, articles and resources.

Cookie policy
We use our own and third party cookies to allow us to understand how the site is used and to support our marketing campaigns.