-
Notifications
You must be signed in to change notification settings - Fork 27
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
makeInvoice and not specifying an amount #13
Comments
Just for some context of other possible use cases, our lapp allows for users to be refunded for market data subscriptions that are not completely consumed. For instance, if a user subscribes to 60 seconds of market data from the suredbits api, and they want to cancel the subscription after 30 seconds, we will refund half of the original amount paid. At a technical level, this means the user has to provide us with a refund invoice that has no amount specified, as we can't know at the time of the market data subscription when (or if) they are going to cancel the subscription for whatever reason. |
An example of what a websocket market data subscription request looks like
and the refund invoice does not have an amount specified. |
Thanks for presenting your use-case! Exactly what I'd have in mind for any amount invoices. It seems to me that in cases like that, a I'll see what this would look like in Joule, and come back with a WebLN pr if it works out! |
I don't think 0-amount invoices are safe at this point in the current way used, so probably best not to implement this. |
BOLT-11 payment requests don't require the invoice to specify an amount, which means clients should be able to create invoices that don't have an amount specified. Right now the interface more or less assumes an amount is going to be provided, but we should try to allow for that not to be the case. This poses a few questions:
makeInvoice
return an amount-less payment request? Or should it be an explicit option?My thought for covering these two cases is to add two new options to
makeInvoice
:But I'm open to any and all opinions!
The text was updated successfully, but these errors were encountered: