Skip to content

Add LSPS5 webhook notification support#993

Draft
Camillarhi wants to merge 2 commits into
lightningdevkit:mainfrom
Camillarhi:lsps5
Draft

Add LSPS5 webhook notification support#993
Camillarhi wants to merge 2 commits into
lightningdevkit:mainfrom
Camillarhi:lsps5

Conversation

@Camillarhi

Copy link
Copy Markdown
Contributor

Integrates LSPS5 (bLIP-0055) from lightning-liquidity, enabling webhook-based push notifications so clients can be alerted to events while their app is offline. Built on the refactored multi-LSP liquidity module (src/liquidity/{client,service}).

  • set_webhook - register/update a webhook.
  • list_webhooks - query registered webhooks.
  • remove_webhook - remove a registration.

When node_id is None, set_webhook and remove_webhook fan out to every LSPS5-capable LSP, so a webhook can be configured once across all configured LSPs.

Lets a node act as an LSPS5 server:

  • Delivers outgoing webhook notifications over HTTP in response to LSPS5ServiceEvent::SendWebhookNotification.
  • Auto-triggers an onion_message_incoming notification when an intercepted onion message targets a client that is currently offline (wired from LdkEvent::OnionMessageIntercepted, gated on peer connectivity via the peer manager).

Reopening after an accidental force-push pushed the branch to main's tip and auto-closed #729.

@ldk-reviews-bot

ldk-reviews-bot commented Jul 17, 2026

Copy link
Copy Markdown

👋 Hi! This PR is now in draft status.
I'll wait to assign reviewers until you mark it as ready for review.
Just convert it out of draft status when you're ready for review!

Implement the bLIP-55 / LSPS5 webhook registration protocol on top of the
multi-LSP liquidity module (src/liquidity/{client,service}).

Client side, exposed via Node::liquidity().lsps5():
- set_webhook / list_webhooks / remove_webhook to manage webhook
  registrations with an LSP.
- When no node_id is given, set_webhook and remove_webhook fan out to every
  LSPS5-capable LSP so a webhook can be configured once across all configured
  LSPs; set_webhook returns one result per LSP that accepted the registration
  and remove_webhook returns the LSPs it was removed from.

Service side, enabled via Builder::enable_liquidity_provider_lsps5():
- Deliver outgoing webhook notifications over HTTP in response to
  LSPS5ServiceEvent::SendWebhookNotification.
- Automatically send an onion-message-incoming notification when an
  intercepted onion message targets a client that is currently offline
  (wired from LdkEvent::OnionMessageIntercepted, gated on peer connectivity).

Wires the feature through the UniFFI bindings and adds LSPS5-specific Error
variants.
@Camillarhi
Camillarhi marked this pull request as draft July 17, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants