0.3.0-alpha.3 • Published 4 years ago
libzeropool-wasm v0.3.0-alpha.3
libzeropool-wasm
Wasm/JavaScript version of libzeropool.
Install
yarn add libzeropool-wasm or npm i -S libzeropool-wasm
Configuration
Webpack 5
Make sure that the experiments.asyncWebAssembly is set to true and there is no import to require transformation
happening before webpack has a chance to process you code.
For example, in your tsconfig.json set this option so that the typescript compiler does not transform your imports
compilerOptions.module = "es2020"
experiments: {
asyncWebAssembly: true,
}Usage
import { UserAccount, State } from 'libzeropool-wasm';
const state = await State.init("any user identifier");
const account = new UserAccount(secretKey, state);
const address = account.generateAddress();
const mergeTx = await account.createTx([{ to: address, amount: "0"}], blockchainData);
const params = Params.fromBinary(serializedParameters);
const proof = Proof.tx(params, mergeTx.public, mergeTx.secret);Development
Build
scripts/buildTest in Headless Browsers with wasm-pack test
wasm-pack test --headless --firefox0.3.0-alpha.2
4 years ago
0.3.0-alpha.3
4 years ago
0.3.0-alpha.1
4 years ago
0.3.0-alpha
4 years ago
0.2.0
4 years ago
0.1.7
5 years ago
0.1.6
5 years ago
0.1.4
5 years ago
0.1.5
5 years ago
0.1.3
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago