/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import { type IsEmpty, PrivateCircuitPublicInputs } from '@aztec/circuits.js';
import { NoteSelector } from '@aztec/foundation/abi';
import { Fr } from '@aztec/foundation/fields';
import { type ZodFor } from '@aztec/foundation/schemas';
import { type FieldsOf } from '@aztec/foundation/types';
import { z } from 'zod';
import { Note, UnencryptedFunctionL2Logs, UnencryptedL2Log } from './logs/index.js';
import { PublicExecutionRequest } from './public_execution_request.js';
/**
 * The contents of a new note.
 */
export declare class NoteAndSlot {
    /** The note. */
    note: Note;
    /** The storage slot of the note. */
    storageSlot: Fr;
    /** The note type identifier. */
    noteTypeId: NoteSelector;
    constructor(
    /** The note. */
    note: Note, 
    /** The storage slot of the note. */
    storageSlot: Fr, 
    /** The note type identifier. */
    noteTypeId: NoteSelector);
    static get schema(): z.ZodEffects<z.ZodObject<{
        note: z.ZodEffects<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[];
        }>]>, Note, string | {
            type: "Buffer";
            data: number[];
        }>;
        storageSlot: z.ZodType<Fr, any, string>;
        noteTypeId: z.ZodType<NoteSelector, any, string>;
    }, "strip", z.ZodTypeAny, {
        note: Note;
        storageSlot: Fr;
        noteTypeId: NoteSelector;
    }, {
        note: string | {
            type: "Buffer";
            data: number[];
        };
        storageSlot: string;
        noteTypeId: string;
    }>, NoteAndSlot, {
        note: string | {
            type: "Buffer";
            data: number[];
        };
        storageSlot: string;
        noteTypeId: string;
    }>;
    static from(fields: FieldsOf<NoteAndSlot>): NoteAndSlot;
    static random(): NoteAndSlot;
}
export declare class CountedContractClassLog implements IsEmpty {
    log: UnencryptedL2Log;
    counter: number;
    constructor(log: UnencryptedL2Log, counter: number);
    static get schema(): z.ZodEffects<z.ZodObject<{
        log: 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[];
            };
        }>;
        counter: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        log: UnencryptedL2Log;
        counter: number;
    }, {
        log: {
            contractAddress: string;
            data: string | {
                type: "Buffer";
                data: number[];
            };
        };
        counter: string | number | bigint;
    }>, CountedContractClassLog, {
        log: {
            contractAddress: string;
            data: string | {
                type: "Buffer";
                data: number[];
            };
        };
        counter: string | number | bigint;
    }>;
    static from(fields: {
        log: UnencryptedL2Log;
        counter: number;
    }): CountedContractClassLog;
    isEmpty(): boolean;
}
export declare class CountedPublicExecutionRequest {
    request: PublicExecutionRequest;
    counter: number;
    constructor(request: PublicExecutionRequest, counter: number);
    static get schema(): z.ZodEffects<z.ZodObject<{
        request: z.ZodEffects<z.ZodObject<{
            callContext: z.ZodEffects<z.ZodObject<{
                msgSender: z.ZodType<import("@aztec/circuits.js").AztecAddress, any, string>;
                contractAddress: z.ZodType<import("@aztec/circuits.js").AztecAddress, any, string>;
                functionSelector: z.ZodType<import("@aztec/circuits.js").FunctionSelector, any, string>;
                isStaticCall: z.ZodBoolean;
            }, "strip", z.ZodTypeAny, {
                msgSender: import("@aztec/circuits.js").AztecAddress;
                contractAddress: import("@aztec/circuits.js").AztecAddress;
                functionSelector: import("@aztec/circuits.js").FunctionSelector;
                isStaticCall: boolean;
            }, {
                msgSender: string;
                contractAddress: string;
                functionSelector: string;
                isStaticCall: boolean;
            }>, import("@aztec/circuits.js").CallContext, {
                msgSender: string;
                contractAddress: string;
                functionSelector: string;
                isStaticCall: boolean;
            }>;
            args: z.ZodArray<z.ZodType<Fr, any, string>, "many">;
        }, "strip", z.ZodTypeAny, {
            args: Fr[];
            callContext: import("@aztec/circuits.js").CallContext;
        }, {
            args: string[];
            callContext: {
                msgSender: string;
                contractAddress: string;
                functionSelector: string;
                isStaticCall: boolean;
            };
        }>, PublicExecutionRequest, {
            args: string[];
            callContext: {
                msgSender: string;
                contractAddress: string;
                functionSelector: string;
                isStaticCall: boolean;
            };
        }>;
        counter: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        counter: number;
        request: PublicExecutionRequest;
    }, {
        counter: string | number | bigint;
        request: {
            args: string[];
            callContext: {
                msgSender: string;
                contractAddress: string;
                functionSelector: string;
                isStaticCall: boolean;
            };
        };
    }>, CountedPublicExecutionRequest, {
        counter: string | number | bigint;
        request: {
            args: string[];
            callContext: {
                msgSender: string;
                contractAddress: string;
                functionSelector: string;
                isStaticCall: boolean;
            };
        };
    }>;
    static from(fields: FieldsOf<CountedPublicExecutionRequest>): CountedPublicExecutionRequest;
    isEmpty(): boolean;
    static random(): CountedPublicExecutionRequest;
}
/**
 * The result of executing a private function.
 */
