I never did find this out despite looking for this information last year.
The closest thing I've been able to find is a memory editor so you can edit hamlet resources on a live game (e.g. https://github.com/zorgiepoo/Bit-Slicer). This is not quite what you are looking for, but you could use it to give yourself a gold equivalent for the trinkets lost.