import type { Fr } from '@aztec/foundation/curves/bn254'; import type { FieldsOf } from '@aztec/foundation/types'; import { z } from 'zod'; import { AztecAddress } from '../aztec-address/index.js'; import { type AbiType, FunctionType } from './abi.js'; import { FunctionSelector } from './function_selector.js'; /** A request to call a function on a contract. */ export declare class FunctionCall { /** The name of the function to call */ name: string; /** The recipient contract */ to: AztecAddress; /** The function being called */ selector: FunctionSelector; /** Type of the function */ type: FunctionType; /** Only applicable for enqueued public function calls. `hideMsgSender = true` will set the msg_sender field (the caller's address) to "null", meaning the public function (and observers around the world) won't know which smart contract address made the call. */ hideMsgSender: boolean; /** Whether this call can make modifications to state or not */ isStatic: boolean; /** The encoded args */ args: Fr[]; /** The return type for decoding */ returnTypes: AbiType[]; constructor( /** The name of the function to call */ name: string, /** The recipient contract */ to: AztecAddress, /** The function being called */ selector: FunctionSelector, /** Type of the function */ type: FunctionType, /** Only applicable for enqueued public function calls. `hideMsgSender = true` will set the msg_sender field (the caller's address) to "null", meaning the public function (and observers around the world) won't know which smart contract address made the call. */ hideMsgSender: boolean, /** Whether this call can make modifications to state or not */ isStatic: boolean, /** The encoded args */ args: Fr[], /** The return type for decoding */ returnTypes: AbiType[]); static getFields(fields: FieldsOf): readonly [string, AztecAddress, FunctionSelector, FunctionType, boolean, boolean, Fr[], AbiType[]]; static from(fields: FieldsOf): FunctionCall; static get schema(): z.ZodEffects; selector: import("../schemas/index.js").ZodFor; type: z.ZodNativeEnum; isStatic: z.ZodBoolean; hideMsgSender: z.ZodBoolean; args: z.ZodArray, "many">; returnTypes: z.ZodArray, "many">; }, "strip", z.ZodTypeAny, { name: string; to: AztecAddress; selector: FunctionSelector; type: FunctionType; isStatic: boolean; hideMsgSender: boolean; args: Fr[]; returnTypes: AbiType[]; }, { name: string; to?: any; selector?: any; type: FunctionType; isStatic: boolean; hideMsgSender: boolean; args: any[]; returnTypes: AbiType[]; }>, FunctionCall, { name: string; to?: any; selector?: any; type: FunctionType; isStatic: boolean; hideMsgSender: boolean; args: any[]; returnTypes: AbiType[]; }>; isPublicStatic(): boolean; /** * Creates an empty function call. * @returns an empty function call. */ static empty(): FunctionCall; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb25fY2FsbC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FiaS9mdW5jdGlvbl9jYWxsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3pELE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBRXhELE9BQU8sRUFBRSxDQUFDLEVBQUUsTUFBTSxLQUFLLENBQUM7QUFFeEIsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBRXpELE9BQU8sRUFBRSxLQUFLLE9BQU8sRUFBaUIsWUFBWSxFQUFFLE1BQU0sVUFBVSxDQUFDO0FBQ3JFLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRTFELGtEQUFrRDtBQUNsRCxxQkFBYSxZQUFZO0lBRXJCLHVDQUF1QztJQUNoQyxJQUFJLEVBQUUsTUFBTTtJQUNuQiw2QkFBNkI7SUFDdEIsRUFBRSxFQUFFLFlBQVk7SUFDdkIsZ0NBQWdDO0lBQ3pCLFFBQVEsRUFBRSxnQkFBZ0I7SUFDakMsMkJBQTJCO0lBQ3BCLElBQUksRUFBRSxZQUFZO0lBQ3pCLHFRQUFxUTtJQUM5UCxhQUFhLEVBQUUsT0FBTztJQUM3QiwrREFBK0Q7SUFDeEQsUUFBUSxFQUFFLE9BQU87SUFDeEIsdUJBQXVCO0lBQ2hCLElBQUksRUFBRSxFQUFFLEVBQUU7SUFDakIsbUNBQW1DO0lBQzVCLFdBQVcsRUFBRSxPQU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