You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Default resources (.zkey and .wasm) generated by snarkjs are encoded in base64 and put inside typescript files. It's a workaround. They should be individual files originally since it's easier to maintain and it allows developers to decide whether or not to load a file. base64 approach has been used because I find it harder to make RLNjs work with standalone files while supporting both browser and nodejs.
How to fix it?
At the moment I can only think of using environment variables to determine whether it's in the browser or nodejs, and access resources in different ways. Maybe there is a better approach though.
The text was updated successfully, but these errors were encountered:
Thanks to the suggestion from @0xtsukino , if we have a static server hosting resources, it will be a lot easier to support the browser by fetching the resource by URL.
What’s wrong?
Default resources (
.zkey
and.wasm
) generated bysnarkjs
are encoded in base64 and put inside typescript files. It's a workaround. They should be individual files originally since it's easier to maintain and it allows developers to decide whether or not to load a file.base64
approach has been used because I find it harder to make RLNjs work with standalone files while supporting both browser and nodejs.How to fix it?
At the moment I can only think of using environment variables to determine whether it's in the browser or nodejs, and access resources in different ways. Maybe there is a better approach though.
The text was updated successfully, but these errors were encountered: