import { BlockNumber } from '@aztec/foundation/branded-types'; import { BufferReader } from '@aztec/foundation/serialize'; import { z } from 'zod'; import { BlockHash } from '../block/block_hash.js'; import { TxHash } from '../tx/tx_hash.js'; /** A globally unique log id. */ export declare class LogId { /** The block number the log was emitted in. */ readonly blockNumber: BlockNumber; /** The hash of the block the log was emitted in. */ readonly blockHash: BlockHash; /** The hash of the transaction the log was emitted in. */ readonly txHash: TxHash; /** The index of a tx in a block the log was emitted in. */ readonly txIndex: number; /** The index of a log the tx was emitted in. */ readonly logIndex: number; constructor( /** The block number the log was emitted in. */ blockNumber: BlockNumber, /** The hash of the block the log was emitted in. */ blockHash: BlockHash, /** The hash of the transaction the log was emitted in. */ txHash: TxHash, /** The index of a tx in a block the log was emitted in. */ txIndex: number, /** The index of a log the tx was emitted in. */ logIndex: number); static random(): LogId; static get schema(): z.ZodEffects, z.ZodNumber>, BlockNumber, string | number | bigint>; blockHash: import("../schemas/index.js").ZodFor; txHash: z.ZodEffects, string, string>, Buffer, string>, TxHash, string>; txIndex: z.ZodPipeline, z.ZodNumber>; logIndex: z.ZodPipeline, z.ZodNumber>; }, "strip", z.ZodTypeAny, { blockNumber: number & { _branding: "BlockNumber"; }; blockHash: BlockHash; txHash: TxHash; txIndex: number; logIndex: number; }, { blockNumber: string | number | bigint; blockHash?: any; txHash: string; txIndex: string | number | bigint; logIndex: string | number | bigint; }>, LogId, { blockNumber: string | number | bigint; blockHash?: any; txHash: string; txIndex: string | number | bigint; logIndex: string | number | bigint; }>; /** * Serializes log id to a buffer. * @returns A buffer containing the serialized log id. */ toBuffer(): Buffer; /** * Creates a LogId from a buffer. * @param buffer - A buffer containing the serialized log id. * @returns A log id. */ static fromBuffer(buffer: Buffer | BufferReader): LogId; /** * Converts the LogId instance to a string. * @returns A string representation of the log id. */ toString(): string; /** * Creates a LogId from a string. * @param data - A string representation of a log id. * @returns A log id. */ static fromString(data: string): LogId; /** * Serializes log id to a human readable string. * @returns A human readable representation of the log id. */ toHumanReadable(): string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