Type alias NetworkOptions

NetworkOptions: {
    apiClientFactory: ((options) => ApiClient);
    apiUrl: string | undefined;
    appVersion?: string;
    env: XmtpEnv;
    skipContactPublishing: boolean;
}

Network startup options

Type declaration

  • apiClientFactory: ((options) => ApiClient)
  • apiUrl: string | undefined

    apiUrl can be used to override the env flag and connect to a specific endpoint

  • Optional appVersion?: string

    identifier that's included with API requests.

    For example, you can use the following format: appVersion: APP_NAME + '/' + APP_VERSION. Setting this value provides telemetry that shows which apps are using the XMTP client SDK. This information can help XMTP developers provide app support, especially around communicating important SDK updates, including deprecations and required upgrades.

  • env: XmtpEnv

    Specify which XMTP environment to connect to. (default: dev)

  • skipContactPublishing: boolean

    Skip publishing the user's contact bundle as part of Client startup.

    This flag should be used with caution, as we rely on contact publishing to let other users know your public key and periodically run migrations on this data with new SDK versions.

    Your application should have this flag set to false at least some of the time.

    The most common use-case for setting this to true is cases where the Client instance is very short-lived. For example, spinning up a Client to decrypt a push notification.