Direct evidence for fixed ionic groups in the hydrogel of an electrolyte diode