Implements the QR-code based pairing handshake used by WhatsApp Web.
Summary
Functions
Applies a decoded node and returns the updated state plus pairing events.
Returns the initial pairing state.
Turns the server-provided ref into a QR string.
Types
@type state() :: %{ status: :idle | :waiting_for_scan | :waiting_for_code | :paired, ref: String.t() | nil, store: ExWapp.Store.t(), req_id: String.t() | nil }
Aggregate structure that keeps temporary pairing data.
Functions
@spec apply_node(state(), ExWapp.Binary.binary_node()) :: {state(), [term()]}
Applies a decoded node and returns the updated state plus pairing events.
@spec new(ExWapp.Store.t()) :: state()
Returns the initial pairing state.
Turns the server-provided ref into a QR string.