Lehi's method of stating this makes it appear that he is citing another prophet, but he is citing revelation he has received. This phrasing of the blessing, with its two-pronged blessing and curse, appears in very similar form multiple times in Alma's discourses. In at least one of those citations, Alma specifically credits Lehi (Alma 9:13 Behold, do ye not remember the words which he spake unto Lehi, saying that: Inasmuch as ye shall keep my commandments, ye shall prosper in the land? And again it is said that: Inasmuch as ye will not keep my commandments ye shall be cut off from the presence of the Lord.)
From this we understand first that Lehi was the recipient of the promise, and that Alma clearly had access to this (and very likely other) teaching of Lehi.