Merge branch 'development' into extractDocs

* development: (22 commits)
  Fix bugs in postpublish_utils.js
  Update @0xproject/utils in top-level package.json
  Changelog tweaks
  Publish
  Updated CHANGELOGS
  Fix typo
  Add PR number to changelog entry
  Add changelog update to subproviders package
  Add `numberOfAccounts` param to `LedgerSubprovider` method `getAccountsAsync` and add tests
  Remove unnecessary type assertion
  Move web3 typings from devDeps to deps
  remove extrenuous comma
  Add PR number
  Add changelog entries from types and utils
  Add changelog entry to subproviders
  Remove extra comma
  Move web3 and ethers types to deps for utils package
  Make web3 typings a dep for web3Wrapper
  Make web3 typings a dep for subproviders
  reorder deps
  ...

# Conflicts:
#	packages/website/package.json
This commit is contained in:
Fabio Berger 2018-03-05 06:20:15 +01:00
commit 1817f6eaf6
41 changed files with 179 additions and 150 deletions

View File

@ -16,7 +16,7 @@
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic"
},
"devDependencies": {
"@0xproject/utils": "^0.3.4",
"@0xproject/utils": "^0.4.0",
"async-child-process": "^1.1.1",
"ethereumjs-testrpc": "^6.0.3",
"lerna": "^2.5.1",

View File

@ -1,11 +1,12 @@
# CHANGELOG
## v0.33.0 - _TBD, 2018_
## v0.33.0 - _March 4, 2018_
* Validate and lowercase all addresses in public methods (#373)
* Improve validation to force passing contract addresses on private networks (#385)
* Change `LogErrorContractEventArgs.errorId` type from `BigNumber` to `number` (#413)
* Rename all public `_unsubscribeAll` methods to `unsubscribeAll` (#415)
* Move web3 typings from devDep to dep since cannot use this package without it (#429)
## v0.32.2 - _February 9, 2018_

View File

@ -1,6 +1,6 @@
{
"name": "0x.js",
"version": "0.32.4",
"version": "0.33.0",
"description": "A javascript library for interacting with the 0x protocol",
"keywords": [
"0x.js",
@ -42,9 +42,9 @@
"node": ">=6.0.0"
},
"devDependencies": {
"@0xproject/abi-gen": "^0.2.3",
"@0xproject/dev-utils": "^0.1.0",
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/abi-gen": "^0.2.4",
"@0xproject/dev-utils": "^0.2.0",
"@0xproject/tslint-config": "^0.4.10",
"@types/bintrees": "^1.0.2",
"@types/jsonschema": "^1.1.1",
"@types/lodash": "^4.14.86",
@ -55,12 +55,13 @@
"awesome-typescript-loader": "^3.1.3",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "^0.0.9",
"chai-as-promised-typescript-typings": "^0.0.10",
"chai-bignumber": "^2.0.1",
"chai-typescript-typings": "^0.0.3",
"chai-typescript-typings": "^0.0.4",
"copyfiles": "^1.2.0",
"coveralls": "^3.0.0",
"dirty-chai": "^2.0.1",
"ethers-typescript-typings": "^0.0.2",
"json-loader": "^0.5.4",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
@ -77,26 +78,25 @@
"types-bn": "^0.0.1",
"typescript": "2.7.1",
"web3-provider-engine": "^13.0.1",
"ethers-typescript-typings": "^0.0.1",
"web3-typescript-typings": "^0.9.11",
"webpack": "^3.1.0"
},
"dependencies": {
"@0xproject/assert": "^0.0.20",
"@0xproject/base-contract": "^0.0.1",
"@0xproject/json-schemas": "^0.7.12",
"@0xproject/types": "^0.2.3",
"@0xproject/utils": "^0.3.4",
"@0xproject/web3-wrapper": "^0.1.14",
"@0xproject/assert": "^0.1.0",
"@0xproject/base-contract": "^0.0.2",
"@0xproject/json-schemas": "^0.7.13",
"@0xproject/types": "^0.3.0",
"@0xproject/utils": "^0.4.0",
"@0xproject/web3-wrapper": "^0.2.0",
"bintrees": "^1.0.2",
"bn.js": "^4.11.8",
"ethers-contracts": "^2.2.1",
"ethereumjs-abi": "^0.6.4",
"ethereumjs-blockstream": "^2.0.6",
"ethereumjs-util": "^5.1.1",
"ethers-contracts": "^2.2.1",
"js-sha3": "^0.7.0",
"lodash": "^4.17.4",
"uuid": "^3.1.0",
"web3": "^0.20.0"
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.0"
}
}

View File

@ -1,6 +1,6 @@
# CHANGELOG
## v0.2.3 - _TBD, 2018_
## v0.2.4 - _March 4, 2018_
* Add a `backend` parameter that allows you to specify the Ethereum library you use in your templates (`web3` or `ethers`). Ethers auto-converts small ints to numbers whereas Web3 doesn't. Defaults to `web3` (#413)
* Add support for [tuple types](https://solidity.readthedocs.io/en/develop/abi-spec.html#handling-tuple-types) (#413)

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/abi-gen",
"version": "0.2.3",
"version": "0.2.4",
"description": "Generate contract wrappers from ABI and handlebars templates",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@ -23,7 +23,7 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
"dependencies": {
"@0xproject/utils": "^0.3.4",
"@0xproject/utils": "^0.4.0",
"chalk": "^2.3.0",
"glob": "^7.1.2",
"handlebars": "^4.0.11",
@ -34,7 +34,7 @@
"yargs": "^10.0.3"
},
"devDependencies": {
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/tslint-config": "^0.4.10",
"@types/glob": "^5.0.33",
"@types/handlebars": "^4.0.36",
"@types/mkdirp": "^0.5.1",
@ -44,6 +44,6 @@
"shx": "^0.2.2",
"tslint": "5.8.0",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.9.11"
"web3-typescript-typings": "^0.10.0"
}
}

View File

@ -1,6 +1,6 @@
# CHANGELOG
## v0.1.0 - _TBD, 2018_
## v0.1.0 - _March 4, 2018_
* Remove isETHAddressHex checksum address check and assume address will be lowercased (#373)
* Add an optional parameter `subSchemas` to `doesConformToSchema` method (#385)

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/assert",
"version": "0.0.20",
"version": "0.1.0",
"description": "Provides a standard way of performing type and schema validation across 0x projects",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
@ -24,12 +24,12 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/assert/README.md",
"devDependencies": {
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/tslint-config": "^0.4.10",
"@types/lodash": "^4.14.86",
"@types/mocha": "^2.2.42",
"@types/valid-url": "^1.0.2",
"chai": "^4.0.1",
"chai-typescript-typings": "^0.0.3",
"chai-typescript-typings": "^0.0.4",
"dirty-chai": "^2.0.1",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
@ -38,8 +38,8 @@
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/json-schemas": "^0.7.12",
"@0xproject/utils": "^0.3.4",
"@0xproject/json-schemas": "^0.7.13",
"@0xproject/utils": "^0.4.0",
"lodash": "^4.17.4",
"valid-url": "^1.0.9"
}

View File

@ -1,5 +1,5 @@
# CHANGELOG
## v0.0.1 - _TBD, 2018_
## v0.0.2 - _March 4, 2018_
* Initial release (#TBD)
* Initial release

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/base-contract",
"version": "0.0.1",
"version": "0.0.2",
"description": "0x Base TS contract",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@ -20,20 +20,20 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/base-contract/README.md",
"devDependencies": {
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/tslint-config": "^0.4.10",
"@types/lodash": "^4.14.86",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"tslint": "5.8.0",
"typescript": "2.7.1",
"ethers-typescript-typings": "^0.0.1",
"web3-typescript-typings": "^0.9.11"
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/types": "^0.2.3",
"@0xproject/web3-wrapper": "^0.1.14",
"@0xproject/types": "^0.3.0",
"@0xproject/web3-wrapper": "^0.2.0",
"ethers-contracts": "^2.2.1",
"ethers-typescript-typings": "^0.0.2",
"lodash": "^4.17.4",
"web3": "^0.20.0"
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.0"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "chai-as-promised-typescript-typings",
"version": "0.0.9",
"version": "0.0.10",
"description": "Typescript type definitions for chai-as-promised",
"main": "index.d.ts",
"types": "index.d.ts",
@ -18,6 +18,6 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/chai-as-promised-typescript-typings#readme",
"dependencies": {
"chai-typescript-typings": "^0.0.3"
"chai-typescript-typings": "^0.0.4"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "chai-typescript-typings",
"version": "0.0.3",
"version": "0.0.4",
"description": "Typescript type definitions for chai",
"main": "index.d.ts",
"types": "index.d.ts",

View File

@ -1,6 +1,6 @@
# CHANGELOG
## v0.6.1 - _February 16, 2018_
## v0.6.2 - _February 16, 2018_
* Fix JSON parse empty response (#407)

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/connect",
"version": "0.6.1",
"version": "0.6.2",
"description": "A javascript library for interacting with the standard relayer api",
"keywords": [
"connect",
@ -37,16 +37,16 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md",
"dependencies": {
"@0xproject/assert": "^0.0.20",
"@0xproject/json-schemas": "^0.7.12",
"@0xproject/utils": "^0.3.4",
"@0xproject/assert": "^0.1.0",
"@0xproject/json-schemas": "^0.7.13",
"@0xproject/utils": "^0.4.0",
"isomorphic-fetch": "^2.2.1",
"lodash": "^4.17.4",
"query-string": "^5.0.1",
"websocket": "^1.0.25"
},
"devDependencies": {
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/tslint-config": "^0.4.10",
"@types/fetch-mock": "^5.12.1",
"@types/lodash": "^4.14.86",
"@types/mocha": "^2.2.42",
@ -54,8 +54,8 @@
"@types/websocket": "^0.0.34",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "^0.0.9",
"chai-typescript-typings": "^0.0.3",
"chai-as-promised-typescript-typings": "^0.0.10",
"chai-typescript-typings": "^0.0.4",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"fetch-mock": "^5.13.1",
@ -65,6 +65,6 @@
"tslint": "5.8.0",
"typedoc": "~0.8.0",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.9.11"
"web3-typescript-typings": "^0.10.0"
}
}

View File

@ -1,7 +1,7 @@
{
"private": true,
"name": "contracts",
"version": "2.1.13",
"version": "2.1.14",
"description": "Smart contract components of 0x protocol",
"main": "index.js",
"directories": {
@ -36,8 +36,8 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md",
"devDependencies": {
"@0xproject/dev-utils": "^0.1.0",
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/dev-utils": "^0.2.0",
"@0xproject/tslint-config": "^0.4.10",
"@types/bluebird": "^3.5.3",
"@types/lodash": "^4.14.86",
"@types/node": "^8.0.53",
@ -45,11 +45,12 @@
"@types/yargs": "^10.0.0",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "^0.0.9",
"chai-as-promised-typescript-typings": "^0.0.10",
"chai-bignumber": "^2.0.1",
"chai-typescript-typings": "^0.0.3",
"chai-typescript-typings": "^0.0.4",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"ethers-typescript-typings": "^0.0.2",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
@ -58,18 +59,16 @@
"types-bn": "^0.0.1",
"types-ethereumjs-util": "0xProject/types-ethereumjs-util",
"typescript": "2.7.1",
"ethers-typescript-typings": "^0.0.1",
"web3-typescript-typings": "^0.9.11",
"web3-typescript-typings": "^0.10.0",
"yargs": "^10.0.3"
},
"dependencies": {
"0x.js": "^0.32.4",
"@0xproject/web3-wrapper": "^0.1.14",
"@0xproject/deployer": "^0.1.0",
"@0xproject/json-schemas": "^0.7.12",
"@0xproject/types": "^0.2.3",
"@0xproject/utils": "^0.3.4",
"@0xproject/web3-wrapper": "^0.1.14",
"0x.js": "^0.33.0",
"@0xproject/deployer": "^0.2.0",
"@0xproject/json-schemas": "^0.7.13",
"@0xproject/types": "^0.3.0",
"@0xproject/utils": "^0.4.0",
"@0xproject/web3-wrapper": "^0.2.0",
"bluebird": "^3.5.0",
"bn.js": "^4.11.8",
"ethereumjs-abi": "^0.6.4",

View File

@ -1,6 +1,6 @@
# CHANGELOG
## v0.2.0 - _TBD, 2018_
## v0.2.0 - _March 4, 2018_
* Check dependencies when determining if contracts should be recompiled (#408).

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/deployer",
"version": "0.1.0",
"version": "0.2.0",
"description": "Smart contract deployer of 0x protocol",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
@ -28,22 +28,22 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/deployer/README.md",
"devDependencies": {
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/tslint-config": "^0.4.10",
"chai": "^4.0.1",
"copyfiles": "^1.2.0",
"ethers-typescript-typings": "^0.0.2",
"mocha": "^4.0.1",
"shx": "^0.2.2",
"tslint": "5.8.0",
"types-bn": "^0.0.1",
"typescript": "2.7.1",
"ethers-typescript-typings": "^0.0.1",
"web3-typescript-typings": "^0.9.11"
"web3-typescript-typings": "^0.10.0"
},
"dependencies": {
"@0xproject/json-schemas": "^0.7.12",
"@0xproject/types": "^0.2.3",
"@0xproject/utils": "^0.3.4",
"@0xproject/web3-wrapper": "^0.1.14",
"@0xproject/json-schemas": "^0.7.13",
"@0xproject/types": "^0.3.0",
"@0xproject/utils": "^0.4.0",
"@0xproject/web3-wrapper": "^0.2.0",
"ethereumjs-util": "^5.1.1",
"lodash": "^4.17.4",
"solc": "^0.4.18",

View File

@ -1,6 +1,6 @@
# CHANGELOG
## v0.1.0 - _February 16, 2018_
## v0.2.0 - _February 16, 2018_
* Remove subproviders (#392)

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/dev-utils",
"version": "0.1.0",
"version": "0.2.0",
"description": "0x dev TS utils",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
@ -23,12 +23,12 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/dev-utils/README.md",
"devDependencies": {
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/web3-wrapper": "^0.1.14",
"@0xproject/tslint-config": "^0.4.10",
"@0xproject/web3-wrapper": "^0.2.0",
"@types/lodash": "^4.14.86",
"@types/mocha": "^2.2.42",
"chai": "^4.0.1",
"chai-typescript-typings": "^0.0.3",
"chai-typescript-typings": "^0.0.4",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
@ -38,9 +38,9 @@
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/subproviders": "^0.5.0",
"@0xproject/types": "^0.2.3",
"@0xproject/utils": "^0.3.4",
"@0xproject/subproviders": "^0.6.0",
"@0xproject/types": "^0.3.0",
"@0xproject/utils": "^0.4.0",
"ethereumjs-util": "^5.1.2",
"lodash": "^4.17.4",
"request-promise-native": "^1.0.5",

View File

@ -1,5 +1,5 @@
# CHANGELOG
## v0.0.1 - _TBD, 2018_
## v0.0.2 - _March 4, 2018_
* Initial types (#413)

View File

@ -1,6 +1,6 @@
{
"name": "ethers-typescript-typings",
"version": "0.0.1",
"version": "0.0.2",
"description": "Typescript type definitions for ethers.js",
"main": "index.d.ts",
"types": "index.d.ts",

View File

@ -1,6 +1,6 @@
# CHANGELOG
## v0.7.10 - _February 9, 2018_
## v0.7.13 - _February 9, 2018_
* Fix publishing issue where .npmignore was not properly excluding undesired content (#389)

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/json-schemas",
"version": "0.7.12",
"version": "0.7.13",
"description": "0x-related json schemas",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
@ -28,13 +28,13 @@
"lodash.values": "^4.3.0"
},
"devDependencies": {
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/utils": "^0.3.4",
"@0xproject/tslint-config": "^0.4.10",
"@0xproject/utils": "^0.4.0",
"@types/lodash.foreach": "^4.5.3",
"@types/lodash.values": "^4.3.3",
"@types/mocha": "^2.2.42",
"chai": "^4.0.1",
"chai-typescript-typings": "^0.0.3",
"chai-typescript-typings": "^0.0.4",
"dirty-chai": "^2.0.1",
"lodash.foreach": "^4.5.0",
"mocha": "^4.0.1",

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/monorepo-scripts",
"version": "0.1.11",
"version": "0.1.12",
"private": true,
"description": "Helper scripts for the monorepo",
"scripts": {
@ -20,7 +20,7 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/monorepo-scripts/README.md",
"devDependencies": {
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/tslint-config": "^0.4.10",
"@types/glob": "^5.0.33",
"@types/node": "^8.0.53",
"shx": "^0.2.2",

View File

@ -1,5 +1,10 @@
# CHANGELOG
## v0.6.0 - _March 4, 2018_
* Move web3 types from being a devDep to a dep since one cannot use this package without it (#429)
* Add `numberOfAccounts` param to `LedgerSubprovider` method `getAccountsAsync` (#432)
## v0.5.0 - _February 16, 2018_
* Add EmptyWalletSubprovider and FakeGasEstimateSubprovider (#392)

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/subproviders",
"version": "0.5.0",
"version": "0.6.0",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"license": "Apache-2.0",
@ -18,9 +18,9 @@
"test:integration": "run-s clean build run_mocha_integration"
},
"dependencies": {
"@0xproject/assert": "^0.0.20",
"@0xproject/types": "^0.2.3",
"@0xproject/utils": "^0.3.4",
"@0xproject/assert": "^0.1.0",
"@0xproject/types": "^0.3.0",
"@0xproject/utils": "^0.4.0",
"bn.js": "^4.11.8",
"es6-promisify": "^5.0.0",
"ethereumjs-tx": "^1.3.3",
@ -30,19 +30,20 @@
"lodash": "^4.17.4",
"semaphore-async-await": "^1.5.1",
"web3": "^0.20.0",
"web3-provider-engine": "^13.0.1"
"web3-provider-engine": "^13.0.1",
"web3-typescript-typings": "^0.10.0"
},
"devDependencies": {
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/utils": "^0.3.4",
"@0xproject/tslint-config": "^0.4.10",
"@0xproject/utils": "^0.4.0",
"@types/lodash": "^4.14.86",
"@types/mocha": "^2.2.42",
"@types/node": "^8.0.53",
"awesome-typescript-loader": "^3.1.3",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "^0.0.9",
"chai-typescript-typings": "^0.0.3",
"chai-as-promised-typescript-typings": "^0.0.10",
"chai-typescript-typings": "^0.0.4",
"dirty-chai": "^2.0.1",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
@ -51,7 +52,6 @@
"types-bn": "^0.0.1",
"types-ethereumjs-util": "0xProject/types-ethereumjs-util",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.9.11",
"webpack": "^3.1.0"
}
}

View File

@ -19,7 +19,7 @@ import {
import { Subprovider } from './subprovider';
const DEFAULT_DERIVATION_PATH = `44'/60'/0'`;
const NUM_ADDRESSES_TO_FETCH = 10;
const DEFAULT_NUM_ADDRESSES_TO_FETCH = 10;
const ASK_FOR_ON_DEVICE_CONFIRMATION = false;
const SHOULD_GET_CHAIN_CODE = true;
@ -129,7 +129,7 @@ export class LedgerSubprovider extends Subprovider {
return;
}
}
public async getAccountsAsync(): Promise<string[]> {
public async getAccountsAsync(numberOfAccounts: number = DEFAULT_NUM_ADDRESSES_TO_FETCH): Promise<string[]> {
this._ledgerClientIfExists = await this._createLedgerClientAsync();
let ledgerResponse;
@ -148,7 +148,7 @@ export class LedgerSubprovider extends Subprovider {
hdKey.chainCode = new Buffer(ledgerResponse.chainCode, 'hex');
const accounts = [];
for (let i = 0; i < NUM_ADDRESSES_TO_FETCH; i++) {
for (let i = 0; i < numberOfAccounts; i++) {
const derivedHDNode = hdKey.derive(`m/${i + this._derivationPathIndex}`);
const derivedPublicKey = derivedHDNode.publicKey;
const shouldSanitizePublicKey = true;

View File

@ -26,11 +26,17 @@ describe('LedgerSubprovider', () => {
});
});
describe('direct method calls', () => {
it('returns a list of accounts', async () => {
it('returns default number of accounts', async () => {
const accounts = await ledgerSubprovider.getAccountsAsync();
expect(accounts[0]).to.not.be.an('undefined');
expect(accounts.length).to.be.equal(10);
});
it('returns requested number of accounts', async () => {
const numberOfAccounts = 20;
const accounts = await ledgerSubprovider.getAccountsAsync(numberOfAccounts);
expect(accounts[0]).to.not.be.an('undefined');
expect(accounts.length).to.be.equal(numberOfAccounts);
});
it('signs a personal message', async () => {
const data = ethUtils.bufferToHex(ethUtils.toBuffer('hello world'));
const ecSignatureHex = await ledgerSubprovider.signPersonalMessageAsync(data);
@ -172,7 +178,7 @@ describe('LedgerSubprovider', () => {
};
const callback = reportCallbackErrors(done)((err: Error, response: Web3.JSONRPCResponsePayload) => {
expect(err).to.be.a('null');
const result = response.result.result;
const result = response.result;
expect(result.length).to.be.equal(66);
expect(result.substr(0, 2)).to.be.equal('0x');
done();

View File

@ -62,11 +62,17 @@ describe('LedgerSubprovider', () => {
});
describe('direct method calls', () => {
describe('success cases', () => {
it('returns a list of accounts', async () => {
it('returns default number of accounts', async () => {
const accounts = await ledgerSubprovider.getAccountsAsync();
expect(accounts[0]).to.be.equal(FAKE_ADDRESS);
expect(accounts.length).to.be.equal(10);
});
it('returns requested number of accounts', async () => {
const numberOfAccounts = 20;
const accounts = await ledgerSubprovider.getAccountsAsync(numberOfAccounts);
expect(accounts[0]).to.be.equal(FAKE_ADDRESS);
expect(accounts.length).to.be.equal(numberOfAccounts);
});
it('signs a personal message', async () => {
const data = ethUtils.bufferToHex(ethUtils.toBuffer('hello world'));
const ecSignatureHex = await ledgerSubprovider.signPersonalMessageAsync(data);

View File

@ -1,7 +1,7 @@
{
"private": true,
"name": "@0xproject/testnet-faucets",
"version": "1.0.14",
"version": "1.0.15",
"description": "A faucet micro-service that dispenses test ERC20 tokens or Ether",
"main": "server.js",
"scripts": {
@ -15,9 +15,9 @@
"author": "Fabio Berger",
"license": "Apache-2.0",
"dependencies": {
"0x.js": "^0.32.4",
"@0xproject/subproviders": "^0.5.0",
"@0xproject/utils": "^0.3.4",
"0x.js": "^0.33.0",
"@0xproject/subproviders": "^0.6.0",
"@0xproject/utils": "^0.4.0",
"body-parser": "^1.17.1",
"ethereumjs-tx": "^1.3.3",
"ethereumjs-util": "^5.1.1",
@ -28,7 +28,7 @@
"web3-provider-engine": "^13.0.1"
},
"devDependencies": {
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/tslint-config": "^0.4.10",
"@types/body-parser": "^1.16.1",
"@types/express": "^4.0.35",
"@types/lodash": "^4.14.86",
@ -41,7 +41,7 @@
"types-bn": "^0.0.1",
"types-ethereumjs-util": "0xProject/types-ethereumjs-util",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.9.11",
"web3-typescript-typings": "^0.10.0",
"webpack": "^3.1.0",
"webpack-node-externals": "^1.6.0"
}

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/tslint-config",
"version": "0.4.9",
"version": "0.4.10",
"description": "Lint rules related to 0xProject for TSLint",
"main": "tslint.json",
"scripts": {

View File

@ -1,9 +1,10 @@
# CHANGELOG
## v0.2.4 - _TBD, 2018_
## v0.3.0 - _March 4, 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 9, 2018_

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/types",
"version": "0.2.3",
"version": "0.3.0",
"description": "0x types",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@ -20,14 +20,14 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/types/README.md",
"devDependencies": {
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/tslint-config": "^0.4.10",
"shx": "^0.2.2",
"tslint": "5.8.0",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.9.11"
"typescript": "2.7.1"
},
"dependencies": {
"bignumber.js": "~4.1.0",
"web3": "^0.20.0"
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.0"
}
}

View File

@ -1,8 +1,9 @@
# CHANGELOG
## v0.4.0 - _TBD, 2018_
## v0.4.0 - _March 4, 2018_
* Use `ethers-contracts` as a backend to decode event args (#413)
* Move web3 types from devDep to dep since required when using this package (#429)
## v0.3.2 - _February 9, 2018_

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/utils",
"version": "0.3.4",
"version": "0.4.0",
"description": "0x TS utils",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@ -20,21 +20,21 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/utils/README.md",
"devDependencies": {
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/tslint-config": "^0.4.10",
"@types/lodash": "^4.14.86",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"tslint": "5.8.0",
"typescript": "2.7.1",
"ethers-typescript-typings": "^0.0.1",
"web3-typescript-typings": "^0.9.11"
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/types": "^0.2.3",
"@0xproject/types": "^0.3.0",
"bignumber.js": "~4.1.0",
"ethers-contracts": "^2.2.1",
"ethers-typescript-typings": "^0.0.2",
"js-sha3": "^0.7.0",
"lodash": "^4.17.4",
"web3": "^0.20.0"
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.0"
}
}

View File

@ -1,6 +1,6 @@
# CHANGELOG
## v0.10.0 - _TBD, 2018_
## v0.10.0 - _March 4, 2018_
* Support ABIv2 (#401)

View File

@ -1,6 +1,6 @@
{
"name": "web3-typescript-typings",
"version": "0.9.11",
"version": "0.10.0",
"description": "Typescript type definitions for web3",
"main": "index.d.ts",
"types": "index.d.ts",

View File

@ -1,6 +1,6 @@
# CHANGELOG
## v0.2.0 _TBD, 2018_
## v0.2.0 _March 4, 2018_
* Ensure all returned user addresses are lowercase (#373)
* Add `web3Wrapper.callAsync` (#413)

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/web3-wrapper",
"version": "0.1.14",
"version": "0.2.0",
"description": "Wraps around web3 and gives a nicer interface",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@ -20,20 +20,20 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/web3-wrapper/README.md",
"devDependencies": {
"@0xproject/tslint-config": "^0.4.9",
"@0xproject/tslint-config": "^0.4.10",
"@types/lodash": "^4.14.86",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"tslint": "5.8.0",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.9.11"
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/types": "^0.2.3",
"@0xproject/utils": "^0.3.4",
"@0xproject/types": "^0.3.0",
"@0xproject/utils": "^0.4.0",
"ethers-contracts": "^2.2.1",
"ethers-typescript-typings": "^0.0.1",
"ethers-typescript-typings": "^0.0.2",
"lodash": "^4.17.4",
"web3": "^0.20.0"
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.0"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@0xproject/website",
"version": "0.0.16",
"version": "0.0.17",
"private": true,
"description": "Website and 0x portal dapp",
"scripts": {
@ -18,10 +18,10 @@
"author": "Fabio Berger",
"license": "Apache-2.0",
"dependencies": {
"0x.js": "^0.32.4",
"@0xproject/subproviders": "^0.5.0",
"@0xproject/react-shared": "^0.0.1",
"@0xproject/utils": "^0.3.4",
"@0xproject/subproviders": "^0.6.0",
"@0xproject/utils": "^0.4.0",
"0x.js": "^0.33.0",
"accounting": "^0.4.1",
"basscss": "^8.0.3",
"blockies": "^0.0.2",
@ -88,7 +88,7 @@
"copy-webpack-plugin": "^4.0.1",
"copyfiles": "^1.2.0",
"css-loader": "0.23.x",
"ethers-typescript-typings": "^0.0.1",
"ethers-typescript-typings": "^0.0.2",
"exports-loader": "0.6.x",
"imports-loader": "0.6.x",
"json-loader": "^0.5.4",
@ -100,7 +100,7 @@
"tslint": "5.8.0",
"tslint-config-0xproject": "^0.0.2",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.9.11",
"web3-typescript-typings": "^0.10.0",
"webpack": "^3.1.0",
"webpack-dev-middleware": "^1.10.0",
"webpack-dev-server": "^2.5.0"

View File

@ -186,7 +186,7 @@ export const typeDocUtils = {
// Versions >0.9.0 have it as type TypeDocNode
const indexSignature =
doesIndexSignatureExist && isIndexSignatureArray
? ((entity.indexSignature as TypeDocNode[])[0] as TypeDocNode)
? (entity.indexSignature as TypeDocNode[])[0]
: (entity.indexSignature as TypeDocNode);
const indexSignatureIfExists = doesIndexSignatureExist
? typeDocUtils._convertIndexSignature(indexSignature, sections, sectionName, docId)

View File

@ -64,11 +64,21 @@ module.exports = {
},
adjustFileIncludePaths: function(fileIncludes, cwd) {
const fileIncludesAdjusted = _.map(fileIncludes, fileInclude => {
let path;
if (_.startsWith(fileInclude, '../')) {
return cwd + '/../' + fileInclude;
} else if (_.startsWith('./')) {
return cwd + '/../' + fileInclude;
path = cwd + '/../' + fileInclude;
} else if (_.startsWith(fileInclude, './')) {
path = cwd + '/../' + fileInclude.substr(2);
} else {
path = cwd + '/' + fileInclude;
}
// HACK: tsconfig.json needs wildcard directory endings as `/**/*`
// but TypeDoc needs it as `/**` in order to pick up files at the root
if (_.endsWith(path, '/**/*')) {
path = path.slice(0, -2);
}
return path;
});
return fileIncludesAdjusted;
},