elnosh / gonuts

Cashu wallet and mint in Go
MIT License
33 stars 6 forks source link

Preimage is an empty string when looking up a settled received invoice #59

Open rolznz opened 2 months ago

rolznz commented 2 months ago

The gonuts library does not have a preimage set, at least when using the Minibits mint.

When checking an invoice is paid, we use GetInvoiceByPaymentHash(), it shows paid as true and has a settled time, but the preimage is empty. Is it possible to get the preimage for received incoming payments?

elnosh commented 2 months ago

sorry for this :( this is not part of the Cashu spec. So the wallet never knows the preimage in mint quotes, it only knows whether the invoice was paid or not