Skip to content

Handling Big integers

Compare
Choose a tag to compare
@svc-developer svc-developer released this 22 Mar 17:27
· 169 commits to master since this release
1f334bb

In the JS-SDK 21.2.1 release, the SDK can now return big integers from API responses.
Big integers in JavaScript are displayed in responses by appending an 'n' to the end of an integer literal. For example, 618368842515476464 -> 618368842515476464n.
Numbers are presented as before. For example, 8456123 -> 8456123.
For more information, refer to the following Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt