Nanolayers on nanochannels for hydrogen purification