Hey! I’m new here, and it looks like it is a great community.
I was wondering if anybody had to come across bitcoin transactions.
The smallest Bitcoin unit is 1e-8, float numbers are not trustable at all, so I was looking for a solution, either a package that takes care of that or maybe a trick i’m not aware of.
I was thinking about that too, the problem with that is that this number rappresent an actual monetary value. and if a conversion from bigint to float goes wrong potentially an user can cashout 1000’s of bitcoin and it’s not ideal.
PS: I’m pretty sure that there are already fixed point packages available for golang, or even specialised currency packages. Try to find those and use them, that will be much less error prone than what you might come up with by yourself.