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

Migrate from Buffer to native Uint8Array #1855

Open
tiero opened this issue Dec 15, 2022 · 2 comments
Open

Migrate from Buffer to native Uint8Array #1855

tiero opened this issue Dec 15, 2022 · 2 comments

Comments

@tiero
Copy link

tiero commented Dec 15, 2022

Since Buffer is a subclass of Uint8Array, is there any plans to migrate the library to use them to have native support in browsers without polyfills? https://nodejs.dev/en/api/v18/buffer/

@ChrisCho-H
Copy link
Contributor

This would be a good feature.
I might work on it, if others think this is necessary.

@junderw
Copy link
Member

junderw commented Jan 5, 2024

Feel free to work on it.

I think the biggest hold out is bip174 which might be tough.

I made a few tools in uint8array-tools (we use them in tiny-secp256k1) that can help with some of the Buffer APIs we use. You can add more tools to that if needed.

Switching away from Buffers should probably be a major version bump, and I think we can also move OPS to enum etc.

Whatever you want to work on, feel free.

If you have questions, asking here is fine. I am also available on Matrix (see the README)

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

No branches or pull requests

3 participants