Wire helpers for padded WAProto message payloads and Baileys-style message IDs.
Summary
Functions
Unpads and deserializes a WAProto message from binary.
Serializes and adds random WhatsApp XMPP padding to a WAProto message.
Generates a 3EB0... random message ID that WhatsApp Web typically uses.
Produces the device participant hash indicating which E2E key copies were distributed.
Strips WAProto padding block, returning only the underlying protobuf.
Pads a binary buffer dynamically using deterministic/cryptographic randomness.
Types
@type proto_message() :: struct()
Functions
@spec decode(binary()) :: {:ok, proto_message()} | {:error, term()}
Unpads and deserializes a WAProto message from binary.
@spec encode( proto_message(), keyword() ) :: binary()
Serializes and adds random WhatsApp XMPP padding to a WAProto message.
Generates a 3EB0... random message ID that WhatsApp Web typically uses.
Produces the device participant hash indicating which E2E key copies were distributed.
Strips WAProto padding block, returning only the underlying protobuf.
Pads a binary buffer dynamically using deterministic/cryptographic randomness.