No description
  • Python 77.2%
  • HTML 10.5%
  • JavaScript 7.9%
  • Shell 3.9%
  • Makefile 0.5%
Find a file
dni ⚡ 603b345073
Some checks failed
/ release (push) Has been cancelled
Tests / test (push) Has been cancelled
/ pullrequest (push) Has been cancelled
fix: use lnbits linting, change to uv (#9)
* fix: use lnbits linting, change to uv

- formatting
- prettier
- pyright

* dont ignore packagejson

* readd poetry lock for integration tests

* fix pyright

* fix mypy

* fix test?

* fix lnbits version

* fixup tests

* fixup!
2025-09-12 09:30:16 +02:00
.devcontainer update dev container 2025-06-09 17:24:41 +02:00
.github/workflows fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
static fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
templates/nwcprovider fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
tests fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
.gitignore fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
.prettierrc fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
__init__.py fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
config.json Update image paths in config.json and added BC as contributor 2025-06-18 13:25:33 +01:00
crud.py fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
description.md make 2024-11-19 22:31:10 +00:00
execution_queue.py fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
LICENSE bell and whistles 2024-07-24 13:00:59 +00:00
Makefile fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
manifest.json Update manifest.json 2025-02-15 17:09:54 +00:00
migrations.py fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
models.py fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
nwcp.py fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
package-lock.json fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
package.json fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
paranoia.py lint 2025-02-23 16:53:06 +00:00
permission.py code quality fixes and cleanup 2024-09-07 09:09:22 +00:00
poetry.lock fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
pyproject.toml fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
README.md format 2025-02-23 16:52:03 +00:00
tasks.py fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
toc.md Added description for extension preview 2024-11-19 14:07:04 +00:00
uv.lock fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
views.py fix json bug, move js to own file 2025-02-15 17:49:25 +00:00
views_api.py fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00

NWC Service Provider Extension for LNbits

Easily connect your LNbits wallets via NWC.

Installation

Install the extension via the .env file or through the admin UI on your LNbits server. More details can be found here.

Configuration

Configure the extension from the "Settings" page in the top right menu when logged in as admin inside the extension page.

Configuration Options:

Key Description Default
relay URL of the nostr relay for dispatching and receiving NWC events. Use public relays or a custom one. Specify nostrclient to connect to the nostrclient extension. nostrclient
provider_key Nostr secret key of the NWC Service Provider. Random key generated on install
relay_alias Relay URL to display in pairing URLs. Set if different from relay. Empty (uses the relay value)
handle_missed_events Number of seconds to look back for processing events missed while offline. Setting it to 0 disables this functionality. 0

Warning

Do not change handle_missed_events from its default value of 0 unless you fully understand its implications. While a non-zero value may improve service quality under unstable conditions (e.g., poor connectivity or unreliable power), it can also lead to unexpected behavior. For example, in shared or community lnbits instances, where users are unaware of this functionality, they might assume a payment has failed and attempt to pay a new invoice with a different wallet, only for the instance to come back online and process the original payment request, potentially leading to duplicate payments.

For this reason, unless you are trying to tackle this specific issue, it is recommended to leave this setting at 0.

Using Nostrclient

The extension is preconfigured to connect to the nostrclient extension. Install it on the same LNbits instance and configure it to expose public websocket endpoints. Refer to the nostrclient documentation for more information.

Using a Custom Relay

To use a custom relay, set the relay key to the relay URL (e.g., wss://nostr.wine) in the extension's Settings page.

Usage

  1. Go to the extension page.
  2. Select a wallet and click the plus button to create a new NWC connection.
  3. Configure expiration, limits, and permissions.
  4. A pairing URL will be generated for you to open, copy, or scan with the NWC app. Note that the pairing URL is shown only once, but you can delete and recreate the connection to get a new one.