Nicaragua declared a nationwide state of emergency last night in response to what it said was a U.S.-sponsored attack that blew up two bridges Sunday near the Honduran border.

Daniel Ortega, a leader of the Sandinista National Liberation Front and coordinator of the three-member ruling junta, said in a broadcast communique that all constitutional rights had been suspended for an initial 30 days.

Earlier yesterday the Nicaraguan Embassy here released a statement blaming the explosions on what it called U.S. covert plans to "hurt Nicaragua and destabilize our government." One bridge was destroyed and another seriously damaged by the attacks, according to the statement.

Foreign Minister Miguel D'Escoto reached by telephone in Managua, said, "We cannot discard the possibility of this being only the beginning of what could be an imminent invasion."

A State Department spokeswoman said there would be no immediate comment on the Nicaraguan charge.

Other officials in Managua said yesterday that the state of emergency would impose measures to restrict travel within the country as well as restrictions on the broadcast and print media.

"We will keep working, but everybody knows we are working under the knowledge that we may have to be mobilized," said Rita Delia Casco, director of North American affairs in the Foreign Ministry. "It means everybody has to sleep with their shoes on."

The Washington Post reported March 10 that President Reagan had approved a program of covert actions to disrupt the Nicaraguan economy and cut off the alleged flow of arms from Nicaragua to guerrillas fighting the U.S.-backed government in nearby El Salvador. The plan authorized the Central Intelligence Agency to begin to build and fund a paramilitary force of up to 500 Latin Americans in Honduran border camps to launch attacks against vital infrastructure targets such as bridges and power stations inside Nicaragua.

Although that report said U.S. officials have stressed it may take months for the paramilitary force to be recruited, trained and positioned to begin operations, the Nicaraguan government has charged the United States with responsibility for what it says have been a series of cross-border attacks during the past several months.

"We are absolutely convinced that the United States is behind" the Sunday bridge explosions, Casco said.

According to a statement issued here by the Nicaraguan Embassy, "terrorist experts on the placement and detonation of explosives who operate from bases in Honduras blew up a bridge over the Rio Negro on the highway leading to Guasaule, a post on the Nicaraguan-Honduran border," and "caused substantial damage" to another bridge on the highway leading to a government border post near the northern town of Ocotal.

"Our government cannot fail to notice," the statement said, that "these terrorist acts" coincided with reports of plans that "the Reagan administration has approved in order to hurt Nicaragua and destabilize our government with the pretext of interrupting the alleged arms traffic from Nicaragua to El Salvador. Destroying and blocking our main arteries such as highways are an essential part of these plans."

The statement concluded with a call for "Americans of good will to reject and denounce . . . the participation of their government in such criminal and covert actions."