Authentication credential state matching the Baileys rc.9 auth envelope.
Most fields roundtrip across both built-in persistence backends. The
:additional_data field is backend-dependent:
BaileysEx.Auth.NativeFilePersistenceroundtrips general BEAM termsBaileysEx.Auth.FilePersistenceaccepts JSON-safe values only
Summary
Functions
Returns a creds viewing projection mapping suitable for saving standalone.
Fetches a value from the auth state or its nested credentials structure.
Returns the current account JID from the auth state when present.
Returns the current LID from the auth state when present.
Returns the current account name from the auth state when present.
Deeply merges arbitrary map updates into the authentication state struct.
Initializes a new authentication state with generated keys.
Types
@type signal_identity() :: %{ identifier: %{name: binary(), device_id: non_neg_integer()}, identifier_key: binary() }
@type signed_key_pair() :: %{ key_pair: key_pair(), key_id: non_neg_integer(), signature: binary() }
@type t() :: %BaileysEx.Auth.State{ account: map() | nil, account_settings: account_settings(), account_sync_counter: non_neg_integer(), additional_data: term() | nil, adv_secret_key: binary(), first_unuploaded_pre_key_id: term(), last_account_sync_timestamp: integer() | nil, last_prop_hash: binary() | nil, me: map() | nil, my_app_state_key_id: binary() | nil, next_pre_key_id: term(), noise_key: key_pair(), pairing_code: binary() | nil, pairing_ephemeral_key: key_pair() | nil, platform: binary() | nil, processed_history_messages: [map()], registered: boolean(), registration_id: non_neg_integer(), routing_info: binary() | nil, signal_identities: [signal_identity()], signed_identity_key: key_pair(), signed_pre_key: signed_key_pair() }
Functions
Returns a creds viewing projection mapping suitable for saving standalone.
Fetches a value from the auth state or its nested credentials structure.
Returns the current account JID from the auth state when present.
Returns the current LID from the auth state when present.
Returns the current account name from the auth state when present.
Deeply merges arbitrary map updates into the authentication state struct.
Initializes a new authentication state with generated keys.