Hamas can accept several items that will guarantee that this kind of attack will not happen again. In return some exchange of prisoners to claim some gains. After that as air leveling of Gaza continues extensively and/or land operation starts there wont be any excuse left.
-they will accept curb of authority to initiate attacks against israel. Either a referandum or an approval of a separate Gaza elected body with all other resistance groups approval. So no more lone wolf attacks risking all Gaza and even more regional conflict possibilities. For example a beating or arrest in Aqsa cannot get approval of Palestinians for Hamas to start rocket attacks again as everytime of escalation Palestinians die in thousands. But a mass killing of palestinians can get approval. So Hamas will know its place as a minimum deterrant defensive force in all future issues and find other smarter ways to respond to israeli provacations thinking more about the Palestinians lives they are responsible for.
-Some Hamas leaders actively planning and executing the current operation knowing that they will be targeted can choose to go to a third country like Qatar. That will strengthen the ceasefire conditions.
-Hamas or other groups like Pij can possibly never accept two state solution especially after the conflict but can state that eventhough they wont recognize that if other muslim countries make a possible future agreement they will not involve militarily as long as ceasefire holds and until that time they wont enforce their own one state solution militarily knowing their responsibility to protect Palestinians above other aims. Pij Hamas and other leaders approving this in return demand not to be targeted by israel later on as ceasefire holds.
-that leaves the weapon transfer issue. They can accept large caliber ballistic missiles will not be transferred from abroad from now on. Small arms ,atgms ,manpads, home made rockets and home made missiles are still necessary for their minimum deterrence. So israel hitting some tunnels claiming arms transfer and collateral damage has risks to shatter the ceasefire again for israel as the initiator of conflict. Usage of smaller tunnels only will prove only small arms can enter for Palestinians.