cashubtc / nutshell

Chaumian ecash wallet and mint for Bitcoin
https://docs.cashu.space
MIT License
380 stars 95 forks source link

melt returns empty preimage for quotes that can be settled internally #625

Open elnosh opened 2 months ago

elnosh commented 2 months ago

created a mint and melt quote pair with the same invoice and when tried melting in /v1/melt/bolt11, it returned the state as paid but the preimage field was empty.

callebtc commented 2 months ago

Preimage can't be returned internally (not available)

callebtc commented 2 months ago

Is it possible after all?

elnosh commented 2 months ago

not sure for all backends but with LND you could get the preimage from the invoice created in the mint quote request from LookupInvoice call https://lightning.engineering/api-docs/api/lnd/lightning/lookup-invoice/index.html