An issue with BOLT 12 for async payments is that recipients may be offline when the payer sends them their invoice request. However, their channel counterparty is likely to be an always-online node. Here we outline a scheme for always-online channel counterparties (e.g. LSPs) to supply BOLT 12 invoices on behalf of often-offline receivers when requested by payers.
TL;DR when creating an offer, the receiver will give their counterparty a payment_hash
-less (or "keysend") invoice. Later, when the payer sends an invoice request to the receiver, the payer will include an encrypted reply path in the onion payload destined for the counterparty. The counterparty will then send the aforementioned keysend invoice over the reply path to the payer.
- Counterparty sends receiver a 16-byte
unique_salt
and 16-byteencrypted_counterparty_secret
encrypted_counterparty_secret
is a staticcounterparty_secret
encrypted withChaCha20-Poly1305
usingcounterparty_secret
itsel