ReadonlyappOptional ReadonlyappProtectedlistenersOptionalconnected?: (data: { network: SupernetType }) => void[]Optionaldisconnected?: (data: { code: ErrorCode; reason: string }) => void[]ApiClient#disconnected - The client has been disconnected by the server, either authentication is lost or the server is unreachable.This event is not triggered when the client manually disconnects.
ReadonlyloggerDispose of this client, disconnecting the socket and removing all event listeners. After calling this method, the client should not be used.
ProtectedemitDispatch an event to all listeners
Remove an event listener
Add an event listener, returns a function that can be called to remove the listener
Add an event listener that will be called only once
Remove all event listeners, optionally for a specific event
Optionalevent: T
ApiClient#connected - The client has been connected to the server.