/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import { PublicDataWrite, RevertCode } from '@aztec/circuits.js';
import { type Fr } from '@aztec/foundation/fields';
import { type FieldsOf } from '@aztec/foundation/types';
import { z } from 'zod';
import { L2BlockHash } from './block_hash.js';
import { TxHash } from './tx_hash.js';
/**
 * Possible status of a transaction.
 */
export declare enum TxStatus {
    DROPPED = "dropped",
    PENDING = "pending",
    SUCCESS = "success",
    APP_LOGIC_REVERTED = "app_logic_reverted",
    TEARDOWN_REVERTED = "teardown_reverted",
    BOTH_REVERTED = "both_reverted"
}
/**
 * Represents a transaction receipt in the Aztec network.
 * Contains essential information about the transaction including its status, origin, and associated addresses.
 * REFACTOR: TxReceipt should be returned only once the tx is mined, and all its fields should be required.
 * We should not be using a TxReceipt to answer a query for a pending or dropped tx.
 */
export declare class TxReceipt {
    /** A unique identifier for a transaction. */
    txHash: TxHash;
    /** The transaction's status. */
    status: TxStatus;
    /** Description of transaction error, if any. */
    error: string;
    /** The transaction fee paid for the transaction. */
    transactionFee?: bigint | undefined;
    /** The hash of the block containing the transaction. */
    blockHash?: L2BlockHash | undefined;
    /** The block number in which the transaction was included. */
    blockNumber?: number | undefined;
    /** Information useful for testing/debugging, set when test flag is set to true in `waitOpts`. */
    debugInfo?: DebugInfo | undefined;
    constructor(
    /** A unique identifier for a transaction. */
    txHash: TxHash, 
    /** The transaction's status. */
    status: TxStatus, 
    /** Description of transaction error, if any. */
    error: string, 
    /** The transaction fee paid for the transaction. */
    transactionFee?: bigint | undefined, 
    /** The hash of the block containing the transaction. */
    blockHash?: L2BlockHash | undefined, 
    /** The block number in which the transaction was included. */
    blockNumber?: number | undefined, 
    /** Information useful for testing/debugging, set when test flag is set to true in `waitOpts`. */
    debugInfo?: DebugInfo | undefined);
    static empty(): TxReceipt;
    static get schema(): z.ZodEffects<z.ZodObject<{
        txHash: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, Buffer, string>, TxHash, string>;
        status: z.ZodNativeEnum<typeof TxStatus>;
        error: z.ZodString;
        blockHash: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, Buffer, string>, L2BlockHash, string>>;
        blockNumber: z.ZodOptional<z.ZodNumber>;
        transactionFee: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>>;
        debugInfo: z.ZodOptional<z.ZodObject<{
            noteHashes: z.ZodArray<z.ZodType<Fr, any, string>, "many">;
            nullifiers: z.ZodArray<z.ZodType<Fr, any, string>, "many">;
            publicDataWrites: z.ZodArray<z.ZodEffects<z.ZodObject<{
                leafSlot: z.ZodType<Fr, any, string>;
                value: z.ZodType<Fr, any, string>;
            }, "strip", z.ZodTypeAny, {
                value: Fr;
                leafSlot: Fr;
            }, {
                value: string;
                leafSlot: string;
            }>, PublicDataWrite, {
                value: string;
                leafSlot: string;
            }>, "many">;
            l2ToL1Msgs: z.ZodArray<z.ZodType<Fr, any, string>, "many">;
        }, "strip", z.ZodTypeAny, {
            l2ToL1Msgs: Fr[];
            noteHashes: Fr[];
            nullifiers: Fr[];
            publicDataWrites: PublicDataWrite[];
        }, {
            l2ToL1Msgs: string[];
            noteHashes: string[];
            nullifiers: string[];
            publicDataWrites: {
                value: string;
                leafSlot: string;
            }[];
        }>>;
    }, "strip", z.ZodTypeAny, {
        status: TxStatus;
        txHash: TxHash;
        error: string;
        blockNumber?: number | undefined;
        transactionFee?: bigint | undefined;
        blockHash?: L2BlockHash | undefined;
        debugInfo?: {
            l2ToL1Msgs: Fr[];
            noteHashes: Fr[];
            nullifiers: Fr[];
            publicDataWrites: PublicDataWrite[];
        } | undefined;
    }, {
        status: TxStatus;
        txHash: string;
        error: string;
        blockNumber?: number | undefined;
        transactionFee?: string | number | bigint | undefined;
        blockHash?: string | undefined;
        debugInfo?: {
            l2ToL1Msgs: string[];
            noteHashes: string[];
            nullifiers: string[];
            publicDataWrites: {
                value: string;
                leafSlot: string;
            }[];
        } | undefined;
    }>, TxReceipt, {
        status: TxStatus;
        txHash: string;
        error: string;
        blockNumber?: number | undefined;
        transactionFee?: string | number | bigint | undefined;
        blockHash?: string | undefined;
        debugInfo?: {
            l2ToL1Msgs: string[];
            noteHashes: string[];
            nullifiers: string[];
            publicDataWrites: {
                value: string;
                leafSlot: string;
            }[];
        } | undefined;
    }>;
    static from(fields: FieldsOf<TxReceipt>): TxReceipt;
    static statusFromRevertCode(revertCode: RevertCode): TxStatus.SUCCESS | TxStatus.APP_LOGIC_REVERTED | TxStatus.TEARDOWN_REVERTED | TxStatus.BOTH_REVERTED;
}
/**
 * Information useful for debugging/testing purposes included in the receipt when the debug flag is set to true
 * in `WaitOpts`.
 */
interface DebugInfo {
    /**
     * New note hashes created by the transaction.
     */
    noteHashes: Fr[];
    /**
     * New nullifiers created by the transaction.
     */
    nullifiers: Fr[];
    /**
     * New public data writes created by the transaction.
     */
    publicDataWrites: PublicDataWrite[];
    /**
     * New L2 to L1 messages created by the transaction.
     */
    l2ToL1Msgs: Fr[];
}
export {};
//# sourceMappingURL=tx_receipt.d.ts.map