The New Effort to Get Bitcoin’s Lightning Network In Every Browser

Touted as a way to make the world’s most valuable cryptocurrency a more effective payment method, bitcoin’s lightning network has a rather large obstacle ahead – it’s still challenging, even risky, to set up and use.

It could become easier, though, should developers at the World Wide Web Consortium (W3C), the prestigious international group that creates standards for the web, have anything to do with it.

The work, which has been ongoing for several years (since standards take a long time to release), looks to make online payments easier, while giving users more choice by making a variety of payment methods available in web browsers using an API – and that includes the lightning network.

Sure, the W3C doesn’t have a horse in the race as it relates to which payment methods – from credit cards to Apple Pay to cryptocurrencies – are adopted most widely, but giving developers the option of adding lightning is a step towards making bitcoin’s layer-two more accessible.

Interest in cryptocurrency at the W3C’s Web Payments Working Group (where the browser API work is taking place) has been high for some time. But the W3C had trouble at first getting bitcoin developers and other cryptocurrency enthusiasts involved in the work.

However, with the help of only a few developers, cryptocurrency is looking compatible with the API. And, further than that, lightning is already compatible with the specification.

“All in all, we should be able to get bitcoin and lightning working with the [specification] without any major roadblocks,” prominent lightning developer Christian Decker told other developers in an email in August. In fact, Decker, an engineer at Blockstream, specifically joined the Web Payments Working Group to make sure bitcoin and lightning would not be missed.

Such a step would put lightning on a similar footing as more established online payment methods, Decker told CoinDesk, adding:

“This is exciting because switching between traditional payments and bitcoins and lightning payments could basically be a single click and make it easier for merchants to accept bitcoin alongside these traditional methods.”

Plus, there are other advantages to getting lightning into the specification.

Whenever a user enters their payment information, whether that’s their credit card number and expiration date or their lightning information, the API saves that information to the browser for easy payment the next time.

A passive strategy

Still, there is work to be done to make this happen.

For one, Decker said that a so-called “payment method ID” must be assigned to bitcoin and lightning before it can be a functioning part of the API.

“Currently only the basic-card identifier has been assigned, but we can apply for one eventually,” he said.

Decker seems in no rush. According to him, lightning developers are taking a passive approach, watching developments within the Web Payments Working Group “very closely” to ensure that lightning remains compatible.

“By being part of the working group we are in a position to raise objections should an incompatibility emerge and we [can] propose alternatives or improvements that better reflect the constraints that come from bitcoin and lightning being very unique payment systems,” Decker told CoinDesk.

It’s important to emphasize, though, that members don’t have to do anything as a part of the working group – it’s all rather voluntary.

And not everyone in the working group will necessarily have “crypto” top of mind. For instance, a bunch of companies contribute loosely to the W3C payment specifications, including the likes of Airbnb, Apple, Google, Facebook and Visa, companies that might be looking to push adoption of other, more obviously beneficial for their businesses, payment methods.

Decker is the sole lightning representative in the group of 172 participants.

As such, even though lightning is compatible, it’s still up to the browsers and merchants to actually add lightning support.

Still, Ian Jacobs, the W3C payments activity head, argued these types of payments will be an option, telling CoinDesk:

“The architecture is designed to enable new payment methods to be used on the web. That should include blockchain-based payment methods.”

Ready for the code?

Turning the W3C standards into code is another key step for pushing lightning into the browser.

Some browsers, including Chrome, Microsoft Edge (formerly Internet Explorer), Samsung browser and Safari have already put the API into practice, while Firefox uses it in “beta,” meaning it’s not quite stable yet.

But so far, none have adopted the cryptocurrency or lightning part of the specifications.

That’s likely partly because the specifications are still in progress. Not to mention, a developer needs to build the actual code implementation for the lightning payments, Decker said.

“I’m not aware of any real implementation, but that would be a very welcome development, and I’d be more than happy to support it,” he told CoinDesk.

One concern, though, is that lightning is so new and experimental, users have been known to lose money when sending a payment across the network. In other words, lightning still has a ways to go to even be safe to use – let alone easy. Bitcoin developer Sjors Provoost, who’s been thinking about how lightning in a browser might look, raised this concern in a comment on the project’s GitHub.

“Bitcoin and lightning wallets are much more involved than just storing a credit card number in a browser,” Provoost contended.

Yet Decker argued:

“I’d say that using bitcoin or lightning payments are probably safer than credit cards.”