Skip to content

Peering: Lightning invoices for paid peering — issue, settle, renew, lapse #937

Open

Description

@chappie-daemon

Part of the relay peering work in #931.

Scope

The source (selling) side of paid peering, using nostream's existing payments processors — the same machinery as admission fees:

  • When a configured peer with paid terms authenticates, the source relay issues a BOLT11 invoice for the amount/period from its advertised terms.
  • Settlement is detected via the existing processor callbacks; on settlement the peer's feed access activates until the end of the paid period.
  • Before expiry, the source offers a renewal invoice.
  • If the period lapses unpaid, the feed is suspended — stored data and sync state are kept, so resuming is a payment, not a re-sync from zero.

Acceptance

  • A paid peering relationship completes end-to-end: authenticate → invoice → settlement → feed active for exactly the paid period.
  • An unpaid lapse suspends the feed; paying the renewal resumes it without re-reconciliation.
  • Invoice/settlement state per peer is recorded for the admin console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions