import { Fr } from '@aztec/foundation/curves/bn254'; import { BufferReader, FieldReader } from '@aztec/foundation/serialize'; import type { FieldsOf } from '@aztec/foundation/types'; import { z } from 'zod'; import { GasSettings } from '../gas/gas_settings.js'; /** * Transaction context. */ export declare class TxContext { /** Gas limits for this transaction. */ gasSettings: GasSettings; chainId: Fr; version: Fr; constructor( /** Chain ID of the transaction. Here for replay protection. */ chainId: Fr | number | bigint, /** Version of the transaction. Here for replay protection. */ version: Fr | number | bigint, /** Gas limits for this transaction. */ gasSettings: GasSettings); static get schema(): z.ZodEffects; version: z.ZodType; gasSettings: z.ZodEffects, z.ZodNumber>; l2Gas: z.ZodPipeline, z.ZodNumber>; }, "strip", z.ZodTypeAny, { daGas: number; l2Gas: number; }, { daGas: string | number | bigint; l2Gas: string | number | bigint; }>, import("../gas/gas.js").Gas, { daGas: string | number | bigint; l2Gas: string | number | bigint; }>; teardownGasLimits: z.ZodEffects, z.ZodNumber>; l2Gas: z.ZodPipeline, z.ZodNumber>; }, "strip", z.ZodTypeAny, { daGas: number; l2Gas: number; }, { daGas: string | number | bigint; l2Gas: string | number | bigint; }>, import("../gas/gas.js").Gas, { daGas: string | number | bigint; l2Gas: string | number | bigint; }>; maxFeesPerGas: z.ZodEffects, z.ZodBigInt>; feePerL2Gas: z.ZodPipeline, z.ZodBigInt>; }, "strip", z.ZodTypeAny, { feePerDaGas: bigint; feePerL2Gas: bigint; }, { feePerDaGas: string | number | bigint; feePerL2Gas: string | number | bigint; }>, import("../gas/gas_fees.js").GasFees, { feePerDaGas: string | number | bigint; feePerL2Gas: string | number | bigint; }>; maxPriorityFeesPerGas: z.ZodEffects, z.ZodBigInt>; feePerL2Gas: z.ZodPipeline, z.ZodBigInt>; }, "strip", z.ZodTypeAny, { feePerDaGas: bigint; feePerL2Gas: bigint; }, { feePerDaGas: string | number | bigint; feePerL2Gas: string | number | bigint; }>, import("../gas/gas_fees.js").GasFees, { feePerDaGas: string | number | bigint; feePerL2Gas: string | number | bigint; }>; }, "strip", z.ZodTypeAny, { gasLimits: import("../gas/gas.js").Gas; teardownGasLimits: import("../gas/gas.js").Gas; maxFeesPerGas: import("../gas/gas_fees.js").GasFees; maxPriorityFeesPerGas: import("../gas/gas_fees.js").GasFees; }, { gasLimits: { daGas: string | number | bigint; l2Gas: string | number | bigint; }; teardownGasLimits: { daGas: string | number | bigint; l2Gas: string | number | bigint; }; maxFeesPerGas: { feePerDaGas: string | number | bigint; feePerL2Gas: string | number | bigint; }; maxPriorityFeesPerGas: { feePerDaGas: string | number | bigint; feePerL2Gas: string | number | bigint; }; }>, GasSettings, { gasLimits: { daGas: string | number | bigint; l2Gas: string | number | bigint; }; teardownGasLimits: { daGas: string | number | bigint; l2Gas: string | number | bigint; }; maxFeesPerGas: { feePerDaGas: string | number | bigint; feePerL2Gas: string | number | bigint; }; maxPriorityFeesPerGas: { feePerDaGas: string | number | bigint; feePerL2Gas: string | number | bigint; }; }>; }, "strip", z.ZodTypeAny, { chainId: Fr; version: Fr; gasSettings: GasSettings; }, { chainId: string; version: string; gasSettings: { gasLimits: { daGas: string | number | bigint; l2Gas: string | number | bigint; }; teardownGasLimits: { daGas: string | number | bigint; l2Gas: string | number | bigint; }; maxFeesPerGas: { feePerDaGas: string | number | bigint; feePerL2Gas: string | number | bigint; }; maxPriorityFeesPerGas: { feePerDaGas: string | number | bigint; feePerL2Gas: string | number | bigint; }; }; }>, TxContext, { chainId: string; version: string; gasSettings: { gasLimits: { daGas: string | number | bigint; l2Gas: string | number | bigint; }; teardownGasLimits: { daGas: string | number | bigint; l2Gas: string | number | bigint; }; maxFeesPerGas: { feePerDaGas: string | number | bigint; feePerL2Gas: string | number | bigint; }; maxPriorityFeesPerGas: { feePerDaGas: string | number | bigint; feePerL2Gas: string | number | bigint; }; }; }>; getSize(): number; clone(): TxContext; /** * Serialize as a buffer. * @returns The buffer. */ toBuffer(): Buffer; static fromFields(fields: Fr[] | FieldReader): TxContext; toFields(): Fr[]; /** * Deserializes TxContext from a buffer or reader. * @param buffer - Buffer to read from. * @returns The TxContext. */ static fromBuffer(buffer: Buffer | BufferReader): TxContext; static empty(chainId?: Fr | number, version?: Fr | number): TxContext; isEmpty(): boolean; /** * Create a new instance from a fields dictionary. * @param fields - The dictionary. * @returns A new instance. */ static from(fields: FieldsOf): TxContext; /** * Serialize into a field array. Low-level utility. * @param fields - Object with fields. * @returns The array. */ static getFields(fields: FieldsOf): readonly [Fr, Fr, GasSettings]; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHhfY29udGV4dC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R4L3R4X2NvbnRleHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBRXBELE9BQU8sRUFBRSxZQUFZLEVBQUUsV0FBVyxFQUF3QyxNQUFNLDZCQUE2QixDQUFDO0FBQzlHLE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBRXhELE9BQU8sRUFBRSxDQUFDLEVBQUUsTUFBTSxLQUFLLENBQUM7QUFFeEIsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRXJEOztHQUVHO0FBQ0gscUJBQWEsU0FBUztJQVNsQix1Q0FBdUM7SUFDaEMsV0FBVyxFQUFFLFdBQVc7SUFUMUIsT0FBTyxFQUFFLEVBQUUsQ0FBQztJQUNaLE9BQU8sRUFBRSxFQUFFLENBQUM7SUFFbkI7SUFDRSwrREFBK0Q7SUFDL0QsT0FBTyxFQUFFLEVBQUUsR0FBRyxNQUFNLEdBQUcsTUFBTTtJQUM3Qiw4REFBOEQ7SUFDOUQsT0FBTyxFQUFFLEVBQUUsR0FBRyxNQUFNLEdBQUcsTUFBTTtJQUM3Qix1Q0FBdUM7SUFDaEMsV0FBVy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