Donald Trump ’s decision to accept an invitation to meet North Korean leader Kim Jong-un stunned the world.

After months of rhetoric between the two leaders that bordered on the juvenile, with the US president boasting about bigger buttons and calling Kim the “little rocket man”, Trump’s policy shifted 180 degrees overnight.

What key players want from Trump-Kim talks (and what they’ll get)

Trump is a showman at heart, so maybe the desire to make headlines shouldn’t be a surprise. What would be a surprise is if both sides enter the meeting with their true intentions on the table – and follow through on any promises made. If that happens, China has a unique role to play as guarantor of the outcome.

The White House has made clear the meeting – which is supposed to happen by the end of May – will not go ahead unless Kim shows he is serious about denuclearisation.

Further muddying the situation, Pyongyang has yet to confirm any invitation as the message has come through a South Korean envoy. It would seem Kim wants to secure economic and diplomatic incentives before any reduction in his nuclear capabilities.

Is China to blame for the North Korea crisis? The answer depends on who you ask

Of course, the summit could go ahead if the right conditions are met. South Korean President Moon Jae-in, who has made peace with the North his top goal, has said Pyongyang could start by freezing its nuclear development and eventually begin to dismantle its “treasured sword” – the North’s nickname for its nuclear weapons. But the US says denuclearisation in such a phased way is unacceptable.

Pyongyang’s history of not living up to its promises – or, more bluntly, its outright deception – also has some US officials concerned Kim will prove to be like his father, Kim Jong-il, and his grandfather, Kim Il-sung, who failed to honour agreements with Bill Clinton and George H.W. Bush.

Nonetheless, the recent about face from the brink of nuclear war to diplomacy gives rise to hope.

In Seoul’s role as a facilitator, Moon has gone to great lengths to engage his northern comrades and bring the two sides to the table. However, it can’t be seen as a power broker given Pyongyang’s perception that Seoul is a puppet government under Washington’s control. This is where China’s influence comes in. Beijing, Pyongyang’s top trading partner, has recently taken steps away from North Korea, increasing an isolation that Kim hasn’t felt before and pushing him towards negotiating. Beijing has welcomed Trump’s decision to meet Kim, and wants a de-escalation of military tensions to come out of the meeting. After all, a war on China’s doorstep would have extreme consequences for its citizens.

Can North Korea cover up its brutal regime with lipstick diplomacy?

Kim’s shift, from provoking the international community with nuclear tests to diplomacy, is mainly due to China. Beijing has never been more seriously committed to “maximum sanctions” in the past two years, and Pyongyang has felt the sting of those sanctions like never before.

Are US and China sincere partners in disarming North Korea?

In announcing the historic meeting, Trumped praised Chinese President Xi Jinping, tweeting that Xi “appreciates that the US is working to solve the problem diplomatically rather than going with the ominous alternative. China continues to be helpful!” This obviously created resentment from Kim towards Beijing, but there is little he can do but pout in the corner. As long as Beijing stands firm with the international community, Pyongyang will be forced to keep its word – making Beijing the true guarantor of any progress at the meeting.

Is North Korea’s Kim Jong-un serious about peace or just playing everybody (again)?

Zhu Feng is the director of the Institute of International Studies at Nanjing University