We recently published new release candidate versions of our libraries, and one of the largest changes introduced is the new public interface for 0x.js. Up until this point, we have been trying to maintain it’s legacy interface. Over the last few months however, we have quietly split up 0x.js into several stand-alone NPM packages:
- @0xproject/contract-wrappers - Wrappers around the 0x smart contracts as well as any ERC20 and ERC721 token.
- @0xproject/order-utils - A set of utilities for creating, signing and verifying 0x orders
- @0xproject/order-watcher - The order watching daemon to help prune an orderbook and keep it up-to-date.
Despite creating these new packages, we still wanted to have all of this functionality available in a single 0x.js package. Because of this, we will continue to publish 0x.js, however we have decided that for the RC releases and the V2 release, we will be modifying the legacy interface and instead export the same exports as these sub-packages. This means there will no longer be a
ZeroEx class. Instead, it’s contents are now found through different exports discoverable on the 0x.js doc reference page. This change reduces the amount of code the 0x dev team needs to maintain, and also makes it easier for developers to migrate from the 0x.js monolith package to a smaller subset of sub-packages they actually rely on.
An additional change to the 0x.js interface is that some of the static helper functions that used to be exposed through 0x.js now only exist through @0xproject/web3-wrapper. These include:
- awaitTransactionMinedAsync (there is also an alternative version: awaitTransactionSuccessAsync)
Thank you for your understanding and please let us know in the comments before if you feel anything is missing or not intuitive enough. We are always looking for feedback so as to improve the 0x developer experience.