Bacterial battery fuels recovery of valuable commodities from wastewater