If you are using rice noodles, put them in a large bowl and cover them with hot water. Let them soak for 20 – 30 minutes until they are soft and pliable, and drain them. If you are using egg noodles, cook them according to the package directions until they are al dente and drain them.
Meanwhile, if you are using the tofu, drain and wrap it in a clean dishtowel to dry it. Cut the drained tofu into 1/2-inch cubes.
In a blender, combine the garlic, fish sauce, sugar, ketchup, vinegar, and ½ cup of water and blend until smooth.
Heat the oil in a large wok or nonstick skillet over medium-high heat.
Add the tofu or shrimp in a single layer and cook it, flipping occasionally, until it is lightly browned, about 5 minutes (if you are using the shrimp, cook it for about 3 minutes until it turns pink).
Add the peas and stir-fry them for 1 minute.
Drizzle the beaten eggs over the tofu or shrimp and peas and let everything quickly set for 10 seconds, then gently stir and let it set for 10 more seconds. Stir to make sure the eggs are set.
Drizzle the blended sauce over everything.
Add the scallions and noodles to the pan, reduce the heat, and toss gently until the sauce is absorbed.
Gently stir in the peanuts and cilantro (optional). Serve it with lime wedges.