Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@0x/types

0xProject31.2kApache-2.03.3.7TypeScript support: included

0x types

readme

@0x/types

TypeScript types shared across 0x projects and packages

Installation

yarn add -D @0x/types

If your project is in TypeScript, add the following to your tsconfig.json:

"compilerOptions": {
    "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
}

Usage

import { TransactionReceipt, TxData, TxDataPayable } from '@0x/types';

Contributing

We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.

Please read our contribution guidelines before getting started.

Install dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

yarn config set workspaces-experimental true

Then install dependencies

yarn install

Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

PKG=@0x/types yarn build

Or continuously rebuild on change:

PKG=@0x/types yarn watch

Clean

yarn clean

Lint

yarn lint

changelog

CHANGELOG

v3.3.7 - August 18, 2022

* Dependencies updated

v3.3.6 - March 16, 2022

* Dependencies updated

v3.3.5 - February 26, 2022

* Dependencies updated

v3.3.4 - August 25, 2021

* Dependencies updated

v3.3.3 - April 26, 2021

* Dependencies updated

v3.3.2 - March 24, 2021

* Dependencies updated

v3.3.1 - December 2, 2020

* Dependencies updated

v3.3.0 - October 28, 2020

* Add `unfillable` to OrdersRequestOpts type. (#1)

v3.2.4 - October 21, 2020

* Dependencies updated

v3.2.3 - October 21, 2020

* Dependencies updated

v3.2.2 - October 20, 2020

* Dependencies updated

v3.2.1 - October 20, 2020

* Dependencies updated

v3.2.0 - July 15, 2020

* Add `ExchangeProxyMetaTransaction` and `SignedExchangeProxyMetaTransaction` (#2610)

v3.1.3 - June 24, 2020

* Dependencies updated

v3.1.2 - February 8, 2020

* Dependencies updated

v3.1.1 - December 17, 2019

* Added `DydxBridgeOnlyCallableByErc20BridgeProxy` and `DydxBridgeUnrecognizedBridgeAction` (#2378)

v3.1.0 - December 9, 2019

* Add `ERC20BridgeAssetData` (#2373)

v3.0.0 - December 2, 2019

* Remove `SendTransactionOpts` and `AwaitTransactionSuccessOpts` types and move them to @0x/base-contracts (#2325)
* Add `SendTransactionOpts` and `AwaitTransactionSuccessOpts` types for contract wrappers (#2243)
* All references to network ID have been removed, and references to chain ID have been introduced instead (#2313)
* Add `OrderStatus` type (#1761)
* Add `OrderInfo`, `FillResults`, `MatchedFillResults`, `BatchMatchedFillResults` types (#2031)
* Add status types for Staking contracts (#1910)
* Add `ERC20Bridge` to `AssetProxyId` (#2220)

v2.5.0-beta.3 - December 2, 2019

* Dependencies updated

v2.5.0-beta.2 - November 17, 2019

* Remove `SendTransactionOpts` and `AwaitTransactionSuccessOpts` types and move them to @0x/base-contracts (#2325)

v2.5.0-beta.1 - November 7, 2019

* Add `SendTransactionOpts` and `AwaitTransactionSuccessOpts` types for contract wrappers (#2243)
* All references to network ID have been removed, and references to chain ID have been introduced instead (#2313)

v2.5.0-beta.0 - October 3, 2019

* Add `OrderStatus` type (#1761)
* Add `OrderInfo`, `FillResults`, `MatchedFillResults`, `BatchMatchedFillResults` types (#2031)
* Add status types for Staking contracts (#1910)
* Add `ERC20Bridge` to `AssetProxyId` (#2220)

v2.4.3 - September 17, 2019

* Dependencies updated

v2.4.2 - September 3, 2019

* Dependencies updated

v2.4.1 - July 24, 2019

* Dependencies updated

v2.4.0 - July 13, 2019

* Add MarketOperation type (#1914)

v2.3.0 - Invalid date

* Add StaticCallProxy types (#1863)
* Add `InvalidStaticCallDataOffset`, `TargetNotEven`, `UnexpectedStaticCallResult`, and `InvalidAssetDataEnd` to `RevertReason` enum (#1863)
* Add `domain` field to `Order`, `ZeroExTransaction` (#1742)
* Rename OrderWithoutExchangeAddress to OrderWithoutDomain (#1742)
* Add `chainId` field to `EIP712DomainWithDefaultSchema` (#1742)
* Add `OrderStatus` type (#1761)
* Add `SignatureType.OrderValidator` and `SignatureType.WalletOrderValidator` (#1774)
* Update `Order` type for arbitrary fee tokens (ZEIP-28). (#1819)
* Add `expirationTimeSeconds` to `ZeroExTransaction` type (#1832)
* Add `TransfersSuccessful` revert reason and `OrderTransferResults` enum (#1868)
* Consolidate all Validator `SignatureType`s to just `Validator` (#1885)
* Add `EIP1271Wallet` to `SignatureType` (#1885)

v2.2.2 - April 11, 2019

* Dependencies updated

v2.2.1 - March 21, 2019

* Dependencies updated

v2.2.0 - March 20, 2019

* Added ERC1155 revert reasons (#1657)
* Added `ERC1155AssetData`, `ERC1155AssetDataNoProxyId`, and `ERC1155AssetDataAbi` (#1661)
* Add `InvalidOrigin` revert reason (#1668)
* Add `RevertReason.SignatureInvalid` thrown by Coordinator (#1705)
* Add `RevertReason.InvalidFreeMemoryPtr` thrown by LibAddressArray (#1712)

v2.1.1 - February 26, 2019

* Dependencies updated

v2.1.0 - February 25, 2019

* Add `FromLessThanToRequired` and `ToLessThanLengthRequired` revert reasons (#1604)

v2.0.2 - February 7, 2019

* Dependencies updated

v2.0.1 - February 6, 2019

* Dependencies updated

v2.0.0 - February 5, 2019

* Upgrade the bignumber.js to v8.0.2 (#1517)
* Update `ZeroExTransaction` type and add `SignedZeroExTransaction` type (#1576)
* Add `EIP712DomainWithDefaultSchema` type (#1576)

v1.5.2 - January 15, 2019

* Dependencies updated

v1.5.1 - January 11, 2019

* Dependencies updated

v1.5.0 - January 9, 2019

* Added types for Dutch Auction contract (#1465)

v1.4.1 - December 13, 2018

* Dependencies updated

v1.4.0 - December 11, 2018

* Add `LengthMismatch` and `LengthGreaterThan3Required` revert reasons (#1224)
* Add RevertReasons for DutchAuction contract (#1225)
* Add MultiAsset types (#1363)

v1.3.0 - November 21, 2018

* Add the `SimpleContractArtifact` type, which describes the artifact format published in the `@0x/contract-artifacts` package (#1298)

v1.2.1 - November 9, 2018

* Dependencies updated

v1.2.0 - October 18, 2018

* Added `EIP712Parameter` `EIP712Types` `EIP712TypedData` for EIP712 signing (#1102)
* Added `ZeroExTransaction` type for Exchange executeTransaction (#1102)
* Add `AssetData` union type (`type AssetData = ERC20AssetData | ERC721AssetData`) (#1131)

v1.1.4 - October 4, 2018

* Dependencies updated

v1.1.3 - October 2, 2018

* Dependencies updated

v1.1.2 - September 28, 2018

* Dependencies updated

v1.1.1 - September 25, 2018

* Dependencies updated

v1.1.0 - September 25, 2018

* Add ObjectMap type (#1037)
* Add SRA types from connect (#1085)

v1.0.2 - September 21, 2018

* Dependencies updated

v1.0.1 - September 5, 2018

* Add AssetProxyOwner revert reasons (#1041)
* Add MultiSigWalletWithTimeLock revert reasons (#1050)

v1.0.1-rc.6 - August 27, 2018

* Add WalletError and ValidatorError revert reasons (#1012)
* Remove Caller and Trezor SignatureTypes (#1015)

v1.0.1-rc.5 - August 24, 2018

* Add revert reasons for ERC721Token (#933)

v1.0.1-rc.4 - August 14, 2018

* Added SignerType to handle different signing prefix scenarios (#914)

v1.0.1-rc.3 - July 26, 2018

* Dependencies updated

v1.0.1-rc.2 - July 26, 2018

* Dependencies updated

v1.0.1-rc.1 - July 26, 2018

* Remove `ECSignatureBuffer`

v1.0.0 - July 23, 2018

* Dependencies updated

v1.0.0-rc.1 - July 19, 2018

* Updated types for V2 of 0x protocol
* Add `ECSignatureBuffer`
* Add Forwarder contract revert reasons

v0.8.2 - July 9, 2018

* Dependencies updated

v0.8.1 - June 19, 2018

* Dependencies updated

v0.8.0 - May 22, 2018

* Change the order type to v2 format (#618)

v0.7.0 - May 22, 2018

* Make OpCode type an enum (#589)
* Moved ExchangeContractErrs, DoneCallback, Token, OrderRelevantState, OrderStateValid, OrderStateInvalid, OrderState, OrderAddresses and OrderValues types from 0x.js (#579)

v0.6.3 - May 4, 2018

* Dependencies updated

v0.6.2 - May 4, 2018

* Dependencies updated

v0.6.1 - April 18, 2018

* Dependencies updated

v0.6.0 - April 11, 2018

* Add Provider type (#501)

v0.5.0 - April 2, 2018

* Make `DataItem.components` optional (#485)

v0.4.2 - April 2, 2018

* Dependencies updated

v0.4.0 - March 17, 2018

* Remove `JSONRPCPayload` (#426)
* Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package (#456)

v0.3.1 - March 7, 2018

* Added `RawLogEntry` type.

v0.3.0 - March 3, 2018

* Add `data` to `TxData` (#413)
* Add `number` as an option to `ContractEventArg` (#413)
* Move web3 types from devDep to dep since required when using this package (#429)

v0.2.1 - February 8, 2018

* Fix publishing issue where .npmignore was not properly excluding undesired content (#389)

v0.2.0 - February 6, 2018

* Added BlockLiteralParam and BlockParam, refactored out of 0x.js types. (#355)