@zk-kit/artifacts
v2.0.1
Published
Utilities for downloading snark artifacts
Downloads
5,398
Readme
Downloading artifacts
@zk-kit/artifacts
provides a set of functions to automatically download artifacts from the snark artifacts registry hosted by PSE at snark-artifacts.pse.dev. For example:
import { maybeGetSnarkArtifacts, Project } from '@zk-kit/artifacts'
// It will return the artifacts' paths.
const { wasm, zkey } = await maybeGetSnarkArtifacts(Project.POSEIDON, {
parameters: [2],
version: '1.0.0',
})
console.log(wasm) // "/tmp/@zk-kit/[email protected]/poseidon-2.wasm"
console.log(zkey) // "/tmp/@zk-kit/[email protected]/poseidon-2.zkey"
// Paths on browsers will be the `unpkg` URLs directly.
// e.g. https://unpkg.com/@zk-kit/[email protected]/poseidon-2.zkey
CLI
Or you can install our snarkli
CLI to download artifacts, list available packages or generate artifacts (.zkey
, .wasm
) from .circom
source files.
pnpm add -g @zk-kit/artifacts
snarkli