Julian Assange will be able to walk free from a US courtroom on Wednesday after a judge said she approved a plea deal with prosecutors, ending his 14-year legal ordeal.