It was mostly diamonds and malachite, with some from equipment I had removed enchantments from or loot I didn't need. There is no practical way to get most of the gold from the traveling merchant without farming diamonds; I think the most I've gotten for equipment sold so far has been a little over 1000 gold, with the majority less than half of that. Other merchants you can sell stuff to over time to eventually deplete their gold reserves (depending on how much you buy from them).