No description
  • Python 53.3%
  • Vue 36.1%
  • JavaScript 9.7%
  • Makefile 0.9%
Find a file
Padreug 31cf2eb164
Some checks failed
lint.yml / feat: register transport RPCs over LNbits nostr transport (push) Failing after 0s
feat: register transport RPCs over LNbits nostr transport
Mirrors what aiolabs/withdraw did — hooks lnurlp's existing CRUD into
the LNbits nostr transport layer so an HTTP-allergic client (e.g.
lamassu-next ATM) can manage PayLinks over kind-21000 encrypted
events instead of HTTP.

Extends the existing `lnurlp_start()` lifecycle hook (auto-invoked
by the LNbits extension manager) to import the transport's
`register_rpc` and register five RPCs:

  lnurlp_create   AUTH_WALLET
  lnurlp_get      AUTH_WALLET
  lnurlp_list     AUTH_ACCOUNT
  lnurlp_update   AUTH_WALLET
  lnurlp_delete   AUTH_WALLET

All handlers are thin shims around the existing crud.py functions —
no business logic duplication. *_get / *_update / *_delete verify
that the link's stored wallet matches the caller's wallet id.

Also registers a link-owner resolver with the core subscriptions
module (tag "lnurlp", extras-key "link" — the default, matching
where views_lnurl.py:86 stamps the link id on settlement). That lets
clients call `subscribe_payments({tag:"lnurlp", link_id:...})` and
stream real-time pay events without polling, with ownership enforced
server-side.

The transport import is guarded by try/except ImportError so this
extension still loads cleanly against an LNbits build that doesn't
have nostr_transport.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 08:46:17 +02:00
.github/workflows feat: code quality (#59) 2024-08-05 12:49:50 +03:00
static remove double slash in LNURL pay endpoint URL (#129) 2026-04-16 13:12:29 +02:00
tests feat: code quality (#59) 2024-08-05 12:49:50 +03:00
.gitignore feat: code quality (#59) 2024-08-05 12:49:50 +03:00
.prettierrc feat: code quality (#59) 2024-08-05 12:49:50 +03:00
__init__.py feat: register transport RPCs over LNbits nostr transport 2026-05-13 08:46:17 +02:00
config.json doc: Changes to more pages (#125) 2026-01-27 11:36:59 +01:00
crud.py feat: add optional domain field (#120) 2026-01-15 09:20:54 +01:00
description.md doc: Changes to more pages (#125) 2026-01-27 11:36:59 +01:00
helpers.py feat: add optional domain field (#120) 2026-01-15 09:20:54 +01:00
LICENSE add license 2023-02-24 18:13:40 +01:00
Makefile chore: update lnurl lib to v0.8.0 (#102) 2025-08-21 17:15:17 +02:00
manifest.json remove the need for nostrclient 2023-04-04 12:52:10 +02:00
migrations.py feat: use 1.4.0 dynamic extension loading (#116) 2025-12-17 13:06:28 +01:00
models.py feat: add optional domain field (#120) 2026-01-15 09:20:54 +01:00
package-lock.json feat: use 1.4.0 dynamic extension loading (#116) 2025-12-17 13:06:28 +01:00
package.json feat: use 1.4.0 dynamic extension loading (#116) 2025-12-17 13:06:28 +01:00
pyproject.toml feat: use 1.4.0 dynamic extension loading (#116) 2025-12-17 13:06:28 +01:00
README.md doc: Changes to more pages (#125) 2026-01-27 11:36:59 +01:00
tasks.py wait for zap receipt (#133) 2026-05-08 06:32:48 +02:00
toc.md feat: code quality (#59) 2024-08-05 12:49:50 +03:00
transport_rpcs.py feat: register transport RPCs over LNbits nostr transport 2026-05-13 08:46:17 +02:00
uv.lock feat: use 1.4.0 dynamic extension loading (#116) 2025-12-17 13:06:28 +01:00
views.py feat: use 1.4.0 dynamic extension loading (#116) 2025-12-17 13:06:28 +01:00
views_api.py feat: add optional domain field (#120) 2026-01-15 09:20:54 +01:00
views_lnurl.py feat: add optional domain field (#120) 2026-01-15 09:20:54 +01:00

LNbits

License: MIT Built for LNbits

LNURLp - LNbits extension

For more about LNBits extension check this tutorial

Create a static QR code or LNaddress people can use to pay over Lightning Network

LNURL is a range of lightning-network standards that allow us to use lightning-network differently. An LNURL-pay is a link that wallets use to fetch an invoice from a server on-demand. The link or QR code is fixed, but each time it is read by a compatible wallet a new invoice is issued by the service and sent to the wallet.

Wallets supporting LNURL

Usage

  1. Create an LNURLp (New Pay link)
    create lnurlp

    • select your wallets
    • make a small description
    • enter amount
    • if Fixed amount is unchecked you'll have the option to configure a Max and Min amount
    • you can set the currency to something different than sats. For example if you choose EUR, the satoshi amount will be calculated when a user scans the LNURLp
    • You can ask the user to send a comment that will be sent along with the payment (for example a comment to a blog post)
    • Webhook URL allows to call an URL when the LNURLp is paid
    • Success mesage, will send a message back to the user after a successful payment, for example a thank you note
    • Success URL, will send back a clickable link to the user. Access to some hidden content, or a download link
  2. Use the shareable link or view the LNURLp you just created
    LNURLp

    • you can now open your LNURLp and copy the LNURL, get the shareable link or print it
      view lnurlp
  3. Optional - add Lightning Address

    • attach a username to your lnurlp to create a lightning address
    • the LN address format will be username@lnbits-domain-name
    • Find out more about the lightning address spec at lightningaddress.com

Update your LNURL-pay extension

Now that the extensions are taken out of core LNbits we can update each extension separately without the need to reload or restart LNbits as a whole. This new version of the extension will give you the option to add a Lightning Address to each LNURLpay link.

  • Open your LNbits instance as super admin (not as a regular user. You will find the SuperUser-ID in your server logs on restart of LNbits. Use that to bookmark and manage LNbits from there in the future.) Now lets install the new version of a given extension like extensively described in this guide. In short:
  • Go to "Manage extensions", click on "ALL", search for e.g. LNURLp, click on "Manage"
  • Open the details of the extension and click on version 0.2.1, click "Install". You´re done!

lnurl-p-1.jpg

  • Open the LNURLp extension from the left panel
  • If you already have had some LNURLp defined, you can now click on edit and add a LN Address to each. Note that this will change your QR-Code!
  • If you didn't create any LNURLp before nothing changed except the window for defining new ones

lnurl-p-ln-address.jpg

Now you can receive sats to your newly created LN address. You will find this info also in the transaction overview for each payment (click on the green arrow).

lnurl-details.jpg

Powered by LNbits

LNbits is a free and open-source lightning accounts system.

Visit LNbits Shop Try myLNbits SaaS