proto namespace: the protobuf message types, enumerations, and interfaces generated from WAProto.proto. They describe WhatsApp’s wire format — the shape of the messages that actually travel over the connection.
These types are kept in their own tab because there are a lot of them. They make up roughly four out of every five generated pages, and mixing them into the API reference buries the functions and types you reach for day to day.
You rarely need these directly. Baileys accepts and returns plain objects for most operations, and the guides cover those shapes. Reach for this section when you’re constructing raw message content, inspecting a message Baileys doesn’t yet have a helper for, or matching behaviour against the protocol.
How it’s organised
Each protobuf message becomes three related pages, and they link to each other:- A class — the runtime implementation, with
encode,decode,create, andverify. - An interface prefixed with
I— the plain-object shape you’d pass tocreate. This is usually the one you want. - A namespace, when the message has nested messages or enumerations of its own.