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

fix the native blake2 bindings issue #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kamalbuilds
Copy link

Fixes #13

The issue is that the sdk is trying to use the native blake2 Node.js module which requires C++ bindings, but those bindings aren't available.

However, there are pure JavaScript/TypeScript implementations of BLAKE2 that we can use instead and in this PR uses it.

The advantages of this approach are:

  1. No native dependencies required
  2. Pure JavaScript implementation that works in all environments
  3. Well-maintained and secure implementation
  4. TypeScript support out of the box

The @noble/hashes library is a popular choice for cryptographic hashes in JavaScript/TypeScript projects and provides a more portable solution than the native blake2 module. It implements the same BLAKE2b algorithm, so the cryptographic properties and output will be identical to the native version.

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

Successfully merging this pull request may close these issues.

TS Sdk has a hashing bug due to which it gives error while using it
1 participant