solana-web3.js
solana-web3.js copied to clipboard
JSON RPC API using (u)int64 whereas JS can only handle int53
Problem
The JSON API uses int64 for fields like lamports. However, the maximum safe integer in browsers is 2^53-1
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER
Proposed Solution
Make lamports a string in the HTTP/RPC API and parse with BigInt on the web3.js client side?