import { Fr } from '@aztec/foundation/curves/bn254'; import { BufferReader } from '@aztec/foundation/serialize'; import { Vector } from '../types/shared.js'; /** * The Note class represents a Note emitted from a Noir contract as a vector of Fr (finite field) elements. * This data also represents a preimage to a note hash. */ export declare class Note extends Vector { toJSON(): Buffer; static get schema(): import("zod").ZodEffects>, Note, any>; /** * Create a Note instance from a Buffer or BufferReader. * The input 'buffer' can be either a Buffer containing the serialized Fr elements or a BufferReader instance. * This function reads the Fr elements in the buffer and constructs a Note with them. * * @param buffer - The Buffer or BufferReader containing the serialized Fr elements. * @returns A Note instance containing the deserialized Fr elements. */ static fromBuffer(buffer: Buffer | BufferReader): Note; /** * Generates a random Note instance with a variable number of items. * The number of items is determined by a random value between 1 and 10 (inclusive). * Each item in the Note is generated using the Fr.random() method. * * @returns A randomly generated Note instance. */ static random(): Note; /** * Returns a hex representation of the note. * @returns A hex string with the vector length as first element. */ toString(): `0x${string}`; /** * Creates a new Note instance from a hex string. * @param str - Hex representation. * @returns A Note instance. */ static fromString(str: string): Note; get length(): number; equals(other: Note): boolean; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90ZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL25vdGUvbm90ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDcEQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBSTNELE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUU1Qzs7O0dBR0c7QUFDSCxxQkFBYSxJQUFLLFNBQVEsTUFBTSxDQUFDLEVBQUUsQ0FBQztJQUNsQyxNQUFNLDRCQUVMO0lBRUQsTUFBTSxLQUFLLE1BQU0sdUdBRWhCO0lBRUQ7Ozs7Ozs7T0FPRztJQUNILE1BQU0sQ0FBQyxVQUFVLENBQUMsTUFBTSxFQUFFLE1BQU0sR0FBRyxZQUFZLFFBRzlDO0lBRUQ7Ozs7OztPQU1HO0lBQ0gsTUFBTSxDQUFDLE1BQU0sU0FJWjtJQUVEOzs7T0FHRztJQUNNLFFBQVEsa0JBRWhCO0lBRUQ7Ozs7T0FJRztJQUNILE1BQU0sQ0FBQyxVQUFVLENBQUMsR0FBRyxFQUFFLE1BQU0sUUFFNUI7SUFFRCxJQUFJLE1BQU0sV0FFVDtJQUVELE1BQU0sQ0FBQyxLQUFLLEVBQUUsSUFBSSxXQUtqQjtDQUNGIn0=