From 0c521c7ce071bcdb8db687da45d46e02dfaad7c1 Mon Sep 17 00:00:00 2001 From: Wilson Garcia Date: Sun, 10 May 2020 12:20:53 -0400 Subject: [PATCH 1/6] Adding support for Pocket --- .idea/workspace.xml | 56 +++++ packages/portis-eos/package-lock.json | 41 +++- packages/portis-web3/package-lock.json | 302 ++++++++++++++++++++++--- packages/portis-web3/package.json | 2 + packages/portis-web3/src/index.ts | 101 ++++++++- packages/portis-web3/src/interfaces.ts | 3 + 6 files changed, 450 insertions(+), 55 deletions(-) create mode 100644 .idea/workspace.xml diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..97a7eb8 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1589115665374 + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/portis-eos/package-lock.json b/packages/portis-eos/package-lock.json index eed01f4..0a3310a 100644 --- a/packages/portis-eos/package-lock.json +++ b/packages/portis-eos/package-lock.json @@ -2236,7 +2236,8 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2260,13 +2261,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2283,19 +2286,22 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2426,7 +2432,8 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2440,6 +2447,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2456,6 +2464,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2464,13 +2473,15 @@ "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -2491,6 +2502,7 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2579,7 +2591,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2593,6 +2606,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2688,7 +2702,8 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2730,6 +2745,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2751,6 +2767,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2799,13 +2816,15 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true + "dev": true, + "optional": true } } }, diff --git a/packages/portis-web3/package-lock.json b/packages/portis-web3/package-lock.json index dc57752..672fb80 100644 --- a/packages/portis-web3/package-lock.json +++ b/packages/portis-web3/package-lock.json @@ -663,6 +663,54 @@ "to-fast-properties": "^2.0.0" } }, + "@pokt-network/aat-js": { + "version": "0.1.0-rc", + "resolved": "https://registry.npmjs.org/@pokt-network/aat-js/-/aat-js-0.1.0-rc.tgz", + "integrity": "sha512-Xa3hJlnv9lnbv0MA3HQ6BMw/r2DS6OI9ALQ/ImzNosr+wwIkUKezGqAQRu0B7vfjE0PwqeTTaG1B4eelZ+bAGA==", + "requires": { + "@types/libsodium-wrappers": "^0.7.7", + "js-sha3": "^0.8.0", + "libsodium-wrappers": "^0.7.6" + } + }, + "@pokt-network/amino-js": { + "version": "0.7.3-alpha.1", + "resolved": "https://registry.npmjs.org/@pokt-network/amino-js/-/amino-js-0.7.3-alpha.1.tgz", + "integrity": "sha512-nqO7R2fWBv+ucEPP6CsEFnLnM8rwyhZD3ldwyORRqocix5t7oDtjcvgWTsHDnEuxCnoEzouFAz2jQ+lZRhhPCQ==", + "requires": { + "@tendermint/belt": "0.2.1", + "@tendermint/types": "0.1.1" + }, + "dependencies": { + "@tendermint/belt": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@tendermint/belt/-/belt-0.2.1.tgz", + "integrity": "sha512-Z3byTEpbSfrMaNx431pr8P4nrFshWz7WiFqxv/cTVgRENCVfndygOz0W15qC1pgqBhhnQPLEnmdP/GIyiS7JWg==", + "requires": { + "@tendermint/types": "0.1.1" + } + } + } + }, + "@pokt-network/pocket-js": { + "version": "0.3.1-rc", + "resolved": "https://registry.npmjs.org/@pokt-network/pocket-js/-/pocket-js-0.3.1-rc.tgz", + "integrity": "sha512-i8xNh8ryTrOjBfPSAwrK1upOTfSCM4RWIx8kCJf9l1XL+lz+95ux5VhmyIUkX2xB9lBb35YobM9xf9zncQt7rw==", + "requires": { + "@pokt-network/aat-js": "0.1.0-rc", + "@pokt-network/amino-js": "0.7.3-alpha.1", + "@tendermint/belt": "^0.2.1", + "@types/aes-js": "^3.1.0", + "@types/libsodium-wrappers": "^0.7.7", + "aes-js": "^3.1.2", + "axios": "^0.18.1", + "js-sha256": "^0.9.0", + "js-sha3": "^0.8.0", + "libsodium-wrappers": "^0.7.6", + "node-localstorage": "^2.1.5", + "pbkdf2": "^3.0.17" + } + }, "@portis/web3-provider-engine": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/@portis/web3-provider-engine/-/web3-provider-engine-1.0.10.tgz", @@ -675,7 +723,7 @@ "eth-block-tracker": "^4.2.0", "eth-json-rpc-filters": "^4.0.2", "eth-json-rpc-infura": "^3.1.0", - "eth-json-rpc-middleware": "github:radotzki/eth-json-rpc-middleware#8acc43df4a8c0c7f6d212af9163d379211dad4c7", + "eth-json-rpc-middleware": "github:radotzki/eth-json-rpc-middleware#patch-1", "eth-sig-util": "^1.4.2", "ethereumjs-block": "^1.2.2", "ethereumjs-tx": "^1.2.0", @@ -692,6 +740,31 @@ "xtend": "^4.0.1" } }, + "@tendermint/belt": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@tendermint/belt/-/belt-0.2.2.tgz", + "integrity": "sha512-ipdBlrp9smvKkGviG5eOfKRNlTyYyOmpP507A9+TgGlrJ7/PKogmndbBY3rooLDyYpXMWXox4XkwtZ7WAkV58g==", + "requires": { + "@tendermint/types": "0.1.2" + }, + "dependencies": { + "@tendermint/types": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@tendermint/types/-/types-0.1.2.tgz", + "integrity": "sha512-VTYYB5xj6jRS0FnJWaSTuDBYOrXXxz1T23tJHuCkK2VGAqHOwaNHrtUK+fKSaYIoCDr21JM0S+uGej5Toqw1aQ==" + } + } + }, + "@tendermint/types": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@tendermint/types/-/types-0.1.1.tgz", + "integrity": "sha512-jMEz5tJ3ncA8903N2DoPD6EJawSyORRSyWvQbmxyz8ONiugjOKvoesMzz/xIioe1Ekzf6YJnw/3RI+kT9qdNyg==" + }, + "@types/aes-js": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/aes-js/-/aes-js-3.1.1.tgz", + "integrity": "sha512-SDSGgXT3LRCH6qMWk8OHT1vLSVNuHNvCpKCx2/TYtQMbMGGgxJC9fspwSkQjqzRagrWnCrxuLL3jMNXLXHHvSw==" + }, "@types/detect-indent": { "version": "0.1.30", "resolved": "https://registry.npmjs.org/@types/detect-indent/-/detect-indent-0.1.30.tgz", @@ -708,6 +781,11 @@ "@types/node": "*" } }, + "@types/libsodium-wrappers": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/@types/libsodium-wrappers/-/libsodium-wrappers-0.7.7.tgz", + "integrity": "sha512-Li91pVKcLvQJK3ZolwCPo85oxf2gKBCApgnesRxYg4OVYchLXcJB2eivX8S87vfQVv6ZRnyCO1lLDosZGJfpRg==" + }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -933,6 +1011,11 @@ "acorn": "^5.0.0" } }, + "aes-js": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" + }, "ajv": { "version": "6.10.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", @@ -1129,6 +1212,22 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, + "axios": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz", + "integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==", + "requires": { + "follow-redirects": "1.5.10", + "is-buffer": "^2.0.2" + }, + "dependencies": { + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" + } + } + }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -2129,6 +2228,13 @@ "requires": { "js-sha3": "^0.6.1", "safe-buffer": "^5.1.1" + }, + "dependencies": { + "js-sha3": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.6.1.tgz", + "integrity": "sha1-W4n3enR3Z5h39YxKB1JAk0sflcA=" + } } }, "browserify-sign": { @@ -3004,6 +3110,14 @@ "safe-event-emitter": "^1.0.1" } }, + "eth-json-rpc-errors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/eth-json-rpc-errors/-/eth-json-rpc-errors-1.1.1.tgz", + "integrity": "sha512-WT5shJ5KfNqHi9jOZD+ID8I1kuYWNrigtZat7GOQkvwo99f8SzAVaEcWhJUv656WiZOAg3P1RiJQANtUmDmbIg==", + "requires": { + "fast-safe-stringify": "^2.0.6" + } + }, "eth-json-rpc-filters": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/eth-json-rpc-filters/-/eth-json-rpc-filters-4.0.2.tgz", @@ -3015,6 +3129,52 @@ "json-rpc-engine": "^5.0.0", "lodash.flatmap": "^4.5.0", "safe-event-emitter": "^1.0.1" + }, + "dependencies": { + "eth-json-rpc-middleware": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-4.4.1.tgz", + "integrity": "sha512-yoSuRgEYYGFdVeZg3poWOwAlRI+MoBIltmOB86MtpoZjvLbou9EB/qWMOWSmH2ryCWLW97VYY6NWsmWm3OAA7A==", + "requires": { + "btoa": "^1.2.1", + "clone": "^2.1.1", + "eth-json-rpc-errors": "^1.0.1", + "eth-query": "^2.1.2", + "eth-sig-util": "^1.4.2", + "ethereumjs-block": "^1.6.0", + "ethereumjs-tx": "^1.3.7", + "ethereumjs-util": "^5.1.2", + "ethereumjs-vm": "^2.6.0", + "fetch-ponyfill": "^4.0.0", + "json-rpc-engine": "^5.1.3", + "json-stable-stringify": "^1.0.1", + "pify": "^3.0.0", + "safe-event-emitter": "^1.0.1" + }, + "dependencies": { + "json-rpc-engine": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-5.1.8.tgz", + "integrity": "sha512-vTBSDEPJV1fPAsbm2g5sEuPjsgLdiab2f1CTn2PyRr8nxggUpA996PDlNQDsM0gnrA99F8KIBLq2nIKrOFl1Mg==", + "requires": { + "async": "^2.0.1", + "eth-json-rpc-errors": "^2.0.1", + "promise-to-callback": "^1.0.0", + "safe-event-emitter": "^1.0.1" + }, + "dependencies": { + "eth-json-rpc-errors": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/eth-json-rpc-errors/-/eth-json-rpc-errors-2.0.2.tgz", + "integrity": "sha512-uBCRM2w2ewusRHGxN8JhcuOb2RN3ueAOYH/0BhqdFmQkZx5lj5+fLKTz0mIVOzd4FG5/kUksCzCD7eTEim6gaA==", + "requires": { + "fast-safe-stringify": "^2.0.6" + } + } + } + } + } + } } }, "eth-json-rpc-infura": { @@ -3178,7 +3338,7 @@ "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", "requires": { - "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb", + "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", "ethereumjs-util": "^5.1.1" } }, @@ -3549,6 +3709,11 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" + }, "fetch-ponyfill": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz", @@ -3632,6 +3797,29 @@ "readable-stream": "^2.3.6" } }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "requires": { + "debug": "=3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, "for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -3717,7 +3905,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3738,12 +3927,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3758,17 +3949,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3885,7 +4079,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3897,6 +4092,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3911,6 +4107,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3918,12 +4115,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3942,6 +4141,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -4022,7 +4222,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4034,6 +4235,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -4119,7 +4321,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -4155,6 +4358,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4174,6 +4378,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4217,12 +4422,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -4328,8 +4535,7 @@ "graceful-fs": { "version": "4.1.15", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" }, "har-schema": { "version": "2.0.0", @@ -4548,8 +4754,7 @@ "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, "indexof": { "version": "0.0.1", @@ -4813,10 +5018,15 @@ "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==" }, + "js-sha256": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", + "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" + }, "js-sha3": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.6.1.tgz", - "integrity": "sha1-W4n3enR3Z5h39YxKB1JAk0sflcA=" + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" }, "js-tokens": { "version": "4.0.0", @@ -5024,6 +5234,19 @@ "xtend": "~4.0.0" } }, + "libsodium": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.6.tgz", + "integrity": "sha512-hPb/04sEuLcTRdWDtd+xH3RXBihpmbPCsKW/Jtf4PsvdyKh+D6z2D2gvp/5BfoxseP+0FCOg66kE+0oGUE/loQ==" + }, + "libsodium-wrappers": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.6.tgz", + "integrity": "sha512-OUO2CWW5bHdLr6hkKLHIKI4raEkZrf3QHkhXsJ1yCh6MZ3JDA7jFD3kCATNquuGSG6MjjPHQIQms0y0gBDzjQg==", + "requires": { + "libsodium": "0.7.6" + } + }, "loader-runner": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", @@ -5451,6 +5674,14 @@ } } }, + "node-localstorage": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/node-localstorage/-/node-localstorage-2.1.6.tgz", + "integrity": "sha512-yE7AycE5G2hU55d+F7Ona9nx97C+enJzWWx6jrsji7fuPZFJOvuW3X/LKKAcXRBcEIJPDOKt8ZiFWFmShR/irg==", + "requires": { + "write-file-atomic": "^1.1.4" + } + }, "node-releases": { "version": "1.1.17", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.17.tgz", @@ -5709,7 +5940,6 @@ "version": "3.0.17", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", - "dev": true, "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -6268,18 +6498,11 @@ } }, "sha3": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/sha3/-/sha3-1.2.2.tgz", - "integrity": "sha1-pmxQmN5MJbyIM27ItIF9AFvKe6k=", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/sha3/-/sha3-1.2.6.tgz", + "integrity": "sha512-KgLGmJGrmNB4JWVsAV11Yk6KbvsAiygWJc7t5IebWva/0NukNrjJqhtKhzy3Eiv2AKuGvhZZt7dt1mDo7HkoiQ==", "requires": { - "nan": "2.10.0" - }, - "dependencies": { - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" - } + "nan": "2.13.2" } }, "shebang-command": { @@ -6308,6 +6531,11 @@ "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -7305,6 +7533,16 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "write-file-atomic": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + }, "ws": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", diff --git a/packages/portis-web3/package.json b/packages/portis-web3/package.json index ebdfed8..bbe5088 100644 --- a/packages/portis-web3/package.json +++ b/packages/portis-web3/package.json @@ -38,6 +38,8 @@ "license": "MIT", "dependencies": { "@portis/web3-provider-engine": "1.0.10", + "@pokt-network/pocket-js": "0.3.1-rc", + "@pokt-network/aat-js": "0.1.0-rc", "ethereumjs-util": "5.2.0", "penpal": "3.0.7" } diff --git a/packages/portis-web3/src/index.ts b/packages/portis-web3/src/index.ts index 769b2d1..b5fb4d9 100644 --- a/packages/portis-web3/src/index.ts +++ b/packages/portis-web3/src/index.ts @@ -12,6 +12,10 @@ import { getTxGas } from './utils/getTxGas'; import { Query } from './utils/query'; import { styles } from './styles'; import { validateSecureOrigin } from './utils/secureOrigin'; +import { Pocket, PocketAAT, typeGuard } from '@pokt-network/pocket-js'; +import { RpcError } from '@pokt-network/pocket-js/lib/src/rpc'; +import { RelayResponse } from '@pokt-network/pocket-js/lib/src/rpc/models'; +import { ConsensusNode } from '@pokt-network/pocket-js/lib/src/rpc/models/consensus-node'; const version = '$$PORTIS_SDK_VERSION$$'; const widgetUrl = 'https://widget.portis.io'; @@ -31,6 +35,8 @@ export default class Portis { private _widgetUrl = widgetUrl; private _onLoginCallback: (walletAddress: string, email?: string, reputation?: string) => void; private _onLogoutCallback: () => void; + private pocket?: Pocket = undefined; + private pocketAAT?: PocketAAT = undefined; constructor(dappId: string, network: string | INetwork, options: IOptions = {}) { validateSecureOrigin(); @@ -42,6 +48,18 @@ export default class Portis { scope: options.scope, registerPageByDefault: options.registerPageByDefault, }; + + if (this.config.network.nodeProtocol === 'pocket') { + if (options.pocketAAT === undefined) { + throw new Error( + "[Portis] illegal 'node protocol' parameter. In order to use the pocket network you need to provide a Pocket AAT object in the options", + ); + } + + this.pocketAAT = options.pocketAAT; + this.pocket = new Pocket([new URL(this.config.network.nodeUrl)]); + } + this.widget = this._initWidget(); this.provider = this._initProvider(); } @@ -287,18 +305,11 @@ export default class Portis { }), ); - engine.addProvider({ - setEngine: _ => _, - handleRequest: async (payload, next, end) => { - const widgetCommunication = (await this.widget).communication; - const { error, result } = await widgetCommunication.relay(payload, this.config); - if (payload.method === 'net_version') { - this._network = result; - engine.networkVersion = this._network; - } - end(error, result); - }, - }); + if (this.pocket === undefined) { + this.addRelayProvider(engine); + } else { + this.addPocketRelayProvider(engine); + } engine.enable = () => new Promise((resolve, reject) => { @@ -329,6 +340,72 @@ export default class Portis { return engine; } + private addRelayProvider(engine: ProviderEngine) { + engine.addProvider({ + setEngine: _ => _, + handleRequest: async (payload, next, end) => { + const widgetCommunication = (await this.widget).communication; + const { error, result } = await widgetCommunication.relay(payload, this.config); + if (payload.method === 'net_version') { + this._network = result; + engine.networkVersion = this._network; + } + end(error, result); + }, + }); + } + + private addPocketRelayProvider(engine: ProviderEngine) { + engine.addProvider({ + setEngine: _ => _, + handleRequest: async (payload, next, end) => { + if (this.config.network.chainId === undefined) { + throw new Error( + "[Portis] 'chainId' is required. Read more about it here: https://docs.portis.io/#/configuration?id=network", + ); + } + + if (this.pocketAAT === undefined) { + throw new Error( + "[Portis] 'pocketAAT' is required. Read more about it here: https://docs.portis.io/#/configuration?id=network", + ); + } + + if (this.pocket === undefined) { + throw new Error( + "[Portis] 'Pocket' wasn't created it. Read more about it here: https://docs.portis.io/#/configuration?id=network", + ); + } + + let response = await this.pocket.sendRelay( + JSON.stringify(payload), + this.config.network.chainId, + this.pocketAAT, + ); + let error; + let result; + + switch (true) { + case typeGuard(response, RpcError): + error = response; + break; + case typeGuard(response, RelayResponse): + result = (response as RelayResponse).payload; + break; + default: + result = (response as ConsensusNode).relayResponse.payload; + } + + if (payload.method === 'net_version') { + this._network = result; + engine.networkVersion = this._network; + } + + end(error, result); + }, + }); + } + private async _setHeight(height: number) { const widgetFrame = (await this.widget).widgetFrame; widgetFrame.style.height = `${height}px`; diff --git a/packages/portis-web3/src/interfaces.ts b/packages/portis-web3/src/interfaces.ts index c8436ec..5a0a8f4 100644 --- a/packages/portis-web3/src/interfaces.ts +++ b/packages/portis-web3/src/interfaces.ts @@ -1,3 +1,5 @@ +import { PocketAAT } from '@pokt-network/aat-js'; + export interface INetwork { nodeUrl: string; chainId?: string; @@ -29,6 +31,7 @@ export interface IOptions { scope?: Scope[]; gasRelay?: boolean; registerPageByDefault?: boolean; + pocketAAT?: PocketAAT; } export interface ITransactionRequest { From 2f28086f2cfb802686be219b5c96cbedbfca5c4a Mon Sep 17 00:00:00 2001 From: Wilson Garcia Date: Tue, 12 May 2020 07:16:40 -0400 Subject: [PATCH 2/6] Fixing issues --- packages/portis-web3/package.json | 6 +++--- packages/portis-web3/src/index.ts | 4 ++-- packages/portis-web3/src/interfaces.ts | 2 ++ packages/portis-web3/tsconfig.json | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/portis-web3/package.json b/packages/portis-web3/package.json index bbe5088..bd56f6e 100644 --- a/packages/portis-web3/package.json +++ b/packages/portis-web3/package.json @@ -25,7 +25,7 @@ "dts-bundle": "0.7.3", "replace-in-file": "3.4.3", "rimraf": "2.6.1", - "typescript": "3.2.2", + "typescript": "3.8.3", "webpack": "4.28.3", "webpack-cli": "3.1.2" }, @@ -37,9 +37,9 @@ ], "license": "MIT", "dependencies": { - "@portis/web3-provider-engine": "1.0.10", - "@pokt-network/pocket-js": "0.3.1-rc", "@pokt-network/aat-js": "0.1.0-rc", + "@pokt-network/pocket-js": "0.3.1-rc", + "@portis/web3-provider-engine": "1.0.10", "ethereumjs-util": "5.2.0", "penpal": "3.0.7" } diff --git a/packages/portis-web3/src/index.ts b/packages/portis-web3/src/index.ts index b5fb4d9..1132914 100644 --- a/packages/portis-web3/src/index.ts +++ b/packages/portis-web3/src/index.ts @@ -50,14 +50,14 @@ export default class Portis { }; if (this.config.network.nodeProtocol === 'pocket') { - if (options.pocketAAT === undefined) { + if (options.pocket === undefined || options.pocketAAT) { throw new Error( "[Portis] illegal 'node protocol' parameter. In order to use the pocket network you need to provide a Pocket AAT object in the options", ); } this.pocketAAT = options.pocketAAT; - this.pocket = new Pocket([new URL(this.config.network.nodeUrl)]); + this.pocket = options.pocket; } this.widget = this._initWidget(); diff --git a/packages/portis-web3/src/interfaces.ts b/packages/portis-web3/src/interfaces.ts index 5a0a8f4..cdff20a 100644 --- a/packages/portis-web3/src/interfaces.ts +++ b/packages/portis-web3/src/interfaces.ts @@ -1,4 +1,5 @@ import { PocketAAT } from '@pokt-network/aat-js'; +import { Pocket } from '@pokt-network/pocket-js'; export interface INetwork { nodeUrl: string; @@ -31,6 +32,7 @@ export interface IOptions { scope?: Scope[]; gasRelay?: boolean; registerPageByDefault?: boolean; + pocket?: Pocket; pocketAAT?: PocketAAT; } diff --git a/packages/portis-web3/tsconfig.json b/packages/portis-web3/tsconfig.json index 71e00c9..8e6b989 100644 --- a/packages/portis-web3/tsconfig.json +++ b/packages/portis-web3/tsconfig.json @@ -7,6 +7,7 @@ "newLine": "LF", "lib": ["dom", "es2017"], "moduleResolution": "node", + "skipLibCheck": true, "importHelpers": false, "declaration": true, "pretty": true, From 167dceb807c58c050d5cfa8380ae110afaf00745 Mon Sep 17 00:00:00 2001 From: Wilson Garcia Date: Tue, 12 May 2020 15:56:55 -0400 Subject: [PATCH 3/6] Fixing issue --- packages/portis-web3/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/portis-web3/src/index.ts b/packages/portis-web3/src/index.ts index 1132914..52aaddf 100644 --- a/packages/portis-web3/src/index.ts +++ b/packages/portis-web3/src/index.ts @@ -50,7 +50,7 @@ export default class Portis { }; if (this.config.network.nodeProtocol === 'pocket') { - if (options.pocket === undefined || options.pocketAAT) { + if (options.pocket === undefined || options.pocketAAT === undefined) { throw new Error( "[Portis] illegal 'node protocol' parameter. In order to use the pocket network you need to provide a Pocket AAT object in the options", ); From f097dd73e22c0aeac0508f65935469433af1acf1 Mon Sep 17 00:00:00 2001 From: Wilson Garcia Date: Thu, 4 Jun 2020 05:15:50 -0400 Subject: [PATCH 4/6] Removing files --- .idea/workspace.xml | 56 -------------------------- packages/portis-web3/package-lock.json | 6 +-- 2 files changed, 3 insertions(+), 59 deletions(-) delete mode 100644 .idea/workspace.xml diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 97a7eb8..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1589115665374 - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/portis-web3/package-lock.json b/packages/portis-web3/package-lock.json index 672fb80..d0ab189 100644 --- a/packages/portis-web3/package-lock.json +++ b/packages/portis-web3/package-lock.json @@ -7172,9 +7172,9 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "typescript": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz", - "integrity": "sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", + "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", "dev": true }, "unicode-canonical-property-names-ecmascript": { From 646ffe8cc0fc9251236a99b8d7af259f4b8f3d66 Mon Sep 17 00:00:00 2001 From: Wilson Garcia Date: Tue, 9 Jun 2020 11:10:15 -0400 Subject: [PATCH 5/6] Updating pocket-js version --- packages/portis-web3/package.json | 4 ++-- packages/portis-web3/src/index.ts | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/portis-web3/package.json b/packages/portis-web3/package.json index bd56f6e..6b65602 100644 --- a/packages/portis-web3/package.json +++ b/packages/portis-web3/package.json @@ -37,8 +37,8 @@ ], "license": "MIT", "dependencies": { - "@pokt-network/aat-js": "0.1.0-rc", - "@pokt-network/pocket-js": "0.3.1-rc", + "@pokt-network/aat-js": "0.1.1-rc", + "@pokt-network/pocket-js": "0.5.0-rc", "@portis/web3-provider-engine": "1.0.10", "ethereumjs-util": "5.2.0", "penpal": "3.0.7" diff --git a/packages/portis-web3/src/index.ts b/packages/portis-web3/src/index.ts index 52aaddf..7711ff4 100644 --- a/packages/portis-web3/src/index.ts +++ b/packages/portis-web3/src/index.ts @@ -12,10 +12,7 @@ import { getTxGas } from './utils/getTxGas'; import { Query } from './utils/query'; import { styles } from './styles'; import { validateSecureOrigin } from './utils/secureOrigin'; -import { Pocket, PocketAAT, typeGuard } from '@pokt-network/pocket-js'; -import { RpcError } from '@pokt-network/pocket-js/lib/src/rpc'; -import { RelayResponse } from '@pokt-network/pocket-js/lib/src/rpc/models'; -import { ConsensusNode } from '@pokt-network/pocket-js/lib/src/rpc/models/consensus-node'; +import { Pocket, PocketAAT, typeGuard, RpcError, RelayResponse, ConsensusNode } from '@pokt-network/pocket-js'; const version = '$$PORTIS_SDK_VERSION$$'; const widgetUrl = 'https://widget.portis.io'; From d22a5c5a9ed14ef072f63a7552cadafe368764b2 Mon Sep 17 00:00:00 2001 From: Wilson Garcia Date: Thu, 18 Jun 2020 15:44:57 -0400 Subject: [PATCH 6/6] Refactoring Portis integration --- packages/portis-web3/package-lock.json | 943 +++++++++++++++++++++++-- packages/portis-web3/package.json | 3 +- packages/portis-web3/src/index.ts | 131 ++-- packages/portis-web3/src/interfaces.ts | 5 +- 4 files changed, 932 insertions(+), 150 deletions(-) diff --git a/packages/portis-web3/package-lock.json b/packages/portis-web3/package-lock.json index d0ab189..2d87f82 100644 --- a/packages/portis-web3/package-lock.json +++ b/packages/portis-web3/package-lock.json @@ -664,9 +664,9 @@ } }, "@pokt-network/aat-js": { - "version": "0.1.0-rc", - "resolved": "https://registry.npmjs.org/@pokt-network/aat-js/-/aat-js-0.1.0-rc.tgz", - "integrity": "sha512-Xa3hJlnv9lnbv0MA3HQ6BMw/r2DS6OI9ALQ/ImzNosr+wwIkUKezGqAQRu0B7vfjE0PwqeTTaG1B4eelZ+bAGA==", + "version": "0.1.1-rc", + "resolved": "https://registry.npmjs.org/@pokt-network/aat-js/-/aat-js-0.1.1-rc.tgz", + "integrity": "sha512-3ZH92G7SVm2KoaJfz8AQzjXvJwSeFiCa5zYJkNCgJDuaKVb59Nd/g+nwvlCTy2GI0KallRS3iTAWOaNU6OQAsg==", "requires": { "@types/libsodium-wrappers": "^0.7.7", "js-sha3": "^0.8.0", @@ -674,9 +674,9 @@ } }, "@pokt-network/amino-js": { - "version": "0.7.3-alpha.1", - "resolved": "https://registry.npmjs.org/@pokt-network/amino-js/-/amino-js-0.7.3-alpha.1.tgz", - "integrity": "sha512-nqO7R2fWBv+ucEPP6CsEFnLnM8rwyhZD3ldwyORRqocix5t7oDtjcvgWTsHDnEuxCnoEzouFAz2jQ+lZRhhPCQ==", + "version": "0.7.5-alpha.1", + "resolved": "https://registry.npmjs.org/@pokt-network/amino-js/-/amino-js-0.7.5-alpha.1.tgz", + "integrity": "sha512-fw/a/4RldtN11PaF2lcatFB7PrZd2MeYlPh/sCs97JaMkvhv56R79rei/UVgTiwWoPWKIWwdbAhLwhUKqGkeVg==", "requires": { "@tendermint/belt": "0.2.1", "@tendermint/types": "0.1.1" @@ -693,22 +693,97 @@ } }, "@pokt-network/pocket-js": { - "version": "0.3.1-rc", - "resolved": "https://registry.npmjs.org/@pokt-network/pocket-js/-/pocket-js-0.3.1-rc.tgz", - "integrity": "sha512-i8xNh8ryTrOjBfPSAwrK1upOTfSCM4RWIx8kCJf9l1XL+lz+95ux5VhmyIUkX2xB9lBb35YobM9xf9zncQt7rw==", + "version": "0.5.0-rc", + "resolved": "https://registry.npmjs.org/@pokt-network/pocket-js/-/pocket-js-0.5.0-rc.tgz", + "integrity": "sha512-Ym7bSrwBONQ9btL0r6J08ShAiA3LFP0fPRv+pPAMNJ9CDbG+fL63wGAV2lGUy7rdLUlW/hy+k04+xotaGpuz6w==", "requires": { - "@pokt-network/aat-js": "0.1.0-rc", - "@pokt-network/amino-js": "0.7.3-alpha.1", + "@pokt-network/aat-js": "0.1.1-rc", + "@pokt-network/amino-js": "0.7.5-alpha.1", "@tendermint/belt": "^0.2.1", "@types/aes-js": "^3.1.0", "@types/libsodium-wrappers": "^0.7.7", + "@types/scrypt-js": "^2.0.4", "aes-js": "^3.1.2", "axios": "^0.18.1", + "browserify": "^16.5.1", + "buffer": "^5.6.0", "js-sha256": "^0.9.0", "js-sha3": "^0.8.0", "libsodium-wrappers": "^0.7.6", + "minifyify": "^7.3.5", "node-localstorage": "^2.1.5", - "pbkdf2": "^3.0.17" + "pbkdf2": "^3.0.17", + "scrypt-js": "^3.0.1", + "tsify": "^4.0.1" + }, + "dependencies": { + "buffer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + } + } + }, + "@pokt-network/web3-provider": { + "version": "0.0.5-rc", + "resolved": "https://registry.npmjs.org/@pokt-network/web3-provider/-/web3-provider-0.0.5-rc.tgz", + "integrity": "sha512-LMEqCJTepXFAGbxEaLIuPUi0W56zkln8+6fKUO1Ie8VLMC7OOQZVqraKQP3UTq8lTBAhpFwzu9SqHLNdqXtFEw==", + "requires": { + "@pokt-network/pocket-js": "0.2.2-rc" + }, + "dependencies": { + "@pokt-network/aat-js": { + "version": "0.1.0-rc", + "resolved": "https://registry.npmjs.org/@pokt-network/aat-js/-/aat-js-0.1.0-rc.tgz", + "integrity": "sha512-Xa3hJlnv9lnbv0MA3HQ6BMw/r2DS6OI9ALQ/ImzNosr+wwIkUKezGqAQRu0B7vfjE0PwqeTTaG1B4eelZ+bAGA==", + "requires": { + "@types/libsodium-wrappers": "^0.7.7", + "js-sha3": "^0.8.0", + "libsodium-wrappers": "^0.7.6" + } + }, + "@pokt-network/amino-js": { + "version": "0.7.3-alpha.1", + "resolved": "https://registry.npmjs.org/@pokt-network/amino-js/-/amino-js-0.7.3-alpha.1.tgz", + "integrity": "sha512-nqO7R2fWBv+ucEPP6CsEFnLnM8rwyhZD3ldwyORRqocix5t7oDtjcvgWTsHDnEuxCnoEzouFAz2jQ+lZRhhPCQ==", + "requires": { + "@tendermint/belt": "0.2.1", + "@tendermint/types": "0.1.1" + }, + "dependencies": { + "@tendermint/belt": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@tendermint/belt/-/belt-0.2.1.tgz", + "integrity": "sha512-Z3byTEpbSfrMaNx431pr8P4nrFshWz7WiFqxv/cTVgRENCVfndygOz0W15qC1pgqBhhnQPLEnmdP/GIyiS7JWg==", + "requires": { + "@tendermint/types": "0.1.1" + } + } + } + }, + "@pokt-network/pocket-js": { + "version": "0.2.2-rc", + "resolved": "https://registry.npmjs.org/@pokt-network/pocket-js/-/pocket-js-0.2.2-rc.tgz", + "integrity": "sha512-/iwhCVXF2+HmxgZ43bhs0NbxqH1waYU7Ejz6CqVqbN2i8imzheUzMiCBatOuMYRBewVcAGF0L9com+l7hfrNyA==", + "requires": { + "@pokt-network/aat-js": "0.1.0-rc", + "@pokt-network/amino-js": "0.7.3-alpha.1", + "@tendermint/belt": "^0.2.1", + "@types/aes-js": "^3.1.0", + "@types/libsodium-wrappers": "^0.7.7", + "aes-js": "^3.1.2", + "axios": "^0.18.1", + "js-sha256": "^0.9.0", + "js-sha3": "^0.8.0", + "libsodium-wrappers": "^0.7.6", + "node-localstorage": "^2.1.5", + "pbkdf2": "^3.0.17" + } + } } }, "@portis/web3-provider-engine": { @@ -741,9 +816,9 @@ } }, "@tendermint/belt": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@tendermint/belt/-/belt-0.2.2.tgz", - "integrity": "sha512-ipdBlrp9smvKkGviG5eOfKRNlTyYyOmpP507A9+TgGlrJ7/PKogmndbBY3rooLDyYpXMWXox4XkwtZ7WAkV58g==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@tendermint/belt/-/belt-0.2.3.tgz", + "integrity": "sha512-FOyojr48WhRd3k2kw3pLh4sCUIDH9XJbESABdD4lH5MSTOqZohuDxD3IQuyKg1jFGCO1xxBmR3TsNq1SVnNdpw==", "requires": { "@tendermint/types": "0.1.2" }, @@ -801,8 +876,15 @@ "@types/node": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.0.tgz", - "integrity": "sha512-j2tekvJCO7j22cs+LO6i0kRPhmQ9MXaPZ55TzOc1lzkN5b6BWqq4AFjl04s1oRRQ1v5rSe+KEvnLUSTonuls/A==", - "dev": true + "integrity": "sha512-j2tekvJCO7j22cs+LO6i0kRPhmQ9MXaPZ55TzOc1lzkN5b6BWqq4AFjl04s1oRRQ1v5rSe+KEvnLUSTonuls/A==" + }, + "@types/scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-FCgSes9EwZrZEv3VmEKGSWeDgJSm6DJdR/QrBnZ1Y6Xhi9EAKmZqr6ocpPtZT/ZbJwaa/rpLyLq4uIy1Imzrhw==", + "requires": { + "@types/node": "*" + } }, "@webassemblyjs/ast": { "version": "1.7.11", @@ -988,6 +1070,15 @@ "integrity": "sha512-FZdkNBDqBRHKQ2MEbSC17xnPFOhZxeJ2YGSfr2BKf3sujG49Qe3bB+rGCwQfIaA7WHnGeGkSijX4FuBCdrzW/g==", "dev": true }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, "abstract-leveldown": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", @@ -1011,6 +1102,33 @@ "acorn": "^5.0.0" } }, + "acorn-node": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", + "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "requires": { + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" + }, + "dependencies": { + "acorn": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", + "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + } + } + }, + "acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==" + }, "aes-js": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", @@ -1039,6 +1157,26 @@ "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", "dev": true }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -1052,6 +1190,11 @@ "color-convert": "^1.9.0" } }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" + }, "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", @@ -1097,12 +1240,35 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=" + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -1115,7 +1281,6 @@ "version": "4.10.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -1126,7 +1291,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, "requires": { "util": "0.10.3" }, @@ -1134,14 +1298,12 @@ "inherits": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" }, "util": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, "requires": { "inherits": "2.0.1" } @@ -2082,8 +2244,7 @@ "base64-js": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" }, "bcrypt-pbkdf": { "version": "1.0.2", @@ -2175,6 +2336,187 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, + "browser-pack": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", + "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", + "requires": { + "JSONStream": "^1.0.3", + "combine-source-map": "~0.8.0", + "defined": "^1.0.0", + "safe-buffer": "^5.1.1", + "through2": "^2.0.0", + "umd": "^3.0.0" + } + }, + "browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + } + } + }, + "browserify": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.5.1.tgz", + "integrity": "sha512-EQX0h59Pp+0GtSRb5rL6OTfrttlzv+uyaUVlK6GX3w11SQ0jKPKyjC/54RhPR2ib2KmfcELM06e8FxcI5XNU2A==", + "requires": { + "JSONStream": "^1.0.3", + "assert": "^1.4.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^1.11.0", + "browserify-zlib": "~0.2.0", + "buffer": "~5.2.1", + "cached-path-relative": "^1.0.0", + "concat-stream": "^1.6.0", + "console-browserify": "^1.1.0", + "constants-browserify": "~1.0.0", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^2.0.0", + "domain-browser": "^1.2.0", + "duplexer2": "~0.1.2", + "events": "^2.0.0", + "glob": "^7.1.0", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "https-browserify": "^1.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^7.0.0", + "labeled-stream-splicer": "^2.0.0", + "mkdirp-classic": "^0.5.2", + "module-deps": "^6.0.0", + "os-browserify": "~0.3.0", + "parents": "^1.0.1", + "path-browserify": "~0.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^2.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.4", + "shasum": "^1.0.0", + "shell-quote": "^1.6.1", + "stream-browserify": "^2.0.0", + "stream-http": "^3.0.0", + "string_decoder": "^1.1.1", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^2.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "0.0.1", + "url": "~0.11.0", + "util": "~0.10.1", + "vm-browserify": "^1.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "events": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz", + "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==" + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "stream-http": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.1.tgz", + "integrity": "sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg==", + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + }, + "dependencies": { + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + } + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "requires": { + "process": "~0.11.0" + } + }, + "tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==" + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "requires": { + "inherits": "2.0.3" + } + }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" + } + } + }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", @@ -2192,7 +2534,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, "requires": { "browserify-aes": "^1.0.4", "browserify-des": "^1.0.0", @@ -2203,7 +2544,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, "requires": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", @@ -2215,7 +2555,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, "requires": { "bn.js": "^4.1.0", "randombytes": "^2.0.1" @@ -2241,7 +2580,6 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, "requires": { "bn.js": "^4.1.1", "browserify-rsa": "^4.0.0", @@ -2256,7 +2594,6 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, "requires": { "pako": "~1.0.5" } @@ -2320,8 +2657,7 @@ "builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" }, "cacache": { "version": "11.3.2", @@ -2373,6 +2709,11 @@ "unset-value": "^1.0.0" } }, + "cached-path-relative": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz", + "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==" + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -2389,6 +2730,15 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -2536,6 +2886,24 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, + "combine-source-map": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", + "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", + "requires": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.6.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.5.3" + }, + "dependencies": { + "convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=" + } + } + }, "combined-stream": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", @@ -2582,7 +2950,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, "requires": { "date-now": "^0.1.4" } @@ -2590,8 +2957,7 @@ "constants-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" }, "convert-source-map": { "version": "1.6.0", @@ -2658,7 +3024,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, "requires": { "bn.js": "^4.1.0", "elliptic": "^6.0.0" @@ -2723,7 +3088,6 @@ "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, "requires": { "browserify-cipher": "^1.0.0", "browserify-sign": "^4.0.0", @@ -2744,6 +3108,11 @@ "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", "dev": true }, + "dash-ast": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", + "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==" + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -2755,8 +3124,7 @@ "date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" }, "debug": { "version": "4.1.1", @@ -2769,8 +3137,7 @@ "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "decode-uri-component": { "version": "0.2.0", @@ -2857,11 +3224,21 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, + "deps-sort": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", + "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", + "requires": { + "JSONStream": "^1.0.3", + "shasum-object": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^2.0.0" + } + }, "des.js": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, "requires": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" @@ -2875,11 +3252,27 @@ "repeating": "^2.0.0" } }, + "detective": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz", + "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==", + "requires": { + "acorn-node": "^1.6.1", + "defined": "^1.0.0", + "minimist": "^1.1.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + } + } + }, "diffie-hellman": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, "requires": { "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", @@ -2894,8 +3287,7 @@ "domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" }, "drbg.js": { "version": "1.0.1", @@ -2954,6 +3346,14 @@ } } }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "requires": { + "readable-stream": "^2.0.2" + } + }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -3035,6 +3435,14 @@ "prr": "~1.0.1" } }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, "es-abstract": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", @@ -4443,6 +4851,11 @@ "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, + "get-assigned-identifiers": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", + "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==" + }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -4646,6 +5059,11 @@ "os-tmpdir": "^1.0.1" } }, + "htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=" + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -4659,8 +5077,7 @@ "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" }, "iconv-lite": { "version": "0.4.24", @@ -4673,8 +5090,7 @@ "ieee754": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", - "dev": true + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" }, "iferr": { "version": "0.1.5", @@ -4776,6 +5192,38 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "inline-source-map": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "requires": { + "source-map": "~0.5.3" + } + }, + "insert-module-globals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", + "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", + "requires": { + "JSONStream": "^1.0.3", + "acorn-node": "^1.5.2", + "combine-source-map": "^0.8.0", + "concat-stream": "^1.6.1", + "is-buffer": "^1.1.0", + "path-is-absolute": "^1.0.1", + "process": "~0.11.0", + "through2": "^2.0.0", + "undeclared-identifiers": "^1.1.2", + "xtend": "^4.0.0" + }, + "dependencies": { + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + } + } + }, "interpret": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", @@ -4816,6 +5264,11 @@ } } }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, "is-binary-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", @@ -4828,8 +5281,7 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-callable": { "version": "1.1.4", @@ -4985,6 +5437,11 @@ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -5107,6 +5564,11 @@ "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -5144,6 +5606,20 @@ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true }, + "labeled-stream-splicer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", + "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", + "requires": { + "inherits": "^2.0.1", + "stream-splicer": "^2.0.0" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, "lcid": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", @@ -5296,11 +5772,41 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" + }, + "lodash.bind": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", + "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=" + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, "lodash.flatmap": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.flatmap/-/lodash.flatmap-4.5.0.tgz", "integrity": "sha1-74y/QI9uSCaGYzRTBcaswLd4cC4=" }, + "lodash.foreach": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" + }, + "lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=" + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -5457,7 +5963,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, "requires": { "bn.js": "^4.0.0", "brorand": "^1.0.1" @@ -5490,6 +5995,25 @@ "dom-walk": "^0.1.0" } }, + "minifyify": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/minifyify/-/minifyify-7.3.5.tgz", + "integrity": "sha1-n0uwyGklAkeNjuhbEL1ySFcGKa4=", + "requires": { + "concat-stream": "^1.4.7", + "convert-source-map": "^1.0.0", + "lodash.assign": "^4.0.0", + "lodash.bind": "^4.0.0", + "lodash.defaults": "^4.0.0", + "lodash.foreach": "^4.0.0", + "mkdirp": "^0.5.0", + "source-map": "^0.5.3", + "through": "^2.3.6", + "tmp": "0.0.28", + "transform-filter": "^0.1.1", + "uglify-js": "^2.6.1" + } + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -5560,6 +6084,33 @@ "minimist": "0.0.8" } }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, + "module-deps": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.2.tgz", + "integrity": "sha512-a9y6yDv5u5I4A+IPHTnqFxcaKr4p50/zxTjcQJaX2ws9tN/W6J6YXnEKhqRyPhl494dkcxx951onSKVezmI+3w==", + "requires": { + "JSONStream": "^1.0.3", + "browser-resolve": "^1.7.0", + "cached-path-relative": "^1.0.2", + "concat-stream": "~1.6.0", + "defined": "^1.0.0", + "detective": "^5.2.0", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "parents": "^1.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.4.0", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + } + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -5579,6 +6130,17 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "requires": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + } + }, "nan": { "version": "2.13.2", "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", @@ -5790,8 +6352,7 @@ "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" }, "os-homedir": { "version": "1.0.2", @@ -5859,8 +6420,7 @@ "pako": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", - "dev": true + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" }, "parallel-transform": { "version": "1.1.0", @@ -5873,11 +6433,18 @@ "readable-stream": "^2.1.5" } }, + "parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "requires": { + "path-platform": "~0.11.15" + } + }, "parse-asn1": { "version": "5.1.4", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", - "dev": true, "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", @@ -5896,6 +6463,14 @@ "string.prototype.trim": "^1.1.2" } }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "^1.2.0" + } + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -5905,8 +6480,7 @@ "path-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" }, "path-dirname": { "version": "1.0.2", @@ -5936,6 +6510,11 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, + "path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=" + }, "pbkdf2": { "version": "3.0.17", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", @@ -6027,7 +6606,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", @@ -6083,20 +6661,17 @@ "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" }, "querystring-es3": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, "requires": { "safe-buffer": "^5.1.0" } @@ -6105,12 +6680,19 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, "requires": { "randombytes": "^2.0.5", "safe-buffer": "^5.1.0" } }, + "read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "requires": { + "readable-stream": "^2.0.2" + } + }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -6235,8 +6817,7 @@ "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, "repeating": { "version": "2.0.1", @@ -6339,6 +6920,14 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "requires": { + "align-text": "^0.1.1" + } + }, "rimraf": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", @@ -6417,6 +7006,11 @@ "ajv-keywords": "^3.1.0" } }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, "secp256k1": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.6.2.tgz", @@ -6505,6 +7099,33 @@ "nan": "2.13.2" } }, + "shasum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "requires": { + "json-stable-stringify": "~0.0.0", + "sha.js": "~2.4.4" + }, + "dependencies": { + "json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "requires": { + "jsonify": "~0.0.0" + } + } + } + }, + "shasum-object": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", + "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", + "requires": { + "fast-safe-stringify": "^2.0.7" + } + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -6520,12 +7141,22 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, + "shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==" + }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" + }, "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", @@ -6755,12 +7386,20 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", - "dev": true, "requires": { "inherits": "~2.0.1", "readable-stream": "^2.0.2" } }, + "stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "requires": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + } + }, "stream-each": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", @@ -6790,6 +7429,15 @@ "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", "dev": true }, + "stream-splicer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", + "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -6840,6 +7488,14 @@ "ansi-regex": "^2.0.0" } }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + } + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", @@ -6854,6 +7510,26 @@ "is-hex-prefixed": "1.0.0" } }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "requires": { + "minimist": "^1.1.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + } + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -6862,6 +7538,14 @@ "has-flag": "^3.0.0" } }, + "syntax-error": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", + "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "requires": { + "acorn-node": "^1.2.0" + } + }, "tapable": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.1.tgz", @@ -7067,6 +7751,14 @@ "setimmediate": "^1.0.4" } }, + "tmp": { + "version": "0.0.28", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.28.tgz", + "integrity": "sha1-Fyc1t/YU6nrzlmT6hM8N5OUV0SA=", + "requires": { + "os-tmpdir": "~1.0.1" + } + }, "to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", @@ -7136,11 +7828,51 @@ } } }, + "transform-filter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/transform-filter/-/transform-filter-0.1.1.tgz", + "integrity": "sha1-gG+FG25ECyN4j9OMoEMbUCAlulk=", + "requires": { + "multimatch": "^2.0.0", + "through": "^2.3.6" + } + }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "tsconfig": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-5.0.3.tgz", + "integrity": "sha1-X0J45wGACWeo/Dg/0ZZIh48qbjo=", + "requires": { + "any-promise": "^1.3.0", + "parse-json": "^2.2.0", + "strip-bom": "^2.0.0", + "strip-json-comments": "^2.0.0" + } + }, + "tsify": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/tsify/-/tsify-4.0.2.tgz", + "integrity": "sha512-XZ4jziRS8SBnoSnp1QOtASxjqhvOSfXhO8cD5WPBpXD6UKDCMQ/n7L1cr+Wlb5htIZJuvfhfxely+HODsVRWLA==", + "requires": { + "convert-source-map": "^1.1.0", + "fs.realpath": "^1.0.0", + "object-assign": "^4.1.0", + "semver": "^6.1.0", + "through2": "^2.0.0", + "tsconfig": "^5.0.3" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", @@ -7177,6 +7909,67 @@ "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", "dev": true }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "optional": true + }, + "umd": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", + "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==" + }, + "undeclared-identifiers": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", + "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", + "requires": { + "acorn-node": "^1.3.0", + "dash-ast": "^1.0.0", + "get-assigned-identifiers": "^1.2.0", + "simple-concat": "^1.0.0", + "xtend": "^4.0.1" + } + }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -7324,7 +8117,6 @@ "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, "requires": { "punycode": "1.3.2", "querystring": "0.2.0" @@ -7333,8 +8125,7 @@ "punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" } } }, @@ -7487,6 +8278,16 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + }, "worker-farm": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", diff --git a/packages/portis-web3/package.json b/packages/portis-web3/package.json index 6b65602..f24fd41 100644 --- a/packages/portis-web3/package.json +++ b/packages/portis-web3/package.json @@ -37,8 +37,7 @@ ], "license": "MIT", "dependencies": { - "@pokt-network/aat-js": "0.1.1-rc", - "@pokt-network/pocket-js": "0.5.0-rc", + "@pokt-network/web3-provider": "0.0.5-rc", "@portis/web3-provider-engine": "1.0.10", "ethereumjs-util": "5.2.0", "penpal": "3.0.7" diff --git a/packages/portis-web3/src/index.ts b/packages/portis-web3/src/index.ts index 7711ff4..8a450c7 100644 --- a/packages/portis-web3/src/index.ts +++ b/packages/portis-web3/src/index.ts @@ -12,7 +12,7 @@ import { getTxGas } from './utils/getTxGas'; import { Query } from './utils/query'; import { styles } from './styles'; import { validateSecureOrigin } from './utils/secureOrigin'; -import { Pocket, PocketAAT, typeGuard, RpcError, RelayResponse, ConsensusNode } from '@pokt-network/pocket-js'; +import { Pocket, PocketAAT, PocketProvider, TransactionSigner, Transaction } from '@pokt-network/web3-provider'; const version = '$$PORTIS_SDK_VERSION$$'; const widgetUrl = 'https://widget.portis.io'; @@ -34,6 +34,7 @@ export default class Portis { private _onLogoutCallback: () => void; private pocket?: Pocket = undefined; private pocketAAT?: PocketAAT = undefined; + private txSigner?: TransactionSigner = undefined; constructor(dappId: string, network: string | INetwork, options: IOptions = {}) { validateSecureOrigin(); @@ -47,18 +48,52 @@ export default class Portis { }; if (this.config.network.nodeProtocol === 'pocket') { - if (options.pocket === undefined || options.pocketAAT === undefined) { + if ( + options.pocket === undefined || + options.pocketAAT === undefined || + options.accounts === undefined || + options.privateKeys === undefined + ) { throw new Error( - "[Portis] illegal 'node protocol' parameter. In order to use the pocket network you need to provide a Pocket AAT object in the options", + "[Portis] illegal 'node protocol' parameter. In order to use the pocket network you need to provide a Pocket AAT object an accounts object and a privateKeys in the options", ); } + const ethTxSigner = { + hasAddress: async function(address: string) { + let accounts: Array = options.accounts == undefined ? [] : options.accounts; + return accounts.includes(address.toUpperCase()); + }, + signTransaction: async function(txParams) { + try { + let privateKeys: Array = options.privateKeys == undefined ? [] : options.privateKeys; + const pkString = privateKeys[0]; + const privateKeyBuffer = Buffer.from(pkString, 'hex'); + const tx = new Transaction(txParams, { + chain: this.chain, + }); + tx.sign(privateKeyBuffer); + return '0x' + tx.serialize().toString('hex'); + } catch (error) { + return error; + } + }, + }; + + const ethTransactionSigner = new TransactionSigner( + options.accounts, + options.privateKeys, + ethTxSigner.hasAddress, + ethTxSigner.signTransaction, + ); + this.pocketAAT = options.pocketAAT; this.pocket = options.pocket; + this.txSigner = ethTransactionSigner; } this.widget = this._initWidget(); - this.provider = this._initProvider(); + this.provider = this.pocket === undefined ? this._initProvider() : this._initPocketProvider(); } changeNetwork(network: string | INetwork, gasRelay?: boolean) { @@ -173,6 +208,11 @@ export default class Portis { }); } + private _initPocketProvider() { + const provider = new PocketProvider(this.config.network.chainId, this.pocketAAT, this.pocket, this.txSigner); + return provider; + } + private _initProvider() { const engine = new ProviderEngine(); const query = new Query(engine); @@ -302,11 +342,18 @@ export default class Portis { }), ); - if (this.pocket === undefined) { - this.addRelayProvider(engine); - } else { - this.addPocketRelayProvider(engine); - } + engine.addProvider({ + setEngine: _ => _, + handleRequest: async (payload, next, end) => { + const widgetCommunication = (await this.widget).communication; + const { error, result } = await widgetCommunication.relay(payload, this.config); + if (payload.method === 'net_version') { + this._network = result; + engine.networkVersion = this._network; + } + end(error, result); + }, + }); engine.enable = () => new Promise((resolve, reject) => { @@ -337,72 +384,6 @@ export default class Portis { return engine; } - private addRelayProvider(engine: ProviderEngine) { - engine.addProvider({ - setEngine: _ => _, - handleRequest: async (payload, next, end) => { - const widgetCommunication = (await this.widget).communication; - const { error, result } = await widgetCommunication.relay(payload, this.config); - if (payload.method === 'net_version') { - this._network = result; - engine.networkVersion = this._network; - } - end(error, result); - }, - }); - } - - private addPocketRelayProvider(engine: ProviderEngine) { - engine.addProvider({ - setEngine: _ => _, - handleRequest: async (payload, next, end) => { - if (this.config.network.chainId === undefined) { - throw new Error( - "[Portis] 'chainId' is required. Read more about it here: https://docs.portis.io/#/configuration?id=network", - ); - } - - if (this.pocketAAT === undefined) { - throw new Error( - "[Portis] 'pocketAAT' is required. Read more about it here: https://docs.portis.io/#/configuration?id=network", - ); - } - - if (this.pocket === undefined) { - throw new Error( - "[Portis] 'Pocket' wasn't created it. Read more about it here: https://docs.portis.io/#/configuration?id=network", - ); - } - - let response = await this.pocket.sendRelay( - JSON.stringify(payload), - this.config.network.chainId, - this.pocketAAT, - ); - let error; - let result; - - switch (true) { - case typeGuard(response, RpcError): - error = response; - break; - case typeGuard(response, RelayResponse): - result = (response as RelayResponse).payload; - break; - default: - result = (response as ConsensusNode).relayResponse.payload; - } - - if (payload.method === 'net_version') { - this._network = result; - engine.networkVersion = this._network; - } - - end(error, result); - }, - }); - } - private async _setHeight(height: number) { const widgetFrame = (await this.widget).widgetFrame; widgetFrame.style.height = `${height}px`; diff --git a/packages/portis-web3/src/interfaces.ts b/packages/portis-web3/src/interfaces.ts index cdff20a..5e592e6 100644 --- a/packages/portis-web3/src/interfaces.ts +++ b/packages/portis-web3/src/interfaces.ts @@ -1,5 +1,4 @@ -import { PocketAAT } from '@pokt-network/aat-js'; -import { Pocket } from '@pokt-network/pocket-js'; +import { Pocket, PocketAAT } from '@pokt-network/web3-provider'; export interface INetwork { nodeUrl: string; @@ -34,6 +33,8 @@ export interface IOptions { registerPageByDefault?: boolean; pocket?: Pocket; pocketAAT?: PocketAAT; + accounts?: Array; + privateKeys?: Array; } export interface ITransactionRequest {