support big integers in json-rpc

+2 votes

Hi Multichain folks,

I tried issuing an asset for 987654321987654321 units on the multichain-cli and I ended up with 987654321987654272 units, I guess this must be related to the fact that JS Numbers are only able to accurately store up to 15 significant digits. So when I send the JSON RPC command, the asset amount gets converted to a JS Number with the reduced precision before getting processed by multichain.

Will multichain be supporting big integers/numbers anytime soon?

asked Apr 12, 2018 by StevenChan
I've forwarded this to the team and we'll respond shortly.

1 Answer

+1 vote
 
Best answer
Currently all numbers are represented as floating point, which leads to this limitation in accuracy of 15 significant digits. I'm afraid we don't have any immediate plans to support large integers. Does your application need this level of accuracy?
answered Apr 13, 2018 by MultiChain
selected Apr 13, 2018 by StevenChan
My application does not need this amount of precision at the moment, but since multichain can issue currency with up to 17 digits of significance, you may want to find a way to support large integers/numbers in the future.
Thanks, the comment is noted.
...