-
Notifications
You must be signed in to change notification settings - Fork 8
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
NodeJS bindings #3
Conversation
for (uint32_t blob_index = 0; blob_index < blobs_count; blob_index++) { | ||
Napi::Value blob = blobs_param[blob_index]; | ||
auto blob_bytes = blob.As<Napi::Uint8Array>().Data(); | ||
memcpy(blobs[blob_index], blob_bytes, BYTES_PER_BLOB); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this copying is unfortunate - does passing blobs_param more directly not work? (like in the python version). not a big deal if you have to copy though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I have tried a bunch of things but can't figure out anything other than memcpy.
blobs_param
is of type Napi::Array
. I've been googling and trying things. Nothing so far is working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming the bindings actually build and work (I haven't tested) this looks great to me.
…tely on verify_kzg_proof failure
This PR adds NodeJS bindings with the following interface:
I also added blst as a submodule.
Most of diff is a yarn lockfile.
Test instructions: README