Abu Rafi

Abū Rāfiʿ (Arabic: بو رافِع) (d. after 40/660-1) is a famous companion of Muhammad) and his servant who later was freed and became the head of the clan of Al Abi Rafi'. Al-Najashi counted him among "al-salaf al-salih" (righteous pioneers [in Islam]).
During the reign of Ali, he was the treasurer of Kufa.
Name.
Abu Rafi' was a Copt (special tribe in Egypt). Different reports about his name has been quoted in various books. Names such as: Aslam, Ibrahim, Thabit, Hurmuz, Sinan, Qaraman, Salih, Yazid, Yasar, and 'Abd al-Rahman are reported as his name. However, in most of the sources Aslam is mentioned as his name.
As a Slave.
At first, Abu Rafi' was 'Abbas ibn 'Abd al-Muttalib's slave. Al-'Abbas gave him to the Prophet (s). When Abu Rafi' told the Prophet (s) that al-'Abbas embraced Islam, the Prophet (s) freed him as a reward of his good news. Abu Rafi' embraced Islam in Mecca before Hijra to Abyssinia.
Immigration to Abyssinia.
He was among the Muslims who immigrated to Abyssinia (Ethiopia) under the leadership of Ja'far ibn Abu Talib to get away from the hostility of pagans of Quraysh.
Immigration to Mecca.
It is commonly believed that Abu Rafi' not only did not immigrate with the Prophet to Medina, but also stayed there until the Battle of Badr after which he joined the Prophet (s) in Medina. However, there is another narration that contradict this report. After that he entered Medina, the Prophet (s) married him to his female slave –Salma- and 'Ubayd Allah was born from them.
Participation in Battles.
Abu Rafi' participated in all of the battles after he immigrated to Medina. He was counted among the Muhammad close companions to the point that the Prophet (s) said "every prophet has a trustee and my trustee is Abu Rafi'."
During the Imamate of Ali Ibn Talib.
After the death of Muhammad, Abu Rafi' became a companion of 'Ali. He was one of Ali Ibn Talib companions until Ali took over the caliphate. When Mu'awiya from Syria and Talha and Zubayr from Basra rose up against Ali Ibn Talib caliphate, Abu Rafi' said that the Prophet had already foretold him this incident and said that Ali Ibn Talib is right and his opponents are wrong.
Immigration to Kufa.
When he was 85, he sold his house and his lands in Khaybar and Medina and immigrated along with Ali Ibn Talib to Kufa. It was then that he said "all praise is due to Allah that I reach a position that no one else has reached to; because I swore two allegiances: al-'Aqaba and Ridwan. I prayed toward two Qiblas and I immigrated thrice." In Kufa, he was appointed by Ali Ibn Talib as the treasurer of the treasury of Kufa and his two sons –'Ali and 'Ubayd Allah- started working as Imam's (s) scribes.
After the Martyrdom of Ali Ibn Talib.
According to a narration, Abu Rafi' was alive in the time of Al-Hasan's caliphate and returned to Medina along with Imam al-Hasan after the martyrdom of Ali Ibn Talib. If this narration is credible, he should have been over 90 years old at that time.
Because Abu Rafi' had sold his land and house in Medina; when he returned to Medina, Imam al-Hasan (a) gave him a half of Imam 'Ali's house and a piece of land located on outskirts of Medina. After his demise, his son -'Ubayd Allah- sold the land for 170,000 (probably dirhams).
Demise.
There are different reports about his demise date:
But according to a narration ,quoted by al-Najashi, he had relations with Hasan Ibn Ali and returned to Medina with him so he was alive after the martyrdom of Imam 'Ali (a) and lived more than 90 years.
Narrator of Hadith.
Numerous narrations have been quoted from Abu Rafi' by his children and wife -Salma- and others. Muslims, especially Shi'a have placed him among the reliable narrators of hadith.
Writing the First Jurisprudential Book.
Abu Rafi' tried to gather, compile and classify hadiths. He compiled the book "al-Sunan wa l-ahkam wa l-qadaya". He is –apparently- the first person in the history of Islam who has written a jurisprudential book.
This book includes chapters of: prayer (salat), fasting, hajj, zakat, and judiciary. Narrations from Ali Ibn Talib can be found in the book.