Skip to content

Files

Latest commit

2cbba4e · Jul 30, 2019

History

History
This branch is 2 commits behind arnaucube/go-snark-study:master.

wasm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 24, 2019
Jul 10, 2019
Jul 30, 2019
Jul 30, 2019
Jun 24, 2019
Jul 27, 2019
Jun 24, 2019
Jun 24, 2019

go-snark wasm

Warning: this is an ongoing experimentation

WASM wrappers for zkSNARK Pinocchio & Groth16 protocols.

Wasm usage

To compile to wasm, inside the wasm directory, execute:

GOARCH=wasm GOOS=js go build -o go-snark.wasm go-snark-wasm-wrapper.go

Add the file wasm_exec.js in the directory:

cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" .

To see the usage from javascript, check index.js file.

Run the http server that allows to load the .wasm file:

node server.js