/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import { Vector } from '@aztec/circuits.js';
import { Fr } from '@aztec/foundation/fields';
import { BufferReader } from '@aztec/foundation/serialize';
/**
 * 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. This class extends the Vector class, which allows for
 * additional operations on the underlying field elements.
 */
export declare class Payload extends Vector<Fr> {
    toJSON(): Buffer;
    static get schema(): import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, Buffer, string>, import("zod").ZodEffects<import("zod").ZodObject<{
        type: import("zod").ZodLiteral<"Buffer">;
        data: import("zod").ZodArray<import("zod").ZodNumber, "many">;
    }, "strip", import("zod").ZodTypeAny, {
        type: "Buffer";
        data: number[];
    }, {
        type: "Buffer";
        data: number[];
    }>, Buffer, {
        type: "Buffer";
        data: number[];
    }>]>, Payload, string | {
        type: "Buffer";
        data: number[];
    }>;
    /**
     * 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): Payload;
    /**
     * 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(): Payload;
    /**
     * 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): Payload;
    get length(): number;
    equals(other: Payload): boolean;
}
export declare class Event extends Payload {
    static get schema(): import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, Buffer, string>, import("zod").ZodEffects<import("zod").ZodObject<{
        type: import("zod").ZodLiteral<"Buffer">;
        data: import("zod").ZodArray<import("zod").ZodNumber, "many">;
    }, "strip", import("zod").ZodTypeAny, {
        type: "Buffer";
        data: number[];
    }, {
        type: "Buffer";
        data: number[];
    }>, Buffer, {
        type: "Buffer";
        data: number[];
    }>]>, Event, string | {
        type: "Buffer";
        data: number[];
    }>;
    static fromBuffer(buffer: Buffer | BufferReader): Event;
}
export declare class Note extends Payload {
    static get schema(): import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, Buffer, string>, import("zod").ZodEffects<import("zod").ZodObject<{
        type: import("zod").ZodLiteral<"Buffer">;
        data: import("zod").ZodArray<import("zod").ZodNumber, "many">;
    }, "strip", import("zod").ZodTypeAny, {
        type: "Buffer";
        data: number[];
    }, {
        type: "Buffer";
        data: number[];
    }>, Buffer, {
        type: "Buffer";
        data: number[];
    }>]>, Note, string | {
        type: "Buffer";
        data: number[];
    }>;
    static fromBuffer(buffer: Buffer | BufferReader): Note;
}
//# sourceMappingURL=payload.d.ts.map