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

Support for non-standard lightning addresses #264

Open
dpad85 opened this issue Apr 15, 2022 · 2 comments
Open

Support for non-standard lightning addresses #264

dpad85 opened this issue Apr 15, 2022 · 2 comments
Labels
UI-android User Interface issue in the Android app UI-iOS User Interface issue in the iOS app

Comments

@dpad85
Copy link
Member

dpad85 commented Apr 15, 2022

Both the Android and iOS apps fail to read non-"standard" lightning address, for example addresses with Chinese domain names, such as:

...@比特幣.組織.香港

@dpad85 dpad85 added UI-android User Interface issue in the Android app UI-iOS User Interface issue in the iOS app labels Apr 15, 2022
@robbiehanson
Copy link
Contributor

robbiehanson commented Apr 27, 2022

Dev notes:

This gets translated into a URL:
https://比特幣.組織.香港/.well-known/lnurlp/username

If you paste ^this^ into a browser, it will work, and properly download the JSON. (Obviously need to replace "username" with a valid username in their system.) But it won't work in something like curl. Nor will it work in Kotlin.

This is because the domain needs to be converted to punycode:
https://xn--zvt121a27e.xn--uc0atv.xn--j6w193g/.well-known/lnurlp/username

(Modern browsers perform the punycode conversion automatically in the background.)

@robbiehanson
Copy link
Contributor

Dev notes:

  • Potential library for iOS: PunycodeSwift
  • I believe Android already has support: IDN
  • If we want to do this automatically within the shared Kotlin layer, then we'll need an expect/actual setup for performing the Punycode. And we'll need to add a built-in Xcode project, similar to the PhoenixCrypto setup we have for lightning-kmp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI-android User Interface issue in the Android app UI-iOS User Interface issue in the iOS app
Projects
None yet
Development

No branches or pull requests

2 participants