> For the complete documentation index, see [llms.txt](/llms.txt)

# Node JSON RPC API reference

This document provides a complete reference for the Aztec Node JSON RPC API. All methods are exposed via JSON RPC on the node's configured ports.

## API endpoint

**Public RPC URL**: `http://localhost:8080`

**Admin URL**: `http://localhost:8880`

Note that the above ports are only defaults, and can be modified by setting `--port` and `--admin-port` flags upon startup.

All methods use standard JSON RPC 2.0 format with methods prefixed by `aztec_` or `aztecAdmin_`.

## Block queries

### aztec\_getBlockNumber

Returns the block number at a given block tag, or the latest proposed block number when `tip` is omitted.

**Parameters**:

1. `tip` - `BlockTagWithoutLatest | undefined`

**Returns**: `number`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getBlockNumber","params":["0x1234..."],"id":1}'
```

### aztec\_getCheckpointNumber

Returns the checkpoint number at a given checkpoint tag, or the latest checkpointed number when `tip` is omitted. The proposed-but-unconfirmed checkpoint frontier is archiver-internal and not exposed over RPC, so `'proposed'` is not a valid checkpoint tag (see ).

**Parameters**:

1. `tip` - `CheckpointTag | undefined`

**Returns**: `number`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getCheckpointNumber","params":["0x1234..."],"id":1}'
```

### aztec\_getChainTips

Returns the tips of the L2 chain.

**Parameters**: None

**Returns**: `L2Tips`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getChainTips","params":[],"id":1}'
```

### aztec\_getL1Constants

Returns the rollup constants for the current chain.

**Parameters**: None

**Returns**: `L1RollupConstants`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getL1Constants","params":[],"id":1}'
```

### aztec\_getSyncedL2SlotNumber

Returns the last L2 slot number for which the node has all L1 data needed to build the next checkpoint.

**Parameters**: None

**Returns**: `SlotNumber | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getSyncedL2SlotNumber","params":[],"id":1}'
```

### aztec\_getSyncedL2EpochNumber

Returns the last L2 epoch number that has been fully synchronized from L1.

**Parameters**: None

**Returns**: `number | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getSyncedL2EpochNumber","params":[],"id":1}'
```

### aztec\_getSyncedL1Timestamp

Returns the latest L1 timestamp according to the archiver's synced L1 view.

**Parameters**: None

**Returns**: `bigint | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getSyncedL1Timestamp","params":[],"id":1}'
```

### aztec\_getBlock

Unified block fetch. Returns the block identified by `param`, with optional fields controlled by `options`.

**Parameters**:

1. `param` - `BlockHash | number | "latest"` - A block number, block hash, archive root, chain-tip name, or object variant.
2. `options` - `BlockIncludeOptions | undefined` - Narrowing options: `includeTransactions`, `includeL1PublishInfo`, `includeAttestations`.

**Returns**: `BlockResponse | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getBlock","params":["latest","0x1234..."],"id":1}'
```

### aztec\_getBlockData

Lightweight block-metadata fetch. Returns the block identified by `param` without transaction bodies or other optional context. Cheaper than `getBlock` for header-only access.

**Parameters**:

1. `param` - `BlockHash | number | "latest"` - A block number, block hash, archive root, chain-tip name, or object variant.

**Returns**: `BlockData | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getBlockData","params":["latest"],"id":1}'
```

### aztec\_getBlocks

Returns up to `limit` blocks starting from `from`, projected to the shape determined by `options`.

**Parameters**:

1. `from` - `number`
2. `limit` - `number`
3. `options` - `BlocksIncludeOptions | undefined`

**Returns**: `BlockResponse[]`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getBlocks","params":[1,100,"0x1234..."],"id":1}'
```

### aztec\_getCheckpoint

Unified checkpoint fetch. Returns the checkpoint identified by `param`, with optional fields controlled by `options`.

**Parameters**:

1. `param` - `CheckpointParameter`
2. `options` - `CheckpointIncludeOptions | undefined`

**Returns**: `CheckpointResponse | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getCheckpoint","params":["0x1234...","0x1234..."],"id":1}'
```

### aztec\_getCheckpoints

Returns up to `limit` checkpoints starting from `from`, projected to the shape determined by `options`.

**Parameters**:

1. `from` - `number`
2. `limit` - `number`
3. `options` - `CheckpointIncludeOptions | undefined`

**Returns**: `CheckpointResponse[]`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getCheckpoints","params":[1,100,"0x1234..."],"id":1}'
```

### aztec\_getCheckpointsData

Gets lightweight checkpoint metadata for a contiguous range or for an entire epoch.

**Parameters**:

1. `query` - `CheckpointsQuery` - Either `{ from, limit }` or `{ epoch }`.

**Returns**: `CheckpointData[]`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getCheckpointsData","params":["0x1234..."],"id":1}'
```

## Transaction operations

### aztec\_sendTx

Method to submit a transaction to the p2p pool.

**Parameters**:

1. `tx` - `Tx` - The transaction to be submitted.

**Returns**: `void` - Nothing.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_sendTx","params":[{"data":"0x..."}],"id":1}'
```

### aztec\_getTxReceipt

Fetches a transaction receipt for a given transaction hash. Always resolves to one of the lifecycle variants of the union: a if the tx was included in a block, a if it's still in the mempool of the connected Aztec node, or a if not found.

**Parameters**:

1. `txHash` - `TxHash` - The transaction hash.
2. `options` - `GetTxReceiptOptions | undefined` - Optional flags controlling which extra data is attached: `includeTxEffect` attaches the full to a mined receipt, `includePendingTx` attaches the pending to a pending receipt, and `includeProof` keeps the proof on that attached pending tx (only meaningful with `includePendingTx`).

**Returns**: `TxReceipt` - A receipt of the transaction.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getTxReceipt","params":["0x1234...","0x1234..."],"id":1}'
```

### aztec\_getTxEffect

Gets a tx effect.

**Deprecated**: Use `getTxReceipt(txHash, { includeTxEffect: true })` and read the `.txEffect` field instead.

**Parameters**:

1. `txHash` - `TxHash` - The hash of the tx corresponding to the tx effect.

**Returns**: `IndexedTxEffect | undefined` - The requested tx effect with block info (or undefined if not found).

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getTxEffect","params":["0x1234..."],"id":1}'
```

### aztec\_getTxByHash

Method to retrieve a single pending tx. The tx's proof is stripped unless `includeProof` is set.

**Parameters**:

1. `txHash` - `TxHash` - The transaction hash to return.
2. `options` - `GetTxByHashOptions | undefined` - Options for the returned tx (eg whether to include its proof).

**Returns**: `Tx | undefined` - The pending tx if it exists.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getTxByHash","params":["0x1234...","0x1234..."],"id":1}'
```

### aztec\_getTxsByHash

Method to retrieve multiple pending txs. The txs' proofs are stripped unless `includeProof` is set.

**Parameters**:

1. `txHashes` - `TxHash[]`
2. `options` - `GetTxByHashOptions | undefined` - Options for the returned txs (eg whether to include their proofs).

**Returns**: `Tx[]` - The pending txs if exist.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getTxsByHash","params":[["0x1234..."],"0x1234..."],"id":1}'
```

### aztec\_getPendingTxs

Method to retrieve pending txs. The txs' proofs are stripped unless `includeProof` is set.

**Parameters**:

1. `limit` - `number | undefined` - The number of items to return.
2. `after` - `TxHash | undefined` - The last known pending tx. Used for pagination.
3. `options` - `GetTxByHashOptions | undefined` - Options for the returned txs (eg whether to include their proofs).

**Returns**: `Tx[]` - The pending txs.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getPendingTxs","params":[100,"0x1234...","0x1234..."],"id":1}'
```

### aztec\_getPendingTxCount

Retrieves the number of pending txs

**Parameters**: None

**Returns**: `number` - The number of pending txs.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getPendingTxCount","params":[],"id":1}'
```

### aztec\_isValidTx

Returns true if the transaction is valid for inclusion at the current state. Valid transactions can be made invalid by *other* transactions if e.g. they emit the same nullifiers, or come become invalid due to e.g. the expiration\_timestamp property.

**Parameters**:

1. `tx` - `Tx` - The transaction to validate for correctness.
2. `options` - `object | undefined`

**Returns**: `TxValidationResult`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_isValidTx","params":[{"data":"0x..."},{}],"id":1}'
```

### aztec\_simulatePublicCalls

Simulates the public part of a transaction with the current state. This currently just checks that the transaction execution succeeds.

**Parameters**:

1. `tx` - `Tx` - The transaction to simulate.
2. `skipFeeEnforcement` - `boolean | undefined` - If true, fee enforcement is skipped.
3. `overrides` - `SimulationOverrides | undefined` - Optional pre-simulation overrides applied to the ephemeral fork and contract DB (publicStorage writes, contract instance overrides).

**Returns**: `PublicSimulationOutput`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_simulatePublicCalls","params":[{"data":"0x..."},true,"0x1234..."],"id":1}'
```

## State queries

### aztec\_getPublicStorageAt

Gets the storage value at the given contract storage slot.

**Remarks**: The storage slot here refers to the slot as it is defined in Noir not the index in the merkle tree. Aztec's version of `eth_getStorageAt`.

**Parameters**:

1. `referenceBlock` - `BlockHash | number | "latest"` - The block parameter (block number, block hash, or 'latest') at which to get the data.
2. `contract` - `AztecAddress` - Address of the contract to query.
3. `slot` - `Fr` - Slot to query.

**Returns**: `Fr` - Storage value at the given contract slot.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getPublicStorageAt","params":["latest","0x1234...","0x1234..."],"id":1}'
```

### aztec\_getWorldStateSyncStatus

Returns the sync status of the node's world state

**Parameters**: None

**Returns**: `WorldStateSyncStatus`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getWorldStateSyncStatus","params":[],"id":1}'
```

## Membership witnesses

### aztec\_findLeavesIndexes

Find the indexes of the given leaves in the given tree along with a block metadata pointing to the block in which the leaves were inserted.

**Parameters**:

1. `referenceBlock` - `BlockHash | number | "latest"` - The block parameter (block number, block hash, or 'latest') at which to get the data.
2. `treeId` - `MerkleTreeId` - The tree to search in.
3. `leafValues` - `Fr[]` - The values to search for.

**Returns**: `(DataInBlock<bigint> | undefined)[]` - The indices of leaves and the block metadata of a block in which the leaves were inserted.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_findLeavesIndexes","params":["latest",1,["0x1234..."]],"id":1}'
```

### aztec\_getNullifierMembershipWitness

Returns a nullifier membership witness for a given nullifier at a given block.

**Parameters**:

1. `referenceBlock` - `BlockHash | number | "latest"` - The block parameter (block number, block hash, or 'latest') at which to get the data.
2. `nullifier` - `Fr` - Nullifier we try to find witness for.

**Returns**: `NullifierMembershipWitness | undefined` - The nullifier membership witness (if found).

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getNullifierMembershipWitness","params":["latest","0x1234..."],"id":1}'
```

### aztec\_getLowNullifierMembershipWitness

Returns a low nullifier membership witness for a given nullifier at a given block.

**Remarks**: Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked list structure" of leaves and proving that a lower nullifier is pointing to a bigger next value than the nullifier we are trying to prove non-inclusion for.

**Parameters**:

1. `referenceBlock` - `BlockHash | number | "latest"` - The block parameter (block number, block hash, or 'latest') at which to get the data.
2. `nullifier` - `Fr` - Nullifier we try to find the low nullifier witness for.

**Returns**: `NullifierMembershipWitness | undefined` - The low nullifier membership witness (if found).

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getLowNullifierMembershipWitness","params":["latest","0x1234..."],"id":1}'
```

### aztec\_getPublicDataWitness

Returns a public data tree witness for a given leaf slot at a given block.

**Remarks**: The witness can be used to compute the current value of the public data tree leaf. If the low leaf preimage corresponds to an "in range" slot, means that the slot doesn't exist and the value is 0. If the low leaf preimage corresponds to the exact slot, the current value is contained in the leaf preimage.

**Parameters**:

1. `referenceBlock` - `BlockHash | number | "latest"` - The block parameter (block number, block hash, or 'latest') at which to get the data.
2. `leafSlot` - `Fr` - The leaf slot we try to find the witness for.

**Returns**: `PublicDataWitness | undefined` - The public data witness (if found).

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getPublicDataWitness","params":["latest","0x1234..."],"id":1}'
```

### aztec\_getBlockHashMembershipWitness

Returns a membership witness for a given block hash in the archive tree, against the reference block header's `lastArchive.root`: the archive as it stood before the reference block itself was appended. This is the root a circuit anchored on that header checks archive membership proofs against.

Block hashes are the leaves of the archive tree. Each time a new block is added to the chain, its block hash is appended as a new leaf to the archive tree. This method finds the membership witness (leaf index and sibling path) for a given block hash, which can be used to prove that a specific block exists in the chain's history.

The reference block must exist. Every `BlockParameter` form selects that reference block, including `{ archive }`, which identifies the block by its post-block archive root, so the witness is still against the archive before that block. To prove membership against a supplied archive root itself, use `getBlockHashMembershipWitnessAtArchive`.

**Parameters**:

1. `referenceBlock` - `BlockHash | number | "latest"` - The block whose header's `lastArchive` the witness is computed against.
2. `blockHash` - `BlockHash` - The block hash to find in the archive tree.

**Returns**: `MembershipWitness | undefined` - The witness, or undefined if the block hash is not in that archive.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getBlockHashMembershipWitness","params":["latest","0x1234..."],"id":1}'
```

### aztec\_getBlockHashMembershipWitnessAtArchive

Returns a membership witness for a given block hash in the archive tree, against exactly the supplied archive root. The root is the archive after some block's own hash was appended, so a block is a member of its own archive and no later block needs to exist.

Choosing a root does not establish that it is canonical or final: a node that has not yet seen a reorg can serve a witness against a root that has been reorged away. The caller must pick a root its verifier accepts.

**Parameters**:

1. `reference` - `{ archive: Fr }` - The archive root to prove membership against.
2. `blockHash` - `BlockHash` - The block hash to find in the archive tree.

**Returns**: `MembershipWitness | undefined` - The witness, or undefined if the block hash is not in that archive.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getBlockHashMembershipWitnessAtArchive","params":[{"archive":"0x1234..."},"0x1234..."],"id":1}'
```

### aztec\_getNoteHashMembershipWitness

Returns a membership witness for a given note hash at a given block.

**Parameters**:

1. `referenceBlock` - `BlockHash | number | "latest"` - The block parameter (block number, block hash, or 'latest') at which to get the data.
2. `noteHash` - `Fr` - The note hash we try to find the witness for.

**Returns**: `MembershipWitness | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getNoteHashMembershipWitness","params":["latest","0x1234..."],"id":1}'
```

### aztec\_getTxEffectMembershipWitness

Returns a membership witness proving that tx `txHash` was included in its block and produced exactly the effects the node reports for it. The witness is verified against the `txEffectsTreeRoot` of the block header of `witness.blockNumber`.

Returns `undefined` if the node does not know the tx.

**Parameters**:

1. `txHash` - `TxHash` - The tx to prove inclusion of.

**Returns**: `TxEffectMembershipWitness | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getTxEffectMembershipWitness","params":["0x1234..."],"id":1}'
```

## L1 to L2 messages

### aztec\_getL1ToL2MessageMembershipWitness

Returns the index and a sibling path for a leaf in the committed l1 to l2 data tree.

**Parameters**:

1. `referenceBlock` - `BlockHash | number | "latest"` - The block parameter (block number, block hash, or 'latest') at which to get the data.
2. `l1ToL2Message` - `Fr` - The l1ToL2Message to get the index / sibling path for.

**Returns**: `[bigint, SiblingPath] | undefined` - A tuple of the index and the sibling path of the L1ToL2Message (undefined if not found).

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getL1ToL2MessageMembershipWitness","params":["latest","0x1234..."],"id":1}'
```

### aztec\_getL1ToL2MessageIndex

Returns the compact leaf index assigned to this L1 to L2 message as soon as the node has ingested it from L1, before any L2 block consumes it. Returns undefined if the node has not yet seen the message. The message becomes consumable once a block's L1-to-L2 message tree grows past this index.

**Parameters**:

1. `l1ToL2Message` - `Fr`

**Returns**: `bigint | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getL1ToL2MessageIndex","params":["0x1234..."],"id":1}'
```

### aztec\_getL2ToL1MembershipWitness

Returns the L2-to-L1 membership witness for `message` emitted by tx `txHash`. The node selects the smallest partial-proof root on the Outbox that covers the tx's checkpoint and builds the witness against it.

The node reads the Outbox roots lazily, pinned to its synced L1 block, so the witness reflects the node's synced view. Returns `undefined` if the tx isn't yet in a block/epoch or no covering root has landed on L1 as of the synced block.

Caveat: cached roots that are sealed and L1-finalized are not re-validated. A reorg deeper than L1 finality could leave the node serving a witness against a no-longer-canonical root.

**Parameters**:

1. `txHash` - `TxHash` - The tx whose L2-to-L1 message we want a witness for.
2. `message` - `Fr` - The message hash to prove inclusion of.
3. `messageIndexInTx` - `object | undefined` - Optional index of the message within the tx's L2-to-L1 messages; pass this when the same message hash appears multiple times in the tx.

**Returns**: `L2ToL1MembershipWitness | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getL2ToL1MembershipWitness","params":["0x1234...","0x1234...",{}],"id":1}'
```

### aztec\_getL2ToL1Messages

Returns all the L2 to L1 messages in an epoch.

**Deprecated**: Use to get an L2-to-L1 message witness directly.

**Parameters**:

1. `epoch` - `number` - The epoch at which to get the data.

**Returns**: `Fr[][][][]` - A nested array of the L2 to L1 messages in each tx of each block in each checkpoint in the epoch (empty array if the epoch is not found).

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getL2ToL1Messages","params":[12345],"id":1}'
```

## Log queries

### aztec\_getPrivateLogsByTags

Gets private logs matching the given tags. Returns one inner array per element of `query.tags`, in input order. An empty inner array means no logs matched that tag. Set `query.includeEffects` to also receive the tx's note hashes and nullifiers.

The return type is the widest shape — `noteHashes`/`nullifiers` are typed as optional even when `includeEffects: true` is set. JSON-RPC validation can't preserve a stricter narrowing across the wire. Callers that want a narrowed type at the call site should use the typed helpers in `pxe/src/tagging/get_all_logs_by_tags.ts`.

**Parameters**:

1. `query` - `PrivateLogsQuery`

**Returns**: `LogResult[][]`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getPrivateLogsByTags","params":["0x1234..."],"id":1}'
```

### aztec\_getPublicLogsByTags

Gets public logs matching the given tags for the given contract. Returns one inner array per element of `query.tags`, in input order. An empty inner array means no logs matched that tag. Set `query.includeEffects` to also receive the tx's note hashes and nullifiers.

The return type is the widest shape — see .

**Parameters**:

1. `query` - `PublicLogsQuery`

**Returns**: `LogResult[][]`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getPublicLogsByTags","params":["0x1234..."],"id":1}'
```

## Contract queries

### aztec\_getContractClass

Returns a registered contract class given its id.

**Parameters**:

1. `id` - `Fr` - Id of the contract class.

**Returns**: `ContractClassPublic | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getContractClass","params":["0x1234..."],"id":1}'
```

### aztec\_getContract

Returns a publicly deployed contract instance given its address. Its current class id is resolved as of the given reference block.

Returns `undefined` if the instance has not been published (i.e. `publish_for_public_execution` was never called on the `ContractInstanceRegistry`). A contract whose class has been updated will never return `undefined`: scheduling an update requires the contract's deployment nullifier, which is only emitted by publishing, so any updatable contract has necessarily been published.

**Parameters**:

1. `address` - `AztecAddress` - Address of the deployed contract.
2. `referenceBlock` - `BlockHash | number | "latest" | undefined` - The block parameter (block number, block hash, or 'latest') at which to get the data. Defaults to 'latest'.

**Returns**: `ContractInstanceWithAddress | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getContract","params":["0x1234...","latest"],"id":1}'
```

## Fee queries

### aztec\_getCurrentMinFees

Method to fetch the current min fees.

**Parameters**: None

**Returns**: `GasFees` - The current min fees.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getCurrentMinFees","params":[],"id":1}'
```

### aztec\_getPredictedMinFees

Returns min fees a transaction submitted now may have to pay. When the node can compute it, the list leads with the fee its public simulation would charge right now; the rest are the predicted min fees for the current slot and next N slots, each accounting for the L1 gas oracle transition and congestion growth based on the given mana usage estimate. Defaults to target usage (steady state).

**Parameters**:

1. `manaUsage` - `ManaUsageEstimate | undefined` - Expected mana usage per checkpoint (none, target, or limit).

**Returns**: `GasFees[]` - An array of GasFees whose worst entry is the fee a client should pad and quote.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getPredictedMinFees","params":["target"],"id":1}'
```

### aztec\_getMaxPriorityFees

Method to fetch the current max priority fee of txs in the mempool.

**Parameters**: None

**Returns**: `GasFees` - The current max priority fees.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getMaxPriorityFees","params":[],"id":1}'
```

## Node information

### aztec\_isReady

Method to determine if the node is ready to accept transactions.

**Parameters**: None

**Returns**: `boolean` - Flag indicating the readiness for tx submission.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_isReady","params":[],"id":1}'
```

### aztec\_getNodeInfo

Returns the information about the server's node. Includes current Node version, compatible Noir version, L1 chain identifier, protocol version, and L1 address of the rollup contract.

**Parameters**: None

**Returns**: `NodeInfo` - The node information.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getNodeInfo","params":[],"id":1}'
```

### aztec\_getNodeVersion

Method to fetch the version of the package.

**Parameters**: None

**Returns**: `string` - The node package version

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getNodeVersion","params":[],"id":1}'
```

### aztec\_getVersion

Method to fetch the version of the rollup the node is connected to.

**Parameters**: None

**Returns**: `number` - The rollup version.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getVersion","params":[],"id":1}'
```

### aztec\_getChainId

Method to fetch the chain id of the base-layer for the rollup.

**Parameters**: None

**Returns**: `number` - The chain id.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getChainId","params":[],"id":1}'
```

### aztec\_getL1ContractAddresses

Method to fetch the currently deployed l1 contract addresses.

**Parameters**: None

**Returns**: `L1ContractAddresses` - The deployed contract addresses.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getL1ContractAddresses","params":[],"id":1}'
```

### aztec\_getProtocolContractAddresses

Method to fetch the protocol contract addresses.

**Parameters**: None

**Returns**: `ProtocolContractAddresses`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getProtocolContractAddresses","params":[],"id":1}'
```

### aztec\_getEncodedEnr

Returns the ENR of this node for peer discovery, if available.

**Parameters**: None

**Returns**: `string | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getEncodedEnr","params":[],"id":1}'
```

## Validator queries

### aztec\_getValidatorsStats

Returns stats for validators if enabled.

**Parameters**: None

**Returns**: `ValidatorsStats`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getValidatorsStats","params":[],"id":1}'
```

### aztec\_getValidatorStats

Returns stats for a single validator if enabled.

**Parameters**:

1. `validatorAddress` - `EthAddress`
2. `fromSlot` - `SlotNumber | undefined`
3. `toSlot` - `SlotNumber | undefined`

**Returns**: `SingleValidatorStats | undefined`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getValidatorStats","params":["0x1234...","100","100"],"id":1}'
```

### aztec\_getValidatorStatsBatch

Returns stats for up to 100 validators using a shared slot range. The slot difference must not exceed the node sentinel's retained history window, and fromSlot must not exceed toSlot. Results follow input order, including duplicates; missing validators or disabled statistics return null entries.

**Parameters**:

1. `validatorAddresses` - `EthAddress[]`
2. `fromSlot` - `SlotNumber | undefined`
3. `toSlot` - `SlotNumber | undefined`

**Returns**: `object[]`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getValidatorStatsBatch","params":[["0x1234..."],"100","100"],"id":1}'
```

## P2P queries

### aztec\_getPeers

Returns info for all connected, dialing, and cached peers. Only available when P2P is enabled.

**Parameters**:

1. `includePending` - `boolean | undefined` - If true, also include peers in the pending state.

**Returns**: `PeerInfo[]`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getPeers","params":[true],"id":1}'
```

### aztec\_getCheckpointAttestationsForSlot

Queries the attestation pool for checkpoint attestations for the given slot.

**Parameters**:

1. `slot` - `SlotNumber` - The slot to query.
2. `proposalPayloadHash` - `string | undefined` - Hex-encoded keccak256 of the target proposal's signed payload hash. When provided, only attestations whose payload hash matches are returned. When omitted, all attestations for the slot are returned.

**Returns**: `CheckpointAttestation[]`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getCheckpointAttestationsForSlot","params":["100","0x1234..."],"id":1}'
```

### aztec\_getProposalsForSlot

Returns block and checkpoint proposals retained in the attestation pool for the given slot. Only available when P2P is enabled.

**Parameters**:

1. `slot` - `SlotNumber`

**Returns**: `ProposalsForSlot`

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getProposalsForSlot","params":["100"],"id":1}'
```

## Debug operations

### aztec\_getAllowedPublicSetup

Returns the list of allowed public setup elements configured for this node.

**Parameters**: None

**Returns**: `AllowedElement[]` - The list of allowed elements.

**Example**:

```bash
curl -X POST http://localhost:8080 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"aztec_getAllowedPublicSetup","params":[],"id":1}'
```

## Admin API

Administrative operations are exposed on port 8880 under the `aztecAdmin_` namespace.

