# baileys_ex v0.1.0-alpha.8 - Table of Contents

> WhatsApp Web API client for Elixir. Full-featured port of Baileys with end-to-end Signal Protocol encryption, multi-device support, groups, communities, media, newsletters, and native BEAM fault tolerance.

## Pages

- Overview
  - [BaileysEx](readme.md)
  - [Changelog](changelog.md)
  - [License](license.md)
  - [Glossary](glossary.md)

- Getting Started
  - [Installation](installation.md)
  - [First Connection](first-connection.md)
  - [Send Your First Message](sending-your-first-message.md)

- Guides
  - [Send Messages](messages.md)
  - [Send and Download Media](media.md)
  - [Work with Groups and Communities](groups.md)
  - [Send Presence Updates](presence.md)
  - [Event and Subscription Patterns](events-and-subscriptions.md)
  - [Manage Authentication and Persistence](authentication-and-persistence.md)
  - [Use Advanced Features](advanced-features.md)
  - [Manage App State Sync](manage-app-state-sync.md)

- Reference
  - [Configuration Reference](configuration.md)
  - [Event Catalog Reference](event-catalog.md)
  - [Message Types Reference](message-types.md)

- Troubleshooting
  - [Troubleshooting: Connection Issues](connection-issues.md)
  - [Troubleshooting: Authentication Issues](authentication-issues.md)
  - [Troubleshooting: Encryption Issues](encryption-issues.md)
  - [Troubleshooting: App State Sync](app-state-sync-issues.md)

- Examples
  - [Echo Bot Example](echo-bot.md)

## Modules

- [BaileysEx.BinaryNode](BaileysEx.BinaryNode.md): WhatsApp's wire format node — a compact binary encoding of XML-like structures.
- [BaileysEx.JID](BaileysEx.JID.md): WhatsApp Jabber ID — the address format for users, groups, and broadcasts.

- Public API
  - [BaileysEx](BaileysEx.md): Public facade for the BaileysEx connection runtime and major feature surfaces.

- Authentication
  - [BaileysEx.Auth.ConnectionValidator](BaileysEx.Auth.ConnectionValidator.md): Builds the rc.9 login and registration client payloads sent after Noise handshake.

  - [BaileysEx.Auth.FilePersistence](BaileysEx.Auth.FilePersistence.md): Baileys-compatible multi-file auth persistence mirroring `useMultiFileAuthState`.
  - [BaileysEx.Auth.KeyStore](BaileysEx.Auth.KeyStore.md): Persistence-backed transactional Signal key store.
  - [BaileysEx.Auth.KeyStore.Ref](BaileysEx.Auth.KeyStore.Ref.md): Store reference returned by `wrap/1` and passed into the KeyStore operations.

  - [BaileysEx.Auth.KeyStore.TxRef](BaileysEx.Auth.KeyStore.TxRef.md): Internal transaction-scoped KeyStore handle.
  - [BaileysEx.Auth.NativeFilePersistence](BaileysEx.Auth.NativeFilePersistence.md): Recommended durable auth persistence for Elixir-first deployments.
  - [BaileysEx.Auth.Persistence](BaileysEx.Auth.Persistence.md): Persistence behaviour for auth credentials and key-store datasets.
  - [BaileysEx.Auth.PersistenceMigration](BaileysEx.Auth.PersistenceMigration.md): Explicit migration helpers between built-in auth persistence backends.
  - [BaileysEx.Auth.State](BaileysEx.Auth.State.md): Authentication credential state matching the Baileys rc.9 auth envelope.

- Connection
  - [BaileysEx.Connection.Config](BaileysEx.Connection.Config.md): Connection configuration defaults and platform mapping.
  - [BaileysEx.Connection.Coordinator](BaileysEx.Connection.Coordinator.md): Runtime wrapper around the raw connection socket.
  - [BaileysEx.Connection.EventEmitter](BaileysEx.Connection.EventEmitter.md): Buffered connection event emitter modeled after Baileys' `makeEventBuffer`.

  - [BaileysEx.Connection.Frame](BaileysEx.Connection.Frame.md): Pure helpers for WhatsApp's 3-byte length-prefixed transport frames.

  - [BaileysEx.Connection.Socket](BaileysEx.Connection.Socket.md): Connection state machine for the WebSocket and Noise transport lifecycle.
  - [BaileysEx.Connection.Store](BaileysEx.Connection.Store.md): Connection-scoped runtime store with ETS-backed concurrent reads.

  - [BaileysEx.Connection.Store.Ref](BaileysEx.Connection.Store.Ref.md): Read-only reference to a connection store ETS table.

  - [BaileysEx.Connection.Supervisor](BaileysEx.Connection.Supervisor.md): Connection runtime supervisor with rc.9-style socket, store, and event layers.

  - [BaileysEx.Connection.Transport](BaileysEx.Connection.Transport.md): Evented transport behaviour for the connection socket runtime.
  - [BaileysEx.Connection.Transport.MintWebSocket](BaileysEx.Connection.Transport.MintWebSocket.md): Mint-backed WebSocket transport for the connection socket.
  - [BaileysEx.Connection.Transport.StubAdapter](BaileysEx.Connection.Transport.StubAdapter.md): Offline adapter for `MintWebSocket` that never touches the network.
  - [BaileysEx.Connection.Version](BaileysEx.Connection.Version.md): Baileys-style helpers for discovering the latest published web versions.

- Features
  - [BaileysEx.Feature.AppState](BaileysEx.Feature.AppState.md): App state sync (Syncd) — runtime orchestration for cross-device state
synchronization.
  - [BaileysEx.Feature.BotDirectory](BaileysEx.Feature.BotDirectory.md): WhatsApp bot-directory queries aligned with Baileys `getBotListV2`.

  - [BaileysEx.Feature.Business](BaileysEx.Feature.Business.md): Business helpers mapped from Baileys' `business.ts`.

  - [BaileysEx.Feature.Call](BaileysEx.Feature.Call.md): Call helpers aligned with Baileys call handling in `messages-recv.ts` and
`chats.ts`.

  - [BaileysEx.Feature.Chat](BaileysEx.Feature.Chat.md): Chat-level operations backed by app-state patches.

  - [BaileysEx.Feature.Community](BaileysEx.Feature.Community.md): Community-management helpers mapped from Baileys' `communities.ts`.

  - [BaileysEx.Feature.Contact](BaileysEx.Feature.Contact.md): Contact CRUD helpers backed by Baileys app-state patches.

  - [BaileysEx.Feature.Group](BaileysEx.Feature.Group.md): Group-management helpers mapped from Baileys' `groups.ts`.

  - [BaileysEx.Feature.Label](BaileysEx.Feature.Label.md): Label CRUD and association helpers backed by Baileys app-state patches.

  - [BaileysEx.Feature.Newsletter](BaileysEx.Feature.Newsletter.md): Newsletter helpers mapped from Baileys' `newsletter.ts`.

  - [BaileysEx.Feature.PhoneValidation](BaileysEx.Feature.PhoneValidation.md): Phone-number registration checks via the USync contact protocol.

  - [BaileysEx.Feature.Presence](BaileysEx.Feature.Presence.md): Presence helpers aligned with Baileys' presence and chatstate behavior.

  - [BaileysEx.Feature.Privacy](BaileysEx.Feature.Privacy.md): Privacy-setting queries aligned with Baileys `chats.ts`.

  - [BaileysEx.Feature.Profile](BaileysEx.Feature.Profile.md): Profile management functions aligned with Baileys `chats.ts`.

  - [BaileysEx.Feature.QuickReply](BaileysEx.Feature.QuickReply.md): Quick reply helpers backed by Baileys app-state patches.

  - [BaileysEx.Feature.TcToken](BaileysEx.Feature.TcToken.md): Trusted-contact token helpers aligned with Baileys' privacy-token flow.

