Skip to content
Compare
Choose a tag to compare
@github-actions github-actions released this 14 Sep 06:36
· 2203 commits to main since this release
9543414

@xmtp/[email protected] (2022-08-18)

Version 6 Release Notes

We are excited to announce version 6 of the XMTP SDK. A consistent request from developers has been to reduce the size of the Javascript SDK and improve the performance of interacting with the XMTP network. Version 6 removes our dependency on js-waku and interacts with XMTP nodes using standard HTTP APIs instead of using the LibP2P protocol.

This leads to faster app startup times, a >50% smaller bundle size, and faster loading of messages from the network.

For the typical user, this will be a drop-in upgrade. There are a few breaking changes that developers should be aware of. If you are using one of the following configuration options, you will need to update your application code.

  • ClientOptions.bootstrapAddrs has been removed. If you want to connect to a local node, you can either use the new local option for ClientOptions.env which will point to http://localhost:5555/. You can also provide the ClientOptons.apiUrl to point to any other backend address.
  • ClientOptions.waitForPeersTimeoutMs has been removed. This is no longer necessary, as the client can connect to the network immediately on startup.
  • ListMessagesOptions.pageSize has been a consistent point of confusion for developers, as it does not actually limit the number of messages returned and instead only changes the chunk-size of the queries we use to get the full list of messages. We have removed pageSize in favour of limit, which you can use to restrict the total number of messages returned from a call like conversation.list()

The SDK also now makes use of the browser field in the package.json to tell bundlers which version of our transpiled code to use. In some cases, you may need to force your Webpack installation to use the browser field by configuring config.resolve.mainFields = ['browser', 'main', 'module']