curvy-wasm
wasm-bindgen exports for curvy-core: Poseidon, seed-backed and direct-scalar
BabyJubjub signing, note encryption and commitments, Merkle trees, witness-input
builders, and stealth addressing.
This crate is the JavaScript binding for core cryptography and tree operations.
Groth16 proving is emitted as a separate WASM module by curvy-prover, allowing
applications to ship only the functionality they use.
Build
Use the workspace scripts rather than invoking wasm-bindgen manually:
Portable builds are single-threaded. The threaded browser build exports
initThreadPool(n), requires cross-origin isolation, and uses n as this
module's worker-pool size.
The generated TypeScript declarations are the JavaScript API reference for each concrete output package. Rust item documentation on docs.rs/curvy-wasm describes the underlying wasm-bindgen exports and boundary validation.
Both signing profiles are supported:
| JavaScript API | Profile |
|---|---|
pubFromPrivateKey, sign |
Seed-backed BLAKE-512/prune derivation |
pubFromScalar, signWithScalar, verifyScalarSignature |
Checked direct-scalar derivation |
See the workspace guide for exact output directories, per-target requirements, and worker-budget configuration.