/    Sign up×
Articles /Pin to ProfileBookmark

Bitcoin Connect – connect bitcoin wallets with apps

Bitcoin Connect allows you to seamlessly connect your bitcoin lightning wallet with any web application. Interactions like payments can happen natively in web apps and PWAs. Bitcoin Connect takes a big leap for non-custodial spending and bitcoin app development.

Solving shortcomings of using bitcoin apps step by step

Previously the only way to connect any wallet to an app has been through custom integrations resulting in a burdensome path for developers to connect each and every wallet separately. With the advent of WebLN now developers have a unified protocol to interact with wallets to power their app with bitcoin payments. That’s why the work on the Alby Browser Extension was started which supports popular browsers like Chrome and Firefox. But on mobile devices there are only a very few browsers supporting browser extensions. What if there is a way to provide the same experience without the need for a browser extension and still keep support payments from all kinds of wallets on all kinds of apps?

Bitcoin Connect an open source way to connect wallets and apps

Bitcoin Connect was started to help every app developer become a bitcoin developer. Standard components let users connect the wallet they prefer without custom integration regardless of web or mobile. As a result, users benefit from a native payment experience. Bitcoin Connect enables non-custodial spending right from the wallet without topping up an account within the app – a big leap for bitcoin app development. For now the focus lies on enabling web applications for desktop and mobile such as PWAs by using open protocols such as Nostr Wallet Connect. But multiple developers already use its Nostr Wallet Connect component to power native mobile apps with bitcoin payments.

How Bitcoin Connect works

Bitcoin Connect leverages two existing components and makes them available in a plug and play experience for app developers and wallet users. First, WebLN, a set of specifications implemented by dozens of apps already, facilitates sending and receiving of payments between apps and users’ lightning wallets in a secure way. Second, Nostr Wallet Connect, a spec to establish authenticated connection between the app and the user’s wallet targeting the mobile use case, if no browser extension is available.

As easy as HTML or just HTML

As of now it enables web apps which only need to implement a single interface to connect with multiple wallets. Users can connect from both desktop and mobile devices. These components work with pure HTML and all Javascript libraries frameworks such as React, Angular, Vue, Solid.js, etc. to expose the following components:

  • a button to launch the Bitcoin Connect modal
  • the modal itself
  • a list of connectors for users to select their preferred wallet
  • a payment component to easily accept payments from the user

Of course, all these components can be colored individually using CSS to fit the color scheme of the app.

Right now these components are available as simple HTML and React packages to more easily integrate Bitcoin Connect into your React and NextJS app. Have a look at these code examples for Codepen and Replit to get a first glimpse.

Bitcoin Connect in the wild

Zap.stream and noStrudel are just two examples of apps making use of Bitcoin Connect.

But what if the user’s wallet does not yet support WebLN or NWC? Bitcoin Connect has you covered. It launches a QR code that can be scanned by any wallet as a fallback offering a best-in class payment UX for every use case.

Building for the world of bitcoin apps

The lightning network on bitcoin has unique properties in terms of efficiency and transaction speed which are unrivalled by alternative payment protocols. Apps can make use of these properties by enabling payments directly between wallets of their users. Nevertheless, the limitations posed by node liquidity and accessibility impose restrictions to this use case. But tools and services are improving quickly and Bitcoin Connect stands as another building stone towards a future of non-custodial app usage.

Are you an app developer and would like to integrate bitcoin payments? Read the docs and reach out to us if you have any questions. Are you a wallet developer and would like to let your users participate in the world of bitcoin apps? We are happy to supply you with knowledge and infrastructure services. Or go ahead and build a connector yourself. Bitcoin Connect is an open source tool set to advance app development on bitcoin.

🏆🚀 PS: Bitcoin Connect won the Legends of Lightning Vol. 2 competition. Have a look at the pitch video.

Front-endHTMLJavaScriptNext.jsReactWeb 3
×

Success!

Help @getalby spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 7.21,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ,
analytics: Fullres
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: Anonymous,
tipped: article
amount: 1000 SATS,

tipper: Anonymous,
tipped: article
amount: 1000 SATS,

tipper: @Nanditha,
tipped: article
amount: 1000 SATS,
)...