That is exactly what His Holiness, Pope Leo XIII did on June 11, 1899 in his Act of Consecration of the Human Race to the Sacred Heart of Jesus. He called this “the great act” of his pontificate.
The Holy Father presented his intentions to the Catholic world in the encyclical Annum Sacrum on May 25, 1899:
“But shall We allow to slip from Our remembrance those innumerable others upon whom the light of Christian truth has not yet shined? We hold the place of Him who came to save that which was lost, and who shed His blood for the salvation of the whole human race. And so We greatly desire to bring to the true life those who sit in the shadow of death. As we have already sent messengers of Christ over the earth to instruct them, so now, in pity for their lot with all Our soul we commend them, and as far as in us lies We consecrate them to the Sacred Heart of Jesus. In this way this act of devotion, which We recommend, will be a blessing to all.”