The admin API requires an API key by default. The node generates one at first startup and prints it once to the logs; pass it with the `x-api-key` header, as the examples below do, or as `Authorization: Bearer [ADMIN_API_KEY]`. See [admin API key authentication](/operate/operators/reference/changelog/v4.md#admin-api-key-authentication).

Security: Admin API Access

For security reasons, the admin port (8880) should **not be exposed** to the host machine in Docker deployments. The examples below show both CLI and Docker methods:

**CLI Method** (when running with `aztec start` directly):

```bash
curl -X POST http://localhost:8880 -H 'x-api-key: [ADMIN_API_KEY]' ...
```

**Docker Method** (when running with Docker Compose):

```bash
docker exec -it <container-name> curl -X POST http://localhost:8880 -H 'x-api-key: [ADMIN_API_KEY]' ...
```

Replace `<container-name>` with your container name (e.g., `aztec-node`, `aztec-sequencer`, `prover-node`).

### aztecAdmin\_getConfig

Retrieves the configuration of this node.

**Parameters**: None

**Returns**: `AztecNodeAdminConfig`

**Example (CLI)**:

```bash
curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_getConfig","params":[],"id":1}'
```

**Example (Docker)**:

```bash
docker exec -it aztec-node curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_getConfig","params":[],"id":1}'
```

### aztecAdmin\_setConfig

Updates the configuration of this node.

**Parameters**:

1. `config` - `object` - Updated configuration to be merged with the current one.

**Returns**: `void`

**Example (CLI)**:

```bash
curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_setConfig","params":[{}],"id":1}'
```

**Example (Docker)**:

```bash
docker exec -it aztec-node curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_setConfig","params":[{}],"id":1}'
```

### aztecAdmin\_pauseSync

Pauses archiver and world state syncing.

**Parameters**: None

**Returns**: `void`

**Example (CLI)**:

```bash
curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_pauseSync","params":[],"id":1}'
```

**Example (Docker)**:

```bash
docker exec -it aztec-node curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_pauseSync","params":[],"id":1}'
```

### aztecAdmin\_resumeSync

Resumes archiver and world state syncing.

**Parameters**: None

**Returns**: `void`

**Example (CLI)**:

```bash
curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_resumeSync","params":[],"id":1}'
```

**Example (Docker)**:

```bash
docker exec -it aztec-node curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_resumeSync","params":[],"id":1}'
```

### aztecAdmin\_pauseSequencer

Pauses block production. Pending txs remain in the mempool; no new blocks will be produced until is called. Throws if no sequencer is running.

**Parameters**: None

**Returns**: `void`

**Example (CLI)**:

```bash
curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_pauseSequencer","params":[],"id":1}'
```

**Example (Docker)**:

```bash
docker exec -it aztec-node curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_pauseSequencer","params":[],"id":1}'
```

### aztecAdmin\_resumeSequencer

Resumes block production previously paused via .

**Parameters**: None

**Returns**: `void`

**Example (CLI)**:

```bash
curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_resumeSequencer","params":[],"id":1}'
```

**Example (Docker)**:

```bash
docker exec -it aztec-node curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_resumeSequencer","params":[],"id":1}'
```

### aztecAdmin\_rollbackTo

Pauses syncing and rolls back the database to the target L2 block number.

**Parameters**:

1. `targetBlockNumber` - `number` - The block number to roll back to.
2. `force` - `boolean | undefined` - If true, clears the world state db and p2p dbs if rolling back to behind the finalized block.
3. `resumeSync` - `boolean | undefined` - If true (default), resumes archiver and world state sync after rollback.

**Returns**: `void`

**Example (CLI)**:

```bash
curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_rollbackTo","params":[12345,true,true],"id":1}'
```

**Example (Docker)**:

```bash
docker exec -it aztec-node curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_rollbackTo","params":[12345,true,true],"id":1}'
```

### aztecAdmin\_startSnapshotUpload

Pauses syncing, creates a backup of archiver and world-state databases, and uploads them. Returns immediately.

**Parameters**:

1. `location` - `string` - The location to upload the snapshot to.

**Returns**: `void`

**Example (CLI)**:

```bash
curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_startSnapshotUpload","params":["0x1234..."],"id":1}'
```

**Example (Docker)**:

```bash
docker exec -it aztec-node curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_startSnapshotUpload","params":["0x1234..."],"id":1}'
```

### aztecAdmin\_getSlashOffenses

Returns all offenses applicable for the given round.

**Parameters**:

1. `round` - `bigint | 'all' | 'current'`

**Returns**: `Offense[]`

**Example (CLI)**:

```bash
curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_getSlashOffenses","params":["current"],"id":1}'
```

**Example (Docker)**:

```bash
docker exec -it aztec-node curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_getSlashOffenses","params":["current"],"id":1}'
```

### aztecAdmin\_reloadKeystore

Reloads keystore configuration from disk.

What is updated:

* Validator attester keys
* Coinbase address per validator
* Fee recipient address per validator

What is NOT updated (requires node restart):

* L1 publisher signers (the funded accounts that send L1 transactions)
* Prover keys
* HA signer PostgreSQL connections

Notes:

* New validators must use a publisher key that was already configured at node startup (or omit the publisher field to fall back to the attester key). A validator with an unknown publisher key will cause the reload to be rejected.

**Parameters**: None

**Returns**: `void`

**Example (CLI)**:

```bash
curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_reloadKeystore","params":[],"id":1}'
```

**Example (Docker)**:

```bash
docker exec -it aztec-node curl -X POST http://localhost:8880 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: [ADMIN_API_KEY]' \
  -d '{"jsonrpc":"2.0","method":"aztecAdmin_reloadKeystore","params":[],"id":1}'
```

## Next steps

* [How to Run a Sequencer Node](/operate/operators/setup/sequencer_management.md) - Set up a node
* [Ethereum RPC Calls Reference](/operate/operators/reference/ethereum_rpc_reference.md) - L1 RPC usage
* [CLI Reference](/operate/operators/reference/cli-reference.md) - Command-line options
* [Aztec Discord](https://discord.gg/aztec) - Developer support
