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>
* fix unreachable code
* trying to fix fiat pay links
* don't drop support for python 3.10
* values are store as int when there's currency
* simplify js
* add hint for fiat denom
* refactor: dont use model property for lnurlpaymetadata
domain is really only needed if you do it with via the property. cleans
up code and makes it more readable
* fix(tasks): Make send_zap non-blocking to prevent freezes
The send_zap async function contained blocking calls (thread.join()) which halted the main asyncio event loop. This caused the application to become unresponsive or "freeze" until all zap receipt threads completed.
Refactored the function to be fully non-blocking by removing the join() calls and the arbitrary sleep(). Zap receipts are now dispatched in background threads on a fire-and-forget basis, allowing the main application to remain responsive.
* fix(tasks): Use async websockets in send_zap to prevent crashes
Refactor to replace the threading and websocket-client logic with the native asyncio websockets library.
Create a non-blocking asyncio task for each relay,