joule-extension icon indicating copy to clipboard operation
joule-extension copied to clipboard

[WIP] Add support for LNURL pay requests

Open bumi opened this issue 3 years ago • 5 comments

Description

This adds a new prompt for LNURL pay requests. This is currently very experimental and this PR is opened to serve as a potential starting point around implementing LNURL features.

LNURL

https://github.com/btcontract/lnurl-rfc

LNURL is a bech32-encoded HTTPS/Onion query string which is supposed to help payer interact with payee and thus simplify a number of standard scenarios such as:

ToDos

  • [ ] add support for success actions
  • [ ] validate payment request amount as described in the lnurl spec
  • [ ] validate payment request description hash as described in the lnurl spec
  • [ ] refactor all the things :)
  • [ ] specify UX for the different LNURL scenarios

Discussion

  • Support for LNURL requests should be added to webln?

Screenshots

90345327-f65b2d80-e01f-11ea-8fe2-b7f0b35c8121

bumi avatar Aug 16 '20 22:08 bumi

experimenting on the flow:

https://vimeo.com/448816127

image

bumi avatar Aug 17 '20 15:08 bumi

This is an awesome start, thanks for being the first to look at LNURL in Joule!

My initial thoughts on the code is that it looks good, but there's quite a bit of overlap between this and prompts/payment.tsx, and it would be good to share more code between the two. Though perhaps this is what you had in mind for the refactor all the things :) TODO.

Looking forward to seeing where this one goes!

wbobeirne avatar Aug 23 '20 04:08 wbobeirne

Is this error expected from Joule with LNURL-withdraw currently?

The payment request that was provided could not be looked up due to the following error: invoice not for current active network 'mainnet'

githorray avatar Oct 16 '20 16:10 githorray

@githorray this PR so far only supports the LNURL-pay flow. And there are no checks to validate the lnurl response.

LNURL-withdraw is the next step. Can you maybe help with that?

bumi avatar Oct 18 '20 10:10 bumi

this is great! why was this never completed? Especially LNURL-Auth would be great to push a whole range of web-app authentications

eza avatar Nov 22 '21 10:11 eza