import { Fr } from '@aztec/foundation/curves/bn254'; import { BufferReader } from '@aztec/foundation/serialize'; import type { IndexedTreeLeaf, IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; import { z } from 'zod'; /** * Class containing the data of a preimage of a single leaf in the public data tree. * Note: It's called preimage because this data gets hashed before being inserted as a node into the `IndexedTree`. */ export declare class PublicDataTreeLeafPreimage implements IndexedTreeLeafPreimage { /** * The leaf (slot, value). */ leaf: PublicDataTreeLeaf; /** * Next key (slot) inside the indexed tree's linked list. */ nextKey: Fr; /** * Index of the next leaf in the indexed tree's linked list. */ nextIndex: bigint; constructor( /** * The leaf (slot, value). */ leaf: PublicDataTreeLeaf, /** * Next key (slot) inside the indexed tree's linked list. */ nextKey: Fr, /** * Index of the next leaf in the indexed tree's linked list. */ nextIndex: bigint); static get schema(): z.ZodEffects; value: z.ZodType; }, "strip", z.ZodTypeAny, { slot: Fr; value: Fr; }, { slot: string; value: string; }>, PublicDataTreeLeaf, { slot: string; value: string; }>; nextKey: z.ZodType; nextIndex: z.ZodPipeline, z.ZodBigInt>; }, "strip", z.ZodTypeAny, { leaf: PublicDataTreeLeaf; nextKey: Fr; nextIndex: bigint; }, { leaf: { slot: string; value: string; }; nextKey: string; nextIndex: string | number | bigint; }>, PublicDataTreeLeafPreimage, { leaf: { slot: string; value: string; }; nextKey: string; nextIndex: string | number | bigint; }>; /** * Creates a PublicDataTreeLeafPreimage from a plain object without Zod validation. * This method is optimized for performance and skips validation, making it suitable * for deserializing trusted data (e.g., from C++ via MessagePack). * @param obj - Plain object containing PublicDataTreeLeafPreimage fields * @returns A PublicDataTreeLeafPreimage instance */ static fromPlainObject(obj: any): PublicDataTreeLeafPreimage; static get leafSchema(): z.ZodEffects; value: z.ZodType; }, "strip", z.ZodTypeAny, { slot: Fr; value: Fr; }, { slot: string; value: string; }>, PublicDataTreeLeaf, { slot: string; value: string; }>; getKey(): bigint; getNextKey(): bigint; getNextIndex(): bigint; asLeaf(): PublicDataTreeLeaf; toBuffer(): Buffer; toHashInputs(): Buffer[]; hash(): Promise; clone(): PublicDataTreeLeafPreimage; static random(): PublicDataTreeLeafPreimage; static empty(): PublicDataTreeLeafPreimage; static fromBuffer(buffer: Buffer | BufferReader): PublicDataTreeLeafPreimage; static fromLeaf(leaf: PublicDataTreeLeaf, nextKey: bigint, nextIndex: bigint): PublicDataTreeLeafPreimage; static clone(preimage: PublicDataTreeLeafPreimage): PublicDataTreeLeafPreimage; } /** * A leaf in the public data indexed tree. */ export declare class PublicDataTreeLeaf implements IndexedTreeLeaf { /** * The slot the value is stored in */ slot: Fr; /** * The value stored in the slot */ value: Fr; constructor( /** * The slot the value is stored in */ slot: Fr, /** * The value stored in the slot */ value: Fr); getKey(): bigint; toBuffer(): Buffer; clone(): PublicDataTreeLeaf; toHashInputs(): Buffer[]; static fromBuffer(buffer: Buffer | BufferReader): PublicDataTreeLeaf; equals(another: PublicDataTreeLeaf): boolean; toString(): string; isEmpty(): boolean; updateTo(another: PublicDataTreeLeaf): PublicDataTreeLeaf; static buildDummy(key: bigint): PublicDataTreeLeaf; static empty(): PublicDataTreeLeaf; static get schema(): z.ZodEffects; value: z.ZodType; }, "strip", z.ZodTypeAny, { slot: Fr; value: Fr; }, { slot: string; value: string; }>, PublicDataTreeLeaf, { slot: string; value: string; }>; /** * Creates a PublicDataTreeLeaf from a plain object without Zod validation. * This method is optimized for performance and skips validation, making it suitable * for deserializing trusted data (e.g., from C++ via MessagePack). * @param obj - Plain object containing PublicDataTreeLeaf fields * @returns A PublicDataTreeLeaf instance */ static fromPlainObject(obj: any): PublicDataTreeLeaf; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2RhdGFfbGVhZi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3RyZWVzL3B1YmxpY19kYXRhX2xlYWYudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUFFLE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