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

Make passing and returning Numbers from JS less annoying #433

Open
fl0rek opened this issue Oct 11, 2024 · 0 comments
Open

Make passing and returning Numbers from JS less annoying #433

fl0rek opened this issue Oct 11, 2024 · 0 comments

Comments

@fl0rek
Copy link
Member

fl0rek commented Oct 11, 2024

Many of our APIs accept/return 64bit unsigned integers, which on JavaScript side are mapped to BigInts. This requires manual conversion: await node.get_header_by_height(BigInt(1)) rather than being able to use 1 literal. This is due to JS number being able to hold up to 53 bit integers without losing precision. We'd like to hide this detail and switch to API which allows passing both Numbers and BigInts.

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