> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Function note

Module: `noir_aztec::macros::notes`

```rust
pub comptime fn note(s: TypeDefinition) -> Quoted
```

Generates the core note functionality for a struct:

- NoteTypeProperties: Defines the structure and properties of note fields
- NoteType trait implementation: Provides the note type ID
- NoteHash trait implementation: Handles note hash and nullifier computation

## Requirements

The note struct must:

- Implement the `Packable` trait
- Not exceed `MAX_NOTE_PACKED_LEN` when packed

## Registration

Registers the note in the global `NOTES` BoundedVec to enable note processing functionality.

## Generated Code

For detailed documentation on the generated implementations, see:

- `generate_note_properties()`
- `generate_note_type_impl()`
- `generate_note_hash_trait_impl()`
