Yes. It took a while to find all the edge cases where tokens may be lost.

It would be nice if cashu-ts had some sort of built in proof storage interface with options like browser storage or sql. With this a dev could simply initialize a wallet and call send/receive without having to worry about proofs at all.

Reply to this note

Please Login to reply.

Discussion

Do you imagine this similar to CDK or Nutshell where you can provide a storage interface and if you don't, it uses a default db in the background (say indexdb when mobile, salute when node, etc?).

in general yes, not sure about having a default though. potentially a wrapper around the existing cashu-ts api that adds storage functionality while keeping the core functions the same and accessible

my experience has been that proof management is the most bug prone aspect of a wallet... storing duplicate proofs, deleting proofs before a melt is confirmed, keeping spent proofs, not getting the change, etc.

also managing things like unpaid mint quotes is cumbersome