After three days of closed-door negotiations , Britain and Ireland on Friday offered a compromise formula to restore Northern Ireland 's power-sharing government by next March , allowing for an election or referendum to endorse the deal .