Closed Perlover closed 1 year ago
And second doc of ECMAScript 2015:
https://www.ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer
And if your amount in satoshies, so if we have 21E6 bitcoins * 1E8 for this amount will be enough 51 bits maximum:
ln(21E6 * 1E8)/ln(2) = 50.8
Thus we can safely say that the type Number() will be enough for amount in satoshies...
Ah, you're totally right on that. I think I was mistaken by the fact that bitwise operations are limited to 32 bits. I'll review the code and make sure there's nowhere that allowing numbers would be problematic.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER