vsss-wasm
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

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-component

to build the project use one of the provided target options :

$ jco transpile vsss_wasm.wasm -o target

Run

Web sample

You can use any web server, here I use python.

To install Python simple web server :

$ python -m pip install simple-http-server

run these commands :

$ cd samples/web-pkg
$ python -m simple_http_server

then 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

Package Sidebar

Install

npm i vsss-wasm

Weekly Downloads

2

Version

0.2.0

License

Apache-2.0

Unpacked Size

168 kB

Total Files

17

Last publish

Collaborators

  • zorvan