[RFC] events: add InvoiceSent event for BOLT12 payee#3853
[RFC] events: add InvoiceSent event for BOLT12 payee#3853vincenzopalazzo wants to merge 1 commit intolightningdevkit:mainfrom
InvoiceSent event for BOLT12 payee#3853Conversation
|
I've assigned @jkczyz as a reviewer! |
93454f3 to
6c4a8ea
Compare
When processing BOLT12 payments, there was an asymmetry in the API where payer nodes receive `InvoiceReceived` events but payee nodes had no way to access the invoices they created and sent as far I know. This commit adds: - New `Event::InvoiceSent` event generated when a BOLT12 invoice is created and sent in response to an invoice request - New `notify_bolt12_invoice_sent` configuration parameter in UserConfig (defaults to false) to enable/disable the event generation The InvoiceSent event provides the payee with access to: - The created BOLT12 invoice - The context of the BlindedMessagePath - The payment hash and payment secret Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
6c4a8ea to
ee2f11c
Compare
InvoiceSent event for BOLT12 payee symmetryInvoiceSent event for BOLT12 payee
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3853 +/- ##
==========================================
- Coverage 89.93% 89.88% -0.06%
==========================================
Files 163 163
Lines 131276 131307 +31
Branches 131276 131307 +31
==========================================
- Hits 118062 118022 -40
- Misses 10529 10600 +71
Partials 2685 2685 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Rather than doing this via the When we first got the request to manually intercept payments between receiving the I haven't had a chance to look at it yet, but #3833 seems to be trying to accomplish the same thing but via the new pipeline. |
|
Thanks for looking into it! I am looking into #3833 now! Closing it for now! |
When processing BOLT12 payments, there was an asymmetry in the API where payer nodes receive
InvoiceReceivedevents but payee nodes had no way to access the invoices they created and sent as far I know.This commit adds:
Event::InvoiceSentevent generated when a BOLT12 invoice is created and sent in response to an invoice requestnotify_bolt12_invoice_sentconfiguration parameter in UserConfig (defaults to false) to enable/disable the event generationThe InvoiceSent event provides the payee with access to: