Skip to content
mc-protocol
Esc
↑↓navigate↵open⌘Jpreview
On this page

Hello (clientbound)

Login 0x01, server → client.

login · 0x01 · clientbound (server → client)

Encryption request. Sent by the server after the serverbound Hello in online mode, carrying the serverId, its RSA publicKey, a random verifyToken, and shouldAuthenticate. The client generates a shared secret, contacts the session server if required, and replies with Key.

Sent by the server, read by the client. Listen for it with client.on("Hello", (data) => …) on the receiving side.

Fields

Field Type Notes
serverId String
publicKey Byte[]
verifyToken Byte[]
shouldAuthenticate Boolean

Send it

await client.sendPacket("Hello", {
  serverId: /* String */,
  publicKey: /* Byte[] */,
  verifyToken: /* Byte[] */,
  shouldAuthenticate: /* Boolean */,
});

Field aliases listed under Notes are accepted as alternative keys when writing.

Source: src/Core/Versions/776/Packets/login/clientbound/Hello.ts

Was this page helpful?