import { Fr } from '@aztec/foundation/curves/bn254'; import { BufferReader } from '@aztec/foundation/serialize'; import type { FieldsOf } from '@aztec/foundation/types'; import { inspect } from 'util'; import { FunctionSelector } from '../abi/function_selector.js'; import { AuthWitness } from '../auth_witness/auth_witness.js'; import { AztecAddress } from '../aztec-address/index.js'; import { type ZodFor } from '../schemas/index.js'; import { Capsule } from './capsule.js'; import { HashedValues } from './hashed_values.js'; import { TxContext } from './tx_context.js'; import { TxRequest } from './tx_request.js'; /** * Request to execute a transaction. Similar to TxRequest, but has the full args. */ export declare class TxExecutionRequest { /** * Sender. */ origin: AztecAddress; /** * Selector of the function to call. */ functionSelector: FunctionSelector; /** * The hash of arguments of first call to be executed (usually account entrypoint). * @dev This hash is a pointer to `argsOfCalls` unordered array. */ firstCallArgsHash: Fr; /** * Transaction context. */ txContext: TxContext; /** * An unordered array of packed arguments for each call in the transaction. * @dev These arguments are accessed in Noir via oracle and constrained against the args hash. The length of * the array is equal to the number of function calls in the transaction (1 args per 1 call). */ argsOfCalls: HashedValues[]; /** * Transient authorization witnesses for authorizing the execution of one or more actions during this tx. * These witnesses are not expected to be stored in the local witnesses database of the PXE. */ authWitnesses: AuthWitness[]; /** * Read-only data passed through the oracle calls during this tx execution. */ capsules: Capsule[]; /** * A salt to make the tx request hash difficult to predict. * The hash is used as the first nullifier if there is no nullifier emitted throughout the tx. */ salt: Fr; constructor( /** * Sender. */ origin: AztecAddress, /** * Selector of the function to call. */ functionSelector: FunctionSelector, /** * The hash of arguments of first call to be executed (usually account entrypoint). * @dev This hash is a pointer to `argsOfCalls` unordered array. */ firstCallArgsHash: Fr, /** * Transaction context. */ txContext: TxContext, /** * An unordered array of packed arguments for each call in the transaction. * @dev These arguments are accessed in Noir via oracle and constrained against the args hash. The length of * the array is equal to the number of function calls in the transaction (1 args per 1 call). */ argsOfCalls: HashedValues[], /** * Transient authorization witnesses for authorizing the execution of one or more actions during this tx. * These witnesses are not expected to be stored in the local witnesses database of the PXE. */ authWitnesses: AuthWitness[], /** * Read-only data passed through the oracle calls during this tx execution. */ capsules: Capsule[], /** * A salt to make the tx request hash difficult to predict. * The hash is used as the first nullifier if there is no nullifier emitted throughout the tx. */ salt?: Fr); static get schema(): ZodFor; toTxRequest(): TxRequest; static getFields(fields: FieldsOf): readonly [AztecAddress, FunctionSelector, Fr, TxContext, HashedValues[], AuthWitness[], Capsule[], Fr]; static from(fields: FieldsOf): TxExecutionRequest; /** * Serialize as a buffer. * @returns The buffer. */ toBuffer(): Buffer; /** * Serialize as a string. * @returns The string. */ toString(): `0x${string}`; /** * Deserializes from a buffer or reader, corresponding to a write in cpp. * @param buffer - Buffer to read from. * @returns The deserialized TxRequest object. */ static fromBuffer(buffer: Buffer | BufferReader): TxExecutionRequest; /** * Deserializes from a string, corresponding to a write in cpp. * @param str - String to read from. * @returns The deserialized TxRequest object. */ static fromString(str: string): TxExecutionRequest; static random(): Promise; [inspect.custom](): string; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHhfZXhlY3V0aW9uX3JlcXVlc3QuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90eC90eF9leGVjdXRpb25fcmVxdWVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDcEQsT0FBTyxFQUFFLFlBQVksRUFBcUIsTUFBTSw2QkFBNkIsQ0FBQztBQUU5RSxPQUFPLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUV4RCxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBRy9CLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQy9ELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQU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