-
Notifications
You must be signed in to change notification settings - Fork 366
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
Allow Asynchronously responding to Invoice Request #3318
base: main
Are you sure you want to change the base?
Commits on Sep 19, 2024
-
Rename manually_handle_bolt12_invoices
1. Till now this UserConfig option was used to indicate whether the user wants to handles the payment for received Bolt12Invoices manually. 2. The future commits expand it's use case, so that it can also be used to indicate whether the user wants to handle response to the received Invoice Request manually as well. 3. Rename this UserConfig appropriately to better represent its use case.
Configuration menu - View commit details
-
Copy full SHA for 93fdfdb - Browse repository at this point
Copy the full SHA 93fdfdbView commit details -
Introduce InvoiceRequestReceived Event
1. This event will be triggered when user enables manual handling of BOLT12 Messages. 2. With this event they can do some preprocessing on their end to make sure if they want to continue with this inbound payment. 3. For example, this can be used by the user to do the currency conversion on their end and respond to invoice request accordingly.
Configuration menu - View commit details
-
Copy full SHA for 5774809 - Browse repository at this point
Copy the full SHA 5774809View commit details
Commits on Sep 20, 2024
-
- Also move event generation after invoice request verification.
Configuration menu - View commit details
-
Copy full SHA for 2a3c8c6 - Browse repository at this point
Copy the full SHA 2a3c8c6View commit details -
Introduce a new category of Bolt12 errors that contains the error generated while trying to respond asynchronously to Bolt12 messages.
Configuration menu - View commit details
-
Copy full SHA for 6342cdd - Browse repository at this point
Copy the full SHA 6342cddView commit details -
Update InvoiceBuilder's amount_msats
1. The amount_msats function first checks if any amount is given with the invoice requests, and defaults to using offer's amount if it's absent. 2. This can be a problem if the amount in offer was represent as a Currency. 3. Update amount_msats to take in an optional custom amount which can be used in case amount if absent in Invoice Request. 4. This update will be utilised in the following commits to set custom amount_msats when responding to Invoice Request Asychronously.
Configuration menu - View commit details
-
Copy full SHA for e3b4c9d - Browse repository at this point
Copy the full SHA e3b4c9dView commit details -
f: Update custom_amount_msats check
Custom amount should only be provided if only the offer is denomiated in currency, and no amount is provided in invoice request. This is done so that the use of Custom Amount can be more specific to the case when Offer is denomiated in Currency.
Configuration menu - View commit details
-
Copy full SHA for af75a15 - Browse repository at this point
Copy the full SHA af75a15View commit details -
Introduce get_response_for_invoice_request
1. Introduce a set of private functions that handles the creation of response for a received Invoice Request. 2. This helps refactor the the logic of response creation in a single function. 3. This will be used in the following commit to send response for invoice_request asynchronously.
Configuration menu - View commit details
-
Copy full SHA for 4431d52 - Browse repository at this point
Copy the full SHA 4431d52View commit details -
Configuration menu - View commit details
-
Copy full SHA for f8b48dc - Browse repository at this point
Copy the full SHA f8b48dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for f00047b - Browse repository at this point
Copy the full SHA f00047bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a37880 - Browse repository at this point
Copy the full SHA 3a37880View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b4daa4 - Browse repository at this point
Copy the full SHA 9b4daa4View commit details