---
# System prepended metadata

title: Aztec.nr Reference Documentation

---

# Aztec.nr Reference Documentation

<!--
    Template for auto-generated reference documentation
    Source: noir-projects/aztec-nr/
    Generation: Extract from source code comments
-->

## Overview

Aztec.nr is the Noir framework for writing smart contracts on Aztec. This reference documentation covers all the modules, types, and utilities provided by the framework.

---

## Note Types

Notes are the fundamental building blocks for private state in Aztec. The following note types are provided:

### AddressNote
<!-- Generated from: address-note/src/address_note.nr -->

**Path:** `address-note/`

#### Description
<!-- Extract from module-level comment -->

#### Methods
<!-- Extract from function-level comments -->

---

### ValueNote
<!-- Generated from: value-note/src/value_note.nr -->

**Path:** `value-note/`

#### Description
<!-- Extract from module-level comment -->

#### Methods
<!-- Extract from function-level comments -->

#### Utility Functions
- `balance_utils` - Balance management utilities
- `filter` - Note filtering utilities

---

### UintNote
<!-- Generated from: uint-note/src/uint_note.nr -->

**Path:** `uint-note/`

#### Description
<!-- Extract from module-level comment -->

#### Methods
<!-- Extract from function-level comments -->

---

## Core Features

### Authentication Witness (authwit)
<!-- Generated from: aztec/src/authwit/ -->

**Module:** `aztec::authwit`

#### Description
<!-- Extract from module-level comment -->

#### Components
<!-- List all sub-modules and their purposes -->

#### Key Functions
<!-- Extract from function-level comments -->

#### Examples
<!-- Extract from example comments -->

---

### Context
<!-- Generated from: aztec/src/context/ -->

**Module:** `aztec::context`

#### Description
<!-- Extract from module-level comment -->

#### Context Types
- Private Context
- Public Context
- Unconstrained Context

#### Key Functions
<!-- Extract from function-level comments -->

#### Examples
<!-- Extract from example comments -->

---

### Events
<!-- Generated from: aztec/src/event/ -->

**Module:** `aztec::event`

#### Description
<!-- Extract from module-level comment -->

#### Event Emission
<!-- Extract from function-level comments -->

#### Event Types
<!-- Extract from type definitions -->

#### Examples
<!-- Extract from example comments -->

---

### Hashing
<!-- Generated from: aztec/src/hash.nr -->

**Module:** `aztec::hash`

#### Description
<!-- Extract from module-level comment -->

#### Hash Functions
<!-- Extract from function-level comments -->

#### Constants
<!-- Extract from constant definitions -->

#### Examples
<!-- Extract from example comments -->

---

### History
<!-- Generated from: aztec/src/history/ -->

**Module:** `aztec::history`

#### Description
<!-- Extract from module-level comment -->

#### Historical Access Functions
<!-- Extract from function-level comments -->

#### Proving Functions
<!-- Extract from function-level comments -->

#### Examples
<!-- Extract from example comments -->

---

### Keys
<!-- Generated from: aztec/src/keys/ -->

**Module:** `aztec::keys`

#### Description
<!-- Extract from module-level comment -->

#### Key Types
<!-- Extract from type definitions -->

#### Key Management Functions
<!-- Extract from function-level comments -->

#### Examples
<!-- Extract from example comments -->

---

### Macros
<!-- Generated from: aztec/src/macros/ -->

**Module:** `aztec::macros`

#### Description
<!-- Extract from module-level comment -->

#### Available Macros
<!-- Extract from macro definitions -->

#### Usage
<!-- Extract from usage comments -->

#### Examples
<!-- Extract from example comments -->

---

### Messages
<!-- Generated from: aztec/src/messages/ -->

**Module:** `aztec::messages`

#### Description
<!-- Extract from module-level comment -->

#### Message Types
<!-- Extract from type definitions -->

#### Message Functions
<!-- Extract from function-level comments -->

#### Examples
<!-- Extract from example comments -->

---

### Messaging
<!-- Generated from: aztec/src/messaging.nr -->

**Module:** `aztec::messaging`

#### Description
<!-- Extract from module-level comment -->

#### Cross-Chain Messaging
<!-- Extract from function-level comments -->

#### L1-L2 Communication
<!-- Extract from function-level comments -->

#### Examples
<!-- Extract from example comments -->

---

### Note System
<!-- Generated from: aztec/src/note/ -->

**Module:** `aztec::note`

#### Core Components

##### NoteInterface
<!-- Extract from note_interface.nr -->

##### NoteLifecycle
<!-- Extract from lifecycle.nr -->

##### NoteGetter
<!-- Extract from note_getter.nr -->

###### NoteGetterOptions
<!-- Extract from note_getter_options.nr -->

