diff --git a/.travis.yml b/.travis.yml index 71f42b8..4da682b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,9 +24,9 @@ before_script: - git clone https://github.com/oceanprotocol/barge - cd barge - export AQUARIUS_VERSION=unstable - - export BRIZO_VERSION=v0.8.1 + - export BRIZO_VERSION=v0.9.3 - export KEEPER_VERSION=v0.13.2 - - export EVENTS_HANDLER_VERSION=v0.4.4 + - export EVENTS_HANDLER_VERSION=v0.4.5 - export KEEPER_OWNER_ROLE_ADDRESS="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260" - rm -rf "${HOME}/.ocean/keeper-contracts/artifacts" - bash -x start_ocean.sh --no-commons --no-dashboard 2>&1 > start_ocean.log & diff --git a/CHANGELOG.md b/CHANGELOG.md index 4761733..52aa38e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,24 +4,70 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -#### [v1.3.0](https://github.com/oceanprotocol/squid-js/compare/v1.2.0...v1.3.0) +#### [v2.0.0-beta.5](https://github.com/oceanprotocol/squid-js/compare/2.0.0-beta.4...v2.0.0-beta.5) + +> 10 March 2020 + +- Update the compute condition name in ddo jason definition. [`#380`](https://github.com/oceanprotocol/squid-js/pull/380) + +#### [2.0.0-beta.4](https://github.com/oceanprotocol/squid-js/compare/v2.0.0-beta.3...2.0.0-beta.4) + +> 6 March 2020 + +- v2: Compute to Data [`#350`](https://github.com/oceanprotocol/squid-js/pull/350) +- Fix style issues and failing unit tests. [`c26ae88`](https://github.com/oceanprotocol/squid-js/commit/c26ae88fa3d63a65b7cba38224cbdcb23cbe6685) +- Fix publishing compute service (fill in parameters value in agreement conditions). Update agreement template events and conditions in the sample json. [`75a0ef0`](https://github.com/oceanprotocol/squid-js/commit/75a0ef05d9789a9358180707b28bad95a84d6499) +- Return proper value from the compute endpoints. [`e2ed974`](https://github.com/oceanprotocol/squid-js/commit/e2ed974af27c7b828980919cb2846fc514fda142) + +#### [v2.0.0-beta.3](https://github.com/oceanprotocol/squid-js/compare/v2.0.0-beta.2...v2.0.0-beta.3) + +> 20 February 2020 + +- Adding output section [`#372`](https://github.com/oceanprotocol/squid-js/pull/372) +- add Output Object passed to brizo [`a60e415`](https://github.com/oceanprotocol/squid-js/commit/a60e4159255aadeba00bec2e72cf0fbb4b71489c) +- lint fix [`6e2289b`](https://github.com/oceanprotocol/squid-js/commit/6e2289b27ddc8643076385ee3fe8cfb743d4ecfb) +- add Output interface [`9cf716e`](https://github.com/oceanprotocol/squid-js/commit/9cf716ebe472ec24603c1bcf052848ad4464d9dd) + +#### [v2.0.0-beta.2](https://github.com/oceanprotocol/squid-js/compare/v1.3.0...v2.0.0-beta.2) + +> 31 January 2020 + +- Release 2.0.0-beta.2 [`4e45a77`](https://github.com/oceanprotocol/squid-js/commit/4e45a773d67b0f4199ffd5eae00b06213ba5622f) + +#### [v2.0.0-beta.1](https://github.com/oceanprotocol/squid-js/compare/v2.0.0-beta.0...v2.0.0-beta.1) + +> 28 January 2020 + +- remove `index` parameter from ocean.assets.consume() [`138a6bf`](https://github.com/oceanprotocol/squid-js/commit/138a6bf75abc402396606fab3bc3701875d7a393) +- Release 2.0.0-beta.1 [`1d7105c`](https://github.com/oceanprotocol/squid-js/commit/1d7105cfb1e80cb45711517ae6840d9ac22e80a6) + +#### [v2.0.0-beta.0](https://github.com/oceanprotocol/squid-js/compare/v1.2.0...v2.0.0-beta.0) + +> 28 January 2020 + +- Update cross-env to the latest version 🚀 [`#363`](https://github.com/oceanprotocol/squid-js/pull/363) +- Update mocha to the latest version 🚀 [`#364`](https://github.com/oceanprotocol/squid-js/pull/364) +- new ocean.utils.services [`40754ca`](https://github.com/oceanprotocol/squid-js/commit/40754ca46a10578cfdf0f460a7c33ba37bb2ffde) +- DDO & compute test tweaks [`e7acadb`](https://github.com/oceanprotocol/squid-js/commit/e7acadb2fe91739eee1bff3589801f12c7ab0b1b) +- test data consolidation [`ac39369`](https://github.com/oceanprotocol/squid-js/commit/ac39369543779370b9be6f00b0f2063a7e50c763) + +#### [v1.3.0](https://github.com/oceanprotocol/squid-js/compare/v2.0.0-beta.1...v1.3.0) > 31 January 2020 - switch to @ethereum-navigator for network lookup [`#366`](https://github.com/oceanprotocol/squid-js/pull/366) - consolidate test files [`#371`](https://github.com/oceanprotocol/squid-js/pull/371) - package updates [`#368`](https://github.com/oceanprotocol/squid-js/pull/368) -- Update cross-env to the latest version 🚀 [`#363`](https://github.com/oceanprotocol/squid-js/pull/363) -- Update mocha to the latest version 🚀 [`#364`](https://github.com/oceanprotocol/squid-js/pull/364) -- chore(package): update lockfile package-lock.json [`46c4def`](https://github.com/oceanprotocol/squid-js/commit/46c4defee5beb43fbea41006c5957d086721aff9) -- switch to @ethereum-navigator/navigator for network lookup [`92dbaae`](https://github.com/oceanprotocol/squid-js/commit/92dbaaeb25b26e28df644be356c347058ca1256a) -- chore(package): update lockfile package-lock.json [`eb141a6`](https://github.com/oceanprotocol/squid-js/commit/eb141a6d3d3131a65e4385f781568d015dac8429) +- service interface refactor and cleanup [`768c69b`](https://github.com/oceanprotocol/squid-js/commit/768c69bdbdc0591e2e747d87082e859bc52cd7d2) +- fix compute unit tests [`e37420d`](https://github.com/oceanprotocol/squid-js/commit/e37420dabfd23d5f307be695992cac7324d47dd0) +- job status cleanup [`f11eaca`](https://github.com/oceanprotocol/squid-js/commit/f11eacaabdc15285ba78a8096e492fd8863c933a) #### [v1.2.0](https://github.com/oceanprotocol/squid-js/compare/v1.1.0...v1.2.0) > 23 January 2020 - Decouple aquarius from ocean [`#354`](https://github.com/oceanprotocol/squid-js/pull/354) +- merge fixes [`c8ea5f7`](https://github.com/oceanprotocol/squid-js/commit/c8ea5f77c2ec541fdbfb6f77cdabcd5691e4bffa) - Release 1.2.0 [`56f7d11`](https://github.com/oceanprotocol/squid-js/commit/56f7d1113a6aa1f3318040fb32cfdcc22f5dc13b) #### [v1.1.0](https://github.com/oceanprotocol/squid-js/compare/v1.1.0-beta.0...v1.1.0) diff --git a/MIGRATION.md b/MIGRATION.md index 3201302..736674d 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,6 +1,34 @@ # Migration Guide -Instructions on how to migrate between breaking versions. +Instructions on how to migrate between versions with breaking changes. + +## v1.2.0 → v2.0.0 + +### Ocean Protocol Components Requirements + +squid-js v2.0.0 only works against: + +- Aquarius v1.0.7+ +- Brizo v0.9.3+ +- Events Handler v0.4.5+ +- Keeper Contracts v0.13.2+ + +### Service index parameter removal from `ocean.assets` methods + +Removes the need to get the respective service from the DDO, the `ocean.assets` methods will now do this on their own automatically. + +```js +// old +const service = ddo.findServiceByType('access') +const did = ddo.id +const agreementId = await ocean.assets.order(did, service.index, account) +const path = await ocean.assets.consume(agreementId, did, service.index, account, folder) + +// NEW +const did = ddo.id +const agreementId = await ocean.assets.order(did, account) +const path = await ocean.assets.consume(agreementId, did, account, folder) +``` ## v0.8.3 → v1.0.0 diff --git a/library.json b/library.json index 9d0cb91..1bfdb58 100644 --- a/library.json +++ b/library.json @@ -11,15 +11,15 @@ }, { "name": "brizo", - "version": "~0.8.1" + "version": "~0.9.0" }, { "name": "aquarius", - "version": "~1.0.5" + "version": "~1.0.7" }, { "name": "events-handler", - "version": "~0.4.1" + "version": "~0.4.4" } ] } diff --git a/package-lock.json b/package-lock.json index 3178b3f..261b931 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@oceanprotocol/squid", - "version": "1.3.0", + "version": "2.0.0-beta.5", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -314,21 +314,66 @@ "node-fetch": "^2.6.0" } }, + "@octokit/auth-token": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.0.tgz", + "integrity": "sha512-eoOVMjILna7FVQf96iWc3+ZtE/ZT6y8ob8ZzcqKY1ibSQCnu4O/B7pJvzMx5cyZ/RjAff6DAdEb0O0Cjcxidkg==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.0" + } + }, "@octokit/endpoint": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.5.1.tgz", - "integrity": "sha512-nBFhRUb5YzVTCX/iAK1MgQ4uWo89Gu0TH00qQHoYRCsE12dWcG1OiLd7v2EIo2+tpUKPMOQ62QFy9hy9Vg2ULg==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.5.3.tgz", + "integrity": "sha512-EzKwkwcxeegYYah5ukEeAI/gYRLv2Y9U5PpIsseGSFDk+G3RbipQGBs8GuYS1TLCtQaqoO66+aQGtITPalxsNQ==", "dev": true, "requires": { "@octokit/types": "^2.0.0", "is-plain-object": "^3.0.0", - "universal-user-agent": "^4.0.0" + "universal-user-agent": "^5.0.0" + }, + "dependencies": { + "universal-user-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-5.0.0.tgz", + "integrity": "sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q==", + "dev": true, + "requires": { + "os-name": "^3.1.0" + } + } + } + }, + "@octokit/plugin-paginate-rest": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz", + "integrity": "sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.1" + } + }, + "@octokit/plugin-request-log": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz", + "integrity": "sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw==", + "dev": true + }, + "@octokit/plugin-rest-endpoint-methods": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz", + "integrity": "sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.1", + "deprecation": "^2.3.1" } }, "@octokit/request": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.3.1.tgz", - "integrity": "sha512-5/X0AL1ZgoU32fAepTfEoggFinO3rxsMLtzhlUX+RctLrusn/CApJuGFCd0v7GMFhF+8UiCsTTfsu7Fh1HnEJg==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.3.2.tgz", + "integrity": "sha512-7NPJpg19wVQy1cs2xqXjjRq/RmtSomja/VSWnptfYwuBxLdbYh2UjhGi0Wx7B1v5Iw5GKhfFDQL7jM7SSp7K2g==", "dev": true, "requires": { "@octokit/endpoint": "^5.5.0", @@ -338,13 +383,24 @@ "is-plain-object": "^3.0.0", "node-fetch": "^2.3.0", "once": "^1.4.0", - "universal-user-agent": "^4.0.0" + "universal-user-agent": "^5.0.0" + }, + "dependencies": { + "universal-user-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-5.0.0.tgz", + "integrity": "sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q==", + "dev": true, + "requires": { + "os-name": "^3.1.0" + } + } } }, "@octokit/request-error": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.0.tgz", - "integrity": "sha512-DNBhROBYjjV/I9n7A8kVkmQNkqFAMem90dSxqvPq57e2hBr7mNTX98y3R2zDpqMQHVRpBDjsvsfIGgBzy+4PAg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.1.tgz", + "integrity": "sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA==", "dev": true, "requires": { "@octokit/types": "^2.0.0", @@ -353,12 +409,16 @@ } }, "@octokit/rest": { - "version": "16.33.0", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.33.0.tgz", - "integrity": "sha512-t4jMR+odsfooQwmHiREoTQixVTX2DfdbSaO+lKrW9R5XBuk0DW+5T/JdfwtxAGUAHgvDDpWY/NVVDfEPTzxD6g==", + "version": "16.43.1", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.43.1.tgz", + "integrity": "sha512-gfFKwRT/wFxq5qlNjnW2dh+qh74XgTQ2B179UX5K1HYCluioWj8Ndbgqw2PVqa1NnVJkGHp2ovMpVn/DImlmkw==", "dev": true, "requires": { - "@octokit/request": "^5.0.0", + "@octokit/auth-token": "^2.4.0", + "@octokit/plugin-paginate-rest": "^1.1.1", + "@octokit/plugin-request-log": "^1.0.0", + "@octokit/plugin-rest-endpoint-methods": "2.4.0", + "@octokit/request": "^5.2.0", "@octokit/request-error": "^1.0.2", "atob-lite": "^2.0.0", "before-after-hook": "^2.0.0", @@ -373,21 +433,22 @@ } }, "@octokit/types": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.1.1.tgz", - "integrity": "sha512-89LOYH+d/vsbDX785NOfLxTW88GjNd0lWRz1DVPVsZgg9Yett5O+3MOvwo7iHgvUwbFz0mf/yPIjBkUbs4kxoQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.5.0.tgz", + "integrity": "sha512-KEnLwOfdXzxPNL34fj508bhi9Z9cStyN7qY1kOfVahmqtAfrWw6Oq3P4R+dtsg0lYtZdWBpUrS/Ixmd5YILSww==", "dev": true, "requires": { "@types/node": ">= 8" } }, "@release-it/bumper": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@release-it/bumper/-/bumper-1.0.5.tgz", - "integrity": "sha512-LqfiUu5IgzdYAHH8+VwVEg30+Q7sRSD44XuwqbfVwhQJYmScO6Ik0Eet+FOAxYr4EskwK8KM4TjsdX+QurgZqA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@release-it/bumper/-/bumper-1.1.0.tgz", + "integrity": "sha512-TThpeghaMLfcHv1ipsyHKgSl1J5OEHU08kM6mVieGLiUbyFfztd+yeqH/QhV94IwX4O+aPjvbVtWpj0c7/pDkw==", "dev": true, "requires": { "detect-indent": "^6.0.0", + "js-yaml": "^3.13.1", "lodash.castarray": "^4.4.0", "lodash.get": "^4.4.2", "lodash.set": "^4.3.2", @@ -400,6 +461,51 @@ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" }, + "@sinonjs/commons": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.7.1.tgz", + "integrity": "sha512-Debi3Baff1Qu1Unc3mjJ96MgpbwTn43S1+9yJ0llWygPwDNu2aaWBD6yc9y/Z8XDRNhx7U+u2UDg2OGQXkclUQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.0.tgz", + "integrity": "sha512-atR1J/jRXvQAb47gfzSK8zavXy7BcpnYq21ALon0U99etu99vsir0trzIO3wpeLtW+LLVY6X7EkfVTbjGSH8Ww==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/formatio": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", + "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^5.0.2" + } + }, + "@sinonjs/samsam": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.0.3.tgz", + "integrity": "sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, "@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", @@ -409,9 +515,9 @@ } }, "@truffle/hdwallet-provider": { - "version": "1.0.29", - "resolved": "https://registry.npmjs.org/@truffle/hdwallet-provider/-/hdwallet-provider-1.0.29.tgz", - "integrity": "sha512-GN/eUINLXHnsUPx3PJvGd6WKnAOXP0MYK/aVhlE7PekYapHjimg0EVo8HrnDSQw6LxYRFiXP3lhyEK6J9witbg==", + "version": "1.0.33", + "resolved": "https://registry.npmjs.org/@truffle/hdwallet-provider/-/hdwallet-provider-1.0.33.tgz", + "integrity": "sha512-hXLZafDyTXH2s6oKnjlrvZhewriHp4NUsYaGOyaihWFpmmUAOqhQSy3vVWD7QzloNCwZZIlQZlOYudPOEyFJOw==", "dev": true, "requires": { "any-promise": "^1.3.0", @@ -421,72 +527,11 @@ "ethereumjs-tx": "^1.0.0", "ethereumjs-util": "^6.1.0", "ethereumjs-wallet": "^0.6.3", + "source-map-support": "^0.5.16", "web3": "1.2.1", "web3-provider-engine": "git+https://github.com/trufflesuite/provider-engine.git#web3-one" }, "dependencies": { - "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - }, - "dependencies": { - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "^0.1.3", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" - } - } - } - }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "dev": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } - }, - "semver": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", - "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", - "dev": true - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, "web3": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.1.tgz", @@ -501,263 +546,6 @@ "web3-shh": "1.2.1", "web3-utils": "1.2.1" } - }, - "web3-bzz": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.1.tgz", - "integrity": "sha512-LdOO44TuYbGIPfL4ilkuS89GQovxUpmLz6C1UC7VYVVRILeZS740FVB3j9V4P4FHUk1RenaDfKhcntqgVCHtjw==", - "dev": true, - "requires": { - "got": "9.6.0", - "swarm-js": "0.1.39", - "underscore": "1.9.1" - } - }, - "web3-core": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.1.tgz", - "integrity": "sha512-5ODwIqgl8oIg/0+Ai4jsLxkKFWJYE0uLuE1yUKHNVCL4zL6n3rFjRMpKPokd6id6nJCNgeA64KdWQ4XfpnjdMg==", - "dev": true, - "requires": { - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-core-requestmanager": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-core-helpers": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.1.tgz", - "integrity": "sha512-Gx3sTEajD5r96bJgfuW377PZVFmXIH4TdqDhgGwd2lZQCcMi+DA4TgxJNJGxn0R3aUVzyyE76j4LBrh412mXrw==", - "dev": true, - "requires": { - "underscore": "1.9.1", - "web3-eth-iban": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-core-method": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.1.tgz", - "integrity": "sha512-Ghg2WS23qi6Xj8Od3VCzaImLHseEA7/usvnOItluiIc5cKs00WYWsNy2YRStzU9a2+z8lwQywPYp0nTzR/QXdQ==", - "dev": true, - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.1", - "web3-core-promievent": "1.2.1", - "web3-core-subscriptions": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-core-promievent": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.1.tgz", - "integrity": "sha512-IVUqgpIKoeOYblwpex4Hye6npM0aMR+kU49VP06secPeN0rHMyhGF0ZGveWBrGvf8WDPI7jhqPBFIC6Jf3Q3zw==", - "dev": true, - "requires": { - "any-promise": "1.3.0", - "eventemitter3": "3.1.2" - } - }, - "web3-core-requestmanager": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.1.tgz", - "integrity": "sha512-xfknTC69RfYmLKC+83Jz73IC3/sS2ZLhGtX33D4Q5nQ8yc39ElyAolxr9sJQS8kihOcM6u4J+8gyGMqsLcpIBg==", - "dev": true, - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.1", - "web3-providers-http": "1.2.1", - "web3-providers-ipc": "1.2.1", - "web3-providers-ws": "1.2.1" - } - }, - "web3-core-subscriptions": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.1.tgz", - "integrity": "sha512-nmOwe3NsB8V8UFsY1r+sW6KjdOS68h8nuh7NzlWxBQT/19QSUGiERRTaZXWu5BYvo1EoZRMxCKyCQpSSXLc08g==", - "dev": true, - "requires": { - "eventemitter3": "3.1.2", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.1" - } - }, - "web3-eth": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.1.tgz", - "integrity": "sha512-/2xly4Yry5FW1i+uygPjhfvgUP/MS/Dk+PDqmzp5M88tS86A+j8BzKc23GrlA8sgGs0645cpZK/999LpEF5UdA==", - "dev": true, - "requires": { - "underscore": "1.9.1", - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-core-subscriptions": "1.2.1", - "web3-eth-abi": "1.2.1", - "web3-eth-accounts": "1.2.1", - "web3-eth-contract": "1.2.1", - "web3-eth-ens": "1.2.1", - "web3-eth-iban": "1.2.1", - "web3-eth-personal": "1.2.1", - "web3-net": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-eth-abi": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.1.tgz", - "integrity": "sha512-jI/KhU2a/DQPZXHjo2GW0myEljzfiKOn+h1qxK1+Y9OQfTcBMxrQJyH5AP89O6l6NZ1QvNdq99ThAxBFoy5L+g==", - "dev": true, - "requires": { - "ethers": "4.0.0-beta.3", - "underscore": "1.9.1", - "web3-utils": "1.2.1" - } - }, - "web3-eth-accounts": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.1.tgz", - "integrity": "sha512-26I4qq42STQ8IeKUyur3MdQ1NzrzCqPsmzqpux0j6X/XBD7EjZ+Cs0lhGNkSKH5dI3V8CJasnQ5T1mNKeWB7nQ==", - "dev": true, - "requires": { - "any-promise": "1.3.0", - "crypto-browserify": "3.12.0", - "eth-lib": "0.2.7", - "scryptsy": "2.1.0", - "semver": "6.2.0", - "underscore": "1.9.1", - "uuid": "3.3.2", - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-eth-contract": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz", - "integrity": "sha512-kYFESbQ3boC9bl2rYVghj7O8UKMiuKaiMkxvRH5cEDHil8V7MGEGZNH0slSdoyeftZVlaWSMqkRP/chfnKND0g==", - "dev": true, - "requires": { - "underscore": "1.9.1", - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-core-promievent": "1.2.1", - "web3-core-subscriptions": "1.2.1", - "web3-eth-abi": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-eth-ens": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.1.tgz", - "integrity": "sha512-lhP1kFhqZr2nnbu3CGIFFrAnNxk2veXpOXBY48Tub37RtobDyHijHgrj+xTh+mFiPokyrapVjpFsbGa+Xzye4Q==", - "dev": true, - "requires": { - "eth-ens-namehash": "2.0.8", - "underscore": "1.9.1", - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-promievent": "1.2.1", - "web3-eth-abi": "1.2.1", - "web3-eth-contract": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-eth-iban": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.1.tgz", - "integrity": "sha512-9gkr4QPl1jCU+wkgmZ8EwODVO3ovVj6d6JKMos52ggdT2YCmlfvFVF6wlGLwi0VvNa/p+0BjJzaqxnnG/JewjQ==", - "dev": true, - "requires": { - "bn.js": "4.11.8", - "web3-utils": "1.2.1" - } - }, - "web3-eth-personal": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.1.tgz", - "integrity": "sha512-RNDVSiaSoY4aIp8+Hc7z+X72H7lMb3fmAChuSBADoEc7DsJrY/d0R5qQDK9g9t2BO8oxgLrLNyBP/9ub2Hc6Bg==", - "dev": true, - "requires": { - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-net": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-net": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.1.tgz", - "integrity": "sha512-Yt1Bs7WgnLESPe0rri/ZoPWzSy55ovioaP35w1KZydrNtQ5Yq4WcrAdhBzcOW7vAkIwrsLQsvA+hrOCy7mNauw==", - "dev": true, - "requires": { - "web3-core": "1.2.1", - "web3-core-method": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-providers-http": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.1.tgz", - "integrity": "sha512-BDtVUVolT9b3CAzeGVA/np1hhn7RPUZ6YYGB/sYky+GjeO311Yoq8SRDUSezU92x8yImSC2B+SMReGhd1zL+bQ==", - "dev": true, - "requires": { - "web3-core-helpers": "1.2.1", - "xhr2-cookies": "1.1.0" - } - }, - "web3-providers-ipc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.1.tgz", - "integrity": "sha512-oPEuOCwxVx8L4CPD0TUdnlOUZwGBSRKScCz/Ws2YHdr9Ium+whm+0NLmOZjkjQp5wovQbyBzNa6zJz1noFRvFA==", - "dev": true, - "requires": { - "oboe": "2.1.4", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.1" - } - }, - "web3-providers-ws": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.1.tgz", - "integrity": "sha512-oqsQXzu+ejJACVHy864WwIyw+oB21nw/pI65/sD95Zi98+/HQzFfNcIFneF1NC4bVF3VNX4YHTNq2I2o97LAiA==", - "dev": true, - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.1", - "websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis" - } - }, - "web3-shh": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.1.tgz", - "integrity": "sha512-/3Cl04nza5kuFn25bV3FJWa0s3Vafr5BlT933h26xovQ6HIIz61LmvNQlvX1AhFL+SNJOTcQmK1SM59vcyC8bA==", - "dev": true, - "requires": { - "web3-core": "1.2.1", - "web3-core-method": "1.2.1", - "web3-core-subscriptions": "1.2.1", - "web3-net": "1.2.1" - } - }, - "web3-utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.1.tgz", - "integrity": "sha512-Mrcn3l58L+yCKz3zBryM6JZpNruWuT0OCbag8w+reeNROSGVlXzUQkU+gtAwc9JCZ7tKUyg67+2YUGqUjVcyBA==", - "dev": true, - "requires": { - "bn.js": "4.11.8", - "eth-lib": "0.2.7", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randomhex": "0.1.5", - "underscore": "1.9.1", - "utf8": "3.0.0" - } } } }, @@ -770,9 +558,9 @@ } }, "@types/chai": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.8.tgz", - "integrity": "sha512-U1bQiWbln41Yo6EeHMr+34aUhvrMVyrhn9lYfPSpLTCrZlGxU4Rtn1bocX+0p2Fc/Jkd2FanCEXdw0WNfHHM0w==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.11.tgz", + "integrity": "sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw==", "dev": true }, "@types/chai-spies": { @@ -826,32 +614,39 @@ "dev": true }, "@types/mocha": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.1.tgz", - "integrity": "sha512-L/Nw/2e5KUaprNJoRA33oly+M8X8n0K+FwLTbYqwTcR14wdPWeRkigBLfSFpN/Asf9ENZTMZwLxjtjeYucAA4Q==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz", + "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==", "dev": true }, "@types/node": { - "version": "13.5.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.5.2.tgz", - "integrity": "sha512-Fr6a47c84PRLfd7M7u3/hEknyUdQrrBA6VoPmkze0tcflhU5UnpWEX2kn12ktA/lb+MNHSqFlSiPHIHsaErTPA==" + "version": "13.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.1.tgz", + "integrity": "sha512-E6M6N0blf/jiZx8Q3nb0vNaswQeEyn0XlupO+xN6DtJ6r6IT4nXrTry7zhIfYvFCl3/8Cu6WIysmUBKiqV0bqQ==" }, "@types/node-fetch": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.4.tgz", - "integrity": "sha512-Oz6id++2qAOFuOlE1j0ouk1dzl3mmI1+qINPNBhi9nt/gVOz0G+13Ao6qjhdF0Ys+eOkhu6JnFmt38bR3H0POQ==", + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.5.tgz", + "integrity": "sha512-IWwjsyYjGw+em3xTvWVQi5MgYKbRs0du57klfTaZkv/B24AEQ/p/IopNeqIYNy3EsfHOpg8ieQSDomPcsYMHpA==", "dev": true, "requires": { - "@types/node": "*" + "@types/node": "*", + "form-data": "^3.0.0" } }, + "@types/sinon": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.2.tgz", + "integrity": "sha512-T+m89VdXj/eidZyejvmoP9jivXgBDdkOSBVQjU9kF349NEx10QdPNGxHeZUaj1IlJ32/ewdyXJjnJxyxJroYwg==", + "dev": true + }, "@typescript-eslint/eslint-plugin": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.18.0.tgz", - "integrity": "sha512-kuO8WQjV+RCZvAXVRJfXWiJ8iYEtfHlKgcqqqXg9uUkIolEHuUaMmm8/lcO4xwCOtaw6mY0gStn2Lg4/eUXXYQ==", + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.23.0.tgz", + "integrity": "sha512-8iA4FvRsz8qTjR0L/nK9RcRUN3QtIHQiOm69FzV7WS3SE+7P7DyGGwh3k4UNR2JBbk+Ej2Io+jLAaqKibNhmtw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.18.0", + "@typescript-eslint/experimental-utils": "2.23.0", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -859,32 +654,32 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.18.0.tgz", - "integrity": "sha512-J6MopKPHuJYmQUkANLip7g9I82ZLe1naCbxZZW3O2sIxTiq/9YYoOELEKY7oPg0hJ0V/AQ225h2z0Yp+RRMXhw==", + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.23.0.tgz", + "integrity": "sha512-OswxY59RcXH3NNPmq+4Kis2CYZPurRU6mG5xPcn24CjFyfdVli5mySwZz/g/xDbJXgDsYqNGq7enV0IziWGXVQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.18.0", + "@typescript-eslint/typescript-estree": "2.23.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/parser": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.18.0.tgz", - "integrity": "sha512-SJJPxFMEYEWkM6pGfcnjLU+NJIPo+Ko1QrCBL+i0+zV30ggLD90huEmMMhKLHBpESWy9lVEeWlQibweNQzyc+A==", + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.23.0.tgz", + "integrity": "sha512-k61pn/Nepk43qa1oLMiyqApC6x5eP5ddPz6VUYXCAuXxbmRLqkPYzkFRKl42ltxzB2luvejlVncrEpflgQoSUg==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.18.0", - "@typescript-eslint/typescript-estree": "2.18.0", + "@typescript-eslint/experimental-utils": "2.23.0", + "@typescript-eslint/typescript-estree": "2.23.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.18.0.tgz", - "integrity": "sha512-gVHylf7FDb8VSi2ypFuEL3hOtoC4HkZZ5dOjXvVjoyKdRrvXAOPSzpNRnKMfaUUEiSLP8UF9j9X9EDLxC0lfZg==", + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.23.0.tgz", + "integrity": "sha512-pmf7IlmvXdlEXvE/JWNNJpEvwBV59wtJqA8MLAxMKLXNKVRC3HZBXR/SlZLPWTCcwOSg9IM7GeRSV3SIerGVqw==", "dev": true, "requires": { "debug": "^4.1.1", @@ -920,6 +715,13 @@ "requires": { "scryptsy": "^2.1.0", "semver": "^6.3.0" + }, + "dependencies": { + "scryptsy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", + "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" + } } }, "@web3-js/websocket": { @@ -1141,9 +943,9 @@ } }, "acorn": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", - "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", "dev": true }, "acorn-jsx": { @@ -1153,9 +955,10 @@ "dev": true }, "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", + "dev": true }, "aggregate-error": { "version": "3.0.1", @@ -1259,6 +1062,12 @@ "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" }, + "any-shell-escape": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/any-shell-escape/-/any-shell-escape-0.1.1.tgz", + "integrity": "sha1-1Vq5ciRMcaml4asIefML8RCAaVk=", + "dev": true + }, "anymatch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", @@ -1476,9 +1285,9 @@ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" }, "async-retry": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.3.tgz", - "integrity": "sha512-tfDb02Th6CE6pJUF2gjW5ZVjsgwlucVXOEQMvEX9JgSJMs9gAX+Nz3xRuJBKuUYjTSYORqvDBORdAQ3LU59g7Q==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.1.tgz", + "integrity": "sha512-aiieFW/7h3hY0Bq5d+ktDBejxuwR78vRu9hDUdR8rNhSaQ29VzPL4AoIRG7D/c7tdenwOcKvgPM6tIxB3cB6HA==", "dev": true, "requires": { "retry": "0.12.0" @@ -2303,9 +2112,9 @@ } }, "base-x": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.7.tgz", - "integrity": "sha512-zAKJGuQPihXW22fkrfOclUUZXM2g92z5GzlSMHxhO6r6Qj+Nm0ccaGNBzDZojzwOMkpjAv4J0fOv1U4go+a4iw==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", "dev": true, "requires": { "safe-buffer": "^5.0.1" @@ -2413,48 +2222,54 @@ } }, "boxen": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-3.2.0.tgz", - "integrity": "sha512-cU4J/+NodM3IHdSL2yN8bqYqnmlBTidDR4RC7nJs61ZmtGz8VZzM3HLQX0zY5mrSmPtR3xWwsq2jOUQqFZN8+A==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", "dev": true, "requires": { "ansi-align": "^3.0.0", "camelcase": "^5.3.1", - "chalk": "^2.4.2", + "chalk": "^3.0.0", "cli-boxes": "^2.2.0", - "string-width": "^3.0.0", - "term-size": "^1.2.0", - "type-fest": "^0.3.0", - "widest-line": "^2.0.0" + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" }, "dependencies": { - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" } }, - "type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true } } @@ -2592,9 +2407,9 @@ "dev": true }, "buffer": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", - "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.5.0.tgz", + "integrity": "sha512-9FTEDjLjwoAkEwyMGDjYJQN2gfRgOKBKRfiglhvibGbpeeU/pQn1bJxQqm32OD/AIeEuHxU9roxXxg34Byp/Ww==", "requires": { "base64-js": "^1.0.2", "ieee754": "^1.1.4" @@ -2742,6 +2557,11 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" } } }, @@ -2811,9 +2631,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001023", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001023.tgz", - "integrity": "sha512-C5TDMiYG11EOhVOA62W1p3UsJ2z4DsHtMBQtjzp3ZsUglcQn62WOUgW0y795c7A5uZ+GCEIvzkMatLIlAsbNTA==", + "version": "1.0.30001035", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001035.tgz", + "integrity": "sha512-C1ZxgkuA4/bUEdMbU5WrGY4+UhMFFiXrgNAfxiMIqWgFTWfv/xsZCS2xEHT2LMq7xAZfuAnu6mcqyDl0ZR6wLQ==", "dev": true }, "caseless": { @@ -3231,17 +3051,17 @@ } }, "configstore": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz", - "integrity": "sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", "dev": true, "requires": { - "dot-prop": "^4.1.0", + "dot-prop": "^5.2.0", "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" } }, "console-browserify": { @@ -3401,9 +3221,9 @@ } }, "cross-env": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.0.tgz", - "integrity": "sha512-rV6M9ldNgmwP7bx5u6rZsTbYidzwvrwIYZnT08hSGLcQCcggofgFW+sNe7IhA1SRauPS0QuLbbX+wdNtpqE5CQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.2.tgz", + "integrity": "sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw==", "dev": true, "requires": { "cross-spawn": "^7.0.1" @@ -3510,9 +3330,9 @@ } }, "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true }, "cyclist": { @@ -3570,6 +3390,23 @@ "make-dir": "^1.0.0", "pify": "^2.3.0", "strip-dirs": "^2.0.0" + }, + "dependencies": { + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + } } }, "decompress-response": { @@ -3860,12 +3697,12 @@ "dev": true }, "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", + "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", "dev": true, "requires": { - "is-obj": "^1.0.0" + "is-obj": "^2.0.0" } }, "dotignore": { @@ -3924,9 +3761,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.341", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.341.tgz", - "integrity": "sha512-iezlV55/tan1rvdvt7yg7VHRSkt+sKfzQ16wTDqTbQqtl4+pSUkKPXpQHDvEt0c7gKcUHHwUbffOgXz6bn096g==", + "version": "1.3.376", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.376.tgz", + "integrity": "sha512-cv/PYVz5szeMz192ngilmezyPNFkUjuynuL2vNdiqIrio440nfTDdc0JJU0TS2KHLSVCs9gBbt4CFqM+HcBnjw==", "dev": true }, "elliptic": { @@ -3950,9 +3787,9 @@ "dev": true }, "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", "dev": true }, "encodeurl": { @@ -4083,6 +3920,12 @@ "ext": "^1.1.2" } }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -4480,16 +4323,6 @@ "tape": "^4.6.3" }, "dependencies": { - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - } - }, "ethereumjs-util": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", @@ -4504,18 +4337,6 @@ "safe-buffer": "^5.1.1", "secp256k1": "^3.0.1" } - }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "dev": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } } } }, @@ -4526,13 +4347,6 @@ "requires": { "idna-uts46-hx": "^2.3.1", "js-sha3": "^0.5.7" - }, - "dependencies": { - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" - } } }, "eth-json-rpc-infura": { @@ -4568,16 +4382,6 @@ "tape": "^4.6.3" }, "dependencies": { - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - } - }, "ethereumjs-util": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", @@ -4592,18 +4396,6 @@ "safe-buffer": "^5.1.1", "secp256k1": "^3.0.1" } - }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "dev": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } } } }, @@ -4654,18 +4446,6 @@ "safe-buffer": "^5.1.1", "secp256k1": "^3.0.1" } - }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "dev": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } } } }, @@ -4693,16 +4473,6 @@ "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", "dev": true }, - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - } - }, "ethereumjs-util": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", @@ -4717,18 +4487,6 @@ "safe-buffer": "^5.1.1", "secp256k1": "^3.0.1" } - }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "dev": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } } } }, @@ -4738,6 +4496,13 @@ "integrity": "sha512-dE9CGNzgOOsdh7msZirvv8qjHtnHpvBlKe2647kM8v+yeF71IRso55jpojemvHV+jMjr48irPWxMRaHuOWzAFA==", "requires": { "js-sha3": "^0.8.0" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + } } }, "ethereum-common": { @@ -4786,18 +4551,6 @@ "safe-buffer": "^5.1.1", "secp256k1": "^3.0.1" } - }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "dev": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } } } }, @@ -4820,24 +4573,6 @@ "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==", "dev": true }, - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - }, - "dependencies": { - "ethereum-common": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", - "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", - "dev": true - } - } - }, "ethereumjs-util": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", @@ -4852,18 +4587,6 @@ "safe-buffer": "^5.1.1", "secp256k1": "^3.0.1" } - }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "dev": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } } } }, @@ -4873,12 +4596,30 @@ "integrity": "sha512-SZOjgK1356hIY7MRj3/ma5qtfr/4B5BL+G4rP/XSMYr2z1H5el4RX5GReYCKmQmYI/nSBmRnwrZ17IfHuG0viQ==" }, "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", + "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "dev": true, "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" + "ethereum-common": "^0.0.18", + "ethereumjs-util": "^5.0.0" + }, + "dependencies": { + "ethereumjs-util": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", + "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", + "dev": true, + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "ethjs-util": "^0.1.3", + "keccak": "^1.0.2", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.0.1" + } + } } }, "ethereumjs-util": { @@ -4893,6 +4634,19 @@ "keccak": "^2.0.0", "rlp": "^2.2.3", "secp256k1": "^3.0.1" + }, + "dependencies": { + "keccak": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", + "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", + "requires": { + "bindings": "^1.5.0", + "inherits": "^2.0.4", + "nan": "^2.14.0", + "safe-buffer": "^5.2.0" + } + } } }, "ethereumjs-vm": { @@ -4944,16 +4698,14 @@ } } }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", + "ethereumjs-tx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", + "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", "dev": true, "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.0.0" } } } @@ -4975,10 +4727,10 @@ "uuid": "^3.3.2" }, "dependencies": { - "aes-js": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true } } @@ -5001,9 +4753,14 @@ }, "dependencies": { "@types/node": { - "version": "10.17.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.14.tgz", - "integrity": "sha512-G0UmX5uKEmW+ZAhmZ6PLTQ5eu/VPaT+d/tdLd5IFsKRPcbe6lPxocBtcYBFSaLaCW8O60AX90e91Nsp8lVHCNw==" + "version": "10.17.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.17.tgz", + "integrity": "sha512-gpNnRnZP3VWzzj5k3qrpRC6Rk3H/uclhAVo1aIvwzK5p5cOrs9yEyQ8H/HBsBY0u5rrWxXEiVPQ0dEB6pkjE8Q==" + }, + "aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" }, "elliptic": { "version": "6.3.3", @@ -5025,11 +4782,6 @@ "minimalistic-assert": "^1.0.0" } }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" - }, "setimmediate": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", @@ -5373,16 +5125,17 @@ "dev": true }, "fast-glob": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.1.1.tgz", - "integrity": "sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.2.tgz", + "integrity": "sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.0", "merge2": "^1.3.0", - "micromatch": "^4.0.2" + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" } }, "fast-json-stable-stringify": { @@ -5397,12 +5150,12 @@ "dev": true }, "fastq": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.6.0.tgz", - "integrity": "sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.6.1.tgz", + "integrity": "sha512-mpIH5sKYueh3YyeJwqtVo8sORi0CgtmkVbK6kZStpQlZBYQuTzG2CZ7idSiJuA7bY0SFCWUc5WIs+oYumGCQNw==", "dev": true, "requires": { - "reusify": "^1.0.0" + "reusify": "^1.0.4" } }, "fd-slicer": { @@ -5794,12 +5547,13 @@ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", + "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "dev": true, "requires": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", + "combined-stream": "^1.0.8", "mime-types": "^2.1.12" } }, @@ -6045,12 +5799,12 @@ } }, "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", + "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", "dev": true, "requires": { - "ini": "^1.3.4" + "ini": "^1.3.5" } }, "global-modules": { @@ -6095,9 +5849,9 @@ "dev": true }, "globby": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.1.tgz", - "integrity": "sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", "dev": true, "requires": { "@types/glob": "^7.1.1", @@ -6355,9 +6109,9 @@ "dev": true }, "highlight.js": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.0.tgz", - "integrity": "sha512-A97kI1KAUzKoAiEoaGcf2O9YPS8nbDTCRFokaaeBhnqjQTvbAuAJrQMm21zw8s8xzaMtCQBtgbyGXLGxdxQyqQ==", + "version": "9.18.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz", + "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==", "dev": true }, "hmac-drbg": { @@ -6402,9 +6156,9 @@ "dev": true }, "http-cache-semantics": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz", - "integrity": "sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" }, "http-errors": { "version": "1.7.2", @@ -6671,9 +6425,9 @@ "dev": true }, "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" }, "is-absolute": { "version": "1.0.0", @@ -6790,13 +6544,10 @@ "dev": true }, "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true }, "is-fn": { "version": "1.0.0", @@ -6830,13 +6581,13 @@ "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" }, "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.1.tgz", + "integrity": "sha512-oiEcGoQbGc+3/iijAijrK2qFpkNoNjsHOm/5V5iaeydyrS/hnwaRCEgH5cpW0P3T1lSjV5piB7S5b5lEugNLhg==", "dev": true, "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" } }, "is-interactive": { @@ -6857,9 +6608,9 @@ "dev": true }, "is-npm": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-3.0.0.tgz", - "integrity": "sha512-wsigDr1Kkschp2opC4G3yA6r9EgVA6NjRpWzIi9axXqeIaAATPRJc4uLujXe3Nd9uO8KoDyA4MD6aZSeXTADhA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", "dev": true }, "is-number": { @@ -6869,9 +6620,9 @@ "dev": true }, "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true }, "is-object": { @@ -6880,13 +6631,10 @@ "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" }, "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", + "dev": true }, "is-plain-obj": { "version": "1.1.0", @@ -7127,6 +6875,12 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -7220,9 +6974,9 @@ "dev": true }, "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" }, "js-tokens": { "version": "3.0.2", @@ -7362,15 +7116,22 @@ "object.assign": "^4.1.0" } }, + "just-extend": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", + "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", + "dev": true + }, "keccak": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", - "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", + "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", + "dev": true, "requires": { - "bindings": "^1.5.0", - "inherits": "^2.0.4", - "nan": "^2.14.0", - "safe-buffer": "^5.2.0" + "bindings": "^1.2.1", + "inherits": "^2.0.3", + "nan": "^2.2.1", + "safe-buffer": "^5.1.0" } }, "keyv": { @@ -7601,13 +7362,13 @@ "dev": true }, "loader-utils": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", - "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", "dev": true, "requires": { "big.js": "^5.2.2", - "emojis-list": "^2.0.0", + "emojis-list": "^3.0.0", "json5": "^1.0.1" }, "dependencies": { @@ -7621,9 +7382,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } } @@ -7713,24 +7474,6 @@ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - }, - "dependencies": { - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, "ltgt": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", @@ -7750,18 +7493,12 @@ "dev": true }, "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", + "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", + "dev": true, "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } + "semver": "^6.0.0" } }, "make-error": { @@ -7920,18 +7657,6 @@ "safe-buffer": "^5.1.1", "secp256k1": "^3.0.1" } - }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "dev": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } } } }, @@ -8108,9 +7833,9 @@ } }, "mocha": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.0.1.tgz", - "integrity": "sha512-9eWmWTdHLXh72rGrdZjNbG3aa1/3NRPpul1z0D979QpEnFdCG0Q5tv834N+94QEN2cysfV72YocQ3fn87s70fg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.0.tgz", + "integrity": "sha512-MymHK8UkU0K15Q/zX7uflZgVoRWiTjy0fXE/QjKts6mowUvGxOdPhZ2qj3b0iZdUrNZlW9LAIMFHB4IW+2b3EQ==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -8124,7 +7849,7 @@ "growl": "1.10.5", "he": "1.2.0", "js-yaml": "3.13.1", - "log-symbols": "2.2.0", + "log-symbols": "3.0.0", "minimatch": "3.0.4", "mkdirp": "0.5.1", "ms": "2.1.1", @@ -8181,15 +7906,6 @@ "path-exists": "^3.0.0" } }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", @@ -8233,9 +7949,9 @@ } }, "mock-fs": { - "version": "4.10.4", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.10.4.tgz", - "integrity": "sha512-gDfZDLaPIvtOusbusLinfx6YSe2YpQsDT8qdP41P47dQ/NQggtkHukz7hwqgt8QvMBmAv+Z6DGmXPyb5BWX2nQ==" + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.11.0.tgz", + "integrity": "sha512-Yp4o3/ZA15wsXqJTT+R+9w2AYIkD1i80Lds47wDbuUhOvQvm+O2EfjFZSz0pMgZZSPHRhGxgcd2+GL4+jZMtdw==" }, "mock-local-storage": { "version": "1.1.11", @@ -8355,6 +8071,36 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "nise": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.3.tgz", + "integrity": "sha512-EGlhjm7/4KvmmE6B/UFsKh7eHykRl9VH+au8dduHLCyWUO/hr7+N+WtTvDUwc9zHuM1IaIJs/0lQ6Ag1jDkQSg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + } + } + } + }, "node-environment-flags": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", @@ -8473,9 +8219,10 @@ } }, "normalize-url": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", + "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", + "dev": true }, "now-and-later": { "version": "2.0.1", @@ -8495,12 +8242,6 @@ "path-key": "^2.0.0" } }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, "number-to-bn": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", @@ -8622,6 +8363,12 @@ "ansi-regex": "^5.0.0" } }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -9212,14 +8959,6 @@ "normalize-url": "^3.3.0", "parse-path": "^4.0.0", "protocols": "^1.4.0" - }, - "dependencies": { - "normalize-url": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", - "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", - "dev": true - } } }, "parseurl": { @@ -9257,12 +8996,6 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", @@ -9501,12 +9234,12 @@ "dev": true }, "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", "requires": { "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" + "ipaddr.js": "1.9.1" } }, "prr": { @@ -9515,12 +9248,6 @@ "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", "dev": true }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, "psl": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz", @@ -9576,6 +9303,15 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "pupa": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz", + "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -9655,9 +9391,9 @@ }, "dependencies": { "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } } @@ -9884,41 +9620,77 @@ } }, "release-it": { - "version": "12.4.3", - "resolved": "https://registry.npmjs.org/release-it/-/release-it-12.4.3.tgz", - "integrity": "sha512-nQMzrAhlNg7LM7c9+4QkDtwzU/cOZeWmqsevzkp/FILSGIu3wjmQ63iSeBuZi1gpscjvJJy8/cCxhnHKczy1RQ==", + "version": "12.6.3", + "resolved": "https://registry.npmjs.org/release-it/-/release-it-12.6.3.tgz", + "integrity": "sha512-F1ObTKC/ug1RJpLE/vyxQWwAdfJ7fwsmOcOefo8PGCc7YzqPUOkS2P8+UYr01yt5v4SHliL0Ekg+FU2fzEFIBg==", "dev": true, "requires": { "@iarna/toml": "2.2.3", - "@octokit/rest": "16.33.0", - "async-retry": "1.2.3", - "chalk": "2.4.2", + "@octokit/rest": "16.43.1", + "any-shell-escape": "0.1.1", + "async-retry": "1.3.1", + "chalk": "3.0.0", "cosmiconfig": "5.2.1", "debug": "4.1.1", "deprecated-obj": "1.0.1", "detect-repo-changelog": "1.0.1", "find-up": "4.1.0", - "form-data": "2.5.1", + "form-data": "3.0.0", "git-url-parse": "11.1.2", - "globby": "10.0.1", + "globby": "10.0.2", "got": "9.6.0", "import-cwd": "3.0.0", - "inquirer": "7.0.0", + "inquirer": "7.0.4", "is-ci": "2.0.0", "lodash": "4.17.15", - "mime-types": "2.1.24", - "ora": "4.0.2", + "mime-types": "2.1.26", + "ora": "4.0.3", "os-name": "3.1.0", - "semver": "6.3.0", + "semver": "7.1.3", "shelljs": "0.8.3", "supports-color": "7.1.0", - "update-notifier": "3.0.1", + "update-notifier": "4.1.0", "url-join": "4.0.1", - "uuid": "3.3.3", + "uuid": "7.0.1", "window-size": "1.1.1", - "yargs-parser": "15.0.0" + "yargs-parser": "17.0.0" }, "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -9928,30 +9700,71 @@ "ms": "^2.1.1" } }, - "form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "inquirer": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.4.tgz", + "integrity": "sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==", "dev": true, "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", - "dev": true - }, - "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", - "dev": true, - "requires": { - "mime-db": "1.40.0" + "ansi-escapes": "^4.2.1", + "chalk": "^2.4.2", + "cli-cursor": "^3.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", + "run-async": "^2.2.0", + "rxjs": "^6.5.3", + "string-width": "^4.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "ms": { @@ -9960,25 +9773,16 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "ora": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/ora/-/ora-4.0.2.tgz", - "integrity": "sha512-YUOZbamht5mfLxPmk4M35CD/5DuOkAacxlEUbStVXpBAt4fyhBf+vZHI/HRkI++QUp3sNoeA2Gw4C+hi4eGSig==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.2.0", - "is-interactive": "^1.0.0", - "log-symbols": "^3.0.0", - "strip-ansi": "^5.2.0", - "wcwidth": "^1.0.1" - } + "semver": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.1.3.tgz", + "integrity": "sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA==", + "dev": true }, "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.1.tgz", + "integrity": "sha512-yqjRXZzSJm9Dbl84H2VDHpM3zMjzSJQ+hn6C4zqd5ilW+7P4ZmLEEqwho9LjP+tGuZlF4xrHQXT0h9QZUS/pWA==", "dev": true } } @@ -10055,9 +9859,9 @@ "dev": true }, "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -10066,7 +9870,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -10076,15 +9880,30 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" }, "dependencies": { + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" } } }, @@ -10347,23 +10166,16 @@ "requires": { "scrypt": "^6.0.2", "scryptsy": "^1.2.1" - }, - "dependencies": { - "scryptsy": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz", - "integrity": "sha1-oyJfpLJST4AnAHYeKFW987LZIWM=", - "dev": true, - "requires": { - "pbkdf2": "^3.0.3" - } - } } }, "scryptsy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", - "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz", + "integrity": "sha1-oyJfpLJST4AnAHYeKFW987LZIWM=", + "dev": true, + "requires": { + "pbkdf2": "^3.0.3" + } }, "secp256k1": { "version": "3.8.0", @@ -10400,20 +10212,12 @@ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" }, "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", "dev": true, "requires": { - "semver": "^5.0.3" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } + "semver": "^6.3.0" } }, "send": { @@ -10593,6 +10397,29 @@ "resolved": "https://registry.npmjs.org/simple-mime/-/simple-mime-0.1.0.tgz", "integrity": "sha1-lfUXxPRm18/1YacfydqyWW6p7y4=" }, + "sinon": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.1.tgz", + "integrity": "sha512-iTTyiQo5T94jrOx7X7QLBZyucUJ2WvL9J13+96HMfm2CGoJYbIPqRfl6wgNcqmzk0DI28jeGx5bUTXizkrqBmg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/formatio": "^5.0.1", + "@sinonjs/samsam": "^5.0.3", + "diff": "^4.0.2", + "nise": "^4.0.1", + "supports-color": "^7.1.0" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + } + } + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -11313,9 +11140,9 @@ "dev": true }, "tape": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/tape/-/tape-4.13.0.tgz", - "integrity": "sha512-J/hvA+GJnuWJ0Sj8Z0dmu3JgMNU+MmusvkCT7+SN4/2TklW18FNCp/UuHIEhPZwHfy4sXfKYgC7kypKg4umbOw==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/tape/-/tape-4.13.2.tgz", + "integrity": "sha512-waWwC/OqYVE9TS6r1IynlP2sEdk4Lfo6jazlgkuNkPTHIbuG2BTABIaKdlQWwPeB6Oo4ksZ1j33Yt0NTOAlYMQ==", "dev": true, "requires": { "deep-equal": "~1.1.1", @@ -11329,22 +11156,22 @@ "is-regex": "~1.0.5", "minimist": "~1.2.0", "object-inspect": "~1.7.0", - "resolve": "~1.14.2", + "resolve": "~1.15.1", "resumer": "~0.0.0", "string.prototype.trim": "~1.2.1", "through": "~2.3.8" }, "dependencies": { "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "resolve": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz", - "integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -11381,52 +11208,15 @@ } }, "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "^0.7.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - } - } + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz", + "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==", + "dev": true }, "terser": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.3.tgz", - "integrity": "sha512-Lw+ieAXmY69d09IIc/yqeBqXpEQIpDGZqT34ui1QWXIUpR2RjbqEkT8X7Lgex19hslSqcWM5iMN2kM11eMsESQ==", + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.6.tgz", + "integrity": "sha512-4lYPyeNmstjIIESr/ysHg2vUPRGf2tzF9z2yYwnowXVuVzLEamPN1Gfrz7f8I9uEPuHcbFlW4PLIAsJoxXyJ1g==", "dev": true, "requires": { "commander": "^2.20.0", @@ -11749,19 +11539,12 @@ "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - } + "psl": "^1.1.28", + "punycode": "^2.1.1" } }, "tr46": { @@ -11883,22 +11666,20 @@ } }, "typedoc": { - "version": "0.16.9", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.16.9.tgz", - "integrity": "sha512-UvOGoy76yqwCXwxPgatwgXWfsQ3FczyZ6ZNLjhCPK+TsDir6LiU3YB6N9XZmPv36E+7LA860mnc8a0v6YADKFw==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.17.1.tgz", + "integrity": "sha512-1AckBdQNvBm0jgR7eko9t3FMPfjoxiKEpQx8ePCsyfTQDPwLVpFIFzn5pXA+smDGTWf2BT7FQrKU6BDzSdgMng==", "dev": true, "requires": { - "@types/minimatch": "3.0.3", "fs-extra": "^8.1.0", - "handlebars": "^4.7.2", - "highlight.js": "^9.17.1", + "handlebars": "^4.7.3", + "highlight.js": "^9.18.1", "lodash": "^4.17.15", "marked": "^0.8.0", "minimatch": "^3.0.0", "progress": "^2.0.3", "shelljs": "^0.8.3", - "typedoc-default-themes": "^0.7.2", - "typescript": "3.7.x" + "typedoc-default-themes": "^0.8.0" }, "dependencies": { "fs-extra": { @@ -11911,25 +11692,51 @@ "jsonfile": "^4.0.0", "universalify": "^0.1.0" } + }, + "handlebars": { + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.3.tgz", + "integrity": "sha512-SRGwSYuNfx8DwHD/6InAPzD6RgeruWLT+B8e8a7gGs8FWgHzlExpTFMEq2IA6QpAfOClpKHy6+8IqTjeBCu6Kg==", + "dev": true, + "requires": { + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, "typedoc-default-themes": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz", - "integrity": "sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.8.0.tgz", + "integrity": "sha512-0bzAjVEX6ClhE3jLRdU7vR8Fsfbt4ZcPa+gkqyAVgTlQ1fLo/7AkCbTP+hC5XAiByDfRfsAGqj9y6FNjJh0p4A==", "dev": true, "requires": { "backbone": "^1.4.0", "jquery": "^3.4.1", "lunr": "^2.3.8", - "underscore": "^1.9.1" + "underscore": "^1.9.2" + }, + "dependencies": { + "underscore": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.2.tgz", + "integrity": "sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ==", + "dev": true + } } }, "typescript": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", - "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", + "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", "dev": true }, "uglify-js": { @@ -12123,18 +11930,18 @@ } }, "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", "dev": true, "requires": { - "crypto-random-string": "^1.0.0" + "crypto-random-string": "^2.0.0" } }, "universal-user-agent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz", - "integrity": "sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.1.tgz", + "integrity": "sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg==", "dev": true, "requires": { "os-name": "^3.1.0" @@ -12209,23 +12016,61 @@ "dev": true }, "update-notifier": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-3.0.1.tgz", - "integrity": "sha512-grrmrB6Zb8DUiyDIaeRTBCkgISYUgETNe7NglEbVsrLWXeESnlCSP50WfRSj/GmzMPl6Uchj24S/p80nP/ZQrQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz", + "integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==", "dev": true, "requires": { - "boxen": "^3.0.0", - "chalk": "^2.0.1", - "configstore": "^4.0.0", + "boxen": "^4.2.0", + "chalk": "^3.0.0", + "configstore": "^5.0.1", "has-yarn": "^2.1.0", "import-lazy": "^2.1.0", "is-ci": "^2.0.0", - "is-installed-globally": "^0.1.0", - "is-npm": "^3.0.0", + "is-installed-globally": "^0.3.1", + "is-npm": "^4.0.0", "is-yarn-global": "^0.3.0", "latest-version": "^5.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" + "pupa": "^2.0.1", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } } }, "uri-js": { @@ -12323,9 +12168,9 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.2.tgz", + "integrity": "sha512-vy9V/+pKG+5ZTYKf+VcphF5Oc6EFiu3W8Nv3P3zIh0EqVI80ZxOzuPfe9EHjkFNvf8+xuTHVeei4Drydlx4zjw==" }, "v8-compile-cache": { "version": "2.1.0", @@ -13232,252 +13077,541 @@ } }, "web3": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.5.tgz", - "integrity": "sha512-diHCkn3x2wCG8xl4funRihWw0oJP6xRchU8ke5S8hxnSdDjtieg0L2zzW1xPnEt5FWEHUPdzBdkH3kiPkD/OYg==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.6.tgz", + "integrity": "sha512-tpu9fLIComgxGrFsD8LUtA4s4aCZk7px8UfcdEy6kS2uDi/ZfR07KJqpXZMij7Jvlq+cQrTAhsPSiBVvoMaivA==", "requires": { "@types/node": "^12.6.1", - "web3-bzz": "1.2.5", - "web3-core": "1.2.5", - "web3-eth": "1.2.5", - "web3-eth-personal": "1.2.5", - "web3-net": "1.2.5", - "web3-shh": "1.2.5", - "web3-utils": "1.2.5" + "web3-bzz": "1.2.6", + "web3-core": "1.2.6", + "web3-eth": "1.2.6", + "web3-eth-personal": "1.2.6", + "web3-net": "1.2.6", + "web3-shh": "1.2.6", + "web3-utils": "1.2.6" }, "dependencies": { "@types/node": { - "version": "12.12.26", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.26.tgz", - "integrity": "sha512-UmUm94/QZvU5xLcUlNR8hA7Ac+fGpO1EG/a8bcWVz0P0LqtxFmun9Y2bbtuckwGboWJIT70DoWq1r3hb56n3DA==" - } - } - }, - "web3-bzz": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.5.tgz", - "integrity": "sha512-PuC56cp6qe3P4/zrwhot9bxuxp53l79OpHd8xmcpULPaDBlINrC/om2GHfe2DfFyZWB2Tcn1mp1obhY+a/4B6w==", - "requires": { - "@types/node": "^10.12.18", - "got": "9.6.0", - "swarm-js": "0.1.39", - "underscore": "1.9.1" - }, - "dependencies": { - "@types/node": { - "version": "10.17.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.14.tgz", - "integrity": "sha512-G0UmX5uKEmW+ZAhmZ6PLTQ5eu/VPaT+d/tdLd5IFsKRPcbe6lPxocBtcYBFSaLaCW8O60AX90e91Nsp8lVHCNw==" - } - } - }, - "web3-core": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.5.tgz", - "integrity": "sha512-86/GlTVlbVWasBidn4dYU9Nmjgj1HtbTxKYB9uu8VfiVKZZziuan3znjk4vS7WqwEJKYF7U/uMaOUg//kekhxg==", - "requires": { - "@types/bn.js": "^4.11.4", - "@types/node": "^12.6.1", - "web3-core-helpers": "1.2.5", - "web3-core-method": "1.2.5", - "web3-core-requestmanager": "1.2.5", - "web3-utils": "1.2.5" - }, - "dependencies": { - "@types/node": { - "version": "12.12.26", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.26.tgz", - "integrity": "sha512-UmUm94/QZvU5xLcUlNR8hA7Ac+fGpO1EG/a8bcWVz0P0LqtxFmun9Y2bbtuckwGboWJIT70DoWq1r3hb56n3DA==" - } - } - }, - "web3-core-helpers": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.5.tgz", - "integrity": "sha512-lC11Zgud+epxqcjLocx7PXGkEUhymXFrQDxAAVAu5V1GrIpvX6RBDR30QKVkZ3kuhq0PRMPeIb5wbLBEpji2qw==", - "requires": { - "underscore": "1.9.1", - "web3-eth-iban": "1.2.5", - "web3-utils": "1.2.5" - } - }, - "web3-core-method": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.5.tgz", - "integrity": "sha512-hipYsQ+MitW9Vn7tA4/rJLjGg4LhnyN/ecCykGkucOoJcobjollV3pUkRExgyVeJLtyS+qlhuyOzwfAQpvIfvg==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.5", - "web3-core-promievent": "1.2.5", - "web3-core-subscriptions": "1.2.5", - "web3-utils": "1.2.5" - } - }, - "web3-core-promievent": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.5.tgz", - "integrity": "sha512-IlrmWl3piOCPJC9IiP1Z1BC9Be4GiNTKw9MfgWL1ZnyQ+GSFHwW2TjDlZbV4IaoCr4K/RvHpxUxd/txrPLI8QQ==", - "requires": { - "any-promise": "1.3.0", - "eventemitter3": "3.1.2" - } - }, - "web3-core-requestmanager": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.5.tgz", - "integrity": "sha512-DmVKuQjjt2Os7YEJ9TKAptCReH4g1nMvPrNS8VvsWRcVHBV0/iN1owv31/t+FA+2hJgN/zQ/gEJ0AikhDk9D0A==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.5", - "web3-providers-http": "1.2.5", - "web3-providers-ipc": "1.2.5", - "web3-providers-ws": "1.2.5" - } - }, - "web3-core-subscriptions": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.5.tgz", - "integrity": "sha512-JQiOgQHqX0Nn8XSyUhLPtO7tfSmDpAZhClkr6bmcwpv7oeLplMWgXIDBiLG4JtrgkxCBzbFEWqBpicHejJ/Vaw==", - "requires": { - "eventemitter3": "3.1.2", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.5" - } - }, - "web3-eth": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.5.tgz", - "integrity": "sha512-39BBB/K3v5E7H8A3ZW9XDaIHPozaQjA/CibXKGxFgoufnUgprU/3RsVH9L6ja1yxQOk6fr4OydfY8bpgXxYxjw==", - "requires": { - "underscore": "1.9.1", - "web3-core": "1.2.5", - "web3-core-helpers": "1.2.5", - "web3-core-method": "1.2.5", - "web3-core-subscriptions": "1.2.5", - "web3-eth-abi": "1.2.5", - "web3-eth-accounts": "1.2.5", - "web3-eth-contract": "1.2.5", - "web3-eth-ens": "1.2.5", - "web3-eth-iban": "1.2.5", - "web3-eth-personal": "1.2.5", - "web3-net": "1.2.5", - "web3-utils": "1.2.5" - } - }, - "web3-eth-abi": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.5.tgz", - "integrity": "sha512-Tz6AjGTlgZVpv01h2YgotoXoQAQgWacx82Zh72ZlZ4iBCs4SoiYvq6tfbW9pquylK2Egm23bELsrSSENz0204w==", - "requires": { - "ethers": "4.0.0-beta.3", - "underscore": "1.9.1", - "web3-utils": "1.2.5" - } - }, - "web3-eth-accounts": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.5.tgz", - "integrity": "sha512-k06CblUZq15zJMwsmr/EO4YJ+P8h2U4/DqZPdOmFTM19v/7l3EFw+mosx8MpPMHf5P8f/QMnHJpGTUOD1hMN7g==", - "requires": { - "@web3-js/scrypt-shim": "^0.1.0", - "any-promise": "1.3.0", - "crypto-browserify": "3.12.0", - "eth-lib": "^0.2.8", - "ethereumjs-common": "^1.3.2", - "ethereumjs-tx": "^2.1.1", - "underscore": "1.9.1", - "uuid": "3.3.2", - "web3-core": "1.2.5", - "web3-core-helpers": "1.2.5", - "web3-core-method": "1.2.5", - "web3-utils": "1.2.5" - }, - "dependencies": { + "version": "12.12.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.30.tgz", + "integrity": "sha512-sz9MF/zk6qVr3pAnM0BSQvYIBK44tS75QC5N+VbWSE4DjCV/pJ+UzCW/F+vVnl7TkOPcuwQureKNtSSwjBTaMg==" + }, "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", "requires": { "bn.js": "^4.11.6", "elliptic": "^6.4.0", "xhr-request-promise": "^0.1.2" } }, + "ethereumjs-tx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", + "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "requires": { + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.0.0" + } + }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "web3-bzz": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.6.tgz", + "integrity": "sha512-9NiHLlxdI1XeFtbPJAmi2jnnIHVF+GNy517wvOS72P7ZfuJTPwZaSNXfT01vWgPPE9R96/uAHDWHOg+T4WaDQQ==", + "requires": { + "@types/node": "^10.12.18", + "got": "9.6.0", + "swarm-js": "0.1.39", + "underscore": "1.9.1" + }, + "dependencies": { + "@types/node": { + "version": "10.17.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.17.tgz", + "integrity": "sha512-gpNnRnZP3VWzzj5k3qrpRC6Rk3H/uclhAVo1aIvwzK5p5cOrs9yEyQ8H/HBsBY0u5rrWxXEiVPQ0dEB6pkjE8Q==" + } + } + }, + "web3-core": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.6.tgz", + "integrity": "sha512-y/QNBFtr5cIR8vxebnotbjWJpOnO8LDYEAzZjeRRUJh2ijmhjoYk7dSNx9ExgC0UCfNFRoNCa9dGRu/GAxwRlw==", + "requires": { + "@types/bn.js": "^4.11.4", + "@types/node": "^12.6.1", + "web3-core-helpers": "1.2.6", + "web3-core-method": "1.2.6", + "web3-core-requestmanager": "1.2.6", + "web3-utils": "1.2.6" + } + }, + "web3-core-helpers": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.6.tgz", + "integrity": "sha512-gYKWmC2HmO7RcDzpo4L1K8EIoy5L8iubNDuTC6q69UxczwqKF/Io0kbK/1Z10Av++NlzOSiuyGp2gc4t4UOsDw==", + "requires": { + "underscore": "1.9.1", + "web3-eth-iban": "1.2.6", + "web3-utils": "1.2.6" + } + }, + "web3-core-method": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.6.tgz", + "integrity": "sha512-r2dzyPEonqkBg7Mugq5dknhV5PGaZTHBZlS/C+aMxNyQs3T3eaAsCTqlQDitwNUh/sUcYPEGF0Vo7ahYK4k91g==", + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.6", + "web3-core-promievent": "1.2.6", + "web3-core-subscriptions": "1.2.6", + "web3-utils": "1.2.6" + } + }, + "web3-core-promievent": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.6.tgz", + "integrity": "sha512-km72kJef/qtQNiSjDJJVHIZvoVOm6ytW3FCYnOcCs7RIkviAb5JYlPiye0o4pJOLzCXYID7DK7Q9bhY8qWb1lw==", + "requires": { + "any-promise": "1.3.0", + "eventemitter3": "3.1.2" + } + }, + "web3-core-requestmanager": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.6.tgz", + "integrity": "sha512-QU2cbsj9Dm0r6om40oSwk8Oqbp3wTa08tXuMpSmeOTkGZ3EMHJ1/4LiJ8shwg1AvPMrKVU0Nri6+uBNCdReZ+g==", + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.6", + "web3-providers-http": "1.2.6", + "web3-providers-ipc": "1.2.6", + "web3-providers-ws": "1.2.6" + } + }, + "web3-core-subscriptions": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.6.tgz", + "integrity": "sha512-M0PzRrP2Ct13x3wPulFtc5kENH4UtnPxO9YxkfQlX2WRKENWjt4Rfq+BCVGYEk3rTutDfWrjfzjmqMRvXqEY5Q==", + "requires": { + "eventemitter3": "3.1.2", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.6" + } + }, + "web3-eth": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.6.tgz", + "integrity": "sha512-ROWlDPzh4QX6tlGGGlAK6X4kA2n0/cNj/4kb0nNVWkRouGmYO0R8k6s47YxYHvGiXt0s0++FUUv5vAbWovtUQw==", + "requires": { + "underscore": "1.9.1", + "web3-core": "1.2.6", + "web3-core-helpers": "1.2.6", + "web3-core-method": "1.2.6", + "web3-core-subscriptions": "1.2.6", + "web3-eth-abi": "1.2.6", + "web3-eth-accounts": "1.2.6", + "web3-eth-contract": "1.2.6", + "web3-eth-ens": "1.2.6", + "web3-eth-iban": "1.2.6", + "web3-eth-personal": "1.2.6", + "web3-net": "1.2.6", + "web3-utils": "1.2.6" + } + }, + "web3-eth-abi": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.6.tgz", + "integrity": "sha512-w9GAyyikn8nSifSDZxAvU9fxtQSX+W2xQWMmrtTXmBGCaE4/ywKOSPAO78gq8AoU4Wq5yqVGKZLLbfpt7/sHlA==", + "requires": { + "ethers": "4.0.0-beta.3", + "underscore": "1.9.1", + "web3-utils": "1.2.6" + } + }, + "web3-eth-accounts": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.6.tgz", + "integrity": "sha512-cDVtonHRgzqi/ZHOOf8kfCQWFEipcfQNAMzXIaKZwc0UUD9mgSI5oJrN45a89Ze+E6Lz9m77cDG5Ax9zscSkcw==", + "requires": { + "@web3-js/scrypt-shim": "^0.1.0", + "any-promise": "1.3.0", + "crypto-browserify": "3.12.0", + "eth-lib": "^0.2.8", + "ethereumjs-common": "^1.3.2", + "ethereumjs-tx": "^2.1.1", + "underscore": "1.9.1", + "uuid": "3.3.2", + "web3-core": "1.2.6", + "web3-core-helpers": "1.2.6", + "web3-core-method": "1.2.6", + "web3-utils": "1.2.6" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + } + } + }, + "web3-eth-contract": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.6.tgz", + "integrity": "sha512-ak4xbHIhWgsbdPCkSN+HnQc1SH4c856y7Ly+S57J/DQVzhFZemK5HvWdpwadJrQTcHET3ZeId1vq3kmW7UYodw==", + "requires": { + "@types/bn.js": "^4.11.4", + "underscore": "1.9.1", + "web3-core": "1.2.6", + "web3-core-helpers": "1.2.6", + "web3-core-method": "1.2.6", + "web3-core-promievent": "1.2.6", + "web3-core-subscriptions": "1.2.6", + "web3-eth-abi": "1.2.6", + "web3-utils": "1.2.6" + } + }, + "web3-eth-ens": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.6.tgz", + "integrity": "sha512-8UEqt6fqR/dji/jBGPFAyBs16OJjwi0t2dPWXPyGXmty/fH+osnXwWXE4HRUyj4xuafiM5P1YkXMsPhKEadjiw==", + "requires": { + "eth-ens-namehash": "2.0.8", + "underscore": "1.9.1", + "web3-core": "1.2.6", + "web3-core-helpers": "1.2.6", + "web3-core-promievent": "1.2.6", + "web3-eth-abi": "1.2.6", + "web3-eth-contract": "1.2.6", + "web3-utils": "1.2.6" + } + }, + "web3-eth-iban": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.6.tgz", + "integrity": "sha512-TPMc3BW9Iso7H+9w+ytbqHK9wgOmtocyCD3PaAe5Eie50KQ/j7ThA60dGJnxItVo6yyRv5pZAYxPVob9x/fJlg==", + "requires": { + "bn.js": "4.11.8", + "web3-utils": "1.2.6" + } + }, + "web3-eth-personal": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.6.tgz", + "integrity": "sha512-T2NUkh1plY8d7wePXSoHnaiKOd8dLNFaQfgBl9JHU6S7IJrG9jnYD9bVxLEgRUfHs9gKf9tQpDf7AcPFdq/A8g==", + "requires": { + "@types/node": "^12.6.1", + "web3-core": "1.2.6", + "web3-core-helpers": "1.2.6", + "web3-core-method": "1.2.6", + "web3-net": "1.2.6", + "web3-utils": "1.2.6" + } + }, + "web3-net": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.6.tgz", + "integrity": "sha512-hsNHAPddrhgjWLmbESW0KxJi2GnthPcow0Sqpnf4oB6+/+ZnQHU9OsIyHb83bnC1OmunrK2vf9Ye2mLPdFIu3A==", + "requires": { + "web3-core": "1.2.6", + "web3-core-method": "1.2.6", + "web3-utils": "1.2.6" + } + }, + "web3-providers-http": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.6.tgz", + "integrity": "sha512-2+SaFCspb5f82QKuHB3nEPQOF9iSWxRf7c18fHtmnLNVkfG9SwLN1zh67bYn3tZGUdOI3gj8aX4Uhfpwx9Ezpw==", + "requires": { + "web3-core-helpers": "1.2.6", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.6.tgz", + "integrity": "sha512-b0Es+/GTZyk5FG3SgUDW+2/mBwJAXWt5LuppODptiOas8bB2khLjG6+Gm1K4uwOb+1NJGPt5mZZ8Wi7vibtQ+A==", + "requires": { + "oboe": "2.1.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.6" + } + }, + "web3-providers-ws": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.6.tgz", + "integrity": "sha512-20waSYX+gb5M5yKhug5FIwxBBvkKzlJH7sK6XEgdOx6BZ9YYamLmvg9wcRVtnSZO8hV/3cWenO/tRtTrHVvIgQ==", + "requires": { + "@web3-js/websocket": "^1.0.29", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.6" + } + }, + "web3-shh": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.6.tgz", + "integrity": "sha512-rouWyOOM6YMbLQd65grpj8BBezQfgNeRRX+cGyW4xsn6Xgu+B73Zvr6OtA/ftJwwa9bqHGpnLrrLMeWyy4YLUw==", + "requires": { + "web3-core": "1.2.6", + "web3-core-method": "1.2.6", + "web3-core-subscriptions": "1.2.6", + "web3-net": "1.2.6" + } + }, + "web3-utils": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.6.tgz", + "integrity": "sha512-8/HnqG/l7dGmKMgEL9JeKPTtjScxOePTzopv5aaKFExPfaBrYRkgoMqhoowCiAl/s16QaTn4DoIF1QC4YsT7Mg==", + "requires": { + "bn.js": "4.11.8", + "eth-lib": "0.2.7", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "underscore": "1.9.1", + "utf8": "3.0.0" + } + } + } + }, + "web3-bzz": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.1.tgz", + "integrity": "sha512-LdOO44TuYbGIPfL4ilkuS89GQovxUpmLz6C1UC7VYVVRILeZS740FVB3j9V4P4FHUk1RenaDfKhcntqgVCHtjw==", + "dev": true, + "requires": { + "got": "9.6.0", + "swarm-js": "0.1.39", + "underscore": "1.9.1" + } + }, + "web3-core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.1.tgz", + "integrity": "sha512-5ODwIqgl8oIg/0+Ai4jsLxkKFWJYE0uLuE1yUKHNVCL4zL6n3rFjRMpKPokd6id6nJCNgeA64KdWQ4XfpnjdMg==", + "dev": true, + "requires": { + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-core-requestmanager": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-core-helpers": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.1.tgz", + "integrity": "sha512-Gx3sTEajD5r96bJgfuW377PZVFmXIH4TdqDhgGwd2lZQCcMi+DA4TgxJNJGxn0R3aUVzyyE76j4LBrh412mXrw==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-eth-iban": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-core-method": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.1.tgz", + "integrity": "sha512-Ghg2WS23qi6Xj8Od3VCzaImLHseEA7/usvnOItluiIc5cKs00WYWsNy2YRStzU9a2+z8lwQywPYp0nTzR/QXdQ==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.1", + "web3-core-promievent": "1.2.1", + "web3-core-subscriptions": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-core-promievent": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.1.tgz", + "integrity": "sha512-IVUqgpIKoeOYblwpex4Hye6npM0aMR+kU49VP06secPeN0rHMyhGF0ZGveWBrGvf8WDPI7jhqPBFIC6Jf3Q3zw==", + "dev": true, + "requires": { + "any-promise": "1.3.0", + "eventemitter3": "3.1.2" + } + }, + "web3-core-requestmanager": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.1.tgz", + "integrity": "sha512-xfknTC69RfYmLKC+83Jz73IC3/sS2ZLhGtX33D4Q5nQ8yc39ElyAolxr9sJQS8kihOcM6u4J+8gyGMqsLcpIBg==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.1", + "web3-providers-http": "1.2.1", + "web3-providers-ipc": "1.2.1", + "web3-providers-ws": "1.2.1" + } + }, + "web3-core-subscriptions": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.1.tgz", + "integrity": "sha512-nmOwe3NsB8V8UFsY1r+sW6KjdOS68h8nuh7NzlWxBQT/19QSUGiERRTaZXWu5BYvo1EoZRMxCKyCQpSSXLc08g==", + "dev": true, + "requires": { + "eventemitter3": "3.1.2", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.1" + } + }, + "web3-eth": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.1.tgz", + "integrity": "sha512-/2xly4Yry5FW1i+uygPjhfvgUP/MS/Dk+PDqmzp5M88tS86A+j8BzKc23GrlA8sgGs0645cpZK/999LpEF5UdA==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-core-subscriptions": "1.2.1", + "web3-eth-abi": "1.2.1", + "web3-eth-accounts": "1.2.1", + "web3-eth-contract": "1.2.1", + "web3-eth-ens": "1.2.1", + "web3-eth-iban": "1.2.1", + "web3-eth-personal": "1.2.1", + "web3-net": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-eth-abi": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.1.tgz", + "integrity": "sha512-jI/KhU2a/DQPZXHjo2GW0myEljzfiKOn+h1qxK1+Y9OQfTcBMxrQJyH5AP89O6l6NZ1QvNdq99ThAxBFoy5L+g==", + "dev": true, + "requires": { + "ethers": "4.0.0-beta.3", + "underscore": "1.9.1", + "web3-utils": "1.2.1" + } + }, + "web3-eth-accounts": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.1.tgz", + "integrity": "sha512-26I4qq42STQ8IeKUyur3MdQ1NzrzCqPsmzqpux0j6X/XBD7EjZ+Cs0lhGNkSKH5dI3V8CJasnQ5T1mNKeWB7nQ==", + "dev": true, + "requires": { + "any-promise": "1.3.0", + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.7", + "scryptsy": "2.1.0", + "semver": "6.2.0", + "underscore": "1.9.1", + "uuid": "3.3.2", + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-utils": "1.2.1" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "scryptsy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", + "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==", + "dev": true + }, + "semver": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", + "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true } } }, "web3-eth-contract": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.5.tgz", - "integrity": "sha512-Sghx+USpxr2qGDgz1C7caqK00fw8EvEaXSVUcHLLwtnK+xw5Vg+eQx0Bbqu0bTERT/WmT2DgULKLFMsfLcNUAw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz", + "integrity": "sha512-kYFESbQ3boC9bl2rYVghj7O8UKMiuKaiMkxvRH5cEDHil8V7MGEGZNH0slSdoyeftZVlaWSMqkRP/chfnKND0g==", + "dev": true, "requires": { - "@types/bn.js": "^4.11.4", "underscore": "1.9.1", - "web3-core": "1.2.5", - "web3-core-helpers": "1.2.5", - "web3-core-method": "1.2.5", - "web3-core-promievent": "1.2.5", - "web3-core-subscriptions": "1.2.5", - "web3-eth-abi": "1.2.5", - "web3-utils": "1.2.5" + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-core-promievent": "1.2.1", + "web3-core-subscriptions": "1.2.1", + "web3-eth-abi": "1.2.1", + "web3-utils": "1.2.1" } }, "web3-eth-ens": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.5.tgz", - "integrity": "sha512-ITfeU3e5t1ABboLNK6Ymox3k+FMb+qkAyovFp6DWAwD0eKv24br91qWjVnHZNxuYLEsSjeWFP+AxRAULUqNUmw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.1.tgz", + "integrity": "sha512-lhP1kFhqZr2nnbu3CGIFFrAnNxk2veXpOXBY48Tub37RtobDyHijHgrj+xTh+mFiPokyrapVjpFsbGa+Xzye4Q==", + "dev": true, "requires": { "eth-ens-namehash": "2.0.8", "underscore": "1.9.1", - "web3-core": "1.2.5", - "web3-core-helpers": "1.2.5", - "web3-core-promievent": "1.2.5", - "web3-eth-abi": "1.2.5", - "web3-eth-contract": "1.2.5", - "web3-utils": "1.2.5" + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-promievent": "1.2.1", + "web3-eth-abi": "1.2.1", + "web3-eth-contract": "1.2.1", + "web3-utils": "1.2.1" } }, "web3-eth-iban": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.5.tgz", - "integrity": "sha512-YtQ4e3npULfbTicF06c5/XzX0EVsIGQQHzqunmFxpDXmN8OYXFm+R/DZDbO+cLMt88Gu+8tEChRpiId3GahirA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.1.tgz", + "integrity": "sha512-9gkr4QPl1jCU+wkgmZ8EwODVO3ovVj6d6JKMos52ggdT2YCmlfvFVF6wlGLwi0VvNa/p+0BjJzaqxnnG/JewjQ==", + "dev": true, "requires": { "bn.js": "4.11.8", - "web3-utils": "1.2.5" + "web3-utils": "1.2.1" } }, "web3-eth-personal": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.5.tgz", - "integrity": "sha512-N8I2Klk4D0TA2bZCmbr60qras8VbRdtGFc5oFeY6kX6pcw1lf9kcvoWa8QdTvkkrASwzmMZ471HcDspQlAidxw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.1.tgz", + "integrity": "sha512-RNDVSiaSoY4aIp8+Hc7z+X72H7lMb3fmAChuSBADoEc7DsJrY/d0R5qQDK9g9t2BO8oxgLrLNyBP/9ub2Hc6Bg==", + "dev": true, "requires": { - "@types/node": "^12.6.1", - "web3-core": "1.2.5", - "web3-core-helpers": "1.2.5", - "web3-core-method": "1.2.5", - "web3-net": "1.2.5", - "web3-utils": "1.2.5" - }, - "dependencies": { - "@types/node": { - "version": "12.12.26", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.26.tgz", - "integrity": "sha512-UmUm94/QZvU5xLcUlNR8hA7Ac+fGpO1EG/a8bcWVz0P0LqtxFmun9Y2bbtuckwGboWJIT70DoWq1r3hb56n3DA==" - } + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-net": "1.2.1", + "web3-utils": "1.2.1" } }, "web3-net": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.5.tgz", - "integrity": "sha512-koNrXdRPN8dc2znbbtaqi85cjgsdL02KKeEq099+ZJeafhRY8dXj8L30zOjHwDPtd3VQdQ4Ibwi/0Z9ceUp8Qg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.1.tgz", + "integrity": "sha512-Yt1Bs7WgnLESPe0rri/ZoPWzSy55ovioaP35w1KZydrNtQ5Yq4WcrAdhBzcOW7vAkIwrsLQsvA+hrOCy7mNauw==", + "dev": true, "requires": { - "web3-core": "1.2.5", - "web3-core-method": "1.2.5", - "web3-utils": "1.2.5" + "web3-core": "1.2.1", + "web3-core-method": "1.2.1", + "web3-utils": "1.2.1" } }, "web3-provider-engine": { @@ -13513,16 +13647,6 @@ "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", "dev": true }, - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - } - }, "ethereumjs-util": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", @@ -13538,18 +13662,6 @@ "secp256k1": "^3.0.1" } }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "dev": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } - }, "ws": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", @@ -13562,56 +13674,60 @@ } }, "web3-providers-http": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.5.tgz", - "integrity": "sha512-cmZqHYhV3a1ZQUDAWCR3xtGjAo7zYds9fza5M90CHINoDLOlXYWoaBeoMTnLm3bydF8Sc22BQhGdrzPZTIiGqQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.1.tgz", + "integrity": "sha512-BDtVUVolT9b3CAzeGVA/np1hhn7RPUZ6YYGB/sYky+GjeO311Yoq8SRDUSezU92x8yImSC2B+SMReGhd1zL+bQ==", + "dev": true, "requires": { - "web3-core-helpers": "1.2.5", + "web3-core-helpers": "1.2.1", "xhr2-cookies": "1.1.0" } }, "web3-providers-ipc": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.5.tgz", - "integrity": "sha512-xIDqR5c2p5T2T/792ZE288lbBcAjEu5Bb86+VoWuRvdjnRlqMSo/0n9/P2360zSvHXftjpN5uSzBNal01zmwYw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.1.tgz", + "integrity": "sha512-oPEuOCwxVx8L4CPD0TUdnlOUZwGBSRKScCz/Ws2YHdr9Ium+whm+0NLmOZjkjQp5wovQbyBzNa6zJz1noFRvFA==", + "dev": true, "requires": { "oboe": "2.1.4", "underscore": "1.9.1", - "web3-core-helpers": "1.2.5" + "web3-core-helpers": "1.2.1" } }, "web3-providers-ws": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.5.tgz", - "integrity": "sha512-o4R0HgvHc2K6YdlwHiexL6j65FsA48/0ygmLKs87jRdOFO36g7kFRLp5IBElRbu9YPRInk90He0a5Me7VCHUvw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.1.tgz", + "integrity": "sha512-oqsQXzu+ejJACVHy864WwIyw+oB21nw/pI65/sD95Zi98+/HQzFfNcIFneF1NC4bVF3VNX4YHTNq2I2o97LAiA==", + "dev": true, "requires": { - "@web3-js/websocket": "^1.0.29", "underscore": "1.9.1", - "web3-core-helpers": "1.2.5" + "web3-core-helpers": "1.2.1", + "websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis" } }, "web3-shh": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.5.tgz", - "integrity": "sha512-p273jalarNw0LjlQMlPdVFEiNPRPt5tz1a+N7LZ68uLDwFQ6PD672Jk4hIteY/20oWGur1SYKQO9v8p9h0DZ7g==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.1.tgz", + "integrity": "sha512-/3Cl04nza5kuFn25bV3FJWa0s3Vafr5BlT933h26xovQ6HIIz61LmvNQlvX1AhFL+SNJOTcQmK1SM59vcyC8bA==", + "dev": true, "requires": { - "web3-core": "1.2.5", - "web3-core-method": "1.2.5", - "web3-core-subscriptions": "1.2.5", - "web3-net": "1.2.5" + "web3-core": "1.2.1", + "web3-core-method": "1.2.1", + "web3-core-subscriptions": "1.2.1", + "web3-net": "1.2.1" } }, "web3-utils": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.5.tgz", - "integrity": "sha512-U0tNfB4Hep5ouzvNZ+Hr8I8kIftiHiDhwg+Eoh2Nvr5lLOPEH14B2exkRSARLXGY9xl2p3ykJWBCKoG1oCadug==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.1.tgz", + "integrity": "sha512-Mrcn3l58L+yCKz3zBryM6JZpNruWuT0OCbag8w+reeNROSGVlXzUQkU+gtAwc9JCZ7tKUyg67+2YUGqUjVcyBA==", + "dev": true, "requires": { "bn.js": "4.11.8", "eth-lib": "0.2.7", - "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", + "randomhex": "0.1.5", "underscore": "1.9.1", "utf8": "3.0.0" }, @@ -13620,6 +13736,7 @@ "version": "0.2.7", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, "requires": { "bn.js": "^4.11.6", "elliptic": "^6.4.0", @@ -13634,9 +13751,9 @@ "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==" }, "webpack": { - "version": "4.41.5", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.41.5.tgz", - "integrity": "sha512-wp0Co4vpyumnp3KlkmpM5LWuzvZYayDwM2n17EHFr4qxBBbRokC7DJawPJC7TfSFZ9HZ6GsdH40EBj4UV0nmpw==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.42.0.tgz", + "integrity": "sha512-EzJRHvwQyBiYrYqhyjW9AqM90dE4+s1/XtCfn7uWg6cS72zH+2VPFAlsnW0+W0cDi0XRjNKUMoJtpSi50+Ph6w==", "dev": true, "requires": { "@webassemblyjs/ast": "1.8.5", @@ -13665,9 +13782,9 @@ }, "dependencies": { "acorn": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", - "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", "dev": true }, "braces": { @@ -13808,9 +13925,9 @@ } }, "webpack-cli": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.10.tgz", - "integrity": "sha512-u1dgND9+MXaEt74sJR4PR7qkPxXUSQ0RXYq8x1L6Jg1MYVEmGPrH6Ah6C4arD4r0J1P5HKjRqpab36k0eIzPqg==", + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.11.tgz", + "integrity": "sha512-dXlfuml7xvAFwYUPsrtQAA9e4DOe58gnzSxhgrO/ZM/gyXTBowrsYeubyN4mqGhYdpXMFNyQ6emjJS9M7OBd4g==", "dev": true, "requires": { "chalk": "2.4.2", @@ -13832,6 +13949,12 @@ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, "enhanced-resolve": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", @@ -13858,6 +13981,26 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -13868,6 +14011,12 @@ "path-exists": "^3.0.0" } }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, "p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", @@ -13929,9 +14078,9 @@ } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -14053,45 +14202,12 @@ } }, "widest-line": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", - "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dev": true, "requires": { - "string-width": "^2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "string-width": "^4.0.0" } }, "window-size": { @@ -14210,14 +14326,15 @@ } }, "write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" } }, "ws": { @@ -14238,9 +14355,9 @@ } }, "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, "xhr": { @@ -14386,9 +14503,9 @@ } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -14398,9 +14515,9 @@ } }, "yargs-parser": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.0.tgz", - "integrity": "sha512-xLTUnCMc4JhxrPEPUYD5IBR1mWCK/aT6+RJ/K29JY2y1vD+FhtgKK0AXRWvI262q3QSffAQuTouFIKUuHX89wQ==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-17.0.0.tgz", + "integrity": "sha512-Fl4RBJThsWeJl3cRZeGuolcuH78/foVUAYIUpKn8rkCnjn23ilZvJyEZJjnlzoG/+EJKPb1RggD4xS/Jie2nxg==", "dev": true, "requires": { "camelcase": "^5.0.0", diff --git a/package.json b/package.json index 0e9dfe9..3d8dbf2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@oceanprotocol/squid", - "version": "1.3.0", + "version": "2.0.0-beta.5", "description": "JavaScript client library for Ocean Protocol", "main": "./dist/node/squid.js", "typings": "./dist/node/squid.d.ts", @@ -58,41 +58,43 @@ "deprecated-decorator": "^0.1.6", "node-fetch": "^2.6.0", "save-file": "^2.3.1", - "uuid": "^3.4.0", - "web3": "^1.2.5", + "uuid": "^7.0.2", + "web3": "^1.2.6", "whatwg-url": "^8.0.0" }, "devDependencies": { - "@release-it/bumper": "^1.0.5", - "@truffle/hdwallet-provider": "^1.0.29", - "@types/chai": "^4.2.8", + "@release-it/bumper": "^1.1.0", + "@truffle/hdwallet-provider": "^1.0.33", + "@types/chai": "^4.2.11", "@types/chai-spies": "^1.0.1", - "@types/mocha": "^7.0.1", - "@types/node": "^13.5.1", - "@types/node-fetch": "^2.5.4", - "@typescript-eslint/eslint-plugin": "^2.18.0", - "@typescript-eslint/parser": "^2.18.0", + "@types/mocha": "^7.0.2", + "@types/node": "^13.9.1", + "@types/node-fetch": "^2.5.5", + "@types/sinon": "^7.5.2", + "@typescript-eslint/eslint-plugin": "^2.23.0", + "@typescript-eslint/parser": "^2.23.0", "auto-changelog": "^1.16.2", "chai": "^4.2.0", "chai-spies": "^1.0.0", - "cross-env": "^7.0.0", + "cross-env": "^7.0.2", "eslint": "^6.8.0", "eslint-config-oceanprotocol": "^1.5.0", "eslint-config-prettier": "^6.10.0", "eslint-plugin-prettier": "^3.1.2", "lcov-result-merger": "^3.1.0", - "mocha": "^7.0.1", + "mocha": "^7.1.0", "mock-local-storage": "^1.1.11", "nyc": "^15.0.0", "ora": "^4.0.2", "prettier": "^1.19.1", + "sinon": "^9.0.1", "source-map-support": "^0.5.16", "ts-node": "^8.6.2", - "typedoc": "^0.16.9", - "typescript": "^3.7.5", + "typedoc": "^0.17.1", + "typescript": "^3.8.3", "uglifyjs-webpack-plugin": "^2.2.0", - "webpack": "^4.41.5", - "webpack-cli": "^3.3.10", + "webpack": "^4.42.0", + "webpack-cli": "^3.3.11", "webpack-merge": "^4.2.2" }, "nyc": { diff --git a/src/brizo/Brizo.ts b/src/brizo/Brizo.ts index 6dd6055..bbb3e29 100644 --- a/src/brizo/Brizo.ts +++ b/src/brizo/Brizo.ts @@ -1,7 +1,10 @@ -import { File } from '../ddo/MetaData' +import { File, MetaDataAlgorithm } from '../ddo/MetaData' import Account from '../ocean/Account' import { noZeroX } from '../utils' import { Instantiable, InstantiableConfig } from '../Instantiable.abstract' +import { DDO } from '../ddo/DDO' +import { ServiceType } from '../ddo/Service' +import { ComputeJob, Output } from '../ocean/OceanCompute' const apiPath = '/api/v1/brizo/services' @@ -35,15 +38,22 @@ export class Brizo extends Instantiable { return `${this.url}${apiPath}/publish` } - public getComputeEndpoint( - pubKey: string, - serviceIndex: number, - _notUsed: string, - container: string - ) { + public getComputeEndpoint() { return `${this.url}${apiPath}/compute` } + public async getEndpointFromAgreement( + type: ServiceType, + agreementId: string + ): Promise { + const { assets, keeper } = this.ocean + const { did } = await keeper.agreementStoreManager.getAgreement(agreementId) + const ddo: DDO = await assets.resolve(did) + const { serviceEndpoint } = ddo.findServiceByType(type) + + return serviceEndpoint + } + public async initializeServiceAgreement( did: string, serviceAgreementId: string, @@ -78,12 +88,7 @@ export class Brizo extends Instantiable { destination: string, index: number = -1 ): Promise { - const signature = - (await account.getToken()) || - (await this.ocean.utils.signature.signText( - noZeroX(agreementId), - account.getId() - )) + const signature = await this.createSignature(account, agreementId) const filesPromises = files .filter((_, i) => index === -1 || i === index) .map(async ({ index: i }) => { @@ -105,6 +110,93 @@ export class Brizo extends Instantiable { return destination } + public async compute( + method: string, + serviceAgreementId: string, + consumerAccount: Account, + algorithmDid?: string, + algorithmMeta?: MetaDataAlgorithm, + jobId?: string, + output?: Output + ): Promise { + const signature = await this.createSignature(consumerAccount, serviceAgreementId) + const address = consumerAccount.getId() + const serviceEndpoint = await this.getEndpointFromAgreement( + 'compute', + serviceAgreementId + ) + + if (!serviceEndpoint) { + throw new Error( + 'Computing on asset failed, service definition is missing the `serviceEndpoint`.' + ) + } + + // construct Brizo URL + let url = serviceEndpoint + url += `?signature=${signature}` + url += `&consumerAddress=${address}` + url += `&serviceAgreementId=${noZeroX(serviceAgreementId)}` + url += (algorithmDid && `&algorithmDid=${algorithmDid}`) || '' + url += + (algorithmMeta && + `&algorithmMeta=${encodeURIComponent(JSON.stringify(algorithmMeta))}`) || + '' + url += (output && `&output=${JSON.stringify(output)}`) || '' + url += (jobId && `&jobId=${jobId}`) || '' + + // switch fetch method + let fetch + + switch (method) { + case 'post': + fetch = this.ocean.utils.fetch.post(url, '') + break + case 'put': + fetch = this.ocean.utils.fetch.put(url, '') + break + case 'delete': + fetch = this.ocean.utils.fetch.delete(url) + break + default: + fetch = this.ocean.utils.fetch.get(url) + break + } + + const result = await fetch + .then((response: any) => { + if (response.ok) { + return response.json() + } + + this.logger.error( + 'Compute job failed:', + response.status, + response.statusText + ) + + return null + }) + .catch((error: Error) => { + this.logger.error('Error with compute job') + this.logger.error(error.message) + throw error + }) + + return result + } + + public async createSignature(account: Account, agreementId: string): Promise { + const signature = + (await account.getToken()) || + (await this.ocean.utils.signature.signText( + noZeroX(agreementId), + account.getId() + )) + + return signature + } + public async encrypt( did: string, signature: string, diff --git a/src/ddo/ComputingProvider.ts b/src/ddo/ComputingProvider.ts deleted file mode 100644 index dc9b2f6..0000000 --- a/src/ddo/ComputingProvider.ts +++ /dev/null @@ -1,25 +0,0 @@ -export interface Provider { - type: string - description: string - environment: { - cluster: { - type: string - url: string - } - supportedContainers: { - image: string - tag: string - checksum: string - }[] - supportedServers: { - serverId: string - serverType: string - price: string - cpu: string - gpu: string - memory: string - disk: string - maxExecutionTime: number - }[] - } -} diff --git a/src/ddo/MetaData.ts b/src/ddo/MetaData.ts index f16bae6..34aceb7 100644 --- a/src/ddo/MetaData.ts +++ b/src/ddo/MetaData.ts @@ -1,72 +1,3 @@ -export interface StageRequirements { - container: { - image: string - tag: string - checksum: string - } -} - -export interface StageInput { - index: number - id: string -} - -export interface StageTransformation { - id: string -} - -export interface StageOutput { - metadataUrl: string - secretStoreUrl: string - accessProxyUrl: string - metadata: MetaDataMain -} - -export interface Stage { - index: number - stageType?: string - requirements: StageRequirements - input: StageInput - transformation: StageTransformation - output: StageOutput -} - -export interface Workflow { - stages: Stage[] -} - -export interface Algorithm { - language: string - format?: string - version?: string - entrypoint: string - requirements: { - requirement: string - version: string - } -} - -export interface ServiceDefinition { - auth: { - type: string - user?: string - password?: string - token?: string - } - endpoints: { - index: number - url: string - method: string - contentTypes: string[] - } -} - -export interface Service { - spec?: string - specChecksum?: string - definition: ServiceDefinition -} - export interface File { /** * File name. @@ -132,6 +63,19 @@ export interface File { compression?: string } +export interface MetaDataAlgorithm { + url?: string + rawcode?: string + language?: string + format?: string + version?: string + container: { + entrypoint: string + image: string + tag: string + } +} + /** * Main attributes of assets metadata. * @see https://github.com/oceanprotocol/OEPs/tree/master/8 @@ -145,12 +89,11 @@ export interface MetaDataMain { name: string /** - * Type of the Asset. Helps to filter by the type of asset, - * initially ("dataset", "algorithm", "container", "workflow", "other"). + * Type of the Asset. Helps to filter by the type of asset ("dataset" or "algorithm"). * @type {string} * @example "dataset" */ - type: 'dataset' | 'algorithm' | 'container' | 'workflow' | 'other' + type: 'dataset' | 'algorithm' /** * The date on which the asset was created by the originator in @@ -185,7 +128,7 @@ export interface MetaDataMain { license: string /** - * Price of the asset. + * Price of the asset in vodka (attoOCEAN). It must be an integer encoded as a string. * @type {string} * @example "1000000000000000000" */ @@ -197,13 +140,11 @@ export interface MetaDataMain { */ files: File[] - encryptedService?: any - - workflow?: Workflow - - algorithm?: Algorithm - - service?: Service + /** + * Metadata used only for assets with type `algorithm`. + * @type {MetaDataAlgorithm} + */ + algorithm?: MetaDataAlgorithm } /** diff --git a/src/ddo/Service.ts b/src/ddo/Service.ts index 8cdad3b..42a7497 100644 --- a/src/ddo/Service.ts +++ b/src/ddo/Service.ts @@ -1,21 +1,65 @@ import { MetaData } from './MetaData' import { ServiceAgreementTemplate } from './ServiceAgreementTemplate' -import { Provider } from './ComputingProvider' -export type ServiceType = - | 'authorization' - | 'metadata' - | 'access' - | 'compute' - | 'computing' - | 'fitchainCompute' +export type ServiceType = 'authorization' | 'metadata' | 'access' | 'compute' export interface ServiceCommon { type: ServiceType index: number serviceEndpoint?: string - attributes: any & { - main: { [key: string]: any } + attributes: ServiceCommonAttributes +} + +export interface ServiceCommonAttributes { + main: { [key: string]: any } + additionalInformation?: { [key: string]: any } + serviceAgreementTemplate?: ServiceAgreementTemplate +} + +export interface ServiceAccessAttributes extends ServiceCommonAttributes { + main: { + creator: string + name: string + datePublished: string + price: string + timeout: number + } +} + +export interface ServiceComputeAttributes extends ServiceCommonAttributes { + main: { + creator: string + datePublished: string + price: string + timeout: number + provider?: ServiceComputeProvider + name: string + } +} + +export interface ServiceComputeProvider { + type: string + description: string + environment: { + cluster: { + type: string + url: string + } + supportedContainers: { + image: string + tag: string + checksum: string + }[] + supportedServers: { + serverId: string + serverType: string + price: string + cpu: string + gpu: string + memory: string + disk: string + maxExecutionTime: number + }[] } } @@ -32,30 +76,13 @@ export interface ServiceMetadata extends ServiceCommon { export interface ServiceAccess extends ServiceCommon { type: 'access' templateId?: string - attributes: { - main: { - creator: string - name: string - datePublished: string - price: string - timeout: number - } - serviceAgreementTemplate?: ServiceAgreementTemplate - additionalInformation: { - description: string - } - } -} - -export interface ServiceComputing extends ServiceCommon { - type: 'computing' - templateId?: string - provider?: Provider - serviceAgreementTemplate?: ServiceAgreementTemplate + attributes: ServiceAccessAttributes } export interface ServiceCompute extends ServiceCommon { + type: 'compute' templateId?: string + attributes: ServiceComputeAttributes } export type Service< @@ -64,8 +91,6 @@ export type Service< ? ServiceAuthorization : T extends 'metadata' ? ServiceMetadata - : T extends 'computing' - ? ServiceComputing : T extends 'access' ? ServiceAccess : T extends 'compute' diff --git a/src/keeper/Keeper.ts b/src/keeper/Keeper.ts index f85757d..75f26d3 100644 --- a/src/keeper/Keeper.ts +++ b/src/keeper/Keeper.ts @@ -95,24 +95,19 @@ export class Keeper extends Instantiable { computeExecutionCondition: keeper.instances.computeExecutionCondition } // Templates - keeper.instances.escrowAccessSecretStoreTemplate = new EscrowAccessSecretStoreTemplate( + keeper.templates = Object() + keeper.templates.escrowAccessSecretStoreTemplate = new EscrowAccessSecretStoreTemplate( keeper.templateStoreManager, keeper.agreementStoreManager, keeper.didRegistry, keeper.conditions ) - keeper.instances.escrowComputeExecutionTemplate = new EscrowComputeExecutionTemplate( + keeper.templates.escrowComputeExecutionTemplate = new EscrowComputeExecutionTemplate( keeper.templateStoreManager, keeper.agreementStoreManager, keeper.didRegistry, keeper.conditions ) - keeper.templates = { - escrowAccessSecretStoreTemplate: - keeper.instances.escrowAccessSecretStoreTemplate, - escrowComputeExecutionTemplate: - keeper.instances.escrowComputeExecutionTemplate - } // Utils keeper.utils = { eventHandler: new EventHandler(config) diff --git a/src/keeper/contracts/templates/EscrowAccess.serviceAgreementTemplate.ts b/src/keeper/contracts/templates/EscrowAccess.serviceAgreementTemplate.ts index 651ec6e..cf1b361 100644 --- a/src/keeper/contracts/templates/EscrowAccess.serviceAgreementTemplate.ts +++ b/src/keeper/contracts/templates/EscrowAccess.serviceAgreementTemplate.ts @@ -4,10 +4,10 @@ export const escrowAccessServiceAgreementTemplate: ServiceAgreementTemplate = { contractName: 'EscrowAccessSecretStoreTemplate', events: [ { - name: 'AgreementCreated', - actorType: 'consumer', + name: 'AgreementActorAdded', + actorType: 'provider', handler: { - moduleName: 'escrowAccessSecretStoreTemplate', + moduleName: '', functionName: 'fulfillLockRewardCondition', version: '0.1' } @@ -45,7 +45,7 @@ export const escrowAccessServiceAgreementTemplate: ServiceAgreementTemplate = { events: [ { name: 'Fulfilled', - actorType: 'publisher', + actorType: 'provider', handler: { moduleName: 'lockRewardCondition', functionName: 'fulfillAccessSecretStoreCondition', @@ -75,7 +75,7 @@ export const escrowAccessServiceAgreementTemplate: ServiceAgreementTemplate = { events: [ { name: 'Fulfilled', - actorType: 'publisher', + actorType: 'provider', handler: { moduleName: 'accessSecretStore', functionName: 'fulfillEscrowRewardCondition', @@ -87,7 +87,7 @@ export const escrowAccessServiceAgreementTemplate: ServiceAgreementTemplate = { actorType: 'consumer', handler: { moduleName: 'accessSecretStore', - functionName: 'fulfillEscrowRewardCondition', + functionName: 'refundReward', version: '0.1' } } @@ -129,7 +129,7 @@ export const escrowAccessServiceAgreementTemplate: ServiceAgreementTemplate = { events: [ { name: 'Fulfilled', - actorType: 'publisher', + actorType: 'provider', handler: { moduleName: 'escrowRewardCondition', functionName: 'verifyRewardTokens', diff --git a/src/keeper/contracts/templates/EscrowCompute.serviceAgreementTemplate.ts b/src/keeper/contracts/templates/EscrowCompute.serviceAgreementTemplate.ts index 732c20d..5587649 100644 --- a/src/keeper/contracts/templates/EscrowCompute.serviceAgreementTemplate.ts +++ b/src/keeper/contracts/templates/EscrowCompute.serviceAgreementTemplate.ts @@ -4,10 +4,10 @@ export const escrowComputeServiceAgreementTemplate: ServiceAgreementTemplate = { contractName: 'EscrowComputeExecutionTemplate', events: [ { - name: 'AgreementCreated', - actorType: 'consumer', + name: 'AgreementActorAdded', + actorType: 'provider', handler: { - moduleName: 'serviceExecutionTemplate', + moduleName: '', functionName: 'fulfillLockRewardCondition', version: '0.1' } @@ -15,13 +15,13 @@ export const escrowComputeServiceAgreementTemplate: ServiceAgreementTemplate = { ], fulfillmentOrder: [ 'lockReward.fulfill', - 'serviceExecution.fulfill', + 'computeExecution.fulfill', 'escrowReward.fulfill' ], conditionDependency: { lockReward: [], - serviceExecution: [], - escrowReward: ['lockReward', 'serviceExecution'] + computeExecution: [], + escrowReward: ['lockReward', 'computeExecution'] }, conditions: [ { @@ -45,17 +45,17 @@ export const escrowComputeServiceAgreementTemplate: ServiceAgreementTemplate = { events: [ { name: 'Fulfilled', - actorType: 'publisher', + actorType: 'provider', handler: { - moduleName: 'lockRewardCondition', - functionName: 'fulfillServiceExecutionCondition', + moduleName: 'lockRewardExecutionCondition', + functionName: 'fulfillComputeExecutionCondition', version: '0.1' } } ] }, { - name: 'serviceExecution', + name: 'computeExecution', timelock: 0, timeout: 0, contractName: 'ComputeExecutionCondition', @@ -75,10 +75,10 @@ export const escrowComputeServiceAgreementTemplate: ServiceAgreementTemplate = { events: [ { name: 'Fulfilled', - actorType: 'publisher', + actorType: 'provider', handler: { - moduleName: 'serviceExecution', - functionName: 'fulfillServiceExecutionCondition', + moduleName: 'accessSecretStore', + functionName: 'fulfillEscrowRewardCondition', version: '0.1' } }, @@ -86,8 +86,8 @@ export const escrowComputeServiceAgreementTemplate: ServiceAgreementTemplate = { name: 'TimedOut', actorType: 'consumer', handler: { - moduleName: 'serviceExec', - functionName: 'fulfillServiceExecutionCondition', + moduleName: 'accessSecretStore', + functionName: 'refundReward', version: '0.1' } } @@ -129,7 +129,7 @@ export const escrowComputeServiceAgreementTemplate: ServiceAgreementTemplate = { events: [ { name: 'Fulfilled', - actorType: 'publisher', + actorType: 'provider', handler: { moduleName: 'escrowRewardCondition', functionName: 'verifyRewardTokens', diff --git a/src/ocean/Ocean.ts b/src/ocean/Ocean.ts index dd618f2..c31a077 100644 --- a/src/ocean/Ocean.ts +++ b/src/ocean/Ocean.ts @@ -2,6 +2,7 @@ import { OceanAccounts } from './OceanAccounts' import { OceanAgreements } from './OceanAgreements' import { OceanAssets } from './OceanAssets' import { OceanAuth } from './OceanAuth' +import { OceanCompute } from './OceanCompute' import { OceanSecretStore } from './OceanSecretStore' import { OceanTokens } from './OceanTokens' import { OceanVersions } from './OceanVersions' @@ -49,6 +50,7 @@ export class Ocean extends Instantiable { instance.accounts = await OceanAccounts.getInstance(instanceConfig) instance.auth = await OceanAuth.getInstance(instanceConfig) instance.assets = await OceanAssets.getInstance(instanceConfig) + instance.compute = await OceanCompute.getInstance(instanceConfig) instance.agreements = await OceanAgreements.getInstance(instanceConfig) instance.secretStore = await OceanSecretStore.getInstance(instanceConfig) instance.tokens = await OceanTokens.getInstance(instanceConfig) @@ -99,6 +101,12 @@ export class Ocean extends Instantiable { */ public agreements: OceanAgreements + /** + * Ocean compute submodule + * @type {OceanCompute} + */ + public compute: OceanCompute + /** * Ocean secretStore submodule * @type {OceanSecretStore} diff --git a/src/ocean/OceanAgreements.ts b/src/ocean/OceanAgreements.ts index 8cf8247..c853248 100644 --- a/src/ocean/OceanAgreements.ts +++ b/src/ocean/OceanAgreements.ts @@ -7,6 +7,7 @@ import { AgreementConditionsStatus } from '../keeper/contracts/templates/Agreeme import { ConditionState } from '../keeper/contracts/conditions/Condition.abstract' import { OceanAgreementsConditions } from './OceanAgreementsConditions' +import { Service } from '../ddo/Service' export interface AgreementPrepareResult { agreementId: string @@ -121,7 +122,7 @@ export class OceanAgreements extends Instantiable { ) { const d: DID = DID.parse(did) const ddo = await this.ocean.aquarius.retrieveDDO(d) - const service = ddo.findServiceById(index) + const service: Service = ddo.findServiceById(index) const templateName = service.attributes.serviceAgreementTemplate.contractName return this.ocean.keeper .getTemplateByName(templateName) diff --git a/src/ocean/OceanAgreementsConditions.ts b/src/ocean/OceanAgreementsConditions.ts index 5fd67da..6f23e04 100644 --- a/src/ocean/OceanAgreementsConditions.ts +++ b/src/ocean/OceanAgreementsConditions.ts @@ -81,13 +81,13 @@ export class OceanAgreementsConditions extends Instantiable { } /** - * Authorize the consumer defined in the agreement to execute a remote service associated with this asset. + * Authorize the consumer defined in the agreement to compute on this asset. * @param {string} agreementId Agreement ID. * @param {string} did Asset ID. * @param {string} grantee Consumer address. * @param {Account} from Account of sender. */ - public async grantServiceExecution( + public async grantCompute( agreementId: string, did: string, grantee: string, diff --git a/src/ocean/OceanAssets.ts b/src/ocean/OceanAssets.ts index ed7fb4a..6c74b62 100644 --- a/src/ocean/OceanAssets.ts +++ b/src/ocean/OceanAssets.ts @@ -2,11 +2,12 @@ import { TransactionReceipt } from 'web3-core' import { SearchQuery } from '../aquarius/Aquarius' import { DDO } from '../ddo/DDO' import { MetaData } from '../ddo/MetaData' -import { Service } from '../ddo/Service' +import { Service, ServiceAccess } from '../ddo/Service' import Account from './Account' import DID from './DID' -import { fillConditionsWithDDO, SubscribablePromise, generateId, zeroX } from '../utils' +import { fillConditionsWithDDO, SubscribablePromise } from '../utils' import { Instantiable, InstantiableConfig } from '../Instantiable.abstract' +import { OrderProgressStep } from './utils/ServiceUtils' export enum CreateProgressStep { EncryptingFiles, @@ -19,13 +20,6 @@ export enum CreateProgressStep { DdoStored } -export enum OrderProgressStep { - CreatingAgreement, - AgreementInitialized, - LockingPayment, - LockedPayment -} - /** * Assets submodule of Ocean Protocol. */ @@ -82,6 +76,16 @@ export class OceanAssets extends Instantiable { this.logger.log('Files encrypted') observer.next(CreateProgressStep.FilesEncrypted) + // make sure that access service is defined if services is empty + if (services.length === 0) { + const accessService = await this.createAccessServiceAttributes( + publisher, + metadata.main.price, + metadata.main.datePublished + ) + services.push(accessService) + } + const serviceAgreementTemplate = await templates.escrowAccessSecretStoreTemplate.getServiceAgreementTemplate() const serviceEndpoint = this.ocean.aquarius.getServiceEndpoint(did) @@ -104,21 +108,6 @@ export class OceanAssets extends Instantiable { } ], service: [ - { - type: 'access', - serviceEndpoint: this.ocean.brizo.getConsumeEndpoint(), - templateId: templates.escrowAccessSecretStoreTemplate.getId(), - attributes: { - main: { - creator: publisher.getId(), - datePublished: metadata.main.datePublished, - name: 'dataAssetAccessServiceAgreement', - price: metadata.main.price, - timeout: 3600 - }, - serviceAgreementTemplate - } - }, { type: 'authorization', service: 'SecretStore', @@ -165,9 +154,18 @@ export class OceanAssets extends Instantiable { }) // Overwrite initial service agreement conditions - const rawConditions = await templates.escrowAccessSecretStoreTemplate.getServiceAgreementTemplateConditions() - const conditions = fillConditionsWithDDO(rawConditions, ddo) - serviceAgreementTemplate.conditions = conditions + serviceAgreementTemplate.conditions = fillConditionsWithDDO( + await templates.escrowAccessSecretStoreTemplate.getServiceAgreementTemplateConditions(), + ddo + ) + for (const service of services) { + if (service.type === 'compute') { + service.attributes.serviceAgreementTemplate.conditions = fillConditionsWithDDO( + await templates.escrowComputeExecutionTemplate.getServiceAgreementTemplateConditions(), + ddo + ) + } + } this.logger.log('Generating proof') observer.next(CreateProgressStep.GeneratingProof) @@ -200,17 +198,16 @@ export class OceanAssets extends Instantiable { public async consume( agreementId: string, did: string, - serviceIndex: number, consumerAccount: Account, resultPath: string, index?: number, useSecretStore?: boolean ): Promise + /* eslint-disable no-dupe-class-members */ public async consume( agreementId: string, did: string, - serviceIndex: number, consumerAccount: Account, resultPath?: undefined | null, index?: number, @@ -220,7 +217,6 @@ export class OceanAssets extends Instantiable { public async consume( agreementId: string, did: string, - serviceIndex: number, consumerAccount: Account, resultPath?: string, index: number = -1, @@ -228,8 +224,7 @@ export class OceanAssets extends Instantiable { ): Promise { const ddo = await this.resolve(did) const { attributes } = ddo.findServiceByType('metadata') - - const accessService = ddo.findServiceById(serviceIndex) + const accessService = ddo.findServiceByType('access') const { files } = attributes.main @@ -244,7 +239,7 @@ export class OceanAssets extends Instantiable { this.logger.log('Consuming files') resultPath = resultPath - ? `${resultPath}/datafile.${ddo.shortId()}.${serviceIndex}/` + ? `${resultPath}/datafile.${ddo.shortId()}.${accessService.index}/` : undefined if (!useSecretStore) { @@ -277,109 +272,43 @@ export class OceanAssets extends Instantiable { } return true } + /* eslint-enable no-dupe-class-members */ /** * Start the purchase/order of an asset's service. Starts by signing the service agreement * then sends the request to the publisher via the service endpoint (Brizo http service). * @param {string} did Decentralized ID. - * @param {number} index Service index. - * @param {Account} consumer Consumer account. + * @param {Account} consumerAccount Consumer account. * @param {string} provider ethereum address of service provider (optional) * @return {Promise} Returns Agreement ID */ public order( did: string, - index: number, - consumer: Account, + consumerAccount: Account, provider?: string ): SubscribablePromise { return new SubscribablePromise(async observer => { - const oceanAgreements = this.ocean.agreements + const { keeper, utils } = this.ocean + const ddo: DDO = await this.resolve(did) + const condition = keeper.conditions.accessSecretStoreCondition - const agreementId = zeroX(generateId()) - const ddo = await this.resolve(did) - - const { keeper } = this.ocean - const templateName = ddo.findServiceByType('access').attributes - .serviceAgreementTemplate.contractName - const template = keeper.getTemplateByName(templateName) - const accessCondition = keeper.conditions.accessSecretStoreCondition - - // eslint-disable-next-line no-async-promise-executor - const paymentFlow = new Promise(async (resolve, reject) => { - await template.getAgreementCreatedEvent(agreementId).once() - - this.logger.log('Agreement initialized') - observer.next(OrderProgressStep.AgreementInitialized) - - const { attributes } = ddo.findServiceByType('metadata') - - this.logger.log('Locking payment') - - const accessGranted = accessCondition - .getConditionFulfilledEvent(agreementId) - .once() - - observer.next(OrderProgressStep.LockingPayment) - const paid = await oceanAgreements.conditions.lockReward( - agreementId, - attributes.main.price, - consumer - ) - observer.next(OrderProgressStep.LockedPayment) - - if (paid) { - this.logger.log('Payment was OK') - } else { - this.logger.error('Payment was KO') - this.logger.error('Agreement ID: ', agreementId) - this.logger.error('DID: ', ddo.id) - reject(new Error('Error on payment')) - } - - await accessGranted - - this.logger.log('Access granted') - resolve() - }) - - observer.next(OrderProgressStep.CreatingAgreement) - this.logger.log('Creating agreement') - - // Get provider from didRegistry if not given in arguments - let _provider = provider - if (!provider) { - const providers = await keeper.didRegistry.getDIDProviders(ddo.shortId()) - if (providers) { - _provider = providers[0] - } - } - - await oceanAgreements.create( - did, - agreementId, - index, - undefined, - consumer, - _provider, - consumer + const agreementId = await utils.services.order( + 'access', + condition, + observer, + consumerAccount, + ddo, + provider ) - this.logger.log('Agreement created') - - try { - await paymentFlow - } catch (e) { - throw new Error('Error paying the asset.') - } return agreementId }) } /** - * Returns the owner of a asset. + * Returns the owner of an asset. * @param {string} did Decentralized ID. - * @return {Promise} Returns eth address + * @return {Promise} Returns Account ID */ public async owner(did: string): Promise { const ddo = await this.resolve(did) @@ -495,4 +424,29 @@ export class OceanAssets extends Instantiable { } } as SearchQuery) } + + public async createAccessServiceAttributes( + consumerAccount: Account, + price: string, + datePublished: string + ): Promise { + const { templates } = this.ocean.keeper + const serviceAgreementTemplate = await templates.escrowAccessSecretStoreTemplate.getServiceAgreementTemplate() + return { + type: 'access', + index: 2, + serviceEndpoint: this.ocean.brizo.getConsumeEndpoint(), + templateId: templates.escrowAccessSecretStoreTemplate.getId(), + attributes: { + main: { + creator: consumerAccount.getId(), + datePublished, + price, + timeout: 3600, + name: 'dataAssetAccessServiceAgreement' + }, + serviceAgreementTemplate + } + } + } } diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts new file mode 100644 index 0000000..331f16d --- /dev/null +++ b/src/ocean/OceanCompute.ts @@ -0,0 +1,291 @@ +import { Instantiable, InstantiableConfig } from '../Instantiable.abstract' +import { MetaData, MetaDataAlgorithm } from '../ddo/MetaData' +import Account from './Account' +import { DDO } from '../ddo/DDO' +import { SubscribablePromise } from '../utils' +import { OrderProgressStep } from './utils/ServiceUtils' +import { DID } from '../squid' +import { ServiceCompute } from '../ddo/Service' + +export const ComputeJobStatus = Object.freeze({ + Started: 10, + ConfiguringVolumes: 20, + ProvisioningSuccess: 30, + DataProvisioningFailed: 31, + AlgorithmProvisioningFailed: 32, + RunningAlgorithm: 40, + FilteringResults: 50, + PublishingResult: 60, + Completed: 70, + Stopped: 80, + Deleted: 90 +}) + +export interface Output { + publishAlgorithmLog?: boolean + publishOutput?: boolean + brizoAddress?: string + brizoUri?: string + metadata?: MetaData + metadataUri?: string + nodeUri?: string + owner?: string + secretStoreUri?: string + whitelist?: string[] +} + +export interface ComputeJob { + owner: string + agreementId: string + jobId: string + dateCreated: string + dateFinished: string + status: number + statusText: string + algorithmLogUrl: string + resultsUrls: string[] + resultsDid?: DID +} + +/** + * Compute submodule of Ocean Protocol. + */ +export class OceanCompute extends Instantiable { + /** + * Returns the instance of OceanCompute. + * @return {Promise} + */ + public static async getInstance(config: InstantiableConfig): Promise { + const instance = new OceanCompute() + instance.setInstanceConfig(config) + + return instance + } + + /** + * Starts an order of a compute service that is defined in an asset's services. + * @param {Account} consumerAccount The account of the consumer ordering the service. + * @param {string} datasetDid The DID of the dataset asset (of type `dataset`) to run the algorithm on. + * @return {Promise} Returns the Service Agreement ID, representation of `bytes32` ID. + */ + public order( + consumerAccount: Account, + datasetDid: string, + provider?: string + ): SubscribablePromise { + return new SubscribablePromise(async observer => { + const { assets, keeper, utils } = this.ocean + const ddo: DDO = await assets.resolve(datasetDid) + const condition = keeper.conditions.computeExecutionCondition + + const agreementId = await utils.services.order( + 'compute', + condition, + observer, + consumerAccount, + ddo, + provider + ) + + return agreementId + }) + } + + /** + * Check the output object and add default properties if needed + * @param {Account} consumerAccount The account of the consumer ordering the service. + * @param {Output} output Output section used for publishing the result. + * @return {Promise} Returns output object + */ + public checkOutput(consumerAccount: Account, output?: Output): Output { + const isDefault = + !output || (!output.publishAlgorithmLog && !output.publishOutput) + + if (isDefault) { + return { + publishAlgorithmLog: false, + publishOutput: false + } + } + + return { + publishAlgorithmLog: output.publishAlgorithmLog, + publishOutput: output.publishOutput, + brizoAddress: output.brizoAddress || this.config.brizoAddress, + brizoUri: output.brizoUri || this.config.brizoUri, + metadataUri: output.metadataUri || this.config.aquariusUri, + nodeUri: output.nodeUri || this.config.nodeUri, + owner: output.owner || consumerAccount.getId(), + secretStoreUri: output.secretStoreUri || this.config.secretStoreUri + } + } + + /** + * Start the execution of a compute job. + * @param {Account} consumerAccount The account of the consumer ordering the service. + * @param {string} agreementId The service agreement ID. + * @param {string} algorithmDid The DID of the algorithm asset (of type `algorithm`) to run on the asset. + * @param {MetaData} algorithmMeta Metadata about the algorithm being run if `algorithm` is being used. This is ignored when `algorithmDid` is specified. + * @param {Output} output Define algorithm output publishing. Publishing the result of a compute job is turned off by default. + * @return {Promise} Returns compute job ID under status.jobId + */ + public async start( + consumerAccount: Account, + agreementId: string, + algorithmDid?: string, + algorithmMeta?: MetaDataAlgorithm, + output?: Output + ): Promise { + output = this.checkOutput(consumerAccount, output) + const computeJobsList = await this.ocean.brizo.compute( + 'post', + agreementId, + consumerAccount, + algorithmDid, + algorithmMeta, + undefined, + output + ) + + return computeJobsList[0] as ComputeJob + } + + /** + * Ends a running compute job. + * @param {Account} consumerAccount The account of the consumer ordering the service. + * @param {string} agreementId The service agreement ID. + * @param {string} jobId The ID of the compute job to be stopped + * @return {Promise} Returns the new status of a job + */ + public async stop( + consumerAccount: Account, + agreementId: string, + jobId: string + ): Promise { + const computeJobsList = await this.ocean.brizo.compute( + 'put', + agreementId, + consumerAccount, + undefined, + undefined, + jobId + ) + + return computeJobsList[0] as ComputeJob + } + + /** + * Deletes a compute job and all resources associated with the job. If job is running it will be stopped first. + * @param {Account} consumerAccount The account of the consumer ordering the service. + * @param {string} agreementId The service agreement ID. + * @param {string} jobId The ID of the compute job to be stopped + * @return {Promise} Returns the new status of a job + */ + public async delete( + consumerAccount: Account, + agreementId: string, + jobId: string + ): Promise { + const computeJobsList = await this.ocean.brizo.compute( + 'delete', + agreementId, + consumerAccount, + undefined, + undefined, + jobId + ) + + return computeJobsList[0] as ComputeJob + } + + /** + * Ends a running compute job and starts it again. + * @param {Account} consumerAccount The account of the consumer ordering the service. + * @param {string} agreementId The service agreement ID. + * @param {string} jobId The ID of the compute job to be stopped + * @return {Promise} Returns the new status of a job + */ + public async restart( + consumerAccount: Account, + agreementId: string, + jobId: string + ): Promise { + await this.stop(consumerAccount, agreementId, jobId) + const result = await this.start(consumerAccount, agreementId, jobId) + return result + } + + /** + * Returns information about the status of all compute jobs, or a single compute job. + * @param {Account} consumerAccount The account of the consumer ordering the service. + * @param {string} agreementId The service agreement ID. + * @param {string} jobId The ID of the compute job to be stopped + * @return {Promise} Returns the status + */ + public async status( + consumerAccount: Account, + agreementId?: string, + jobId?: string + ): Promise { + const computeJobsList = await this.ocean.brizo.compute( + 'get', + agreementId, + consumerAccount, + undefined, + undefined, + jobId + ) + + return computeJobsList as ComputeJob[] + } + + /** + * Returns the final result of a specific compute job published as an asset. + * @param {Account} consumerAccount The account of the consumer ordering the service. + * @param {string} agreementId The service agreement ID. + * @param {string} jobId The ID of the compute job to be stopped. + * @return {Promise} Returns the DDO of the result asset. + */ + public async result( + consumerAccount: Account, + agreementId: string, + jobId: string + ): Promise { + const computeJobsList = await this.ocean.brizo.compute( + 'get', + agreementId, + consumerAccount, + undefined, + undefined, + jobId + ) + + return computeJobsList[0] as ComputeJob + } + + public async createComputeServiceAttributes( + consumerAccount: Account, + price: string, + datePublished: string + ): Promise { + const { templates } = this.ocean.keeper + const serviceAgreementTemplate = await templates.escrowComputeExecutionTemplate.getServiceAgreementTemplate() + const name = 'dataAssetComputingServiceAgreement' + return { + type: 'compute', + index: 3, + serviceEndpoint: this.ocean.brizo.getComputeEndpoint(), + templateId: templates.escrowComputeExecutionTemplate.getId(), + attributes: { + main: { + creator: consumerAccount.getId(), + datePublished, + price, + timeout: 3600, + name + }, + serviceAgreementTemplate + } + } + } +} diff --git a/src/ocean/utils/OceanUtils.ts b/src/ocean/utils/OceanUtils.ts index 581398b..5fda842 100644 --- a/src/ocean/utils/OceanUtils.ts +++ b/src/ocean/utils/OceanUtils.ts @@ -1,5 +1,6 @@ import { Instantiable, InstantiableConfig } from '../../Instantiable.abstract' +import { ServiceUtils } from './ServiceUtils' import { ServiceAgreement } from './ServiceAgreement' import { SignatureUtils } from './SignatureUtils' import { WebServiceConnector } from './WebServiceConnector' @@ -21,6 +22,7 @@ export class OceanUtils extends Instantiable { config.logger, config.web3 ) + instance.services = new ServiceUtils(config.ocean, config.logger) instance.signature = new SignatureUtils(config.web3, config.logger) instance.fetch = new WebServiceConnector(config.logger) @@ -33,6 +35,12 @@ export class OceanUtils extends Instantiable { */ public agreements: ServiceAgreement + /** + * Service utils. + * @type {ServiceUtils} + */ + public services: ServiceUtils + /** * Signature utils. * @type {SignatureUtils} diff --git a/src/ocean/utils/ServiceUtils.ts b/src/ocean/utils/ServiceUtils.ts new file mode 100644 index 0000000..f499757 --- /dev/null +++ b/src/ocean/utils/ServiceUtils.ts @@ -0,0 +1,115 @@ +import { DDO } from '../../ddo/DDO' +import Account from '../Account' +import { zeroX, Logger, generateId } from '../../utils' +import { Ocean } from '../../squid' +import { Condition } from '../../keeper/contracts/conditions' +import { ServiceType, Service } from '../../ddo/Service' + +export enum OrderProgressStep { + CreatingAgreement, + AgreementInitialized, + LockingPayment, + LockedPayment +} + +export class ServiceUtils { + private ocean: Ocean + private logger: Logger + + constructor(ocean: Ocean, logger: Logger) { + this.ocean = ocean + this.logger = logger + } + + public async order( + type: ServiceType, + condition: Condition, + observer: any, + consumerAccount: Account, + ddo: DDO, + provider?: string + ): Promise { + const { keeper, agreements } = this.ocean + + const agreementId = zeroX(generateId()) + const service: Service = ddo.findServiceByType(type) + const metadata = ddo.findServiceByType('metadata') + + const templateName = service.attributes.serviceAgreementTemplate.contractName + const template = keeper.getTemplateByName(templateName) + + // use price from compute service, + // otherwise always take the price from metadata + const price = + type === 'compute' + ? service.attributes.main.price + : metadata.attributes.main.price + + // eslint-disable-next-line no-async-promise-executor + const paymentFlow = new Promise(async (resolve, reject) => { + await template.getAgreementCreatedEvent(agreementId).once() + + this.logger.log('Agreement initialized') + observer.next(OrderProgressStep.AgreementInitialized) + + this.logger.log('Locking payment') + + const serviceGranted = condition + .getConditionFulfilledEvent(agreementId) + .once() + + observer.next(OrderProgressStep.LockingPayment) + const paid = await agreements.conditions.lockReward( + agreementId, + price, + consumerAccount + ) + observer.next(OrderProgressStep.LockedPayment) + + if (paid) { + this.logger.log('Payment was OK') + } else { + this.logger.error('Payment was KO') + this.logger.error('Agreement ID: ', agreementId) + this.logger.error('DID: ', ddo.id) + reject(new Error('Error on payment')) + } + + await serviceGranted + + this.logger.log(`Service ${type} granted`) + resolve() + }) + + observer.next(OrderProgressStep.CreatingAgreement) + this.logger.log('Creating agreement') + + // Get provider from didRegistry if not given in arguments + let _provider = provider + if (!provider) { + const providers = await keeper.didRegistry.getDIDProviders(ddo.shortId()) + if (providers) { + _provider = providers[0] + } + } + + await agreements.create( + ddo.id, + agreementId, + service.index, + undefined, + consumerAccount, + _provider, + consumerAccount + ) + this.logger.log('Agreement created') + + try { + await paymentFlow + } catch (e) { + throw new Error(`Error paying the ${type} service.`) + } + + return agreementId + } +} diff --git a/src/ocean/utils/WebServiceConnector.ts b/src/ocean/utils/WebServiceConnector.ts index 04c4f8f..d34e6fe 100644 --- a/src/ocean/utils/WebServiceConnector.ts +++ b/src/ocean/utils/WebServiceConnector.ts @@ -43,6 +43,15 @@ export class WebServiceConnector { }) } + public delete(url: string): Promise { + return this.fetch(url, { + method: 'DELETE', + headers: { + 'Content-type': 'application/json' + } + }) + } + public async downloadFile( url: string, destination?: string, diff --git a/src/squid.ts b/src/squid.ts index 2709151..1eb831f 100644 --- a/src/squid.ts +++ b/src/squid.ts @@ -14,7 +14,9 @@ import * as utils from './utils' export * from './ddo/DDO' export * from './ddo/MetaData' -export { OrderProgressStep, CreateProgressStep } from './ocean/OceanAssets' +export { CreateProgressStep } from './ocean/OceanAssets' +export { ComputeJob, ComputeJobStatus } from './ocean/OceanCompute' +export { OrderProgressStep } from './ocean/utils/ServiceUtils' export { OceanPlatformTechStatus, OceanPlatformTech, diff --git a/test/integration/ocean/AssetOwners.test.ts b/test/integration/ocean/AssetOwners.test.ts index b97853e..22fd0e7 100644 --- a/test/integration/ocean/AssetOwners.test.ts +++ b/test/integration/ocean/AssetOwners.test.ts @@ -85,12 +85,15 @@ describe('Asset Owners', () => { // Granting access try { await account2.requestTokens( - +metadata.main.price * 10 ** -(await ocean.keeper.token.decimals()) + parseInt( + ( + +metadata.main.price * + 10 ** -(await ocean.keeper.token.decimals()) + ).toString() + ) ) } catch {} - const { index } = ddo.findServiceByType('access') - - await ocean.assets.order(ddo.id, index, account2) + await ocean.assets.order(ddo.id, account2) // Access granted const { length: finalLength2 } = await ocean.assets.consumerAssets( account2.getId() diff --git a/test/integration/ocean/Compute.test.ts b/test/integration/ocean/Compute.test.ts new file mode 100644 index 0000000..965221a --- /dev/null +++ b/test/integration/ocean/Compute.test.ts @@ -0,0 +1,121 @@ +import { assert } from 'chai' + +import { config } from '../config' +import { + Ocean, + Account, + DDO, + MetaData, + ComputeJobStatus, + Config, + MetaDataAlgorithm +} from '../../../src' +import { getMetadata } from '../utils' +import { ServiceCompute } from '../../../src/ddo/Service' + +const metadataAsset = getMetadata() +const metadataAlgorithm = getMetadata(0, 'algorithm') + +const customConfig: Config = { + ...config, + // nodeUri: 'https://nile.dev-ocean.com', + // aquariusUri: 'https://aquarius.nile.dev-ocean.com', + // brizoUri: 'http://89.46.156.10:8030', + // secretStoreUri: 'https://secret-store.nile.dev-ocean.com', + // brizoAddress: '0x413c9ba0a05b8a600899b41b0c62dd661e689354', + verbose: true +} + +describe('Compute', () => { + let ocean: Ocean + let account: Account + let agreementId: string + let dataset: DDO + let algorithm: DDO + let computeService: ServiceCompute + + before(async () => { + ocean = await Ocean.getInstance(customConfig) + ;[account] = await ocean.accounts.list() + }) + + it('should authenticate the consumer account', async () => { + await account.authenticate() + }) + + it('should publish a dataset with a compute service object', async () => { + const stepsAsset = [] + computeService = await ocean.compute.createComputeServiceAttributes( + account, + '1000', + metadataAsset.main.datePublished + ) + dataset = await ocean.assets + .create(metadataAsset as MetaData, account, [computeService]) + .next(step => stepsAsset.push(step)) + + assert.instanceOf(dataset, DDO) + assert.isDefined( + dataset.findServiceByType('compute'), + `DDO compute service doesn't exist` + ) + assert.deepEqual(stepsAsset, [0, 1, 2, 3, 4, 5, 6, 7]) + }) + + it('should publish an algorithm', async () => { + const stepsAlgorithm = [] + algorithm = await ocean.assets + .create(metadataAlgorithm as MetaData, account) + .next(step => stepsAlgorithm.push(step)) + + assert.instanceOf(algorithm, DDO) + assert.deepEqual(stepsAlgorithm, [0, 1, 2, 3, 4, 5, 6, 7]) + }) + + it('should order the compute service of the dataset', async () => { + const steps = [] + try { + await account.requestTokens( + parseInt( + ( + +computeService.attributes.main.price * + 10 ** -(await ocean.keeper.token.decimals()) + ).toString() + ) + ) + + agreementId = await ocean.compute + .order(account, dataset.id) + .next(step => steps.push(step)) + + console.log(agreementId) + assert.isDefined(agreementId) + assert.deepEqual(steps, [0, 1, 2, 3]) + } catch {} + }) + + it('should start a compute job with a published algo', async () => { + const response = await ocean.compute.start(account, agreementId, algorithm.id) + + assert.equal(response.status, ComputeJobStatus.Started) + }) + + it('should start a compute job with a rawcode algo', async () => { + const algoMeta: MetaDataAlgorithm = { + rawcode: `console.log('Hello world!')`, + container: { + entrypoint: 'node $ALGO', + image: 'node', + tag: '10' + } + } + const response = await ocean.compute.start( + account, + agreementId, + undefined, + algoMeta + ) + + assert.equal(response.status, ComputeJobStatus.Started) + }) +}) diff --git a/test/integration/ocean/ConsumeAsset.test.ts b/test/integration/ocean/ConsumeAsset.test.ts index 67a2658..6d11835 100644 --- a/test/integration/ocean/ConsumeAsset.test.ts +++ b/test/integration/ocean/ConsumeAsset.test.ts @@ -45,8 +45,12 @@ describe('Consume Asset', () => { it('should be able to request tokens for consumer', async () => { const initialBalance = (await consumer.getBalance()).ocn - const claimedTokens = - +metadata.main.price * 10 ** -(await ocean.keeper.token.decimals()) + const claimedTokens = parseInt( + ( + +metadata.main.price * + 10 ** -(await ocean.keeper.token.decimals()) + ).toString() + ) try { await consumer.requestTokens(claimedTokens) @@ -156,13 +160,10 @@ describe('Consume Asset', () => { }) it('should consume and store the assets', async () => { - const accessService = ddo.findServiceByType('access') - const folder = '/tmp/ocean/squid-js-1' const path = await ocean.assets.consume( serviceAgreementSignatureResult.agreementId, ddo.id, - accessService.index, consumer, folder ) @@ -183,13 +184,10 @@ describe('Consume Asset', () => { }) it('should consume and store one asset', async () => { - const accessService = ddo.findServiceByType('access') - const folder = '/tmp/ocean/squid-js-2' const path = await ocean.assets.consume( serviceAgreementSignatureResult.agreementId, ddo.id, - accessService.index, consumer, folder, 1 diff --git a/test/integration/ocean/ConsumeAssetBrizo.test.ts b/test/integration/ocean/ConsumeAssetBrizo.test.ts index 722ed95..b87407a 100644 --- a/test/integration/ocean/ConsumeAssetBrizo.test.ts +++ b/test/integration/ocean/ConsumeAssetBrizo.test.ts @@ -50,34 +50,30 @@ describe('Consume Asset (Brizo)', () => { }) it('should order the asset', async () => { - const accessService = ddo.findServiceByType('access') + const steps = [] try { await consumer.requestTokens( - +metadata.main.price * 10 ** -(await ocean.keeper.token.decimals()) + parseInt( + ( + +metadata.main.price * + 10 ** -(await ocean.keeper.token.decimals()) + ).toString() + ) ) - } catch {} - const steps = [] - agreementId = await ocean.assets - .order(ddo.id, accessService.index, consumer) - .next(step => steps.push(step)) + agreementId = await ocean.assets + .order(ddo.id, consumer) + .next(step => steps.push(step)) + } catch {} assert.isDefined(agreementId) assert.deepEqual(steps, [0, 1, 2, 3]) }) it('should consume and store the assets', async () => { - const accessService = ddo.findServiceByType('access') - const folder = '/tmp/ocean/squid-js' - const path = await ocean.assets.consume( - agreementId, - ddo.id, - accessService.index, - consumer, - folder - ) + const path = await ocean.assets.consume(agreementId, ddo.id, consumer, folder) assert.include(path, folder, 'The storage path is not correct.') diff --git a/test/integration/ocean/ConsumeBigAsset.test.ts b/test/integration/ocean/ConsumeBigAsset.test.ts index a5d135e..a2e0567 100644 --- a/test/integration/ocean/ConsumeBigAsset.test.ts +++ b/test/integration/ocean/ConsumeBigAsset.test.ts @@ -50,30 +50,25 @@ xdescribe('Consume Asset (Large size)', () => { }) it('should order the asset', async () => { - const accessService = ddo.findServiceByType('access') - try { await consumer.requestTokens( - +metadata.main.price * 10 ** -(await ocean.keeper.token.decimals()) + parseInt( + ( + +metadata.main.price * + 10 ** -(await ocean.keeper.token.decimals()) + ).toString() + ) ) } catch {} - agreementId = await ocean.assets.order(ddo.id, accessService.index, consumer) + agreementId = await ocean.assets.order(ddo.id, consumer) assert.isDefined(agreementId) }) it('should consume and store the assets', async () => { - const accessService = ddo.findServiceByType('access') - const folder = '/tmp/ocean/squid-js' - const path = await ocean.assets.consume( - agreementId, - ddo.id, - accessService.index, - consumer, - folder - ) + const path = await ocean.assets.consume(agreementId, ddo.id, consumer, folder) assert.include(path, folder, 'The storage path is not correct.') diff --git a/test/integration/ocean/RegisterEscrowComputeExecutionTemplate.test.ts b/test/integration/ocean/RegisterEscrowComputeExecutionTemplate.test.ts index 735f1de..5c5dde3 100644 --- a/test/integration/ocean/RegisterEscrowComputeExecutionTemplate.test.ts +++ b/test/integration/ocean/RegisterEscrowComputeExecutionTemplate.test.ts @@ -26,7 +26,7 @@ describe('Register Escrow Compute Execution Template', () => { before(async () => { ocean = await Ocean.getInstance(config) - keeper = ocean.keeper + ;({ keeper } = ocean) template = keeper.templates.escrowComputeExecutionTemplate @@ -36,9 +36,11 @@ describe('Register Escrow Compute Execution Template', () => { consumer = (await ocean.accounts.list())[2] // Conditions - computeExecutionCondition = keeper.conditions.computeExecutionCondition - lockRewardCondition = keeper.conditions.lockRewardCondition - escrowReward = keeper.conditions.escrowReward + ;({ + computeExecutionCondition, + lockRewardCondition, + escrowReward + } = keeper.conditions) if (!ocean.keeper.dispenser) { escrowAmount = 0 @@ -274,7 +276,7 @@ describe('Register Escrow Compute Execution Template', () => { }) it('should fulfill the conditions from computing side', async () => { - await ocean.agreements.conditions.grantServiceExecution( + await ocean.agreements.conditions.grantCompute( agreementId, did, consumer.getId(), diff --git a/test/integration/ocean/Versions.test.ts b/test/integration/ocean/Versions.test.ts index 19ce70f..91e8a85 100644 --- a/test/integration/ocean/Versions.test.ts +++ b/test/integration/ocean/Versions.test.ts @@ -11,18 +11,17 @@ describe('Versions', () => { ocean = await Ocean.getInstance(config) }) - // TODO: enable again after new versions of Brizo - xit('should return the versions', async () => { + it('should return the versions', async () => { const versions = await ocean.versions.get() assert.equal(versions.aquarius.status, OceanPlatformTechStatus.Working) assert.equal(versions.brizo.status, OceanPlatformTechStatus.Working) assert.equal(versions.squid.status, OceanPlatformTechStatus.Working) - assert.deepEqual(versions.status, { - ok: true, - contracts: true, - network: true - }) + // assert.deepEqual(versions.status, { + // ok: true, + // contracts: true, + // network: true + // }) }) }) diff --git a/test/integration/utils/ddo-metadata-generator.ts b/test/integration/utils/ddo-metadata-generator.ts index ed488e4..5bfe952 100644 --- a/test/integration/utils/ddo-metadata-generator.ts +++ b/test/integration/utils/ddo-metadata-generator.ts @@ -1,9 +1,10 @@ -import { MetaData } from '../../../src' // @oceanprotocol/squid +import { MetaData, MetaDataAlgorithm, Ocean, Account } from '../../../src' // @oceanprotocol/squid +import { ServiceCompute } from '../../../src/ddo/Service' const metadata: Partial = { main: { name: undefined, - type: 'dataset', + type: undefined, dateCreated: '2012-10-10T17:00:00Z', datePublished: '2012-10-10T17:00:00Z', author: 'Met Office', @@ -46,16 +47,33 @@ const metadata: Partial = { } } -export const generateMetadata = (name: string, price?: number): Partial => ({ - ...metadata, +const algorithmMeta: MetaDataAlgorithm = { + language: 'scala', + format: 'docker-image', + version: '0.1', + container: { + entrypoint: 'ocean-entrypoint.sh', + image: 'node', + tag: '10' + } +} + +export const generateMetadata = ( + name: string, + type?: 'dataset' | 'algorithm', + price?: number +): Partial => ({ main: { ...metadata.main, name, - price: (price || 21) + '0'.repeat(18) + type: type || 'dataset', + price: (price || 21) + '0'.repeat(18), + algorithm: type === 'algorithm' ? algorithmMeta : undefined }, additionalInformation: { ...metadata.additionalInformation } }) -export const getMetadata = (price?: number) => generateMetadata('TestAsset', price) +export const getMetadata = (price?: number, type?: 'dataset' | 'algorithm') => + generateMetadata('TestAsset', type, price) diff --git a/test/unit/__fixtures__/ddo.json b/test/unit/__fixtures__/ddo.json new file mode 100644 index 0000000..73ddd2f --- /dev/null +++ b/test/unit/__fixtures__/ddo.json @@ -0,0 +1,459 @@ +{ + "@context": "https://w3id.org/future-method/v1", + "id": "did:op:08a429b8529856d59867503f8056903a680935a76950bb9649785cc97869a43d", + "publicKey": [ + { + "id": "did:op:123456789abcdefghi#keys-1", + "type": "RsaVerificationKey2018", + "owner": "did:op:123456789abcdefghi", + "publicKeyPem": "-----BEGIN PUBLIC KEY...END PUBLIC KEY-----\r\n" + }, + { + "id": "did:op:123456789abcdefghi#keys-2", + "type": "Ed25519VerificationKey2018", + "owner": "did:op:123456789abcdefghi", + "publicKeyBase58": "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" + }, + { + "id": "did:op:123456789abcdefghi#keys-3", + "type": "RsaPublicKeyExchangeKey2018", + "owner": "did:op:123456789abcdefghi", + "publicKeyPem": "-----BEGIN PUBLIC KEY...END PUBLIC KEY-----\r\n" + } + ], + "authentication": [ + { + "type": "RsaSignatureAuthentication2018", + "publicKey": "did:op:123456789abcdefghi#keys-1" + }, + { + "type": "ieee2410Authentication2018", + "publicKey": "did:op:123456789abcdefghi#keys-2" + } + ], + "proof": { + "type": "UUIDSignature", + "created": "2016-02-08T16:02:20Z", + "creator": "did:example:8uQhQMGzWxR8vw5P3UWH1ja", + "signatureValue": "QNB13Y7Q9...1tzjn4w==" + }, + "service": [ + { + "type": "access", + "index": 0, + "serviceEndpoint": "http://mybrizo.org/api/v1/brizo/services/consume?pubKey=${pubKey}&serviceId={serviceId}&url={url}", + "templateId": "044852b2a670ade5407e78fb2863c51000000000000000000000000000000000", + "attributes": { + "main": { + "name": "dataAssetAccessServiceAgreement", + "creator": "0x36A7f3383A63279cDaF4DfC0F3ABc07d90252C6b", + "datePublished": "2019-11-15T14:11:23Z", + "price": "", + "timeout": 36000 + }, + "serviceAgreementTemplate": { + "contractName": "EscrowAccessSecretStoreTemplate", + "events": [ + { + "name": "AgreementCreated", + "actorType": "consumer", + "handler": { + "moduleName": "escrowAccessSecretStoreTemplate", + "functionName": "fulfillLockRewardCondition", + "version": "0.1" + } + } + ], + "fulfillmentOrder": [ + "lockReward.fulfill", + "accessSecretStore.fulfill", + "escrowReward.fulfill" + ], + "conditionDependency": { + "lockReward": [], + "accessSecretStore": [], + "escrowReward": ["lockReward", "accessSecretStore"] + }, + "conditions": [ + { + "name": "lockReward", + "timelock": 0, + "timeout": 0, + "contractName": "LockRewardCondition", + "functionName": "fulfill", + "parameters": [ + { + "name": "_rewardAddress", + "type": "address", + "value": "0x36A7f3383A63279cDaF4DfC0F3ABc07d90252C6b" + }, + { + "name": "_amount", + "type": "uint256", + "value": "0" + } + ], + "events": [ + { + "name": "Fulfilled", + "actorType": "publisher", + "handler": { + "moduleName": "lockRewardCondition", + "functionName": "fulfillAccessSecretStoreCondition", + "version": "0.1" + } + } + ] + }, + { + "name": "accessSecretStore", + "timelock": 0, + "timeout": 0, + "contractName": "AccessSecretStoreCondition", + "functionName": "fulfill", + "parameters": [ + { + "name": "_documentId", + "type": "bytes32", + "value": "c678e7e5963d4fdc99afea49ac221d4d4177790f30204417823319d4d35f851f" + }, + { + "name": "_grantee", + "type": "address", + "value": "" + } + ], + "events": [ + { + "name": "Fulfilled", + "actorType": "publisher", + "handler": { + "moduleName": "accessSecretStore", + "functionName": "fulfillEscrowRewardCondition", + "version": "0.1" + } + }, + { + "name": "TimedOut", + "actorType": "consumer", + "handler": { + "moduleName": "accessSecretStore", + "functionName": "refundReward", + "version": "0.1" + } + } + ] + }, + { + "name": "escrowReward", + "timelock": 0, + "timeout": 0, + "contractName": "EscrowReward", + "functionName": "fulfill", + "parameters": [ + { + "name": "_amount", + "type": "uint256", + "value": "0" + }, + { + "name": "_receiver", + "type": "address", + "value": "" + }, + { + "name": "_sender", + "type": "address", + "value": "" + }, + { + "name": "_lockCondition", + "type": "bytes32", + "value": "" + }, + { + "name": "_releaseCondition", + "type": "bytes32", + "value": "" + } + ], + "events": [ + { + "name": "Fulfilled", + "actorType": "publisher", + "handler": { + "moduleName": "escrowRewardCondition", + "functionName": "verifyRewardTokens", + "version": "0.1" + } + } + ] + } + ] + } + } + }, + { + "type": "compute", + "index": 1, + "serviceEndpoint": "http://localhost:8030/api/v1/brizo/services/compute", + "templateId": "", + "attributes": { + "main": { + "name": "dataAssetComputingServiceAgreement", + "creator": "0x36A7f3383A63279cDaF4DfC0F3ABc07d90252C6b", + "datePublished": "2019-04-09T19:02:11Z", + "price": "10", + "timeout": 86400, + "provider": { + "type": "Azure", + "description": "", + "environment": { + "cluster": { + "type": "Kubernetes", + "url": "http://10.0.0.17/xxx" + }, + "supportedContainers": [ + { + "image": "tensorflow/tensorflow", + "tag": "latest", + "checksum": "sha256:cb57ecfa6ebbefd8ffc7f75c0f00e57a7fa739578a429b6f72a0df19315deadc" + }, + { + "image": "tensorflow/tensorflow", + "tag": "latest", + "checksum": "sha256:cb57ecfa6ebbefd8ffc7f75c0f00e57a7fa739578a429b6f72a0df19315deadc" + } + ], + "supportedServers": [ + { + "serverId": "1", + "serverType": "xlsize", + "price": "50", + "cpu": "16", + "gpu": "0", + "memory": "128gb", + "disk": "160gb", + "maxExecutionTime": 86400 + }, + { + "serverId": "2", + "serverType": "medium", + "price": "10", + "cpu": "2", + "gpu": "0", + "memory": "8gb", + "disk": "80gb", + "maxExecutionTime": 86400 + } + ] + } + } + }, + "additionalInformation": {}, + "serviceAgreementTemplate": { + "contractName": "EscrowComputeExecutionTemplate", + "events": [ + { + "name": "AgreementActorAdded", + "actorType": "provider", + "handler": { + "moduleName": "", + "functionName": "fulfillLockRewardCondition", + "version": "0.1" + } + } + ], + "fulfillmentOrder": [ + "lockReward.fulfill", + "computeExecution.fulfill", + "escrowReward.fulfill" + ], + "conditionDependency": { + "lockReward": [], + "computeExecution": [], + "releaseReward": ["lockReward", "computeExecution"] + }, + "conditions": [ + { + "name": "lockReward", + "timelock": 0, + "timeout": 0, + "contractName": "LockRewardCondition", + "functionName": "fulfill", + "parameters": [ + { + "name": "_rewardAddress", + "type": "address", + "value": "" + }, + { + "name": "_amount", + "type": "uint256", + "value": "" + } + ], + "events": [ + { + "name": "Fulfilled", + "actorType": "provider", + "handler": { + "moduleName": "lockRewardExecutionCondition", + "functionName": "fulfillComputeExecutionCondition", + "version": "0.1" + } + } + ] + }, + { + "name": "computeExecution", + "timelock": 0, + "timeout": 0, + "contractName": "ComputeExecutionCondition", + "functionName": "fulfill", + "parameters": [ + { + "name": "_documentId", + "type": "bytes32", + "value": "" + }, + { + "name": "_grantee", + "type": "address", + "value": "" + } + ], + "events": [ + { + "name": "Fulfilled", + "actorType": "provider", + "handler": { + "moduleName": "accessSecretStore", + "functionName": "fulfillEscrowRewardCondition", + "version": "0.1" + } + }, + { + "name": "TimedOut", + "actorType": "consumer", + "handler": { + "moduleName": "accessSecretStore", + "functionName": "refundReward", + "version": "0.1" + } + } + ] + }, + { + "name": "escrowReward", + "timelock": 0, + "timeout": 0, + "contractName": "EscrowReward", + "functionName": "fulfill", + "parameters": [ + { + "name": "_amount", + "type": "uint256", + "value": "" + }, + { + "name": "_receiver", + "type": "address", + "value": "" + }, + { + "name": "_sender", + "type": "address", + "value": "" + }, + { + "name": "_lockCondition", + "type": "bytes32", + "value": "" + }, + { + "name": "_releaseCondition", + "type": "bytes32", + "value": "" + } + ], + "events": [ + { + "name": "Fulfilled", + "actorType": "provider", + "handler": { + "moduleName": "escrowRewardCondition", + "functionName": "verifyRewardTokens", + "version": "0.1" + } + } + ] + } + ] + } + } + }, + { + "type": "metadata", + "index": 2, + "serviceEndpoint": "http://myaquarius.org/api/v1/provider/assets/metadata/{did}", + "attributes": { + "main": { + "name": "UK Weather information 2011", + "type": "dataset", + "dateCreated": "2012-10-10T17:00:000Z", + "author": "Met Office", + "license": "CC-BY", + "price": "1000000000000000000", + "files": [ + { + "index": 0, + "url": "https://testocnfiles.blob.core.windows.net/testfiles/testzkp.zip", + "checksum": "085340abffh21495345af97c6b0e761", + "contentLength": "12324" + }, + { + "url": "https://testocnfiles.blob.core.windows.net/testfiles/testzkp2.zip" + } + ] + }, + "curation": { + "rating": 0.93, + "numVotes": 123, + "schema": "Binary Voting" + }, + "additionalInformation": { + "description": "Weather information of UK including temperature and humidity", + "copyrightHolder": "Met Office", + "workExample": "423432fsd,51.509865,-0.118092,2011-01-01T10:55:11+00:00,7.2,68", + "links": [ + { + "name": "Sample of Asset Data", + "type": "sample", + "url": "https://foo.com/sample.csv" + }, + { + "name": "Data Format Definition", + "type": "format", + "AssetID": "4d517500da0acb0d65a716f61330969334630363ce4a6a9d39691026ac7908ea" + } + ], + "inLanguage": "en", + "categories": ["Economy", "Data Science"], + "tags": ["weather", "uk", "2011", "temperature", "humidity"], + "updateFrequency": "yearly", + "structuredMarkup": [ + { + "uri": "http://skos.um.es/unescothes/C01194/jsonld", + "mediaType": "application/ld+json" + }, + { + "uri": "http://skos.um.es/unescothes/C01194/turtle", + "mediaType": "text/turtle" + } + ] + } + } + } + ] +} diff --git a/test/unit/mocks/Aquarius.mock.ts b/test/unit/__mocks__/Aquarius.mock.ts similarity index 100% rename from test/unit/mocks/Aquarius.mock.ts rename to test/unit/__mocks__/Aquarius.mock.ts diff --git a/test/unit/mocks/ContractBase.Mock.ts b/test/unit/__mocks__/ContractBase.Mock.ts similarity index 100% rename from test/unit/mocks/ContractBase.Mock.ts rename to test/unit/__mocks__/ContractBase.Mock.ts diff --git a/test/unit/mocks/SecretStore.mock.ts b/test/unit/__mocks__/SecretStore.mock.ts similarity index 100% rename from test/unit/mocks/SecretStore.mock.ts rename to test/unit/__mocks__/SecretStore.mock.ts diff --git a/test/unit/mocks/WebServiceConnector.mock.ts b/test/unit/__mocks__/WebServiceConnector.mock.ts similarity index 89% rename from test/unit/mocks/WebServiceConnector.mock.ts rename to test/unit/__mocks__/WebServiceConnector.mock.ts index 1a7ac55..7e7dc5e 100644 --- a/test/unit/mocks/WebServiceConnector.mock.ts +++ b/test/unit/__mocks__/WebServiceConnector.mock.ts @@ -1,4 +1,4 @@ -import WebServiceConnector from '../../src/utils/WebServiceConnector' +import { WebServiceConnector } from '../../src/ocean/utils/WebServiceConnector' // @ts-ignore export default class WebServiceConnectorMock extends WebServiceConnector { diff --git a/test/unit/ddo/DDO.test.ts b/test/unit/ddo/DDO.test.ts index 1c65d14..6f06ca8 100644 --- a/test/unit/ddo/DDO.test.ts +++ b/test/unit/ddo/DDO.test.ts @@ -7,7 +7,7 @@ import { Ocean } from '../../../src/ocean/Ocean' import config from '../config' import TestContractHandler from '../keeper/TestContractHandler' -import * as jsonDDO from '../testdata/ddo.json' +import * as jsonDDO from '../__fixtures__/ddo.json' use(spies) diff --git a/test/unit/keeper/ContractBase.test.ts b/test/unit/keeper/ContractBase.test.ts index 2e0d20f..43e9e2a 100644 --- a/test/unit/keeper/ContractBase.test.ts +++ b/test/unit/keeper/ContractBase.test.ts @@ -2,7 +2,7 @@ import { assert } from 'chai' import Account from '../../../src/ocean/Account' import { Ocean } from '../../../src/ocean/Ocean' import config from '../config' -import ContractBaseMock from '../mocks/ContractBase.Mock' +import ContractBaseMock from '../__mocks__/ContractBase.Mock' import TestContractHandler from './TestContractHandler' const wrappedContract = new ContractBaseMock('OceanToken') diff --git a/test/unit/keeper/TestContractHandler.ts b/test/unit/keeper/TestContractHandler.ts index e06d625..985d260 100644 --- a/test/unit/keeper/TestContractHandler.ts +++ b/test/unit/keeper/TestContractHandler.ts @@ -7,6 +7,13 @@ import config from '../config' interface ContractTest extends Contract { testContract?: boolean $initialized?: boolean + options?: { + address: string + } + methods?: { + addMinter(address: string): any + initialize(...args: any[]): any + } } export default class TestContractHandler extends ContractHandler { diff --git a/test/unit/mocks/Brizo.mock.ts b/test/unit/mocks/Brizo.mock.ts deleted file mode 100644 index 4d48e2a..0000000 --- a/test/unit/mocks/Brizo.mock.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Brizo } from '../../../src/brizo/Brizo' - -export default class BrizoMock extends Brizo { - public async initializeServiceAgreement( - did: string, - serviceAgreementId: string, - index: number, - signature: string, - consumerPublicKey: string - ): Promise { - return true - } -} diff --git a/test/unit/ocean/OceanCompute.test.ts b/test/unit/ocean/OceanCompute.test.ts new file mode 100644 index 0000000..a91156e --- /dev/null +++ b/test/unit/ocean/OceanCompute.test.ts @@ -0,0 +1,131 @@ +import { assert } from 'chai' +import sinon from 'sinon' + +import { Ocean } from '../../../src/ocean/Ocean' +import config from '../config' +import { Account } from '../../../src/squid' +import { OceanCompute, ComputeJobStatus } from '../../../src/ocean/OceanCompute' +import TestIdGenerator from '../TestIdGenerator' + +describe('OceanCompute', () => { + let ocean: Ocean + let account: Account + let compute: OceanCompute + let agreementId: string + + before(async () => { + ocean = await Ocean.getInstance(config) + ;[account] = await ocean.accounts.list() + compute = ocean.compute // eslint-disable-line prefer-destructuring + agreementId = TestIdGenerator.generatePrefixedId() + }) + + afterEach(() => { + sinon.reset() + sinon.restore() + }) + + describe('#start()', () => { + it('should start a new job', async () => { + sinon.stub(ocean.brizo, 'compute').returns([{ jobId: 'my-job-id' }] as any) + const response = await compute.start(account, agreementId, 'did:op:0xxx') + assert(response.jobId === 'my-job-id') + }) + }) + + describe('#stop()', () => { + it('should stop a job', async () => { + sinon + .stub(ocean.brizo, 'compute') + .returns([{ status: ComputeJobStatus.Completed }] as any) + + const response = await compute.stop(account, agreementId, 'xxx') + assert(response.status === ComputeJobStatus.Completed) + }) + }) + + describe('#restart()', () => { + it('should restart a job', async () => { + sinon + .stub(ocean.brizo, 'compute') + .returns([ + { status: ComputeJobStatus.Started, jobId: 'my-job-id' } + ] as any) + + const response = await compute.restart(account, agreementId, 'xxx') + assert(response.jobId === 'my-job-id') + }) + }) + + describe('#delete()', () => { + it('should delete a job', async () => { + sinon + .stub(ocean.brizo, 'compute') + .returns([{ status: ComputeJobStatus.Deleted }] as any) + + const response = await compute.delete(account, agreementId, 'xxx') + assert(response.status === ComputeJobStatus.Deleted) + }) + }) + + describe('#status()', () => { + it('should get the status of one job', async () => { + sinon + .stub(ocean.brizo, 'compute') + .returns([{ status: ComputeJobStatus.Started }] as any) + + const response = await compute.status(account, agreementId, 'xxx') + assert(response.length === 1) + assert(response[0].status === ComputeJobStatus.Started) + }) + + it('should get the status of multiple jobs', async () => { + sinon + .stub(ocean.brizo, 'compute') + .returns([ + { status: ComputeJobStatus.Started }, + { status: ComputeJobStatus.Started } + ] as any) + + const response = await compute.status(account, agreementId) + assert(response.length === 2) + assert(response[0].status === ComputeJobStatus.Started) + }) + + it('should get all jobs for one owner', async () => { + sinon + .stub(ocean.brizo, 'compute') + .returns([ + { status: ComputeJobStatus.Started }, + { status: ComputeJobStatus.Started } + ] as any) + + const response = await compute.status(account) + assert(response.length === 2) + assert(response[0].status === ComputeJobStatus.Started) + }) + }) + + describe('#checkOutput()', () => { + it('should return default values', async () => { + const defaultOutput = { publishAlgorithmLog: false, publishOutput: false } + const output = compute.checkOutput(account, undefined) + assert.deepEqual(output, defaultOutput) + }) + + it('should return output values', async () => { + const newOutput = { + publishAlgorithmLog: true, + publishOutput: true, + brizoAddress: 'hello', + brizoUri: 'hello', + metadataUri: 'hello', + nodeUri: 'hello', + owner: '0xhello', + secretStoreUri: 'hello' + } + const output = compute.checkOutput(account, newOutput) + assert.deepEqual(output, newOutput) + }) + }) +}) diff --git a/test/unit/testdata/ddo.json b/test/unit/testdata/ddo.json deleted file mode 100644 index 8cffe79..0000000 --- a/test/unit/testdata/ddo.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "@context": "https://w3id.org/future-method/v1", - "id": "did:op:08a429b8529856d59867503f8056903a680935a76950bb9649785cc97869a43d", - "publicKey": [ - { - "id": "did:op:123456789abcdefghi#keys-1", - "type": "RsaVerificationKey2018", - "owner": "did:op:123456789abcdefghi", - "publicKeyPem": "-----BEGIN PUBLIC KEY...END PUBLIC KEY-----\r\n" - }, - { - "id": "did:op:123456789abcdefghi#keys-2", - "type": "Ed25519VerificationKey2018", - "owner": "did:op:123456789abcdefghi", - "publicKeyBase58": "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" - }, - { - "id": "did:op:123456789abcdefghi#keys-3", - "type": "RsaPublicKeyExchangeKey2018", - "owner": "did:op:123456789abcdefghi", - "publicKeyPem": "-----BEGIN PUBLIC KEY...END PUBLIC KEY-----\r\n" - } - ], - "authentication": [ - { - "type": "RsaSignatureAuthentication2018", - "publicKey": "did:op:123456789abcdefghi#keys-1" - }, - { - "type": "ieee2410Authentication2018", - "publicKey": "did:op:123456789abcdefghi#keys-2" - } - ], - "proof": { - "type": "UUIDSignature", - "created": "2016-02-08T16:02:20Z", - "creator": "did:example:8uQhQMGzWxR8vw5P3UWH1ja", - "signatureValue": "QNB13Y7Q9...1tzjn4w==" - }, - "service": [ - { - "type": "access", - "index": 0, - "serviceEndpoint": "http://mybrizo.org/api/v1/brizo/services/consume?pubKey=${pubKey}&serviceId={serviceId}&url={url}", - "purchaseEndpoint": "http://mybrizo.org/api/v1/brizo/services/access/purchase?", - "templateId": "044852b2a670ade5407e78fb2863c51000000000000000000000000000000000", - "conditions": [ - { - "name": "lockPayment", - "timeout": 0, - "conditionKey": { - "contractAddress": "0x...", - "fingerprint": "0x..." - }, - "parameters": { - "assetId": "bytes32", - "price": "integer" - }, - "events": { - "PaymentLocked": { - "actorType": ["publisher"], - "handlers": [ - { - "moduleName": "accessControl", - "functionName": "grantAccess", - "version": "0.1" - } - ] - } - } - }, - { - "name": "releasePayment", - "timeout": 0, - "conditionKey": { - "contractAddress": "0x...", - "fingerprint": "0xXXXXXXXX" - }, - "parameters": { - "assetId": "bytes32", - "price": "integer" - }, - "events": { - "PaymentReleased": { - "actorType": ["publisher"], - "handlers": [ - { - "moduleName": "serviceAgreement", - "functionName": "fulfillAgreement", - "version": "0.1" - } - ] - } - } - }, - { - "name": "grantAccess", - "timeout": 0, - "conditionKey": { - "contractAddress": "0x", - "fingerprint": "0xXXXXXXXX" - }, - "parameters": { - "assetId": "bytes32", - "documentKeyId": "bytes32" - }, - "events": { - "AccessGranted": { - "actorType": ["consumer"], - "handlers": [ - { - "moduleName": "asset", - "functionName": "consumeService", - "version": "0.1" - } - ] - } - } - }, - { - "name": "refundPayment", - "timeout": 1, - "condition_key": { - "contractAddress": "0x...", - "fingerprint": "0xXXXXXXXX" - }, - "parameters": { - "assetId": "bytes32", - "price": "int" - }, - "events": { - "PaymentRefund": { - "actorType": ["consumer"], - "handlers": [ - { - "moduleName": "serviceAgreement", - "functionName": "fulfillAgreement", - "version": "0.1" - } - ] - } - } - } - ] - }, - { - "type": "compute", - "index": 1, - "serviceEndpoint": "http://mybrizo.org/api/v1/brizo/services/compute?pubKey=${pubKey}&serviceId={serviceId}&algo={algo}&container={container}", - "templateId": "044852b2a670ade5407e78fb2863c51000000000000000000000000000000002" - }, - { - "type": "metadata", - "index": 2, - "serviceEndpoint": "http://myaquarius.org/api/v1/provider/assets/metadata/{did}", - "attributes": { - "main": { - "name": "UK Weather information 2011", - "type": "dataset", - "dateCreated": "2012-10-10T17:00:000Z", - "author": "Met Office", - "license": "CC-BY", - "price": 10, - "files": [ - { - "index": 0, - "url": "https://testocnfiles.blob.core.windows.net/testfiles/testzkp.zip", - "checksum": "085340abffh21495345af97c6b0e761", - "contentLength": "12324" - }, - { - "url": "https://testocnfiles.blob.core.windows.net/testfiles/testzkp2.zip" - } - ] - }, - "curation": { - "rating": 0.93, - "numVotes": 123, - "schema": "Binary Voting" - }, - "additionalInformation": { - "description": "Weather information of UK including temperature and humidity", - "copyrightHolder": "Met Office", - "workExample": "423432fsd,51.509865,-0.118092,2011-01-01T10:55:11+00:00,7.2,68", - "links": [ - { - "name": "Sample of Asset Data", - "type": "sample", - "url": "https://foo.com/sample.csv" - }, - { - "name": "Data Format Definition", - "type": "format", - "AssetID": "4d517500da0acb0d65a716f61330969334630363ce4a6a9d39691026ac7908ea" - } - ], - "inLanguage": "en", - "categories": ["Economy", "Data Science"], - "tags": ["weather", "uk", "2011", "temperature", "humidity"], - "updateFrequency": "yearly", - "structuredMarkup": [ - { - "uri": "http://skos.um.es/unescothes/C01194/jsonld", - "mediaType": "application/ld+json" - }, - { - "uri": "http://skos.um.es/unescothes/C01194/turtle", - "mediaType": "text/turtle" - } - ] - } - } - } - ] -}