import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; import { NoteData } from '../acvm/index.js'; /** * Data that's accessible by all the function calls in an execution. */ export declare class ExecutionNoteCache { /** * New notes created in this transaction. * This mapping maps from a contract address to the notes in the contract. */ private newNotes; /** * The list of nullifiers created in this transaction. * This mapping maps from a contract address to the nullifiers emitted from the contract. * The note which is nullified might be new or not (i.e., was generated in a previous transaction). * Note that their value (bigint representation) is used because Frs cannot be looked up in Sets. */ private nullifiers; /** * Add a new note to cache. * @param note - New note created during execution. */ addNewNote(note: NoteData): void; /** * Add a nullifier to cache. It could be for a db note or a new note created during execution. * @param contractAddress - Contract address of the note. * @param storageSlot - Storage slot of the note. * @param innerNullifier - Inner nullifier of the note. * @param innerNoteHash - Inner note hash of the note. If this value equals 0, it means the * note being nullified is from a previous transaction (and thus not a new note). */ nullifyNote(contractAddress: AztecAddress, innerNullifier: Fr, innerNoteHash: Fr): void; /** * Return notes created up to current point in execution. * If a nullifier for a note in this list is emitted, the note will be deleted. * @param contractAddress - Contract address of the notes. * @param storageSlot - Storage slot of the notes. **/ getNotes(contractAddress: AztecAddress, storageSlot: Fr): NoteData[]; /** * Check if a note exists in the newNotes array. * @param contractAddress - Contract address of the note. * @param storageSlot - Storage slot of the note. * @param innerNoteHash - Inner note hash of the note. **/ checkNoteExists(contractAddress: AztecAddress, innerNoteHash: Fr): boolean; /** * Return all nullifiers emitted from a contract. * @param contractAddress - Address of the contract. */ getNullifiers(contractAddress: AztecAddress): Set; } //# sourceMappingURL=execution_note_cache.d.ts.map