/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import { type LogHash, type ScopedLogHash } from '@aztec/circuits.js';
import { BufferReader } from '@aztec/foundation/serialize';
import { z } from 'zod';
import { UnencryptedFunctionL2Logs } from './function_l2_logs.js';
import { type UnencryptedL2Log } from './unencrypted_l2_log.js';
/**
 * Data container of logs emitted in 1 tx.
 */
export declare abstract class TxL2Logs {
    /** An array containing logs emitted in individual function invocations in this tx. */
    readonly functionLogs: UnencryptedFunctionL2Logs[];
    abstract hash(): Buffer;
    constructor(
    /** An array containing logs emitted in individual function invocations in this tx. */
    functionLogs: UnencryptedFunctionL2Logs[]);
    /**
     * Serializes logs into a buffer.
     * @returns A buffer containing the serialized logs.
     */
    toBuffer(): Buffer;
    /**
     * Get the total length of serialized data.
     * @returns Total length of serialized data.
     */
    getSerializedLength(): number;
    /**
     * Get the total length of all chargable data (raw log data + 4 for each log)
     * TODO: Rename this? getChargableLength? getDALength?
     * @returns Total length of data.
     */
    getKernelLength(): number;
    /** Gets the total number of logs. */
    getTotalLogCount(): number;
    /**
     * Adds function logs to the existing logs.
     * @param functionLogs - The function logs to add
     * @remarks Used by sequencer to append unencrypted logs emitted in public function calls.
     */
    addFunctionLogs(functionLogs: UnencryptedFunctionL2Logs[]): void;
    /**
     * Unrolls logs from this tx.
     * @returns Unrolled logs.
     */
    unrollLogs(): UnencryptedL2Log[];
    /**
     * Checks if two TxL2Logs objects are equal.
     * @param other - Another TxL2Logs object to compare with.
     * @returns True if the two objects are equal, false otherwise.
     */
    equals(other: TxL2Logs): boolean;
    /**
     * Filter the logs from functions from this TxL2Logs that
     * appear in the provided logHashes
     * @param logHashes hashes we want to keep
     * @param output our aggregation
     * @returns our aggregation
     */
    filter(logHashes: LogHash[], output: TxL2Logs): TxL2Logs;
    /**
     * Filter the logs from functions from this TxL2Logs that
     * appear in the provided scopedLogHashes
     * @param logHashes hashes we want to keep
     * @param output our aggregation
     * @returns our aggregation
     */
    filterScoped(scopedLogHashes: ScopedLogHash[], output: TxL2Logs): TxL2Logs;
}
export declare class UnencryptedTxL2Logs extends TxL2Logs {
    static get schema(): z.ZodEffects<z.ZodObject<{
        functionLogs: z.ZodArray<z.ZodEffects<z.ZodObject<{
            logs: z.ZodArray<z.ZodEffects<z.ZodObject<{
                contractAddress: z.ZodType<import("@aztec/circuits.js").AztecAddress, any, string>;
                data: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Buffer, string>, z.ZodEffects<z.ZodObject<{
                    type: z.ZodLiteral<"Buffer">;
                    data: z.ZodArray<z.ZodNumber, "many">;
                }, "strip", z.ZodTypeAny, {
                    type: "Buffer";
                    data: number[];
                }, {
                    type: "Buffer";
                    data: number[];
                }>, Buffer, {
                    type: "Buffer";
                    data: number[];
                }>]>;
            }, "strip", z.ZodTypeAny, {
                contractAddress: import("@aztec/circuits.js").AztecAddress;
                data: Buffer;
            }, {
                contractAddress: string;
                data: string | {
                    type: "Buffer";
                    data: number[];
                };
            }>, UnencryptedL2Log, {
                contractAddress: string;
                data: string | {
                    type: "Buffer";
                    data: number[];
                };
            }>, "many">;
        }, "strip", z.ZodTypeAny, {
            logs: UnencryptedL2Log[];
        }, {
            logs: {
                contractAddress: string;
                data: string | {
                    type: "Buffer";
                    data: number[];
                };
            }[];
        }>, UnencryptedFunctionL2Logs, {
            logs: {
                contractAddress: string;
                data: string | {
                    type: "Buffer";
                    data: number[];
                };
            }[];
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        functionLogs: UnencryptedFunctionL2Logs[];
    }, {
        functionLogs: {
            logs: {
                contractAddress: string;
                data: string | {
                    type: "Buffer";
                    data: number[];
                };
            }[];
        }[];
    }>, UnencryptedTxL2Logs, {
        functionLogs: {
            logs: {
                contractAddress: string;
                data: string | {
                    type: "Buffer";
                    data: number[];
                };
            }[];
        }[];
    }>;
    /** Creates an empty instance. */
    static empty(): UnencryptedTxL2Logs;
    /**
     * Deserializes logs from a buffer.
     * @param buf - The buffer containing the serialized logs.
     * @param isLengthPrefixed - Whether the buffer is prefixed with 4 bytes for its total length.
     * @returns A new L2Logs object.
     */
    static fromBuffer(buf: Buffer | BufferReader, isLengthPrefixed?: boolean): UnencryptedTxL2Logs;
    /**
     * Creates a new `TxL2Logs` object with `numCalls` function logs and `numLogsPerCall` logs in each invocation.
     * @param numCalls - The number of function calls in the tx.
     * @param numLogsPerCall - The number of logs emitted in each function call.
     * @returns A new `TxL2Logs` object.
     */
    static random(numCalls: number, numLogsPerCall: number): UnencryptedTxL2Logs;
    /**
     * Computes unencrypted logs hash as is done in the kernel and decoder contract.
     * @param logs - Logs to be hashed.
     * @returns The hash of the logs.
     * Note: This is a TS implementation of `computeKernelUnencryptedLogsHash` function in Decoder.sol. See that function documentation
     *       for more details.
     */
    hash(): Buffer;
    /**
     * Hashes siloed unencrypted logs as in the same way as the base rollup would.
     * @param siloedLogHashes - The siloed log hashes
     * @returns The hash of the logs.
     */
    static hashSiloedLogs(siloedLogHashes: Buffer[]): Buffer;
}
export declare class ContractClassTxL2Logs extends TxL2Logs {
    static get schema(): z.ZodEffects<z.ZodObject<{
        functionLogs: z.ZodArray<z.ZodEffects<z.ZodObject<{
            logs: z.ZodArray<z.ZodEffects<z.ZodObject<{
                contractAddress: z.ZodType<import("@aztec/circuits.js").AztecAddress, any, string>;
                data: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Buffer, string>, z.ZodEffects<z.ZodObject<{
                    type: z.ZodLiteral<"Buffer">;
                    data: z.ZodArray<z.ZodNumber, "many">;
                }, "strip", z.ZodTypeAny, {
                    type: "Buffer";
                    data: number[];
                }, {
                    type: "Buffer";
                    data: number[];
                }>, Buffer, {
                    type: "Buffer";
                    data: number[];
                }>]>;
            }, "strip", z.ZodTypeAny, {
                contractAddress: import("@aztec/circuits.js").AztecAddress;
                data: Buffer;
            }, {
                contractAddress: string;
                data: string | {
                    type: "Buffer";
                    data: number[];
                };
            }>, UnencryptedL2Log, {
                contractAddress: string;
                data: string | {
                    type: "Buffer";
                    data: number[];
                };
            }>, "many">;
        }, "strip", z.ZodTypeAny, {
            logs: UnencryptedL2Log[];
        }, {
            logs: {
                contractAddress: string;
                data: string | {
                    type: "Buffer";
                    data: number[];
                };
            }[];
        }>, UnencryptedFunctionL2Logs, {
            logs: {
                contractAddress: string;
                data: string | {
                    type: "Buffer";
                    data: number[];
                };
            }[];
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        functionLogs: UnencryptedFunctionL2Logs[];
    }, {
        functionLogs: {
            logs: {
                contractAddress: string;
                data: string | {
                    type: "Buffer";
                    data: number[];
                };
            }[];
        }[];
    }>, ContractClassTxL2Logs, {
        functionLogs: {
            logs: {
                contractAddress: string;
                data: string | {
                    type: "Buffer";
                    data: number[];
                };
            }[];
        }[];
    }>;
    /** Creates an empty instance. */
    static empty(): ContractClassTxL2Logs;
    /**
     * Deserializes logs from a buffer.
     * @param buf - The buffer containing the serialized logs.
     * @param isLengthPrefixed - Whether the buffer is prefixed with 4 bytes for its total length.
     * @returns A new L2Logs object.
     */
    static fromBuffer(buf: Buffer | BufferReader, isLengthPrefixed?: boolean): ContractClassTxL2Logs;
    /**
     * Creates a new `TxL2Logs` object with `numCalls` function logs and `numLogsPerCall` logs in each invocation.
     * @param numCalls - The number of function calls in the tx.
     * @param numLogsPerCall - The number of logs emitted in each function call.
     * @returns A new `TxL2Logs` object.
     */
    static random(numCalls: number, numLogsPerCall: number): ContractClassTxL2Logs;
    /**
     * @param logs - Logs to be hashed.
     * @returns The hash of the logs.
     * Note: This is a TS implementation of `computeKernelUnencryptedLogsHash` function in Decoder.sol. See that function documentation
     *       for more details.
     */
    hash(): Buffer;
    /**
     * Hashes siloed contract class logs as in the same way as the base rollup would.
     * @param siloedLogHashes - The siloed log hashes
     * @returns The hash of the logs.
     */
    static hashSiloedLogs(siloedLogHashes: Buffer[]): Buffer;
}
//# sourceMappingURL=tx_l2_logs.d.ts.map