Cook untrimmed beans in a 6- to 8-quart pot of boiling salted water, uncovered, stirring occasionally, until just tender, 3 to 5 minutes. Transfer with tongs to a large bowl of ice and cold water to stop cooking, then drain in a colander and pat dry with paper towels. Trim beans and cut crosswise into 3/4-inch pieces.
Meanwhile, pulse peanuts in a food processor until about half of peanuts are finely ground and remainder are in very large pieces (do not grind to a paste).
Stir together soy sauce, chiles, and salt in a small bowl.
Heat wok over high heat until a bead of water dropped onto cooking surface evaporates immediately. Add oil, swirling to coat wok, then add garlic and stir-fry until garlic begins to turn pale golden, about 5 seconds. Add peanuts, and stir-fry until all of mixture is golden, about 30 seconds. Add beans, and stir-fry until hot and well coated, about 2 minutes. Remove wok from heat, then stir in soy sauce mixture and onion. Drizzle in lime juice and season with salt, then transfer to a bowl. Serve warm or at room temperature.