Devdutt Pattanaik in this YouTube video discusses gender and sexuality in Hinduism. There he mentions an incident from the Hijra Rāmāyaṇa that involves the transgenders and Rāma. From Wikipedia, here's the full story:
In some versions of the Ramayana, when Rama leaves Ayodhya for his 14-year exile, a crowd of his subjects follow him into the forest because of their devotion to him. Soon Rama notices this, and gathers them to tell them not to mourn, and that all the "men and women" of his kingdom should return to their places in Ayodhya. Rama then leaves and has adventures for 14 years. When he returns to Ayodhya, he finds that the hijras, being neither men nor women, have not moved from the place where he gave his speech. Impressed with their devotion, Rama grants hijras the boon to confer blessings on people during auspicious inaugural occasions like childbirth and weddings. This boon is the origin of badhai in which hijras sing, dance, and give blessings.
What's the original source of this story? Is this from an independent work called Hijra Rāmāyaṇa?