Nanometre-resolved observation of electrochemical microenvironment formation at the nanoparticle–ligand interface