"We have agreed to the 18-month truce with the Israeli side [in return] for the opening of all six crossings between the Gaza Strip and Israel," MENA quoted Mussa Abu Marzuk as saying.
Marzuk, who is heading a senior Hamas delegation in Cairo, met late on Thursday with Egyptian intelligence chief Omar Suleiman to finalize the details of the Egyptian-brokered three-point truce plan beginning with an immediate ceasefire to allow humanitarian aid into Gaza.
According to the Hamas official, the sides agreed not to include the release of Israeli Corporal Gilad Shalit, abducted two years ago by radical Gaza militants, in the truce deal, and negotiate the issue later.
Israel has previously insisted that Hamas release Shalit as a condition for ending the blockade of Gaza.
Mazruk said Egypt will announce the agreement in 48 hours after contacting Israel and Palestinian factions.
Egypt is mediating the talks between Israel and Hamas, who do not communicate directly.
More than 1,300 Palestinians were killed during Israel's recent three-week military operation in Gaza, which was aimed at stopping rocket and mortar fire into southern Israel from Palestinian territory.
In contrast with Mazruk's statements, the Arabic daily Al-Hayat cited on Friday that the truce agreement included the release of Shalit in exchange for 1,000 Palestinian prisoners held by Israel.
According to the newspaper, Shalit may be released as early as next Wednesday.
Meanwhile, militants in Gaza fired two rockets into southern Israel on Friday, just hours after Hamas made the truce announcement, the Israeli military said.