js: handle OT and PK result