The circuit is not much more than a basic transistor switch. This one should work: http://www.instructables.com/id/Simple-Water-Sensor/ (you can remove the LED and change the resistor to a 10k one. Connect the ESP pin between the resistor and transistor).
If you use the transistor in place of the switch in this circuit http://j0h.nl/-1QB (courtesy of Sprite_tm, posted here), the ESP would only be powered if a leak is detected.