The US has confirmed it deployed a space weapon in Earth’s orbit, the first time it has acknowledged such offensive capabilities.