Hamas has said it agrees to release Israeli hostages, dead and alive, under Donald Trump's peace plan for Gaza.