breez / breez-sdk-liquid

MIT License
26 stars 7 forks source link

Incoming offline payments using notifications #84

Closed roeierez closed 2 months ago

tanx commented 4 months ago

Hey, thanks for your work on the liquid sdk. I’m playing around with Aqua wallet and the Breez Liquid SDK to get a feeling for a possible UX.

I still need to read up on the details on how liquid swaps work. But offline receive seems like the biggest advantage of using the liquid sdk over the Lightning node / LSP architecture. So I’m confused as to why the app would need a notification to receive offline? Thanks

ok300 commented 3 months ago

Hey @tanx thanks for the question.

The LN -> Liquid swaps require one interaction from the receiver (in this case, the SDK) in order to complete. In fact, from the sender's point of view, the LN invoice will appear as pending until the receiver claims the funds, at which point it will appear as settled. For this to happen, the receiver has to be online (app has to be running) to detect there's an incoming payment and to claim the funds. This is why the mobile notifications are needed for offline receive, e.g. if the receiver's app is stopped or in the background.

You can read more about the swap flow here: https://docs.boltz.exchange/v/api/lifecycle#reverse-submarine-swaps

tanx commented 3 months ago

@ok300 thanks for the clarification. Very helpful! I'm looking forward to test mobile notifications and offline receive 🙏

dangeross commented 2 months ago

Closed by #433, #436