1.6.0 • Published 6 months ago

libzkbob-rs-wasm-web v1.6.0

Weekly downloads
-
License
MIT OR Apache-2.0
Repository
github
Last release
6 months ago

libzkbob-rs-wasm

Wasm/JavaScript version of libzkbob-rs.

Install

Bundler version: npm i -S libzkbob-rs-wasm-bundler or nodejs version: npm i -S libzkbob-rs-wasm-nodejs

Configuration

Webpack 5

When using the bundler version, 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 your 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 'libzkbob-rs-wasm-bundler';

const state = await State.init("any user identifier");
const account = new UserAccount(spendingKey, 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

Build both bundler and nodejs versions:

scripts/build

Test in Headless Browsers with wasm-pack test

wasm-pack test --headless --firefox
1.7.0-beta5

6 months ago

1.7.0-beta4

7 months ago

1.7.0-beta3

7 months ago

1.7.0-beta2

7 months ago

1.7.0-beta1

8 months ago

1.6.0

9 months ago

1.6.0-beta2

9 months ago

1.6.0-beta

10 months ago

1.4.2

12 months ago

1.5.0

11 months ago

1.4.2-beta2

12 months ago

1.5.0-beta2

11 months ago

1.5.0-beta

11 months ago

1.4.2-beta

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.2.0

1 year ago

1.3.0

1 year ago

1.1.0

1 year ago

1.0.0

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.3.16

2 years ago

0.3.15

2 years ago

0.3.14

2 years ago

0.3.13

2 years ago

0.3.12

2 years ago

0.3.10

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.3.9

2 years ago