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 nullifier tree. * Note: It's called preimage because this data gets hashed before being inserted as a node into the `IndexedTree`. */ export declare class NullifierLeafPreimage implements IndexedTreeLeafPreimage { /** * Leaf value inside the indexed tree's linked list. */ leaf: NullifierLeaf; /** * Next nullifier inside the indexed tree's linked list. */ nextKey: Fr; /** * Index of the next leaf in the indexed tree's linked list. */ nextIndex: bigint; constructor( /** * Leaf value inside the indexed tree's linked list. */ leaf: NullifierLeaf, /** * Next nullifier 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; }, "strip", z.ZodTypeAny, { nullifier: Fr; }, { nullifier: string; }>, NullifierLeaf, { nullifier: string; }>; nextKey: z.ZodType; nextIndex: z.ZodPipeline, z.ZodBigInt>; }, "strip", z.ZodTypeAny, { leaf: NullifierLeaf; nextKey: Fr; nextIndex: bigint; }, { leaf: { nullifier: string; }; nextKey: string; nextIndex: string | number | bigint; }>, NullifierLeafPreimage, { leaf: { nullifier: string; }; nextKey: string; nextIndex: string | number | bigint; }>; /** * Creates a NullifierLeafPreimage 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 NullifierLeafPreimage fields * @returns A NullifierLeafPreimage instance */ static fromPlainObject(obj: any): NullifierLeafPreimage; static get leafSchema(): z.ZodEffects; }, "strip", z.ZodTypeAny, { nullifier: Fr; }, { nullifier: string; }>, NullifierLeaf, { nullifier: string; }>; getKey(): bigint; getNextKey(): bigint; getNextIndex(): bigint; asLeaf(): NullifierLeaf; toBuffer(): Buffer; toHashInputs(): Buffer[]; toFields(): Fr[]; clone(): NullifierLeafPreimage; static random(): NullifierLeafPreimage; static empty(): NullifierLeafPreimage; static fromBuffer(buffer: Buffer | BufferReader): NullifierLeafPreimage; static fromLeaf(leaf: NullifierLeaf, nextKey: bigint, nextIndex: bigint): NullifierLeafPreimage; static clone(preimage: NullifierLeafPreimage): NullifierLeafPreimage; } /** * A nullifier to be inserted in the nullifier tree. */ export declare class NullifierLeaf implements IndexedTreeLeaf { /** * Nullifier value. */ nullifier: Fr; constructor( /** * Nullifier value. */ nullifier: Fr); getKey(): bigint; toBuffer(): Buffer; clone(): NullifierLeaf; toHashInputs(): Buffer[]; static empty(): NullifierLeaf; static random(): NullifierLeaf; isEmpty(): boolean; updateTo(_another: NullifierLeaf): NullifierLeaf; static buildDummy(key: bigint): NullifierLeaf; static fromBuffer(buf: Buffer | BufferReader): NullifierLeaf; static get schema(): z.ZodEffects; }, "strip", z.ZodTypeAny, { nullifier: Fr; }, { nullifier: string; }>, NullifierLeaf, { nullifier: string; }>; /** * Creates a NullifierLeaf 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 NullifierLeaf fields * @returns A NullifierLeaf instance */ static fromPlainObject(obj: any): NullifierLeaf; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVsbGlmaWVyX2xlYWYuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90cmVlcy9udWxsaWZpZXJfbGVhZi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFFcEQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQzNELE9BQU8sS0FBSyxFQUFFLGVBQWUsRUFBRSx1QkFBdUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBRXhGLE9BQU8sRUFBRSxDQUFDLEVBQUUsTUFBTSxLQU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