Skip to content

Introduce Event Model for Offers Flow #3833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

shaavan
Copy link
Member

@shaavan shaavan commented Jun 7, 2025

This PR introduces the event-model for Flow, that allows a user to asynchronously examine, and handle and InvoiceRequest, or an Invoice, based on their selected FlowConfig.# Introduce Event Model for Offers Flow

This PR introduces an event-based model for OffersMessageFlow, enabling users to asynchronously examine and handle incoming InvoiceRequests or Bolt12Invoices based on their configured FlowConfigs.

By setting custom FlowConfigs, users can choose whether to:

  • Automatically respond to offers synchronously (as before), or
  • Receive structured OfferEvents for manual inspection and handling.

This makes offer handling more flexible, especially in use-cases like:

  • Dynamic conversion for currency-denominated offers
  • Selective acceptance of invoices based on custom user-based rules

The default configuration (NeverTrigger) maintains backward compatibility by preserving the existing synchronous behavior.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Jun 7, 2025

I've assigned @joostjager as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@shaavan
Copy link
Member Author

shaavan commented Jun 7, 2025

cc @jkczyz

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