A €2.8 billion ($3.8 billion) project financing agreement has been secured for an offshore wind farm, in a deal that claims to be the largest of its kind.