Skip to main content

7 docs tagged with "notes"

View all tags

Notes

Notes are the fundamental data structure in Aztec when working with private state. Using Aztec.nr, developers can define note types which allow flexibility in how notes are stored and nullified.

Notes (UTXOs)

The state model page explains that there is a difference between public and private state. Private state uses UTXOs (unspent transaction ouputs), also known as notes. This page introduces the concept of UTXOs and how notes are abstracted on Aztec.

Using Address Note in Aztec.nr

Address notes hold one main property of the type AztecAddress. It also holds npkmhash and randomness, similar to other note types.

Using custom note types in Aztec.nr

It may be useful to write a custom note type if you want to use a specific type of private data or struct that does not have a default implementation in Aztec.nr. If you create a note that uses a custom note type, you are able to nullify that note with one nullifier. This is more secure and less expensive than using multiple separate notes.

Using Value Notes in Aztec.nr

ValueNotes hold one main property - a value - and have utils useful for manipulating this value, such as incrementing and decrementing it similarly to an integer.