Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Representation of uint64 types #2789

Open
ckeshava opened this issue Sep 27, 2024 · 0 comments
Open

Representation of uint64 types #2789

ckeshava opened this issue Sep 27, 2024 · 0 comments

Comments

@ckeshava
Copy link
Collaborator

I'd like clarification on the representation of UINT64 type in the xrpl.js library. This data type needs to support a maximum value of 18446744073709551615 (in base-10 representation) or 0xffffffffffffffff in base-16 format.

  1. The former input causes regular-expression failures in the below unit tests.
  2. What are the acceptable forms of BigInt representation? As explained in the comments, 18446744073709551615n causes a typescript compiler error. Whereas BigInt(18446744073709551615) causes a loss of precision. It appears that only BigInt('0xffffffffffffffff') is the format of input.

Reference unit tests: https://github.com/XRPLF/xrpl.js/compare/main...ckeshava:xrpl.js:uint_tests?expand=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant