How does fetching an invoice from a BOLT12 offer differ from fetching an invoice from a lightning address?

If you could fetch the invoice, what else would you need to create a Zap?

Reply to this note

Please Login to reply.

Discussion

fetching an invoice from a lightning address is a simple HTTPS call, fetching an invoice from an offer requires you to connect to a lightning node directly.

luckily I have a library that does just that: https://github.com/jb55/lnsocket

but to do onion routing is non-trivial, so you would only be able to fetch direct-hop invoices atm.

I see, that evidently makes it considerably more challenging. I appreciate you taking the time to explain, thanks.

Do you generally see BOLT12 as a practical way to transition Zaps to non custodial transactions, or do you find it too complex for the purpose?

The main thing it does is reduce the burden on running an http server in conjunction with your lightning node. I would argue running an http server is the least hard thing, running a lightning node itself is more complex, but things like phoenix make running an ln node easy, so it may be worth switching to it.