Closed ARitz-Cracker closed 6 years ago
Hey @ARitz-Cracker, thanks for opening an issue. I'll add an explanation of the compilation process in the readme.
We do all the compilation in Docker to ensure simple and deterministic builds between different development environments.
You'll need to have Docker installed on your machine, then run the npm
script for the WASM you want to compile. For Secp256k1, you'll want to run:
npm run compile:secp256k1
The output should be automatically placed in the right locations. If you're adding to the bindings, you'll also need to modify those to include the new functionality. In your case, you'll need to update bindings in secp256k1Wasm.ts
and depending on your changes, seckp256k1.ts
(the functional wrapper).
Thank you! I managed to get recoverable signatures to work properly! You've been helpful.
I was trying my hand on exposing a function I needed for a project of mine, I thought rather than submitting an issue about it without knowing if or when it would be implemented, I thought I'd learn something new and add it myself, so I spent a lot of time figuring out how the WASM functions were exposed to JS, which lead me to the compiling commands in
secp256k1.Dockerfile
.I've tried running the commands specified in the docker-file, but... I kinda ran into a wall when actually trying compile it: