@tokamak-zk-evm/synthesizer-web
v1.0.3
Published
Browser-facing Tokamak zk-EVM synthesizer package with bundled subcircuit library assets.
Readme
Tokamak zk-EVM Synthesizer Web App
@tokamak-zk-evm/synthesizer-web is the browser-facing package for running the Tokamak zk-EVM synthesizer from uploaded files or application-provided payload objects.
Install
npm install @tokamak-zk-evm/synthesizer-webRuntime Model
- The published build bundles the subcircuit library JSON and WASM artifacts at build time.
- Callers only provide the transaction/state/block/code payload.
- No extra subcircuit fetch or file upload step is required at runtime.
Quick start
import {
loadSynthesisInputFromFiles,
saveSynthesisOutputToFiles,
synthesize,
} from '@tokamak-zk-evm/synthesizer-web';
const payload = await loadSynthesisInputFromFiles({
previousState,
transaction,
blockInfo,
contractCodes,
});
const output = await synthesize(payload);
saveSynthesisOutputToFiles(output);Input Shape
synthesize(input) expects one transaction payload with:
previousStatetransactionblockInfocontractCodes
The package also provides:
loadSynthesisInputFromFiles(...)loadSynthesisInputFromUrls(...)saveSynthesisOutputToFiles(...)postSynthesisOutput(...)
Notes
- Build-time dependency metadata is exported as
buildMetadata. - The same metadata is also written to
build-metadata.jsonin the published package root. buildMetadata.dependencies.subcircuitLibrary.buildVersionandbuildMetadata.dependencies.tokamakL2js.buildVersionrecord the exact versions bundled into the published web package.- This package targets browser-style runtimes and ESM consumption.
- Node CLI usage belongs to
@tokamak-zk-evm/synthesizer-node. - Workspace overview: ../README.md
- Workspace changelog: ../CHANGELOG.md
