0.2.0 • Published 1 year ago
vsss-wasm v0.2.0
Description
Porting publicly verifiable shamir secret sharing from Rust to WASM for javascript.
secret size = 32 bytes.
verifier size = 130 bytes. (optional)
Compile Wasm
install wasm-pack :
$ npm install -g @bytecodealliance/jco
$ npm install -g @bytecodealliance/componentize-js
$ rustup target install wasm32-wasip2 wasm32-wasip1 wasm32-wasi
$ cargo install cargo-componentto build the project use one of the provided target options :
$ jco transpile vsss_wasm.wasm -o targetRun
Web sample
You can use any web server, here I use python.
To install Python simple web server :
$ python -m pip install simple-http-serverrun these commands :
$ cd samples/web-pkg
$ python -m simple_http_serverthen open localhost:9090/web.html
then look at browser console logs in verbose mode.
Node.js sample
$ cd samples/node-pkg
$ node --trace-warnings app.mjs