Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 2.02 KB

README.md

File metadata and controls

40 lines (25 loc) · 2.02 KB

📥 Lightning Box

Lightning Box is in a very early stage, not much is finished yet.

Work In Progress, not suited for production just yet. Contributions, suggestions and ideas are appreciated. Database schema and configuration are bound to change.

Lightning Box is a payment inbox for Lightning Addresses. It's mainly suited for non-custodial Lightning wallets that might not always be online to receive payments.

Lightning Box will take the payment on behalf of the wallet and then notify the user about the payment via a communication medium (Email, Telegram, Push notification...). The user is then supposed to start their wallet to withdraw.

By utilizing the widely adopted protocols LNURL-auth and LNURL-withdraw, any supporting Lightning Wallet can use Lightning Box. Wallets that also support LNURL-withdraw's balanceCheck can keep the Lightning Box as known service inside the wallet and easily withdraw from the box without leaving the wallet.

For supporting wallets of bLIP-TBD, if the wallet is online, the LNURL-pay request will be forwarded to the wallet app via an LN P2P message, so that it can respond back with its own invoice. In this mode Lightning Box does not take the payment on behalf of the wallet.

Build

Lightning Box requires lnd as the Lightning backend right now, though the plan is to make the service implementation independent.

The master branch always expects the latest version of lnd. Lnd compiled with routerrpc is required.

  1. Run lnd, wallet must be unlocked for Lightning Box to operate correctly
  2. git clone https://github.com/hsjoberg/lightning-box && cd lightning-box
  3. Copy config/config.ts_TEMPLATE to config/config.ts and set up your configuration. See config/interface.ts for documentation over the configuration
  4. npm install
  5. npm start

Test

To do tests run npm test or npm test:coverage.

Any new code should not decerease code coverage significantly.

License

MIT