[DM]Refact js sdk