project-serum / serum-ts

Project Serum TypeScript monorepo
https://projectserum.com
Apache License 2.0
270 stars 245 forks source link

Possible to ditch the 'bn.js' dependency in favour of native JS BigInt? #251

Open mikemaccana opened 1 year ago

mikemaccana commented 1 year ago

Looks like https://github.com/project-serum/serum-ts/blob/master/packages/borsh/src/index.ts still uses 'bn'.js' - is there a technical reason we wouldn't ditch the 'bn.js' dependency in favour of native BigInt?

BigInt works in most places since 2019 / 2020. Removing 'bn.js' would remove an unnecessary dependency and reduce the surface area for security issues and vulnerabilities.