// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; import "./UserOperation.sol"; /** * Aggregated Signatures validator. */ interface IAggregator { /** * validate aggregated signature. * revert if the aggregated signature does not match the given list of operations. */ function validateSignatures(UserOperation[] calldata userOps, bytes calldata signature) external view; /** * validate signature of a single userOp * This method is called by EntryPoint.simulateUserOperation() if the wallet has an aggregator. * First it validates the signature over the userOp. then it return data to be used when creating the handleOps: * @param userOp the userOperation received from the user. * @param offChainSigCheck if true, don't check signature, and leave it for the Bundler to use an off-chain native library. * @return sigForUserOp the value to put into the signature field of the userOp when calling handleOps. * (usually empty, unless wallet and aggregator support some kind of "multisig" * @return sigForAggregation the value to pass (for all wallets) to aggregateSignatures() * @return offChainSigInfo in case offChainSigCheck is true, this value should be used by the off-chain signature code (e.g. it contains the sender's publickey) */ function validateUserOpSignature(UserOperation calldata userOp, bool offChainSigCheck) external view returns (bytes memory sigForUserOp, bytes memory sigForAggregation, bytes memory offChainSigInfo); /** * aggregate multiple signatures into a single value. * This method is called off-chain to calculate the signature to pass with handleOps() * bundler MAY use optimized custom code perform this aggregation * @param sigsForAggregation array of values returned by validateUserOpSignature() for each op * @return aggregatesSignature the aggregated signature */ function aggregateSignatures(bytes[] calldata sigsForAggregation) external view returns (bytes memory aggregatesSignature); }