<p>Yes this is theoretically possible as described in this video <a href="https://youtu.be/bihYeAeNi0g" rel="nofollow noreferrer">https://youtu.be/bihYeAeNi0g</a> The idea is to have a deterministic way of generating preimages and entangling the lightning node with the point of sale device.</p>

<p>This idea originated from stepan snigirev who went down further and refined it to this idea: <a href="https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-June/002009.html" rel="nofollow noreferrer">https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-June/002009.html</a></p>

<p>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. </p>

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

CC BY-SA 4.0
2019-10-08T14:17:54.243Z
2019-10-08T14:17:54.243Z
Rene Pickhardt
<p>Is it possible to set up a merchant site where:</p>

<ul>
<li><p>The customer facing website generates valid lightning invoices, given some kind of master public key, that it gives users to pay</p></li>
<li><p>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.</p></li>
</ul>

<p>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 <code>AddInvoice</code> RPC call for it to handle those invoices.</p>

<p>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.</p>

<lightning-network-daemon>
Is it possible to generate an invoice for my lnd without having a connection to my lnd?
ieatpizza
# Is it possible to generate an invoice for my lnd without having a connection to my lnd?

(Asked by: username_0 on 2019-10-08)

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.

**Tags:** lightning-network-daemon


---

## 1 answers

### Answer by username_1 on 2019-10-08. Score: 4 | Accepted answer

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.


---

