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

Replace Buffer with Uint8Array #49

Open
xcaptain opened this issue Oct 28, 2024 · 3 comments
Open

Replace Buffer with Uint8Array #49

xcaptain opened this issue Oct 28, 2024 · 3 comments

Comments

@xcaptain
Copy link

xcaptain commented Oct 28, 2024

I'm developing a dapp using sveltekit + tonconnectui, I have to install the vite-plugin-node-polyfills package to fix the Fix Buffer is not defined error, because @ton/core uses Buffer which is a nodejs only type. I hope you can replace it with Uint8Array so we can better use it in browser.

An example can be found at: https://github.com/ton-org/ton-core/blob/main/src/boc/BitString.ts#L17

@xcaptain
Copy link
Author

@dvlkv can you take a look at it? do you have any plan to remove nodejs dependency?

@dvlkv
Copy link
Collaborator

dvlkv commented Oct 29, 2024

Yes we do have plans removing Buffer in the next major version. However, I cannot provide you any estimates on this update.

@xcaptain
Copy link
Author

This PR shows it's not hard to replace Buffer with Uint8Array. I'm happy to help if you need.

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

2 participants