Catalog npm
Back to packageRELEASE DETAILS

6.0.12

npm

0x.js

A javascript library for interacting with the 0x protocol

0x.js0xprojectethereumexchangetokens
Published15 Jul 2019
Direct dependencies43
Transitive dependenciesNot calculated

README

Current package documentation

0x.js

A TypeScript/Javascript library for interacting with the 0x protocol. It is a high level package which combines a number of underlying packages such as order-utils and asset-data-utils.

Read the Documentation.

Installation

0x.js ships as both a UMD module and a CommonJS package.

Install

npm install 0x.js --save

Import

import {
    assetDataUtils,
    BigNumber,
    ContractWrappers,
    generatePseudoRandomSalt,
    orderHashUtils,
    signatureUtils,
} from '0x.js';

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

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

UMD:

Install

Download the UMD module from our releases page and add it to your project.

Import

<script type="text/javascript" src="0x.js"></script>

Webpack config

If bundling your project with Webpack, add the following to your webpack.config.js:

If building for web:

node: {
    fs: 'empty';
}

If building a node library:

externals: {
    fs: true;
}

ContractWrappers uses WebAssembly to simulate Ethereum calls. This toolchain involves generated 'glue' code that requires the fs built-in, but won't actually use it in a web environment. We tell Webpack not to resolve them since we won't need them. The specific dependency is here.

Also see:

Contributing

We strongly recommend that the community help us make improvements and determine the future direction of 0x protocol. 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.js yarn build

Or continuously rebuild on change:

PKG=0x.js yarn watch

Clean

yarn clean

Lint

yarn lint

Run Tests

yarn test

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 43

