Packages
The SDK ships as two packages, both published to GitHub Packages under the @cardinal-cryptography scope. See Getting Started for the .npmrc setup that authenticates installs against https://npm.pkg.github.com.
@cardinal-cryptography/sdk
Dual-target SDK for Node and browser. One install, conditional exports route to the right entry per runtime.
| Export | Description |
|---|---|
createRuntime() | Full runtime — decryption + proving |
createReadRuntime() | Read-only runtime — decryption only |
DlogSolver | WASM discrete-log solver (Node and browser builds) |
NoirProver | Noir-backed prover with bundled circuit JSONs |
bun add @cardinal-cryptography/sdk viem
Bundles the dlog-solver WASM (both wasm/node/ and wasm/browser/), the Noir circuit JSONs (circuits/eb_*.json), and re-exports everything from @cardinal-cryptography/core. Most apps depend only on this package.
@cardinal-cryptography/core
Platform-agnostic primitives: cryptographic helpers, account/runtime types, action extensions, client factories, and bundler/paymaster support. Pure TypeScript, no WASM, no heavy peers — depends only on viem.
bun add @cardinal-cryptography/core viem
You typically don't install core directly — @cardinal-cryptography/sdk re-exports its public surface. Library authors who want to stay platform-agnostic depend on core directly.
Peer dependencies
| Package | When required |
|---|---|
viem | Always |
@aztec/bb.js | When using the prover (full runtime) |
@noir-lang/noir_js | When using the prover (full runtime) |
@noir-lang/acvm_js | When using the prover (full runtime) |
@noir-lang/noirc_abi | When using the prover (full runtime) |