Closed tcheeric closed 5 months ago
When swapping proof P1 for proofs P2 and P3, is it acceptable to delete P1 from the wallet database after a successful swap, similar to the process during the melting operation?
If the swap is successful and the proof is spent you can delete it. CDK deletes spent proofs
Unless I am mistaken cashu-ts is stateless so its up to the implementer to store or not store proofs.
Thank you for clarifying. -- Sent with Tuta; enjoy secure & ad-free emails: https://tuta.com
6 Jun 2024, 13:31 by @.***:
When swapping proof P1 for proofs P2 and P3, is it acceptable to delete P1 from the wallet database after a successful swap, similar to the process during the melting operation?
If the swap is successful and the proof is spent you can delete it. CDK deletes spent proofs
Unless I am mistaken cashu-ts is stateless so its up to the implementer to store or not store proofs.
— Reply to this email directly, > view it on GitHub https://github.com/cashubtc/nuts/issues/134#issuecomment-2152290432> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/ABQMG7FRVOBWBX6H67HFQKDZGBJDBAVCNFSM6AAAAABI4SQMN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJSGI4TANBTGI> . You are receiving this because you authored the thread.> Message ID: > <cashubtc/nuts/issues/134/2152290432> @> github> .> com>
I am working on a Java implementation of the protocol (wallet and mint), and have the following question:
When swapping proof P1 for proofs P2 and P3, is it acceptable to delete P1 from the wallet database after a successful swap, similar to the process during the melting operation?
NUT-03 does not provide guidance on this matter, and it seems that
cashu-ts
will not delete, but always check the spendable status of a proof with the mint before selecting it... (?) https://github.com/cashubtc/cashu-ts/blob/4bb76a432f0b01589f95fa370ec5e0d78d0e70ae/src/CashuWallet.ts#L84Deleting locally "feels" safe, but I thought I should ask first...
Thoughts?
Thank you.