Docs
emitters
network-change

Description

An event fired when a user changes their current network.


Usage

  sdk.on('network-change', (network: BasicNetwork) => fn)

Data

// BasicNetwork
  protocol: Protocol;
  type: NetworkTypes;
  wss: string;
  rpc: string;

Example

    sdk.on(EVENTS.NETWORK_CHANGE, (network) =>
      handleUpdate(EVENTS.NETWORK_CHANGE + "\r\n" + JSON.stringify(network))
    );