Cut the tofu into 2 cm cubes.
Finally chop the garlic, ginger and chilli. Thinly slice the spring onions (including most of the green parts).
Heat a Tbsp of groundnut oil in a wok. When it starts smoking, add the tofu and carefully stir-fry until golden all over. Transfer the tofu onto a plate lined with kitchen paper towel.
Clean out the wok, then heat a Tbsp of groundnut oil. When hot, add the ginger, chilli and garlic and stir-fry for a minute. Add the beansprouts and most of the spring onions, then stir-fry for 3 minutes.
Add the soy sauce and rice wine. Stir-fry for a minute, then turn down the heat and put a lid on. Let it steam for a couple of minutes, until the beansprouts have just wilted but they still have a bite.
Stir in the sesame seeds (if used) and sesame oil, then return the tofu. Gently combine.
Serve with steamed rice or noodles, garnished with the remaining spring onions and a sprinkle of sesame seeds.