Can you implement the handshake packet from the minecraft protocol as a class with a serialize and deserialize method in typescript? Write your response with exactly 3 paragraphs, separated with the markdown divider: ***.
user