Lawyers for Assange, 49, claim the plan to extradite and prosecute him involved the US president and then US ambassador to Germany, Richard Grenell.
Assange is fighting extradition to the US, where he is facing an 18-count indictment.
This includes alleging a plot to hack computers and conspiracy to obtain and disclose national defence information.
It comes after he was removed from the Ecuadorian embassy and arrested on April 11 last year.
American journalist Cassandra Fairbanks said Arthur Schwartz, described as an informal adviser to Donald Trump Junior, revealed details to her in a phone call on October 30 2018 after she posted a link to an interview with Assange’s mother, Christine.
In a statement read at the Old Bailey on Monday, she said: “He repeatedly insisted that I stop advocating for WikiLeaks and Assange telling me that ‘a pardon isn’t going to f****** happen’.
“He knew very specific details about a future prosecution against Assange that were later made public and that only those very close to the situation then would have been aware of.”
Ms Fairbanks, who was working for the pro-Trump Gateway Pundit publication at the time of the call, said she was told Assange would be targeted over the leaks from US army analyst Chelsea Manning.
“He also told me that the US would be going into the embassy to get Assange.
“I responded that entering the embassy of a sovereign nation and kidnapping a political refugee would be an act of war, and he responded, ‘not if they let us’.
“I did not know at that time that Ambassador Grenell himself had that very month, October 2018, worked out a deal for Assange’s arrest with the Ecuadorian government.”
Joel Smith, for the US government, said prosecutors could, in later submissions, comment on the partiality of the witness, who admitted to being a supporter of Assange and WikiLeaks and visited him in the embassy, where he stayed for around seven years.
“Firstly, the truth of what Ms Fairbanks was told by Arthur Schwartz is not within her knowledge,” he said.
“Secondly, so far as the remainder of the evidence is concerned, it’s relied on by the defence, not challenged but not accepted by the prosecution.”
Edward Fitzgerald QC, for Assange, said Ms Fairbanks’ statement is “reliable and true”.
He told the judge, Vanessa Baraitser: “We will, in due course, invite you to rely on this evidence as supporting a pre-coordinated plan at the top level, including Trump and Grenell, to take Assange out of the Ecuadorian embassy, to extradite and prosecute him and also to compel Manning, if possible to give evidence against him.”
The hearing continues with medical evidence on Tuesday.