/** * Rewrap `factoryData` if the facilitator returned v0.6 format. * Returns the rewrapped hex, or the input unchanged when no rewrap is needed. */ export declare function rewrapFactoryData(factoryData: string | undefined): string | undefined; export interface UnpackedUserOp { sender: string; nonce: string; factory?: string; factoryData?: string; callData: string; callGasLimit: string; verificationGasLimit: string; preVerificationGas: string; maxFeePerGas: string; maxPriorityFeePerGas: string; paymaster?: string; paymasterVerificationGasLimit?: string; paymasterPostOpGasLimit?: string; paymasterData?: string; } /** * Compute the ERC-4337 v0.7 userOpHash from the facilitator's UNPACKED UserOp shape. * Mirrors `EntryPoint.getUserOpHash()` exactly. */ export declare function computeUnpackedUserOpHash(userOp: UnpackedUserOp, chainId: number): string; /** * Apply the legacy-factoryData rewrap + hash-recompute flow to a * facilitator-returned UserOp. Mutates `userOp.factoryData` if needed and * returns the hash to sign (fresh if rewrapped, facilitator-provided otherwise). */ export declare function patchLegacyUserOp(userOp: UnpackedUserOp, facilitatorHash: string, chainId: number): { hashToSign: string; patched: boolean; };