Skip to main content

Installation (v2)

Packages use the @zk-privacy scope (often GitHub Packages). Configure ~/.npmrc like v1 if your org requires it.

Install

@zk-privacy/web and @zk-privacy/node already depend on @zk-privacy/core, and declare @aztec/bb.js, @noir-lang/noir_js, @noir-lang/acvm_js, and @noir-lang/noirc_abi as peerDependencies (needed at runtime for in-process proving).

npm (v7 and later) installs those peer packages automatically when you add the adapter, so this is enough:

npm install @zk-privacy/web
# or
npm install @zk-privacy/node

Add @zk-privacy/core explicitly if you import types or helpers from it in application code (it is already a dependency of the adapters).

Explicit Noir/bb versions in the install command are optional: use them when you want to pin versions, or when your package manager does not auto-install peers (e.g. Yarn 1.x — add peers yourself or use install-peerdeps).

pnpm satisfies peers from the graph; if it warns about missing peers, add those packages or use pnpm.peerDependencyRules.

Packages (high level)

PackageRole
@zk-privacy/webcreateWebClient
@zk-privacy/nodecreateNodeClient + bundled circuit JSON
@zk-privacy/coreZkpClient, ZkpWallet, shared types

The web adapter does not ship circuit JSON in the npm tarball; createWebClient defaults to fetching artifacts from https://cdn.zkprivacy.dev/circuits/v1/ (eb_transfer.json, eb_unshield.json). Override with circuitsCdnBaseUrl, circuitLoader, or pre-resolved transferCircuit / toPublicCircuit. node loads bundled JSON from disk by default.

Custom backends (e.g. native prover): types from @zk-privacy/core/types. Details: Advanced.