Porn star Stormy Daniels will go to court on July 12 in a bid to dissolve an agreement stopping her discussing an affair she says she had with US President Donald Trump, according to court papers published on Wednesday.

Lawyer Michael Avenatti filed a lawsuit on behalf of Daniels last week seeking to toss out the confidential settlement she signed just days before the November 2016 election.

The lawsuit alleges Daniels, whose real name is Stephanie Clifford, began an "intimate relationship" with Mr Trump in the summer of 2006 that continued well into 2007.

A copy of the settlement filed in court shows Daniels received the $130,000 from a company known as Essential Consultants LLC in return for her silence.

Later on Wednesday, the Wall Street Journal published details of an arbitration document filed on 22 February in California and signed by Jill A. Martin, a Trump Organisation lawyer.

The document, intended to stop Daniels from further discussing the alleged affair, represents the first link between Mr Trump's company and efforts to stop the porn star talking.

The White House has denied any sexual encounter between Mr Trump and Daniels - who has offered to return the $130,000 she received so she can be free to "speak openly and freely about her prior relationship with the president and the attempts to silence her".

She is also asking to be allowed to publish text messages, photos and videos relating to the president, Mr Avenatti said in a letter to Mr Trump's lawyer Michael Cohen.

"I think it's time for her to tell her story and for the public to decide who's telling the truth," Mr Avenatti said last week.

Using the pseudonyms Peggy Peterson and David Dennison, Daniels and Mr Trump were to sign the 2016 agreement, along with Essential Consultants.

But Mr Trump never signed, providing the basis for Mr Avenatti's attempt to have it thrown out and release Daniels from her obligations.

Daniels is asking for presiding judge Elizabeth Feffer to be replaced, arguing she has a conflict of interest because she is seeking an appointment to a seat in federal court.