export declare class PrivateExecutionResult {
    /** The ACIR bytecode. */
    acir: Buffer;
    /** The verification key. */
    vk: Buffer;
    /** The partial witness. */
    partialWitness: Map<number, string>;
    /** The call stack item. */
    publicInputs: PrivateCircuitPublicInputs;
    /** Mapping of note hash to its index in the note hash tree. Used for building hints for note hash read requests. */
    noteHashLeafIndexMap: Map<bigint, bigint>;
    /** The notes created in the executed function. */
    newNotes: NoteAndSlot[];
    /** Mapping of note hash counter to the counter of its nullifier. */
    noteHashNullifierCounterMap: Map<number, number>;
    /** The raw return values of the executed function. */
    returnValues: Fr[];
    /** The nested executions. */
    nestedExecutions: PrivateExecutionResult[];
    /** Enqueued public function execution requests to be picked up by the sequencer. */
    enqueuedPublicFunctionCalls: CountedPublicExecutionRequest[];
    /** Public function execution requested for teardown */
    publicTeardownFunctionCall: PublicExecutionRequest;
    /**
     * Contract class logs emitted during execution of this function call.
     * Note: These are preimages to `contractClassLogsHashes`.
     */
    contractClassLogs: CountedContractClassLog[];
    constructor(
    /** The ACIR bytecode. */
    acir: Buffer, 
    /** The verification key. */
    vk: Buffer, 
    /** The partial witness. */
    partialWitness: Map<number, string>, 
    /** The call stack item. */
    publicInputs: PrivateCircuitPublicInputs, 
    /** Mapping of note hash to its index in the note hash tree. Used for building hints for note hash read requests. */
    noteHashLeafIndexMap: Map<bigint, bigint>, 
    /** The notes created in the executed function. */
    newNotes: NoteAndSlot[], 
    /** Mapping of note hash counter to the counter of its nullifier. */
    noteHashNullifierCounterMap: Map<number, number>, 
    /** The raw return values of the executed function. */
    returnValues: Fr[], 
    /** The nested executions. */
    nestedExecutions: PrivateExecutionResult[], 
    /** Enqueued public function execution requests to be picked up by the sequencer. */
    enqueuedPublicFunctionCalls: CountedPublicExecutionRequest[], 
    /** Public function execution requested for teardown */
    publicTeardownFunctionCall: PublicExecutionRequest, 
    /**
     * Contract class logs emitted during execution of this function call.
     * Note: These are preimages to `contractClassLogsHashes`.
     */
    contractClassLogs: CountedContractClassLog[]);
    static get schema(): ZodFor<PrivateExecutionResult>;
    static from(fields: FieldsOf<PrivateExecutionResult>): PrivateExecutionResult;
    static random(nested?: number): PrivateExecutionResult;
}
export declare function collectNoteHashLeafIndexMap(execResult: PrivateExecutionResult, accum?: Map<bigint, bigint>): Map<bigint, bigint>;
export declare function collectNoteHashNullifierCounterMap(execResult: PrivateExecutionResult, accum?: Map<number, number>): Map<number, number>;
/**
 * Collect all contract class logs across all nested executions and sorts by counter.
 * @param execResult - The topmost execution result.
 * @returns All contract class logs.
 */
export declare function collectSortedContractClassLogs(execResult: PrivateExecutionResult): UnencryptedFunctionL2Logs;
/**
 * Collect all enqueued public function calls across all nested executions.
 * @param execResult - The topmost execution result.
 * @returns All enqueued public function calls.
 */
export declare function collectEnqueuedPublicFunctionCalls(execResult: PrivateExecutionResult): PublicExecutionRequest[];
export declare function collectPublicTeardownFunctionCall(execResult: PrivateExecutionResult): PublicExecutionRequest;
export declare function getFinalMinRevertibleSideEffectCounter(execResult: PrivateExecutionResult): number;
export declare function collectNested<T>(executionStack: PrivateExecutionResult[], extractExecutionItems: (execution: PrivateExecutionResult) => T[]): T[];
//# sourceMappingURL=private_execution_result.d.ts.map