Maybe they had learned to make picric acid. One of the early methods involved nitrating silk. But for that, you need nitric and sulfuric acids.
Nitric acid you can make from sulfuric acid and alkali nitrates. And sulfuric acid was discovered by Rhazes (Zakariya al-Razi) in ~900 AD. So it's possible.
Or maybe ammonium nitrate. That was known in antiquity, but not as an explosive. But maybe they discovered that. And indeed, mixtures of ammonium nitrate, picric acid and anything carbonaceous are decent ~high explosives.
The energy released would have required at least 20,000,000 pounds of high explosive. There is simply no way they had the resources to manufacture in those quantities.
True enough, but maybe the reports have been exaggerated.
The Texas City disaster,[0] involved ~2 million kg of ammonium nitrate. But TFA notes that the facility produced only ~400 kg gunpowder per day. Let alone ammonium nitrate, if any.
Wikipedia puts the TNT equivalency of ammonium nitrate at 2.38 kg of ammonium nitrate for one kg of TNT. The Texas City explosion had 2,200 tons of ammonium nitrate present, so my estimate for the potential TNT equivalency of that explosion is just less than one kiloton. Meaning the Wanggongchang explosion was 10-20x as big (my math might be a bit off there, but probably not by an order of magnitude.)
Even the Halifax explosion wasn't nearly as big as the Wanggongchang explosion. It's hard for me to fathom they had so much explosives there.
Nitric acid you can make from sulfuric acid and alkali nitrates. And sulfuric acid was discovered by Rhazes (Zakariya al-Razi) in ~900 AD. So it's possible.
Or maybe ammonium nitrate. That was known in antiquity, but not as an explosive. But maybe they discovered that. And indeed, mixtures of ammonium nitrate, picric acid and anything carbonaceous are decent ~high explosives.