On what basis is general walayah described?

Ahl al-Qibla, Sin and Faith, the Essence of Faith and Degrees of Believers