Skip to content
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

Return preimage in PostMintQuoteBolt11Response for paid invoices #168

Closed
rolznz opened this issue Sep 22, 2024 · 9 comments
Closed

Return preimage in PostMintQuoteBolt11Response for paid invoices #168

rolznz opened this issue Sep 22, 2024 · 9 comments

Comments

@rolznz
Copy link

rolznz commented Sep 22, 2024

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 getAlby/hub#651

@bumi
Copy link

bumi commented Sep 22, 2024

+1
I don't know the cashu API but I think any lightning payment related call should return the preimage

@prusnak
Copy link
Collaborator

prusnak commented Sep 22, 2024

@callebtc @thesimplekid is it always guaranteed that the pre-image is always available?

@callebtc
Copy link
Contributor

callebtc commented Sep 22, 2024

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.

@rolznz
Copy link
Author

rolznz commented Sep 23, 2024

@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
Copy link
Contributor

@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.

@bumi
Copy link

bumi commented Sep 24, 2024

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?

@callebtc
Copy link
Contributor

callebtc commented Sep 25, 2024

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.

@callebtc callebtc closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2024
@bumi
Copy link

bumi commented Sep 25, 2024

ok,understandable. as a follow up:

  • where do I see the supported backends or the spec that the backends need to support, then I can ask there.
  • how do you know the invoice is actually paid? can the user somehow proof this?

@callebtc
Copy link
Contributor

  • 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.

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

No branches or pull requests

4 participants