import type { Fr } from '@aztec/foundation/curves/bn254'; import { BufferReader, FieldReader } from '@aztec/foundation/serialize'; import type { FieldsOf } from '@aztec/foundation/types'; import { inspect } from 'util'; import { z } from 'zod'; import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js'; import { PartialStateReference } from './partial_state_reference.js'; /** * Stores snapshots of all the trees but archive. */ export declare class StateReference { /** Snapshot of the l1 to l2 message tree. */ l1ToL2MessageTree: AppendOnlyTreeSnapshot; /** Reference to the rest of the state. */ partial: PartialStateReference; constructor( /** Snapshot of the l1 to l2 message tree. */ l1ToL2MessageTree: AppendOnlyTreeSnapshot, /** Reference to the rest of the state. */ partial: PartialStateReference); static get schema(): z.ZodEffects; nextAvailableLeafIndex: z.ZodPipeline, z.ZodNumber>; }, "strip", z.ZodTypeAny, { root: Fr; nextAvailableLeafIndex: number; }, { root: string; nextAvailableLeafIndex: string | number | bigint; }>, AppendOnlyTreeSnapshot, { root: string; nextAvailableLeafIndex: string | number | bigint; }>; partial: z.ZodEffects; nextAvailableLeafIndex: z.ZodPipeline, z.ZodNumber>; }, "strip", z.ZodTypeAny, { root: Fr; nextAvailableLeafIndex: number; }, { root: string; nextAvailableLeafIndex: string | number | bigint; }>, AppendOnlyTreeSnapshot, { root: string; nextAvailableLeafIndex: string | number | bigint; }>; nullifierTree: z.ZodEffects; nextAvailableLeafIndex: z.ZodPipeline, z.ZodNumber>; }, "strip", z.ZodTypeAny, { root: Fr; nextAvailableLeafIndex: number; }, { root: string; nextAvailableLeafIndex: string | number | bigint; }>, AppendOnlyTreeSnapshot, { root: string; nextAvailableLeafIndex: string | number | bigint; }>; publicDataTree: z.ZodEffects; nextAvailableLeafIndex: z.ZodPipeline, z.ZodNumber>; }, "strip", z.ZodTypeAny, { root: Fr; nextAvailableLeafIndex: number; }, { root: string; nextAvailableLeafIndex: string | number | bigint; }>, AppendOnlyTreeSnapshot, { root: string; nextAvailableLeafIndex: string | number | bigint; }>; }, "strip", z.ZodTypeAny, { noteHashTree: AppendOnlyTreeSnapshot; nullifierTree: AppendOnlyTreeSnapshot; publicDataTree: AppendOnlyTreeSnapshot; }, { noteHashTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; nullifierTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; publicDataTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; }>, PartialStateReference, { noteHashTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; nullifierTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; publicDataTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; }>; }, "strip", z.ZodTypeAny, { l1ToL2MessageTree: AppendOnlyTreeSnapshot; partial: PartialStateReference; }, { l1ToL2MessageTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; partial: { noteHashTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; nullifierTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; publicDataTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; }; }>, StateReference, { l1ToL2MessageTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; partial: { noteHashTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; nullifierTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; publicDataTree: { root: string; nextAvailableLeafIndex: string | number | bigint; }; }; }>; getSize(): number; static getFields(fields: FieldsOf): readonly [AppendOnlyTreeSnapshot, PartialStateReference]; static from(fields: FieldsOf): StateReference; toBuffer(): Buffer; toFields(): Fr[]; static fromBuffer(buffer: Buffer | BufferReader): StateReference; static fromFields(fields: Fr[] | FieldReader): StateReference; static empty(): StateReference; static random(): StateReference; toAbi(): [ReturnType, ReturnType]; isEmpty(): boolean; toInspect(): { l1ToL2MessageTree: `0x${string}`; noteHashTree: `0x${string}`; nullifierTree: `0x${string}`; publicDataTree: `0x${string}`; }; /** * Validates the trees in world state have the expected number of leaves (multiple of number of insertions per tx) */ validate(): void; [inspect.custom](): string; equals(other: this): boolean; } //# sourceMappingURL=data:application/json;base64,e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