import type { ViemHeader } from '@aztec/ethereum/contracts'; import { SlotNumber } from '@aztec/foundation/branded-types'; import { Fr } from '@aztec/foundation/curves/bn254'; import { EthAddress } from '@aztec/foundation/eth-address'; import type { ZodFor } from '@aztec/foundation/schemas'; import { BufferReader } from '@aztec/foundation/serialize'; import type { FieldsOf } from '@aztec/foundation/types'; import { inspect } from 'util'; import { AztecAddress } from '../aztec-address/index.js'; import { GasFees } from '../gas/index.js'; import type { GlobalVariables } from '../tx/global_variables.js'; import type { UInt64 } from '../types/shared.js'; /** * Header of a checkpoint. A checkpoint is a collection of blocks submitted to L1 all within the same slot. * This header is verified as-is in the rollup circuits, posted to the L1 rollup contract, stored in the archiver, * and exposed via the Aztec Node API. See `CheckpointData` for a struct that includes the header plus extra metadata. */ export declare class CheckpointHeader { /** Root of the archive tree before this block is added. */ lastArchiveRoot: Fr; /** Hash of the headers of all blocks in this checkpoint. */ blockHeadersHash: Fr; /** Hash of the blobs in the checkpoint. */ blobsHash: Fr; /** Root of the l1 to l2 messages subtree. */ inHash: Fr; /** * The root of the epoch out hash balanced tree. The out hash of the first checkpoint in the epoch is inserted at * index 0, the second at index 1, and so on. * Note: This is not necessarily the final epoch out hash. It includes only the out hashes of checkpoints up to and * including the current checkpoint. Any subsequent checkpoints added to the same epoch are not reflected in this * value. */ epochOutHash: Fr; /** Slot number of the L2 block */ slotNumber: SlotNumber; /** Timestamp of the L2 block. */ timestamp: UInt64; /** Recipient of block reward. */ coinbase: EthAddress; /** Address to receive fees. */ feeRecipient: AztecAddress; /** Global gas prices for this block. */ gasFees: GasFees; /** Total mana used in the block, computed by the root rollup circuit */ totalManaUsed: Fr; constructor( /** Root of the archive tree before this block is added. */ lastArchiveRoot: Fr, /** Hash of the headers of all blocks in this checkpoint. */ blockHeadersHash: Fr, /** Hash of the blobs in the checkpoint. */ blobsHash: Fr, /** Root of the l1 to l2 messages subtree. */ inHash: Fr, /** * The root of the epoch out hash balanced tree. The out hash of the first checkpoint in the epoch is inserted at * index 0, the second at index 1, and so on. * Note: This is not necessarily the final epoch out hash. It includes only the out hashes of checkpoints up to and * including the current checkpoint. Any subsequent checkpoints added to the same epoch are not reflected in this * value. */ epochOutHash: Fr, /** Slot number of the L2 block */ slotNumber: SlotNumber, /** Timestamp of the L2 block. */ timestamp: UInt64, /** Recipient of block reward. */ coinbase: EthAddress, /** Address to receive fees. */ feeRecipient: AztecAddress, /** Global gas prices for this block. */ gasFees: GasFees, /** Total mana used in the block, computed by the root rollup circuit */ totalManaUsed: Fr); static get schema(): ZodFor; static getFields(fields: FieldsOf): readonly [Fr, Fr, Fr, Fr, Fr, SlotNumber, bigint, EthAddress, AztecAddress, GasFees, Fr]; static from(fields: FieldsOf): CheckpointHeader; static fromBuffer(buffer: Buffer | BufferReader): CheckpointHeader; equals(other: CheckpointHeader): boolean; /** Returns true if the global variables match those in the checkpoint header. */ matchesGlobalVariables(other: GlobalVariables): boolean; toBuffer(): Buffer; hash(): Fr; static empty(fields?: Partial>): CheckpointHeader; static random(overrides?: Partial>): CheckpointHeader; isEmpty(): boolean; /** * Serializes this instance into a string. * @returns Encoded string. */ toString(): `0x${string}`; static fromString(str: string): CheckpointHeader; static fromViem(header: ViemHeader): CheckpointHeader; /** * Returns the slot number as a SlotNumber branded type. * @deprecated Use slotNumber directly instead. */ getSlotNumber(): SlotNumber; toViem(): ViemHeader; toInspect(): { lastArchive: `0x${string}`; blockHeadersHash: `0x${string}`; blobsHash: `0x${string}`; inHash: `0x${string}`; epochOutHash: `0x${string}`; slotNumber: SlotNumber; timestamp: bigint; coinbase: `0x${string}`; feeRecipient: `0x${string}`; gasFees: { feePerDaGas: bigint; feePerL2Gas: bigint; }; totalManaUsed: bigint; }; [inspect.custom](): string; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2twb2ludF9oZWFkZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yb2xsdXAvY2hl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