18 Commits

Author SHA1 Message Date
f321x 306cac192b lnaddr: rename LnAddr -> bolt11
The LnAddr, lndecode and lnencode naming didn't imply that it is
bolt 11 specific, making it confusing to work with, now that there are
also bolt 12 "lnaddr".
Renaming it to *bolt11* creates a clear separation to bolt 12 things and
reduces mental load.

This commit is pure renaming (using the PyCharm IDE refactor function),
except for the removal of the `object` inheritance of LnAddr/BOLT11Addr,
this is Python 2 legacy.
2026-04-27 16:28:19 +02:00
f321x ef702d74cd pi: handle lud-17 URI payment identifier
LNURL-W/P can also be encoded in lud-17 form instead of bech32.
https://github.com/lnurl/luds/blob/luds/17.md
e.g.
lnurlw://example.com/api/test123
lnurlp://example.com/api/test123
2026-04-13 09:30:28 +02:00
f321x 4bd013ef10 lnurlw: accept "null" minWithdrawable in response
Accept a `null` value as response for the `minWithdrawable` field in the
lnurlw response. Some servers seem to set this to `null` instead of 0
when having no minimum withdrawal amount.
2025-12-10 10:50:01 +01:00
f321x bcb740695b lnurl: only sanitize untrusted LNURL errors
it is not neccessary to sanitize all LNURLErrors as most are just source
strings.
2025-08-27 17:36:51 +02:00
f321x b90090e2dd qml: separate PI resolving from QEInvoiceParser
separates the resolving step from the QEInvoiceParser so the 'recipient'
can be resolved first and then either an QEInvoiceParser can be used if
it is a sending request that has been resolved (invoice, address,
lnurlp, ...), or RequestDetails can be used if the resolved 'recipient'
turns out to be a voucher/LNURLW string.

# Conflicts:
#	electrum/gui/qml/qeinvoice.py
2025-08-27 15:35:03 +02:00
f321x fdeada3f51 lnurl: implement LNURL-withdraw
adds handling of lnurl-withdraw payment identifiers which allow users to
withdraw bitcoin from a service by scanning a qr code or pasting the
lnurl-w code as "sending" address.
2025-08-27 15:31:43 +02:00
f321x 40f11213df make openalias and lnaddress lookup concurrent 2025-05-20 10:08:36 +02:00
SomberNight fab567db3a lnurl: better error messages
re https://github.com/spesmilo/electrum/issues/9078
2024-06-04 13:42:57 +00:00
SomberNight 8075c0d02a lnurl: add encode_lnurl() for console usage, fix tests 2023-06-23 16:01:03 +00:00
Sander van Grieken 17a89efd3c lnurl: fix lightning address regex 2023-05-12 13:53:51 +02:00
SomberNight 1b5c7d46d7 lnurl: forbid paying to "http://" lnurls (enforce https or .onion)
In theory merchants should only use safeish non-mitm-able schemes, but
let's add this sanity check for peace of mind.
2023-04-20 18:08:42 +00:00
SomberNight 8f576e50a4 lnurl: add some error-handling/response-validation 2023-04-20 17:48:03 +00:00
Sander van Grieken e73993dba5 lnurl: add support for comments (LNURL12) 2022-09-30 14:01:18 +02:00
Sander van Grieken 8437e13666 add initial lnurl-pay 2022-09-28 18:21:07 +02:00
SomberNight e5f21fb7b5 lnurl: better handle unimplemented lnurl subtypes
fixes https://github.com/spesmilo/electrum/issues/7971
2022-09-20 16:00:20 +00:00
SomberNight ed1567e841 lnurl: make requests async, don't block Qt GUI, rm LUD-16 support
- in lnurl.py, make request methods async
- in Qt GUI, lnurl network requests no longer block the GUI thread
  - but they still do in the kivy GUI
- "lightning address" (LUD-16) support is removed for now as the
  email addresses are indistinguishable from openalias email addresses
  (both protocols should have added and enforced a prefix, or similar,
   to remove this kind of ambiguity -- now we would need to make a
   network request just to identify what kind of ID we were given)
2022-06-29 16:56:04 +02:00
SomberNight 649cad0122 lnurl: clean-up 2022-06-29 16:18:23 +02:00
bitromortac fe2fbbd9b1 add lnurl-pay and lightning address support
* bundles all payment identifiers into handle_payment_identifier
* adds lnurl decoding
* adds lightning address decoding
2022-06-29 16:18:15 +02:00