Is this sink drain ok?

The lines in white are 2" pipe and ties into the main line directly behind the toilet. Wanting to run the sink drain through the wall and tie into the vent if that's acceptable. Thanks in advance for your response.