MTProto implementation in JavaScript