Iranian President Hassan Rouhani said he was optimistic over talks to revive the 2015 nuclear deal with world powers and suggested a deal had been reached to lift the main sanctions on Tehran.