[Lightning-dev] Payee pay fee

Rusty Russell rusty at rustcorp.com.au
Sat Feb 23 03:53:47 UTC 2019

ZmnSCPxj <ZmnSCPxj at protonmail.com> writes:
> Good morning Rusty,
>> So we need a web way of asking a client to send an invoice or offer over
>> HTTPS. Is this a new URI scheme? How would this work?
> I thought that offers would work over LN alone?
> When you first proposed the offers, I thought it was this way:
> 1.  Payee gives BOLT12 offer to Payer.
> 2.  Payer generates a completely new random preimage and computes its hash.
> 3.  Payer issues a payment along an LN route from Payer to Payee using its random hash.
> 4.  At the payee hop, the onion packet contains some identifying information from the BOLT12 offer.
> 5.  Payee generates a BOLT11 invoice.
> 6.  Payee sends back an error packet, which includes the BOLT11 invoice.
> 7.  Payer receives the error packet that includes the BOLT11 invoice.
> 8.  Payer pays using the BOLT11 invoice.

Yes.  But how does the payee know to give the bolt12 offer to the payer?

That's the piece that's missing here, which is actually independent.

> Intermediate nodes remain unaware of this new feature and do not require upgrades.

That works if we use a fake "payment" like this to get the real invoice.
Be nicer to use a real message format though, as it's less overhead for
everyone and faster.

> A node issuing a BOLT12 offer would implicitly signal its support for this feature by the simple fact of being able to issue the BOLT12 offer.
> A node that can understand a BOLT12 offer implicitly means it supports this feature.

Yes; I think it's early enough that we don't need to cram offers into
bolt11 in some backwards compat way, they can be a new thing.


More information about the Lightning-dev mailing list