Giter Club home page Giter Club logo

lightning-node-connect's Introduction

Lightning Node Connect (LNC)

Secure, private access to a Lightning node over an untrusted web server. LNC leverages Password Authenticated Key Exchange (PAKE) and macaroon-scoped gRPC connections to enable developers/users a trust-minimized application experience. LNC removes various network obstructions (NAT etc.) to provide disintermediated access to user-run Lightning Network infrastructure and app UX.

Lightning Node Connect improves on prior trust/access efforts at solving this problem (like LND Connect) by using a PAKE instead of manually managing TLS certificates and macaroons. Lightning Node Connect's PAKE is combined with the Noise Protocol Framework to create a pairing flow where a user only needs to enter a short human-readable passphrase (scan or click a link) to establish a secure end-to-end encrypted/mutually-authenticated connection with an application. LNC uses macaroons to allow users to set a granular set of capabilities a remote website/application is able to access.

LNC leverages Go’s excellent WASM toolchain in order to allow browsers to securely connect to a remote Lightning Node. This WASM integration will allow for richer web-based Lightning applications, which are a necessary component to realize the Lightning Native Web.

Read the full LNC launch blog post here.

Components

Lightning Node Connect diagram

LNC is a secure connection protocol for bridging the gap between any Lightning node and the web. It is designed to work with any Lightning Network implementation but this reference project is built to work with Lightning Terminal / lnd specifically.

The following Open Source (MIT licensed) components are required to build a secure LNC connection:

  • Lightning Terminal (LiT) provides a UI for creating and managing LNC sessions. A session is a time-limited, permission-scoped connection authorization that is identified by a 10 word mnemonic pairing phrase. Once a session is created in LiT, an outbound connection to the mailbox proxy is established from LiT, waiting for a handshake with a browser. This allows a connection to be made to a LiT node that is behind a firewall/NAT or even Tor-only internet connection.
  • A mailbox proxy (built into aperture): A simple public mailbox server that acts as a TURN relay. The mailbox proxy/relay simply offers a buffered (hence the term "mailbox") one-way connection stream. A stream is identified by a 512-bit ID which is derived from the LNC pairing phrase. This makes it virtually impossible for anyone to occupy a stream they weren't authorized to. And the added PAKE/Noise encryption layer prevents anyone (including the mailbox proxy) from listening in on the content.
  • A WASM client embedded in a website: The WASM reference client provided in this repo is the component that allows JavaScript embedded in a website (such as Lightning Terminal) to communicate with a mailbox proxy over WebSockets using the PAKE/Noise encryption protocol. An example HTML page shows how the WASM binary can be used by JavaScript to initiate a connection and issue gRPC requests.

lightning-node-connect's People

Contributors

ellemouton avatar guggero avatar jamaljsr avatar kaloudis avatar roasbeef avatar viktortigerstrom avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.