Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add support for LNURL pay requests #262

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

bumi
Copy link
Contributor

@bumi bumi commented Aug 16, 2020

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

The minimum amount is valid, thus it is invalid if the minimum is greater
than the value.
This adds an experimental prompt to support lnurl links currently only
supporting lnurl pay requests.

lnurl pay flow: https://xn--57h.bigsun.xyz/lnurl-pay-flow.txt
This refactors the LNURL pay flow to show the payment request and a
proper success message
@bumi
Copy link
Contributor Author

bumi commented Aug 17, 2020

experimenting on the flow:

https://vimeo.com/448816127

image

@wbobeirne wbobeirne self-requested a review August 23, 2020 04:05
@wbobeirne
Copy link
Member

wbobeirne commented Aug 23, 2020

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!

@githorray
Copy link

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'

@bumi
Copy link
Contributor Author

bumi commented Oct 18, 2020

@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?

@eza
Copy link

eza commented Nov 22, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants