Catalyzes the synthesis of polyP from ATP or GTP. Can also use inorganic polyphosphate (polyP) as a donor to convert ADP to ATP, but the activity is 10-fold higher in vitro for polyP synthesis than for ATP formation. [phosphate](n) + ATP = [phosphate](n+1) + ADP [phosphate](n) + GTP = [phosphate](n+1) + GDP Optimum pH is 7.2. Homotetramer. Deletion mutant accumulates very little cellular polyP. Belongs to the polyphosphate kinase 2 (PPK2) family. Class I subfamily.