Skip to content
WoompaLoompa edited this page Aug 10, 2026 · 9 revisions

lnbits-clink

A CLINK extension for LNbits — Nostr-native Lightning.

CLINK turns Lightning wallets into first-class Nostr citizens. With this extension your LNbits wallet speaks the CLINK protocol natively: it can publish offers and receive payments over Nostr, issue debit pointers for apps to charge it, pay offers (outgoing), and run recurring subscriptions against a payer's ndebit1... pointer — all over ordinary Nostr relays with NIP-44 encryption.

Status: v0.1.4 released — CLINK is now a real LNbits funding source (ClinkWallet). It appears in /admin → Funding Sources (add ClinkWallet to the allowed funding sources and select it as backend), is configured with a noffer1... string via the LNBITS_CLINK_FUNDING_NOFFER env var, and requests BOLT11 invoices from a remote Lightning.pub node's offer service (kind 21001). Receive-first: invoice creation is fully wired; paying out and balance/invoice-status reporting require a Lightning.pub account (planned next). Earlier: v0.1.3 swapped the event_repeat icon for event (the ligature splits into multiple glyphs in the Material Icons font); v0.1.2 fixed the frontend rendering (tabs/panels/dialogs collapsed because self-closing Quasar tags were mangled by the HTML parser) and added header nav links.

Features

Area What it does
Offers Create noffer1... pointers, share a public checkout page, create BOLT11 invoices on demand (fixed / variable / spontaneous prices).
Debits Mint ndebit1... pointers, enforce rules (allowed_pubkeys, min/max amounts), per-period budgets, and single-use session k1 — auto-settle direct payments and acknowledge budget requests.
Pay Offers Paste a noffer1..., parse it, and pay the resulting invoice with any LNbits wallet.
Subscriptions Define recurring plans and attach them to a payer's ndebit1... pointer. A poller bills each period via kind 21002 direct-payment requests, with retries and automatic cancellation.
Relays Manage the Nostr relays the node listens on; the listener reconnects with backoff.
Funding source Run this LNbits instance backed by CLINK: ClinkWallet is injected into lnbits.wallets at load, appears in /admin → Funding Sources, and serves invoices from a remote Lightning.pub node configured via LNBITS_CLINK_FUNDING_NOFFER.

Pages

  • /clink — extension index: offers, debits, relays.
  • /clink/pay — pay an offer from a noffer1... string.
  • /clink/subscriptions — plans and subscriptions.
  • /clink/checkout/{offer_id} — public checkout page for a fixed offer.

Quick links

  • Installation — getting the extension into LNbits
  • Usage — offers, debits, pay, subscriptions walkthrough
  • Protocol — the CLINK protocol layer (NIP-44, noffer/ndebit, event kinds, GFY)
  • API — REST API reference
  • Architecture — how the extension is put together
  • Development — tests, linting, and the release pipeline

Repositories

Clone this wiki locally