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.
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.
- Run lnd, wallet must be unlocked for Lightning Box to operate correctly
git clone https://github.com/hsjoberg/lightning-box && cd lightning-box
- Copy
config/config.ts_TEMPLATE
toconfig/config.ts
and set up your configuration. See config/interface.ts for documentation over the configuration npm install
npm start
To do tests run npm test
or npm test:coverage
.
Any new code should not decerease code coverage significantly.
MIT