The Pacific Railway Act was signed into law by President Abraham Lincoln on July 1, 1862. This act provided Federal government support for the building of the first transcontinental railroad, which was completed on May 10, 1869.
From this, I think it is the second option, but I am not 100% sure. Hopefully this helps... :)