BaileysEx.WAM.BinaryInfo (baileys_ex v0.1.0-alpha.7)

Copy Markdown View Source

Ordered WAM buffer input matching Baileys rc9's BinaryInfo.

Summary

Types

One WAM event entry to encode into the buffer.

Ordered WAM key/value pairs.

t()

Scalar values accepted by the WAM encoder.

Functions

Create a new WAM buffer.

Types

event_input()

@type event_input() :: %{
  :name => String.t() | atom(),
  optional(:props) => ordered_values(),
  optional(:globals) => ordered_values()
}

One WAM event entry to encode into the buffer.

ordered_values()

@type ordered_values() :: [{String.t() | atom(), value()}]

Ordered WAM key/value pairs.

Lists preserve the same insertion order Baileys gets from JavaScript objects.

t()

@type t() :: %BaileysEx.WAM.BinaryInfo{
  events: [event_input()],
  protocol_version: non_neg_integer(),
  sequence: non_neg_integer()
}

value()

@type value() :: integer() | float() | boolean() | String.t() | nil

Scalar values accepted by the WAM encoder.

Functions

new(opts \\ [])

@spec new(keyword()) :: t()

Create a new WAM buffer.