##### NoteViewerOptions
<!-- Extract from note_viewer_options.nr -->

##### NoteEmission
<!-- Extract from note_emission.nr -->

##### NoteMetadata
<!-- Extract from note_metadata.nr -->

##### RetrievedNote
<!-- Extract from retrieved_note.nr -->

#### Utility Functions
<!-- Extract from utils.nr -->

#### Constants
<!-- Extract from constants.nr -->

#### Examples
<!-- Extract from example comments -->

---

### Oracle
<!-- Generated from: aztec/src/oracle/ -->

**Module:** `aztec::oracle`

#### Description
<!-- Extract from module-level comment -->

#### Oracle Functions
<!-- Extract from function-level comments -->

#### Oracle Types
<!-- Extract from type definitions -->

#### Examples
<!-- Extract from example comments -->

---

### State Variables
<!-- Generated from: aztec/src/state_vars/ -->

**Module:** `aztec::state_vars`

#### Overview
<!-- Extract from module-level comment -->

#### Storage
<!-- Extract from storage.nr -->

#### Map
<!-- Extract from map.nr -->

#### State Variable Types

##### PrivateImmutable
<!-- Extract from private_immutable.nr -->

###### Description
###### Methods
###### Examples

##### PrivateMutable
<!-- Extract from private_mutable.nr -->

###### Description
###### Methods
###### Examples

##### PrivateSet
<!-- Extract from private_set.nr -->

###### Description
###### Methods
###### Examples

##### PublicImmutable
<!-- Extract from public_immutable.nr -->

###### Description
###### Methods
###### Examples

##### PublicMutable
<!-- Extract from public_mutable.nr -->

###### Description
###### Methods
###### Examples

##### DelayedPublicMutable
<!-- Extract from delayed_public_mutable.nr -->

###### Description
###### Methods
###### Examples

---

### Utilities
<!-- Generated from: aztec/src/utils/ -->

**Module:** `aztec::utils`

#### Array Utilities
<!-- Extract from array/ -->

##### Description
##### Functions
##### Examples

#### Comparison
<!-- Extract from comparison.nr -->

##### Description
##### Functions
##### Examples

#### Conversion
<!-- Extract from conversion.nr and conversion/ -->

##### Description
##### Functions
##### Examples

#### Point Operations
<!-- Extract from point.nr -->

##### Description
##### Functions
##### Examples

#### Random
<!-- Extract from random.nr -->

##### Description
##### Functions
##### Examples

#### Remove Constraints
<!-- Extract from remove_constraints.nr -->

##### Description
##### Functions
##### Examples

#### To Bytes
<!-- Extract from to_bytes.nr -->

##### Description
##### Functions
##### Examples

#### With Hash
<!-- Extract from with_hash.nr -->

##### Description
##### Functions
##### Examples

---

### Publishing Contracts
<!-- Generated from: aztec/src/publish_contract_instance.nr -->

**Module:** `aztec::publish_contract_instance`

#### Description
<!-- Extract from module-level comment -->

#### Functions
<!-- Extract from function-level comments -->

#### Examples
<!-- Extract from example comments -->

---

## Testing Utilities
<!-- Generated from: aztec/src/test/ -->

**Module:** `aztec::test`

### Description
<!-- Extract from module-level comment -->

### Test Helpers
<!-- Extract from function-level comments -->

### Mock Components
<!-- Extract from mock implementations -->

### Examples
<!-- Extract from example comments -->

---

## Utility Libraries

### EasyPrivateState
<!-- Generated from: easy-private-state/src/ -->

**Path:** `easy-private-state/`

#### EasyPrivateUint
<!-- Extract from easy_private_uint.nr comments -->

##### Description

##### Methods

---

### CompressedString
<!-- Generated from: compressed-string/src/ -->

**Path:** `compressed-string/`

#### CompressedString
<!-- Extract from compressed_string.nr comments -->

##### Description
##### Methods

#### FieldCompressedString
<!-- Extract from field_compressed_string.nr comments -->

##### Description
##### Methods

---

## Appendices

This section contains information listed above, but is meant to be a navigational aid.

### A. Type Index
<!-- Auto-generated index of all types -->

### B. Function Index
<!-- Auto-generated index of all public functions -->

### C. Macro Index
<!-- Auto-generated index of all macros -->

### D. Constants Index
<!-- Auto-generated index of all public constants -->

---


### Generation Markers?

Use these markers in source comments for special processing:
- `@public` - Public API, include in docs
- `@private` - Internal only, exclude from docs
- `@deprecated` - Mark as deprecated with version
- `@since` - Version when added
- `@example` - Start of example block
- `@param` - Parameter documentation
- `@returns` - Return value documentation
- `@throws` - Error conditions