How to Make It
In a medium skillet, heat the oil. Add the garlic and shallots and cook over moderately low heat, stirring occasionally, until golden brown, about 5 minutes. Add the ginger, ham, black beans and sugar and cook, stirring occasionally, until richly browned, about 10 minutes. Add the dried shrimp, ancho powder, brandy and rice wine and simmer over moderate heat until thickened, about 3 minutes. Stir in the Sriracha and let the XO sauce cool.
Bring a large, deep skillet of salted water to a boil. Add the beans and boil until crisp-tender, about 3 minutes. Drain well.
Add the stock to the large skillet and bring to a boil. Add half of the XO sauce and whisk in the cornstarch mixture. Bring to a simmer over moderate heat, stirring until thickened. Add the green beans, toss to coat with the sauce and cook until hot, about 1 minute. Season with salt and serve. Reserve the remaining sauce for another use.