Native requirements
43 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@0x/assert
Environment
{
  "local_name": "@0x/assert",
  "alias": false,
  "peer_metadata": null
}
^2.1.0runtime
@0x/base-contract
Environment
{
  "local_name": "@0x/base-contract",
  "alias": false,
  "peer_metadata": null
}
^5.1.1runtime
@0x/contract-wrappers
Environment
{
  "local_name": "@0x/contract-wrappers",
  "alias": false,
  "peer_metadata": null
}
^9.1.7runtime
@0x/order-utils
Environment
{
  "local_name": "@0x/order-utils",
  "alias": false,
  "peer_metadata": null
}
^8.2.2runtime
@0x/order-watcher
Environment
{
  "local_name": "@0x/order-watcher",
  "alias": false,
  "peer_metadata": null
}
^4.0.14runtime
@0x/subproviders
Environment
{
  "local_name": "@0x/subproviders",
  "alias": false,
  "peer_metadata": null
}
^4.1.1runtime
@0x/types
Environment
{
  "local_name": "@0x/types",
  "alias": false,
  "peer_metadata": null
}
^2.4.0runtime
@0x/typescript-typings
Environment
{
  "local_name": "@0x/typescript-typings",
  "alias": false,
  "peer_metadata": null
}
^4.2.3runtime
@0x/utils
Environment
{
  "local_name": "@0x/utils",
  "alias": false,
  "peer_metadata": null
}
^4.4.0runtime
@0x/web3-wrapper
Environment
{
  "local_name": "@0x/web3-wrapper",
  "alias": false,
  "peer_metadata": null
}
^6.0.7runtime
@types/web3-provider-engine
Environment
{
  "local_name": "@types/web3-provider-engine",
  "alias": false,
  "peer_metadata": null
}
^14.0.0runtime
ethereum-types
Environment
{
  "local_name": "ethereum-types",
  "alias": false,
  "peer_metadata": null
}
^2.1.3runtime
ethers
Environment
{
  "local_name": "ethers",
  "alias": false,
  "peer_metadata": null
}
~4.0.4runtime
lodash
Environment
{
  "local_name": "lodash",
  "alias": false,
  "peer_metadata": null
}
^4.17.11runtime
web3-provider-engine
Environment
{
  "local_name": "web3-provider-engine",
  "alias": false,
  "peer_metadata": null
}
14.0.6runtime
@0x/abi-gen-wrappers
Environment
{
  "local_name": "@0x/abi-gen-wrappers",
  "alias": false,
  "peer_metadata": null
}
^5.0.2development
@0x/contract-addresses
Environment
{
  "local_name": "@0x/contract-addresses",
  "alias": false,
  "peer_metadata": null
}
^3.0.2development
@0x/dev-utils
Environment
{
  "local_name": "@0x/dev-utils",
  "alias": false,
  "peer_metadata": null
}
^2.2.4development
@0x/migrations
Environment
{
  "local_name": "@0x/migrations",
  "alias": false,
  "peer_metadata": null
}
^4.1.9development
@0x/tslint-config
Environment
{
  "local_name": "@0x/tslint-config",
  "alias": false,
  "peer_metadata": null
}
^3.0.1development
@types/lodash
Environment
{
  "local_name": "@types/lodash",
  "alias": false,
  "peer_metadata": null
}
4.14.104development
@types/mocha
Environment
{
  "local_name": "@types/mocha",
  "alias": false,
  "peer_metadata": null
}
^2.2.42development
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
*development
@types/sinon
Environment
{
  "local_name": "@types/sinon",
  "alias": false,
  "peer_metadata": null
}
^2.2.2development
awesome-typescript-loader
Environment
{
  "local_name": "awesome-typescript-loader",
  "alias": false,
  "peer_metadata": null
}
^5.2.1development
chai
Environment
{
  "local_name": "chai",
  "alias": false,
  "peer_metadata": null
}
^4.0.1development
chai-as-promised
Environment
{
  "local_name": "chai-as-promised",
  "alias": false,
  "peer_metadata": null
}
^7.1.0development
chai-bignumber
Environment
{
  "local_name": "chai-bignumber",
  "alias": false,
  "peer_metadata": null
}
^3.0.0development
copyfiles
Environment
{
  "local_name": "copyfiles",
  "alias": false,
  "peer_metadata": null
}
^2.0.0development
dirty-chai
Environment
{
  "local_name": "dirty-chai",
  "alias": false,
  "peer_metadata": null
}
^2.0.1development
make-promises-safe
Environment
{
  "local_name": "make-promises-safe",
  "alias": false,
  "peer_metadata": null
}
^1.1.0development
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
^4.1.0development
npm-run-all
Environment
{
  "local_name": "npm-run-all",
  "alias": false,
  "peer_metadata": null
}
^4.1.2development
nyc
Environment
{
  "local_name": "nyc",
  "alias": false,
  "peer_metadata": null
}
^11.0.1development
opn-cli
Environment
{
  "local_name": "opn-cli",
  "alias": false,
  "peer_metadata": null
}
^3.1.0development
shx
Environment
{
  "local_name": "shx",
  "alias": false,
  "peer_metadata": null
}
^0.2.2development
sinon
Environment
{
  "local_name": "sinon",
  "alias": false,
  "peer_metadata": null
}
^4.0.0development
source-map-support
Environment
{
  "local_name": "source-map-support",
  "alias": false,
  "peer_metadata": null
}
^0.5.0development
tslint
Environment
{
  "local_name": "tslint",
  "alias": false,
  "peer_metadata": null
}
5.11.0development
typedoc
Environment
{
  "local_name": "typedoc",
  "alias": false,
  "peer_metadata": null
}
0.13.0development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
3.0.1development
uglifyjs-webpack-plugin
Environment
{
  "local_name": "uglifyjs-webpack-plugin",
  "alias": false,
  "peer_metadata": null
}
^2.0.1development
webpack
Environment
{
  "local_name": "webpack",
  "alias": false,
  "peer_metadata": null
}
^4.20.2development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "a9fa66f4477f0711f8beaafd567b50e28b360a09",
  "tarball": "https://registry.npmjs.org/0x.js/-/0x.js-6.0.12.tgz",
  "integrity": "sha512-WNUr1MX1QsQe7iyR9pzNnrhRKtDK+qV/sNQNlp0Wz/6mBlc/n6Ep/gNpHf3tcCNlWmsQv2Cil24xpO5F6+AQsQ==",
  "fileCount": 15,
  "unpackedSize": 20926136,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLHBZCRA9TVsSAnZWagAAvtYP/AnUSDvAqYqGB3KLZNLE\nbH0v78PeT8VtSFzDeC0fjqMOPBpl6sJzPt3n37ynMi3VM+m6IgGJnyzVlWVv\npY8gja1hiraFN40nQ+WeLzpre909DwIoQs5HuH5bwHvmvgQq9Lru4+1H8LgH\n3MqA65BgYLvLoDXV2uxsQjoXdlmZvNKgO6sT9Ybn3nFuc4g4mMTGw+ySU8kj\nBiP/1j1/12Jhaa/9gkszCFGOxAzGoF95PxS+1mxXh6wXCKBhxLsRWXrd5gFR\nWz6YKQvbG/f3q53QsuqvydwWgqKNZemzpKWvbnRz9qfxIYSrmUsm3zeBQ9L2\nT8p/3QkC1WT0HtptJALHkf11TpvQg9rWg133HB9PmTHNhqsN21sJ4KvnlN6T\n2fpNIw0U+m9YSPxnEg4RjaK8P1mtCZVa0CG18M/lbb6+vaOGpc/CzDVa+F1c\nhwKA9to9Ybd0iRSYFH+Hnh+JwLo1lSbcJzcwGxaP1WAnLCu2zq+k3hjz01UJ\nPPM/2bsf7wNexklVqUyvBGRt88EHIKFOC1/2X9L3wpPwJaWCHCsWPJDH18Yu\nscgEfsCTrTTVfgKuAC5g/d+CfjhD1zgAxwq6xBjlUlCv4mHZ0glI60TNkVik\ne1HJsHoKxBxGIalv548gezoI1FRWiV7zUSVBr/+UM9dg4+6Lw9JhKPJ5Zh7P\nHKFd\r\n=JJch\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEYCIQCAHaFCfPFzOyUq3DgX5idiAEESH6F1FB8wpdctngySPgIhANEt48xncy0B+CZuICSkAR25zi0jQREOPaToEZ5ajOiK"
    }
  ]
}

Repository

PENDING
0xproject/0x-monorepo

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
0xproject/0x.js

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:47 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:a3aafde60d80de77a144158aef18435a899e58d288e2925400a891809adc1832

Other collected versions

9.2.015 Jul9.1.624 Jun9.1.53 Mar9.1.427 Feb9.1.326 Feb9.1.225 FebView all collected versions →