add privatepub to js