- Messaging
  - [BaileysEx.Message.Builder](BaileysEx.Message.Builder.md): Constructs WAProto message structs from user-facing Elixir maps.

  - [BaileysEx.Message.Decode](BaileysEx.Message.Decode.md): Envelope decode helpers aligned with Baileys' message addressing rules.
  - [BaileysEx.Message.HistorySync](BaileysEx.Message.HistorySync.md): History-sync download and payload processing.
  - [BaileysEx.Message.IdentityChangeHandler](BaileysEx.Message.IdentityChangeHandler.md): Handles identity-change notifications and triggers rc.9-style session refreshes.

  - [BaileysEx.Message.Normalizer](BaileysEx.Message.Normalizer.md): Received-message normalization and content side effects aligned with Baileys rc.9.

  - [BaileysEx.Message.NotificationHandler](BaileysEx.Message.NotificationHandler.md): Message-layer notification handling aligned with Baileys rc.9.
  - [BaileysEx.Message.OfflineQueue](BaileysEx.Message.OfflineQueue.md): FIFO offline node batching owned by the caller's process state.
  - [BaileysEx.Message.Parser](BaileysEx.Message.Parser.md): Normalizes wrapped message content and detects the active message type.

  - [BaileysEx.Message.PeerData](BaileysEx.Message.PeerData.md): Peer data operation transport for phone-only protocol messages.

  - [BaileysEx.Message.Receipt](BaileysEx.Message.Receipt.md): Receipt node construction and receipt-event parsing.

  - [BaileysEx.Message.Receiver](BaileysEx.Message.Receiver.md): Message receive pipeline.

  - [BaileysEx.Message.Retry](BaileysEx.Message.Retry.md): Retry-state helpers modeled after Baileys' message retry manager.

  - [BaileysEx.Message.Sender](BaileysEx.Message.Sender.md): Message send pipeline.

  - [BaileysEx.Message.StubSideEffects](BaileysEx.Message.StubSideEffects.md): Pure reducer that derives higher-level side-effect events from group stub messages.
  - [BaileysEx.Message.Wire](BaileysEx.Message.Wire.md): Wire helpers for padded WAProto message payloads and Baileys-style message IDs.

- Media
  - [BaileysEx.Media.Crypto](BaileysEx.Media.Crypto.md): Media encryption and decryption for WhatsApp CDN payloads.

  - [BaileysEx.Media.Download](BaileysEx.Media.Download.md): Download and decrypt WhatsApp CDN media referenced by media message structs.

  - [BaileysEx.Media.HTTP](BaileysEx.Media.HTTP.md): Shared HTTP request helpers for media upload and download flows.

  - [BaileysEx.Media.MessageBuilder](BaileysEx.Media.MessageBuilder.md): Prepare media message content for message building and relay.
  - [BaileysEx.Media.Retry](BaileysEx.Media.Retry.md): Media re-upload request helpers modeled after Baileys' media retry flow.

  - [BaileysEx.Media.Thumbnail](BaileysEx.Media.Thumbnail.md): Generate media derivatives used by WhatsApp media messages.
  - [BaileysEx.Media.Types](BaileysEx.Media.Types.md): Media type descriptors used by media crypto, upload, and download flows.

  - [BaileysEx.Media.Upload](BaileysEx.Media.Upload.md): WhatsApp media connection lookup and CDN upload helpers.

- Signal Protocol
  - [BaileysEx.Signal.Address](BaileysEx.Signal.Address.md): Signal protocol address derived from a WhatsApp JID.
  - [BaileysEx.Signal.Curve](BaileysEx.Signal.Curve.md): Signal-specific Curve25519 helpers matching the Baileys Curve contract.
  - [BaileysEx.Signal.Device](BaileysEx.Signal.Device.md): Device discovery and caching for message fanout.

  - [BaileysEx.Signal.Identity](BaileysEx.Signal.Identity.md): Store-backed Signal identity helpers with TOFU and change detection semantics.
  - [BaileysEx.Signal.LIDMappingStore](BaileysEx.Signal.LIDMappingStore.md): Store-backed PN<->LID mapping helpers aligned with Baileys' lookup rules.
  - [BaileysEx.Signal.Repository](BaileysEx.Signal.Repository.md): Public Signal repository boundary for connection and messaging consumers.
  - [BaileysEx.Signal.Session](BaileysEx.Signal.Session.md): Session assertion helpers aligned with Baileys rc.9 `assertSessions`.

  - [BaileysEx.Signal.Store](BaileysEx.Signal.Store.md): Runtime-backed Signal key store boundary aligned with Baileys' `keys` contract.
  - [BaileysEx.Signal.Store.Memory](BaileysEx.Signal.Store.Memory.md): In-memory runtime implementation of `BaileysEx.Signal.Store`.

- Protocol
  - [BaileysEx.Protocol.BinaryNode](BaileysEx.Protocol.BinaryNode.md): Encoder and decoder for WhatsApp's WABinary wire format.
  - [BaileysEx.Protocol.Constants](BaileysEx.Protocol.Constants.md): WhatsApp protocol dictionaries and tag constants for WABinary encoding/decoding.
  - [BaileysEx.Protocol.JID](BaileysEx.Protocol.JID.md): JID (Jabber ID) parsing, formatting, and utility functions for WhatsApp addressing.
  - [BaileysEx.Protocol.MessageStubType](BaileysEx.Protocol.MessageStubType.md): Group notification stub types for synthetic messages.
  - [BaileysEx.Protocol.Noise](BaileysEx.Protocol.Noise.md): WhatsApp Noise handshake and transport state aligned with the Baileys reference.
  - [BaileysEx.Protocol.Noise.TransportState](BaileysEx.Protocol.Noise.TransportState.md): Derived transport keys and frame counters for the established Noise session.

  - [BaileysEx.Protocol.USync](BaileysEx.Protocol.USync.md): Baileys-aligned USync query builder and result parser.
  - [BaileysEx.Protocol.USync.User](BaileysEx.Protocol.USync.User.md): User selector for a USync query.

  - [BaileysEx.Protocol.WMex](BaileysEx.Protocol.WMex.md): WMex (WhatsApp MEX) query helpers.

- App State Sync
  - [BaileysEx.Syncd.ActionMapper](BaileysEx.Syncd.ActionMapper.md): Maps decoded Syncd mutations to application events.
  - [BaileysEx.Syncd.Codec](BaileysEx.Syncd.Codec.md): Syncd protocol codec — encode/decode snapshots, patches, and mutations
with MAC generation and verification.
  - [BaileysEx.Syncd.Keys](BaileysEx.Syncd.Keys.md): App state sync key expansion.

- Native NIFs
  - [BaileysEx.Native.Noise](BaileysEx.Native.Noise.md): Low-level raw Noise XX NIF wrapping the `snow` crate.
  - [BaileysEx.Native.XEdDSA](BaileysEx.Native.XEdDSA.md): XEdDSA signing/verification via curve25519-dalek NIF.

- Analytics
  - [BaileysEx.WAM](BaileysEx.WAM.md): WhatsApp Analytics/Metrics helpers backed by the Baileys rc9 event registry.

  - [BaileysEx.WAM.BinaryInfo](BaileysEx.WAM.BinaryInfo.md): Ordered WAM buffer input matching Baileys rc9's `BinaryInfo`.

  - [BaileysEx.WAM.Definitions](BaileysEx.WAM.Definitions.md): Loads the generated WAM event and global definitions derived from Baileys rc9.

  - [BaileysEx.WAM.Encoder](BaileysEx.WAM.Encoder.md): Pure Elixir WAM encoder matching Baileys rc9's `src/WAM/encode.ts`.

- Telemetry
  - [BaileysEx.Telemetry](BaileysEx.Telemetry.md): Shared telemetry helpers for BaileysEx runtime instrumentation.

- Utilities
  - [BaileysEx.Crypto](BaileysEx.Crypto.md): Cryptographic primitives for WhatsApp Web protocol communication.
  - [BaileysEx.Util.LTHash](BaileysEx.Util.LTHash.md): Linked Truncated Hash for app state integrity verification.

