# @aztec/simulator

> This library package is responsible for simulating function circuits compiled to ACIR / AVM.

Latest version **5.2.0** (published 2026-08-17) · 0 weekly downloads

## Install

```sh
npm install @aztec/simulator
pnpm add @aztec/simulator
yarn add @aztec/simulator
bun add @aztec/simulator
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.2.0 |
| Published | 2026-08-17 |
| First published | 2024-02-06 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=20.10 |
| Dependencies | 15 |
| Unpacked size | 1.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | zac-williamson, leilawang, charlielye, jaosef, joss-aztecprotocol, ludamad |

## Links

- npm: https://www.npmjs.com/package/@aztec/simulator
- npm.io page: https://npm.io/package/@aztec/simulator

## Dependencies (15)

- [tslib](https://npm.io/package/tslib.md) ^2.4.0
- [lodash.merge](https://npm.io/package/lodash.merge.md) ^4.6.2
- [@aztec/native](https://npm.io/package/@aztec/native.md) 5.2.0
- [@aztec/stdlib](https://npm.io/package/@aztec/stdlib.md) 5.2.0
- [@aztec/constants](https://npm.io/package/@aztec/constants.md) 5.2.0
- [lodash.clonedeep](https://npm.io/package/lodash.clonedeep.md) ^4.5.0
- [@aztec/foundation](https://npm.io/package/@aztec/foundation.md) 5.2.0
- [@aztec/noir-types](https://npm.io/package/@aztec/noir-types.md) 5.2.0
- [@aztec/world-state](https://npm.io/package/@aztec/world-state.md) 5.2.0
- [@aztec/noir-acvm_js](https://npm.io/package/@aztec/noir-acvm_js.md) 5.2.0
- [@aztec/noir-noirc_abi](https://npm.io/package/@aztec/noir-noirc_abi.md) 5.2.0
- [@aztec/telemetry-client](https://npm.io/package/@aztec/telemetry-client.md) 5.2.0
- [@aztec/protocol-contracts](https://npm.io/package/@aztec/protocol-contracts.md) 5.2.0
- [@aztec/standard-contracts](https://npm.io/package/@aztec/standard-contracts.md) 5.2.0
- [@aztec/noir-protocol-circuits-types](https://npm.io/package/@aztec/noir-protocol-circuits-types.md) 5.2.0

## Recent versions

- 5.2.0 (latest) — 2026-08-17
- 5.3.0-nightly.20260920 (prerelease) — 2026-09-20
- 0.0.1-dev (dev) — 2026-06-26
- 4.4.0-nightly.20260618 (nightly) — 2026-06-18
- 4.3.0-rc.1 (rc) — 2026-05-15
- 0.0.1-commit.fff30aa (commit) — 2026-04-17
- 4.0.0-devnet.4-patch.0 (devnet) — 2026-04-06
- 4.2.0-aztecnr-rc.2 (aztecnr-rc) — 2026-03-26
- 5.0.0-private.20260319 (private) — 2026-03-19
- 5.0.0-patched.20260318 (patched) — 2026-03-18
- 4.0.0-spartan.20260218 (spartan) — 2026-02-18
- 2.0.3-zkpassport (zkpassport) — 2025-12-03
- 3.0.0-manual.20251030 (manual) — 2025-10-30
- 0.0.1-fake-ceab37513c (fake-ceab37513c) — 2025-10-30
- 0.0.1-fake-c83136db25 (fake-c83136db25) — 2025-10-30
- … 1236 more at https://npm.io/package/@aztec/simulator/versions

## README

# Simulator

## Responsibilities

This library package is responsible for simulating function circuits compiled to ACIR / AVM.

Simulating a function implies generating the partial witness and the public inputs of the function, as well as collecting all the data (such as created notes or nullifiers, or state changes) that are necessary for components upstream.

It's able to simulate three different types of functions:

### Private Functions

Private functions are simulated and proved client-side, and verified client-side in the private kernel circuit.

The public inputs of private functions are defined [here](../stdlib/src/structs/private_circuit_public_inputs.ts).

They are run with the assistance of a DB oracle that provides any private data requested by the function.

Private functions can call another private function, and can request to call a public function, but the public function execution will be performed by the sequencer asynchronously, thus having no access to the return values.

### Public Functions

Public functions are simulated and proved on the sequencer side, and verified by the public kernel circuit.

The public inputs of public functions are defined [here](../stdlib/src/structs/avm/avm_circuit_public_inputs.ts).

They are run with the assistance of an oracle that provides any value read from the public state tree.

Public functions can call other public functions, but cannot call private functions.

See the specifications of the [Aztec Virtual Machine (AVM) for public execution](./docs/avm/index.md).

### Unconstrained Functions

Unconstrained functions are useful to extract data for users that could produce very large execution traces - such as the summed balance of all of a user's notes.
They are not proved, and are simulated client-side.

They are run with the assistance of a DB oracle that provides any private data requested by the function.

At the moment, unconstrained functions cannot call any other function.
It would be possible to allow them to call other unconstrained functions.

## Usage

### Development

Same steps as any other library. They are detailed [here](../README.md#development)

### Testing

Same steps as any other library. They are detailed [here](../README.md#tests)

### Benchmarking

```
LOG_LEVEL=info yarn test src/public/public_tx_simulator/apps_tests/bench.test.ts
```

---
_Source: https://npm.io/package/@aztec/simulator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
