The Dharma Seal is fictitious. Kangxi advocated Buddhism. Logically speaking, it is normal to have an enlightened monk around him, but it is not called the Dharma Seal. The name San Dezi is also fictitious, but there must be a prototype character. It may be based on Wei Zhu or Liang Jiugong, the most favored eunuchs around Kangxi. However, during the sixty-one years of Kangxi's reign, the eunuchs he liked around him came one after another.
All in all, it should be a happy ending.