Skip to content

Conversation

@Camillarhi
Copy link
Contributor

Integrates LSPS5 (BLIP-0055) from lightning-liquidity to enable webhook-based push notifications for clients.

  • Add event system integration for LSPS5 events
  • Add public API methods for:
    • Registering/updating webhook URLs
    • Querying webhooks
    • Removing webhook registrations

This allows client developers to register webhook endpoints with their LSP to receive notifications when their app is offline.

Integrates LSPS5 (BLIP-0055) from lightning-liquidity to enable
webhook-based push notifications for clients.

- Add event system integration for LSPS5 events
- Expose public API for webhook management

This allows client developers to register webhook endpoints
with their LSP to receive notifications when their app is offline.
@ldk-reviews-bot
Copy link

👋 Hi! I see this is a draft PR.
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!

Copy link
Collaborator

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this over!

Need to look into this PR closer, here are some early comments that I noted when briefly scrolling through.

bdk_wallet = { version = "2.2.0", default-features = false, features = ["std", "keys-bip39"]}

reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "blocking"] }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't ever add the blocking feature for reqwest as it's fundamentally incompatible with the async variant.

impl std::error::Error for HttpClientError {}

/// Trait for making HTTP requests.
pub trait HttpClient: Send + Sync + std::fmt::Debug {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this code seems like an outdated copy of what was there on the upstream LSPS5 PR at one point in time. Please remove anything related to HttpClient etc. Rather, we should just ... make the call via spawned async task using reqwest when we handle the SendWebhookNotification event.

///
/// [bLIP-55 / LSPS5]: https://github.com/lightning/blips/blob/master/blip-0055.md
#[derive(Debug, Clone)]
pub struct LSPS5ServiceConfig {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why we need to replicate this struct?

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.

3 participants