API Reference baileys_ex v#0.1.0-alpha.8

Copy Markdown View Source

Modules

Public facade for the BaileysEx connection runtime and major feature surfaces.

Builds the rc.9 login and registration client payloads sent after Noise handshake.

Baileys-compatible multi-file auth persistence mirroring useMultiFileAuthState.

Persistence-backed transactional Signal key store.

Store reference returned by wrap/1 and passed into the KeyStore operations.

Internal transaction-scoped KeyStore handle.

Recommended durable auth persistence for Elixir-first deployments.

Persistence behaviour for auth credentials and key-store datasets.

Explicit migration helpers between built-in auth persistence backends.

Authentication credential state matching the Baileys rc.9 auth envelope.

WhatsApp's wire format node — a compact binary encoding of XML-like structures.

Connection configuration defaults and platform mapping.

Runtime wrapper around the raw connection socket.

Buffered connection event emitter modeled after Baileys' makeEventBuffer.

Pure helpers for WhatsApp's 3-byte length-prefixed transport frames.

Connection state machine for the WebSocket and Noise transport lifecycle.

Connection-scoped runtime store with ETS-backed concurrent reads.

Read-only reference to a connection store ETS table.

Connection runtime supervisor with rc.9-style socket, store, and event layers.

Evented transport behaviour for the connection socket runtime.

Mint-backed WebSocket transport for the connection socket.

Offline adapter for MintWebSocket that never touches the network.

Baileys-style helpers for discovering the latest published web versions.

Cryptographic primitives for WhatsApp Web protocol communication.

App state sync (Syncd) — runtime orchestration for cross-device state synchronization.

WhatsApp bot-directory queries aligned with Baileys getBotListV2.

Business helpers mapped from Baileys' business.ts.

Call helpers aligned with Baileys call handling in messages-recv.ts and chats.ts.

Chat-level operations backed by app-state patches.

Community-management helpers mapped from Baileys' communities.ts.

Contact CRUD helpers backed by Baileys app-state patches.

Group-management helpers mapped from Baileys' groups.ts.

Label CRUD and association helpers backed by Baileys app-state patches.

Newsletter helpers mapped from Baileys' newsletter.ts.

Phone-number registration checks via the USync contact protocol.

Presence helpers aligned with Baileys' presence and chatstate behavior.

Privacy-setting queries aligned with Baileys chats.ts.

Profile management functions aligned with Baileys chats.ts.

Quick reply helpers backed by Baileys app-state patches.

Trusted-contact token helpers aligned with Baileys' privacy-token flow.

WhatsApp Jabber ID — the address format for users, groups, and broadcasts.

Media encryption and decryption for WhatsApp CDN payloads.

Download and decrypt WhatsApp CDN media referenced by media message structs.

Shared HTTP request helpers for media upload and download flows.

Prepare media message content for message building and relay.

Media re-upload request helpers modeled after Baileys' media retry flow.

Generate media derivatives used by WhatsApp media messages.

Media type descriptors used by media crypto, upload, and download flows.

WhatsApp media connection lookup and CDN upload helpers.

Constructs WAProto message structs from user-facing Elixir maps.

Envelope decode helpers aligned with Baileys' message addressing rules.

History-sync download and payload processing.

Handles identity-change notifications and triggers rc.9-style session refreshes.

Received-message normalization and content side effects aligned with Baileys rc.9.

Message-layer notification handling aligned with Baileys rc.9.

FIFO offline node batching owned by the caller's process state.

Normalizes wrapped message content and detects the active message type.

Peer data operation transport for phone-only protocol messages.

Receipt node construction and receipt-event parsing.

Message receive pipeline.

Retry-state helpers modeled after Baileys' message retry manager.

Message send pipeline.

Pure reducer that derives higher-level side-effect events from group stub messages.

Wire helpers for padded WAProto message payloads and Baileys-style message IDs.

Low-level raw Noise XX NIF wrapping the snow crate.

XEdDSA signing/verification via curve25519-dalek NIF.

Encoder and decoder for WhatsApp's WABinary wire format.

WhatsApp protocol dictionaries and tag constants for WABinary encoding/decoding.

JID (Jabber ID) parsing, formatting, and utility functions for WhatsApp addressing.

Group notification stub types for synthetic messages.

WhatsApp Noise handshake and transport state aligned with the Baileys reference.

Derived transport keys and frame counters for the established Noise session.

Baileys-aligned USync query builder and result parser.

User selector for a USync query.

WMex (WhatsApp MEX) query helpers.

Signal protocol address derived from a WhatsApp JID.

Signal-specific Curve25519 helpers matching the Baileys Curve contract.

Device discovery and caching for message fanout.

Store-backed Signal identity helpers with TOFU and change detection semantics.

Store-backed PN<->LID mapping helpers aligned with Baileys' lookup rules.

Public Signal repository boundary for connection and messaging consumers.

Session assertion helpers aligned with Baileys rc.9 assertSessions.

Runtime-backed Signal key store boundary aligned with Baileys' keys contract.

In-memory runtime implementation of BaileysEx.Signal.Store.

Maps decoded Syncd mutations to application events.

Syncd protocol codec — encode/decode snapshots, patches, and mutations with MAC generation and verification.

App state sync key expansion.

Shared telemetry helpers for BaileysEx runtime instrumentation.

Linked Truncated Hash for app state integrity verification.

WhatsApp Analytics/Metrics helpers backed by the Baileys rc9 event registry.

Ordered WAM buffer input matching Baileys rc9's BinaryInfo.

Loads the generated WAM event and global definitions derived from Baileys rc9.

Pure Elixir WAM encoder matching Baileys rc9's src/WAM/encode.ts.