3

Is it possible to set up a merchant site where:

  • The customer facing website generates valid lightning invoices, given some kind of master public key, that it gives users to pay

  • The actual lnd server is located on an entirely different server, and the front facing website works entirely without making any outbound RPC calls to the lnd server. The lnd server would be updating a backoffice database and would not have contact with the front facing website at all.

I would expect this to be possible, maybe by having the customer facing site and lnd both share the same seed that they use to generate preimages using. I have tried just making my own script to generate valid invoices using, but it seems like lnd still needs its AddInvoice RPC call for it to handle those invoices.

The parallel of course being BIP32, where we can put a public xpub key on the customer facing site, have the actual wallet software checking for payments on an entirely different server, and the 2 never having to talk to each other. In a worst case if an attacker took over the customer facing site, they'd only get my xpub for that week, since there are no private keys.

3

Yes this is theoretically possible as described in this video https://youtu.be/bihYeAeNi0g The idea is to have a deterministic way of generating preimages and entangling the lightning node with the point of sale device.

This idea originated from stepan snigirev who went down further and refined it to this idea: https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-June/002009.html

His main idea is that the offline node creates an invoice with a routing hint through the online node and the online node catches the onion and gets preimage information from it with some form of a ECDH key exchange.

I think both ideas are not implemented in lnd yet but the latter is supposed to be included.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.