BaileysEx.Signal.Address (baileys_ex v0.1.0-alpha.7)

Copy Markdown View Source

Signal protocol address derived from a WhatsApp JID.

Matches the Baileys jidToSignalProtocolAddress() naming rules: non-WhatsApp domains are encoded as user_domainType, and the device number defaults to 0.

Summary

Functions

Constructs a Signal Address handle from a valid user JID.

Formats a Signal protocol address structure to its native string identifier payload.

Types

error()

@type error() :: :invalid_signal_address

t()

@type t() :: %BaileysEx.Signal.Address{device_id: non_neg_integer(), name: String.t()}

Functions

from_jid(jid)

@spec from_jid(String.t()) :: {:ok, t()} | {:error, error()}

Constructs a Signal Address handle from a valid user JID.

to_string(address)

@spec to_string(t()) :: String.t()

Formats a Signal protocol address structure to its native string identifier payload.