Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Add LNURL Fallback Scheme to Web URL #176

Closed
pretyflaco opened this issue Mar 2, 2022 · 5 comments
Closed

Add LNURL Fallback Scheme to Web URL #176

pretyflaco opened this issue Mar 2, 2022 · 5 comments

Comments

@pretyflaco
Copy link

pretyflaco commented Mar 2, 2022

There is a Fallback Scheme in LNURL. If implemented in the Paycode Print it could eliminate the need for a second QR as fallback for all non LNURL wallets. Then, all users could scan the same QR - users with LNURL supported wallets could pay directly, all others could scan with camera and be directed to the Web URL.

Decoded example (Uppercase):
HTTPS://LN.BITCOINBEACH.COM/ideasarelikeflames?LIGHTNING=LNURL1DP68GURN8GHJ7MRW9E3XJARRDA5KUCN9V93KSTNRDAKJ7TNHV4KXCTTTDEHHWM30D3H82UNVWQHKJER9V9EKZUN9D35KKETXD3SK6ETN7KSR69

image

This would make the QR a bit more complex. To mitigate, the Web URL could be shortened with a shorter domain:
e.g.
HTTPS://BBW.SV/ideasarelikeflames

Also the URL in LNURL could be shortened from

https://ln.bitcoinbeach.com/.well-known/lnurlp/ideasarelikeflames

to

HTTPS://BBW.SV/U/ideasarelikeflames

resulting in a fairly compact QR:

HTTPS://BBW.SV/ideasarelikeflames?LIGHTNING=LNURL1FP29G5ZN8GHJ7SJZ2UH9X430D9JX2CTND35KKETXD3SK6ETNV8UF7N

image

Furthermore, if all wallets in the ecosystem checked for a Web URL in a QR when they dont find a payment request, like Breez Wallet already does, the need to switch from wallet to mobile's camera wouldn't be necessary, and non LNURL wallets could navigate to Web URL from wallet to get a Bolt11.
image

h/t to @CandleHater for bringing this idea up.

@nicolasburtey
Copy link
Member

note @pretyflaco, it's possible to use uppercase for the username as well: HTTPS://PAY.BBW.SV/IDEASARELIKEFLAMES

@pretyflaco
Copy link
Author

pretyflaco commented Mar 2, 2022

Nice, that saves a couple bits, too, and I see the shortened domain is already live so this should actually work already:

image

HTTPS://PAY.BBW.SV/IDEASARELIKEFLAMES?LIGHTNING=LNURL1DP68GURN8GHJ7URP0YHXYCNH9EEHVTEWWAJKCMPDDDHX7AMW9AKXUATJD3CZ7J2YG4Q4XS2JG4XYJJ69GEXYZN292V3RPALZ

Update:
Paying from LNURL wallet (e.g. Wallet of Satoshi) works indeed, but calling the Web URL from camera, I get an application error
image

image

Update 2:
Calling Web URL only fails with my android camera. Behaves as expected when scanned with QR code reader app

@pretyflaco
Copy link
Author

This feature request has now a bounty on it. More info

kngako added a commit to kngako/galoy-pay that referenced this issue Oct 11, 2022
@abhiShandy
Copy link
Contributor

Is anyone reviewing #318 ?

@pretyflaco
Copy link
Author

This has been merged.

galoybot pushed a commit that referenced this issue May 31, 2023
* fix: redirect loop 3

* fix: prettier
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants