mirror of
https://github.com/arnaucube/websnark.git
synced 2026-02-27 21:46:42 +01:00
Improve instructions in readme
This commit is contained in:
18
README.md
18
README.md
@@ -31,6 +31,8 @@ witness is a binary buffer with all the signals in binnary format. The buffer i
|
||||
|
||||
You can use the tool to build the binary file from the witness.json file generated by [snarkjs](https://github.com/iden3/snarkjs).
|
||||
|
||||
### IMPORTANT: Please be sure you run your setup with `--protocol groth` websnark only generates groth16 proofs!
|
||||
|
||||
```
|
||||
node ../tools/buildwitness.js -i witness.json -o witness.bin
|
||||
```
|
||||
@@ -102,6 +104,22 @@ function calcProof() {
|
||||
</html>
|
||||
```
|
||||
|
||||
You can test it by running a web server on the example directory
|
||||
|
||||
```
|
||||
npm -g install http-server
|
||||
cd example
|
||||
http-server .
|
||||
```
|
||||
|
||||
And then navegate to [http://127.0.0.1:8080](http://127.0.0.1:8080)
|
||||
|
||||
The generated proof can be cut and pasted to `example/proof` and tested with snarkjs
|
||||
|
||||
```
|
||||
snarkjs verify
|
||||
``
|
||||
|
||||
## Building wasm.js
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user