Closed rolznz closed 1 month ago
+1 I don't know the cashu API but I think any lightning payment related call should return the preimage
@callebtc @thesimplekid is it always guaranteed that the pre-image is always available?
I'm not sure if this post relates to a melt or a mint request. Assuming the title is correct, it would mean that we return a preimage when creating an incoming invoice. This is in most cases not possible. Most Lightning backends do not return the preimage when you create an invoice.
For melts, we do return the preimage (whenever possible, some backends do not support this either) in the PostMeltQuoteBolt11Response
, see NUT-05.
@callebtc for minting, when checking if the invoice is paid (by checking the PostMintQuoteBolt11Response
). If the invoice is paid already then there should be no issue returning the preimage in this response, right?
@callebtc for minting, when checking if the invoice is paid (by checking the
PostMintQuoteBolt11Response
). If the invoice is paid already then there should be no issue returning the preimage in this response, right?
Most backends do not provide you with this information, no.
Most backends do not provide you with this information, no.
what are most backends? and why do they not provide that information? how do you know the invoice is paid?
I can't answer these questions because I'm not responsible for designing these backends. I'm just stating it as a fact and that's why this feature request can't be met.
ok,understandable. as a follow up:
- how do you know the invoice is actually paid?
I don't understand. The payer can prove it by showing the preimage. We provide the preimage to a paying Cashu wallet.
Are you referring to the receiver (like the top post)? There is no way to prove you've received a Lightning payment that I know of.
Currently in Alby Hub we expect every paid transaction to have a preimage and we think this is important for data consistency so are hesitant about removing this check. I think other wallets would also want to show the preimage in the transaction list for settled payments, even received ones.
See https://github.com/getAlby/hub/issues/651