From 07b70f808644d0eb3ccfd380d947274897123a40 Mon Sep 17 00:00:00 2001 From: Micah Riggan Date: Tue, 17 Sep 2019 14:56:54 -0400 Subject: [PATCH] Multiple hosts, and support for chain/network on a particular host --- packages/bitcore-node/package-lock.json | 6 +- packages/bitcore-p2p-cash/package-lock.json | 41 +-- packages/bitcore-p2p/package-lock.json | 258 +++++------------- packages/crypto-wallet-core/package-lock.json | 2 +- packages/insight/package-lock.json | 2 +- packages/insight/package.json | 1 + .../src/pages/broadcast-tx/broadcast-tx.ts | 2 +- .../insight/src/providers/address/address.ts | 13 +- packages/insight/src/providers/api/api.ts | 97 +++++-- .../insight/src/providers/blocks/blocks.ts | 38 +-- .../insight/src/providers/search/search.ts | 12 +- .../providers/transactions/transactions.ts | 47 ++-- 12 files changed, 221 insertions(+), 298 deletions(-) diff --git a/packages/bitcore-node/package-lock.json b/packages/bitcore-node/package-lock.json index 8d1e8f7d016..4e6548863c8 100644 --- a/packages/bitcore-node/package-lock.json +++ b/packages/bitcore-node/package-lock.json @@ -1,12 +1,12 @@ { "name": "bitcore-node", - "version": "8.6.0", + "version": "8.7.3", "lockfileVersion": 1, "requires": true, "dependencies": { "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -1415,7 +1415,7 @@ }, "engine.io-client": { "version": "3.2.1", - "resolved": "http://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", "requires": { "component-emitter": "1.2.1", diff --git a/packages/bitcore-p2p-cash/package-lock.json b/packages/bitcore-p2p-cash/package-lock.json index 34dbdd9372c..1ca607656e6 100644 --- a/packages/bitcore-p2p-cash/package-lock.json +++ b/packages/bitcore-p2p-cash/package-lock.json @@ -1270,8 +1270,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -1292,14 +1291,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1314,20 +1311,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -1444,8 +1438,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -1457,7 +1450,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1472,7 +1464,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1480,14 +1471,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -1506,7 +1495,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -1587,8 +1575,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -1600,7 +1587,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -1686,8 +1672,7 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -1723,7 +1708,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -1743,7 +1727,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -1787,14 +1770,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, diff --git a/packages/bitcore-p2p/package-lock.json b/packages/bitcore-p2p/package-lock.json index 9093a00ae71..9c7cfbc4275 100644 --- a/packages/bitcore-p2p/package-lock.json +++ b/packages/bitcore-p2p/package-lock.json @@ -7,8 +7,7 @@ "abbrev": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", - "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", - "optional": true + "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=" }, "abstract-leveldown": { "version": "2.6.2", @@ -62,7 +61,6 @@ "version": "4.11.8", "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "optional": true, "requires": { "co": "^4.6.0", "json-stable-stringify": "^1.0.1" @@ -78,8 +76,7 @@ "ansi": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", - "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=", - "optional": true + "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=" }, "ansi-colors": { "version": "1.1.0", @@ -153,7 +150,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", - "optional": true, "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" @@ -280,20 +276,17 @@ "arraybuffer.slice": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz", - "integrity": "sha1-8zshWfBTKj8xB6JywMz70a0peco=", - "optional": true + "integrity": "sha1-8zshWfBTKj8xB6JywMz70a0peco=" }, "asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", - "optional": true + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" }, "assert-plus": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "optional": true + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" }, "assign-symbols": { "version": "1.0.0", @@ -337,8 +330,7 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "optional": true + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "atob": { "version": "2.1.2", @@ -349,14 +341,12 @@ "aws-sign2": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "optional": true + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" }, "aws4": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", - "optional": true + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" }, "bach": { "version": "1.2.0", @@ -450,8 +440,7 @@ "base64-arraybuffer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz", - "integrity": "sha1-R030qfLaJOBd8xWMOx2zw81GoVQ=", - "optional": true + "integrity": "sha1-R030qfLaJOBd8xWMOx2zw81GoVQ=" }, "base64id": { "version": "0.1.0", @@ -495,14 +484,12 @@ "benchmark": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-1.0.0.tgz", - "integrity": "sha1-Lx4vpMNZ8REiqhgwgiGOlX45DHM=", - "optional": true + "integrity": "sha1-Lx4vpMNZ8REiqhgwgiGOlX45DHM=" }, "better-assert": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", - "optional": true, "requires": { "callsite": "1.0.0" } @@ -532,7 +519,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/bl/-/bl-1.0.3.tgz", "integrity": "sha1-/FQhoo/UImA2w7OJGmaiW8ZNIm4=", - "optional": true, "requires": { "readable-stream": "~2.0.5" } @@ -540,14 +526,12 @@ "blob": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", - "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=", - "optional": true + "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=" }, "block-stream": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "optional": true, "requires": { "inherits": "~2.0.0" } @@ -566,7 +550,6 @@ "version": "2.10.1", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "optional": true, "requires": { "hoek": "2.x.x" } @@ -725,8 +708,7 @@ "callsite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "optional": true + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=" }, "camelcase": { "version": "3.0.0", @@ -737,8 +719,7 @@ "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "optional": true + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "chai": { "version": "1.10.0", @@ -789,7 +770,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "optional": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -911,8 +891,7 @@ "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "optional": true + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, "code-point-at": { "version": "1.1.0", @@ -955,7 +934,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", - "optional": true, "requires": { "delayed-stream": "~1.0.0" } @@ -969,8 +947,7 @@ "component-emitter": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz", - "integrity": "sha1-KWWU8nU9qmOZbSrwjRWpURbJrsM=", - "optional": true + "integrity": "sha1-KWWU8nU9qmOZbSrwjRWpURbJrsM=" }, "component-inherit": { "version": "0.0.3", @@ -1023,8 +1000,7 @@ "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=", - "optional": true + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" }, "convert-source-map": { "version": "1.6.0", @@ -1060,7 +1036,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", - "optional": true, "requires": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -1086,7 +1061,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "optional": true, "requires": { "boom": "2.x.x" } @@ -1108,7 +1082,6 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "optional": true, "requires": { "assert-plus": "^1.0.0" }, @@ -1116,8 +1089,7 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "optional": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, @@ -1248,14 +1220,12 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "optional": true + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "optional": true + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" }, "detect-file": { "version": "1.0.0", @@ -1431,7 +1401,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.2.4.tgz", "integrity": "sha1-4Il7C/FOeS1M0qWVBVORnFaUjEI=", - "optional": true, "requires": { "after": "0.8.1", "arraybuffer.slice": "0.0.6", @@ -1444,14 +1413,12 @@ "after": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/after/-/after-0.8.1.tgz", - "integrity": "sha1-q11PuIP1loFtNRX495HAr0ht1ic=", - "optional": true + "integrity": "sha1-q11PuIP1loFtNRX495HAr0ht1ic=" }, "has-binary": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/has-binary/-/has-binary-0.1.6.tgz", "integrity": "sha1-JTJvOc+k9hath4eJTjryz7x7bhA=", - "optional": true, "requires": { "isarray": "0.0.1" } @@ -1459,8 +1426,7 @@ "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "optional": true + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" } } }, @@ -1705,8 +1671,7 @@ "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "optional": true + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "eyes": { "version": "0.1.8", @@ -1860,14 +1825,12 @@ "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "optional": true + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "optional": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.5", @@ -1969,8 +1932,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -1991,14 +1953,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2013,20 +1973,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -2143,8 +2100,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -2156,7 +2112,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2171,7 +2126,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2179,14 +2133,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2205,7 +2157,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -2293,8 +2244,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -2306,7 +2256,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -2392,8 +2341,7 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -2429,7 +2377,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2449,7 +2396,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2493,14 +2439,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -2508,7 +2452,6 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "optional": true, "requires": { "graceful-fs": "^4.1.2", "inherits": "~2.0.0", @@ -2526,7 +2469,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz", "integrity": "sha1-6c7FSD09TuDvRLYKfZnkk14TbZM=", - "optional": true, "requires": { "ansi": "^0.3.0", "has-unicode": "^2.0.0", @@ -2551,7 +2493,6 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "optional": true, "requires": { "assert-plus": "^1.0.0" }, @@ -2559,8 +2500,7 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "optional": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, @@ -2591,7 +2531,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ghutils/-/ghutils-3.2.1.tgz", "integrity": "sha1-T87f+sk1/KzgbhKhfGF04sKf/k8=", - "optional": true, "requires": { "jsonist": "~1.3.0", "xtend": "~4.0.1" @@ -2791,14 +2730,12 @@ "har-schema": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "optional": true + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" }, "har-validator": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "optional": true, "requires": { "ajv": "^4.9.1", "har-schema": "^1.0.5" @@ -2817,7 +2754,6 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz", "integrity": "sha1-aOYesWIQyVRaClzOBqhzkS/h5ow=", - "optional": true, "requires": { "isarray": "0.0.1" }, @@ -2825,8 +2761,7 @@ "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "optional": true + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" } } }, @@ -2845,8 +2780,7 @@ "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "optional": true + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" }, "has-value": { "version": "1.0.0", @@ -2884,7 +2818,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", - "optional": true, "requires": { "inherits": "^2.0.1" } @@ -2902,7 +2835,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "optional": true, "requires": { "boom": "2.x.x", "cryptiles": "2.x.x", @@ -2913,8 +2845,7 @@ "hoek": { "version": "2.16.3", "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "optional": true + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" }, "homedir-polyfill": { "version": "1.0.1", @@ -2935,7 +2866,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "optional": true, "requires": { "assert-plus": "^0.2.0", "jsprim": "^1.2.2", @@ -2946,7 +2876,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/hyperquest/-/hyperquest-1.2.0.tgz", "integrity": "sha1-OeH+9miI3Hzg3sbA3YFPb8iUStU=", - "optional": true, "requires": { "duplexer2": "~0.0.2", "through2": "~0.6.3" @@ -2955,8 +2884,7 @@ "indexof": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "optional": true + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" }, "inflight": { "version": "1.0.6", @@ -3174,8 +3102,7 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "optional": true + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "is-unc-path": { "version": "1.0.0", @@ -3234,14 +3161,12 @@ "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "optional": true + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, "json-stable-stringify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "optional": true, "requires": { "jsonify": "~0.0.0" } @@ -3255,8 +3180,7 @@ "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "optional": true + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json3": { "version": "3.2.6", @@ -3267,14 +3191,12 @@ "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "optional": true + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" }, "jsonist": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/jsonist/-/jsonist-1.3.0.tgz", "integrity": "sha1-wMdLle8clSA4YZsp76UgscyYdVY=", - "optional": true, "requires": { "bl": "~1.0.0", "hyperquest": "~1.2.0", @@ -3286,7 +3208,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "optional": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -3297,8 +3218,7 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "optional": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, @@ -3410,20 +3330,17 @@ "lodash.pad": { "version": "4.5.1", "resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz", - "integrity": "sha1-QzCUmoM6fI2iLMIPaibE1Z3runA=", - "optional": true + "integrity": "sha1-QzCUmoM6fI2iLMIPaibE1Z3runA=" }, "lodash.padend": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", - "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=", - "optional": true + "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=" }, "lodash.padstart": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz", - "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=", - "optional": true + "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=" }, "lolex": { "version": "1.3.2", @@ -3491,14 +3408,12 @@ "mime-db": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz", - "integrity": "sha1-SNJtI1WJZRcErFkWygYAGRQmaHg=", - "optional": true + "integrity": "sha1-SNJtI1WJZRcErFkWygYAGRQmaHg=" }, "mime-types": { "version": "2.1.16", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", "integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=", - "optional": true, "requires": { "mime-db": "~1.29.0" } @@ -3546,7 +3461,6 @@ "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "optional": true, "requires": { "minimist": "0.0.8" }, @@ -3554,8 +3468,7 @@ "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "optional": true + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } }, @@ -3665,7 +3578,6 @@ "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "optional": true, "requires": { "abbrev": "1" } @@ -3704,7 +3616,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz", "integrity": "sha1-mLUlMPJRTKkNCexbIsiEZyI3VpI=", - "optional": true, "requires": { "ansi": "~0.3.1", "are-we-there-yet": "~1.1.2", @@ -3719,8 +3630,7 @@ "oauth-sign": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "optional": true + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" }, "object-assign": { "version": "4.1.1", @@ -3858,8 +3768,7 @@ "options": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", - "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=", - "optional": true + "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=" }, "ordered-read-streams": { "version": "1.0.1", @@ -3873,8 +3782,7 @@ "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "optional": true + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-locale": { "version": "1.4.0", @@ -3888,14 +3796,12 @@ "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "optional": true + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, "osenv": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", - "optional": true, "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" @@ -3955,7 +3861,6 @@ "version": "0.0.4", "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.4.tgz", "integrity": "sha1-gGWCo5iH4eoY3V4v4OAZAiaOk1A=", - "optional": true, "requires": { "better-assert": "~1.0.0" } @@ -4030,8 +3935,7 @@ "performance-now": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", - "optional": true + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" }, "pify": { "version": "2.3.0", @@ -4158,7 +4062,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz", "integrity": "sha1-Oz7mUS+U8OV1U4wXmV+fFpkKXVE=", - "optional": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -4190,14 +4093,12 @@ "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "optional": true + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, "qs": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "optional": true + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" }, "quote-stream": { "version": "1.0.2", @@ -4424,7 +4325,6 @@ "version": "2.81.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "optional": true, "requires": { "aws-sign2": "~0.6.0", "aws4": "^1.2.1", @@ -4506,7 +4406,6 @@ "version": "2.6.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", - "optional": true, "requires": { "glob": "^7.0.5" } @@ -4515,7 +4414,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", - "optional": true, "requires": { "hash-base": "^2.0.0", "inherits": "^2.0.1" @@ -4603,7 +4501,6 @@ "version": "2.4.8", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz", "integrity": "sha1-NwaMLEdra69ALRSknGf1l5IfY08=", - "optional": true, "requires": { "inherits": "^2.0.1" } @@ -4766,7 +4663,6 @@ "version": "1.0.9", "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "optional": true, "requires": { "hoek": "2.x.x" } @@ -4902,7 +4798,6 @@ "version": "2.2.6", "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.6.tgz", "integrity": "sha1-ON/WHfUNz4qx2eIJEyK/kCuii5k=", - "optional": true, "requires": { "benchmark": "1.0.0", "component-emitter": "1.1.2", @@ -4915,7 +4810,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", - "optional": true, "requires": { "ms": "0.7.1" } @@ -4923,20 +4817,17 @@ "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "optional": true + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "json3": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", - "optional": true + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=" }, "ms": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", - "optional": true + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=" } } }, @@ -5034,7 +4925,6 @@ "version": "1.13.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", - "optional": true, "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -5049,8 +4939,7 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "optional": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, @@ -5224,8 +5113,7 @@ "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", - "optional": true + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" }, "strip-ansi": { "version": "3.0.1", @@ -5264,7 +5152,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "optional": true, "requires": { "block-stream": "*", "fstream": "^1.0.2", @@ -5287,7 +5174,6 @@ "version": "1.5.4", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.4.tgz", "integrity": "sha1-NlSc8E7RrumyowwBQyUiONr5QBY=", - "optional": true, "requires": { "bl": "^1.0.0", "end-of-stream": "^1.0.0", @@ -5299,7 +5185,6 @@ "version": "0.6.5", "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "optional": true, "requires": { "readable-stream": ">=1.0.33-1 <1.1.0-0", "xtend": ">=4.0.0 <4.1.0-0" @@ -5308,14 +5193,12 @@ "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "optional": true + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "readable-stream": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "optional": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -5496,7 +5379,6 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", - "optional": true, "requires": { "punycode": "^1.4.1" } @@ -5505,7 +5387,6 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "optional": true, "requires": { "safe-buffer": "^5.0.1" } @@ -5525,8 +5406,7 @@ "ultron": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", - "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=", - "optional": true + "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=" }, "unc-path-regex": { "version": "0.1.2", @@ -5675,8 +5555,7 @@ "utf8": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.0.tgz", - "integrity": "sha1-DP7FyAUtRKI+OqqQgQToB1+V39U=", - "optional": true + "integrity": "sha1-DP7FyAUtRKI+OqqQgQToB1+V39U=" }, "util": { "version": "0.10.3", @@ -5709,8 +5588,7 @@ "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", - "optional": true + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" }, "v8flags": { "version": "3.1.2", @@ -5741,7 +5619,6 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "optional": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -5751,8 +5628,7 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "optional": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, diff --git a/packages/crypto-wallet-core/package-lock.json b/packages/crypto-wallet-core/package-lock.json index 94ba24b23e5..4faf6f0b6a6 100644 --- a/packages/crypto-wallet-core/package-lock.json +++ b/packages/crypto-wallet-core/package-lock.json @@ -1,6 +1,6 @@ { "name": "crypto-wallet-core", - "version": "8.6.0", + "version": "8.7.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insight/package-lock.json b/packages/insight/package-lock.json index 995c0fac5e5..c09aec2630c 100644 --- a/packages/insight/package-lock.json +++ b/packages/insight/package-lock.json @@ -1,6 +1,6 @@ { "name": "@bitpay/insight-previous", - "version": "8.6.0", + "version": "8.7.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insight/package.json b/packages/insight/package.json index fe5cd9b02d9..72c3fcbf6c8 100644 --- a/packages/insight/package.json +++ b/packages/insight/package.json @@ -33,6 +33,7 @@ "ionic:serve": "ionic-app-scripts serve --port 8200", "postinstall": "./node_modules/.bin/webdriver-manager update --gecko false", "start": "npm run ionic:serve", + "start:prod": "ENV=prod CHAIN=BTC NETWORK=mainnet API_PREFIX=https://api.bitcore.io/api npm run ionic:serve", "test": "ng test --watch=false --code-coverage --no-progress", "fix:prettier": "prettier '{*,**/*}.{js,ts,md,json,css}' --write", "fix:tslint": "tslint --type-check --fix --project ." diff --git a/packages/insight/src/pages/broadcast-tx/broadcast-tx.ts b/packages/insight/src/pages/broadcast-tx/broadcast-tx.ts index a24e82502bd..17ba76b2a9b 100644 --- a/packages/insight/src/pages/broadcast-tx/broadcast-tx.ts +++ b/packages/insight/src/pages/broadcast-tx/broadcast-tx.ts @@ -57,7 +57,7 @@ export class BroadcastTxPage { }; this.httpClient - .post(this.apiProvider.getUrl() + '/tx/send', postData) + .post(this.apiProvider.getUrl(this.chainNetwork) + '/tx/send', postData) .subscribe( response => { this.presentToast(true, response); diff --git a/packages/insight/src/providers/address/address.ts b/packages/insight/src/providers/address/address.ts index fa167d9d488..75fc4b67fa1 100644 --- a/packages/insight/src/providers/address/address.ts +++ b/packages/insight/src/providers/address/address.ts @@ -27,15 +27,18 @@ export class AddressProvider { chainNetwork?: ChainNetwork ): Observable { return this.httpClient.get( - `${this.apiProvider.getUrlPrefix()}/${chainNetwork.chain}/${ - chainNetwork.network - }/address/${addrStr}/balance` + `${this.apiProvider.getUrl(chainNetwork)}/address/${addrStr}/balance` ); } - public getAddressActivity(addrStr?: string): Observable { + public getAddressActivity( + addrStr?: string, + chainNetwork?: ChainNetwork + ): Observable { return this.httpClient.get( - `${this.apiProvider.getUrl()}/address/${addrStr}/txs?limit=1000` + `${this.apiProvider.getUrl( + chainNetwork + )}/address/${addrStr}/txs?limit=1000` ); } } diff --git a/packages/insight/src/providers/api/api.ts b/packages/insight/src/providers/api/api.ts index 4f633a4d941..948015f3f49 100644 --- a/packages/insight/src/providers/api/api.ts +++ b/packages/insight/src/providers/api/api.ts @@ -15,6 +15,15 @@ export interface NetworkSettings { selectedNetwork: ChainNetwork; } +const CurrentEnv = process.env.ENV || 'dev'; + +const EnvApiHosts: { [env: string]: string[] } = { + prod: ['https://api.bitcore.io/api', 'https://api-eth.bitcore.io/api'], + dev: ['/api'] +}; + +const CurrentApiHosts = EnvApiHosts[CurrentEnv]; + @Injectable() export class ApiProvider { public defaultNetwork = { @@ -23,7 +32,8 @@ export class ApiProvider { }; public networkSettings = { availableNetworks: [this.defaultNetwork], - selectedNetwork: this.defaultNetwork + selectedNetwork: this.defaultNetwork, + chainNetworkLookup: {} }; public ratesAPI = { @@ -38,28 +48,69 @@ export class ApiProvider { private logger: Logger ) { this.getAvailableNetworks().subscribe(data => { - const availableNetworks = data; + const newNetworks = data + .map(x => x.supported) + .reduce((agg, arr) => [...agg].concat(arr), []); + + const chainNetworkLookup = {}; + for (const hostConfig of data) { + for (const chainNetwork of hostConfig.supported) { + const key = `${chainNetwork.chain}:${chainNetwork.network}`; + chainNetworkLookup[key] = hostConfig.host; + } + } + + for (const { chain, network } of newNetworks) { + const found = this.networkSettings.availableNetworks.find( + available => + available.chain === chain && available.network === network + ); + if (!found) { + this.networkSettings.availableNetworks.push({ chain, network }); + } + } + this.networkSettings = { - availableNetworks, - selectedNetwork: this.networkSettings.selectedNetwork + availableNetworks: this.networkSettings.availableNetworks, + selectedNetwork: this.networkSettings.selectedNetwork, + chainNetworkLookup }; }); } - public getAvailableNetworks(): Observable { - return this.httpClient.get( - this.getUrlPrefix() + '/status/enabled-chains' + public getAvailableNetworks(): Observable< + Array<{ host: string; supported: ChainNetwork[] }> + > { + const hosts = EnvApiHosts[CurrentEnv]; + return Observable.fromPromise( + Promise.all( + hosts.map(async host => { + const supported = await this.httpClient + .get(host + '/status/enabled-chains') + .toPromise(); + return { + host, + supported + }; + }) + ) ); } - public getUrlPrefix(): string { - const prefix: string = this.defaults.getDefault('%API_PREFIX%'); + public getUrlPrefix(chain, network): string { + const defaultChain = chain || this.defaultNetwork.chain; + const defaultNetwork = network || this.defaultNetwork.network; + const key = `${defaultChain}:${defaultNetwork}`; + const lookupHost = this.networkSettings.chainNetworkLookup[key]; + const prefix = lookupHost || this.defaults.getDefault('%API_PREFIX%'); return prefix; } - public getUrl(): string { - const prefix: string = this.defaults.getDefault('%API_PREFIX%'); - const chain: string = this.networkSettings.selectedNetwork.chain; - const network: string = this.networkSettings.selectedNetwork.network; + + public getUrl(params?: { chain?: string; network?: string }): string { + let { chain, network } = params; + chain = chain || this.networkSettings.selectedNetwork.chain; + network = network || this.networkSettings.selectedNetwork.network; + const prefix: string = this.getUrlPrefix(chain, network); const apiPrefix = `${prefix}/${chain}/${network}`; return apiPrefix; } @@ -74,16 +125,20 @@ export class ApiProvider { public changeNetwork(network: ChainNetwork): void { const availableNetworks = this.networkSettings.availableNetworks; - const isValid = _.some(availableNetworks, network); - if (!isValid) { - this.logger.error( - 'Invalid URL: missing or invalid COIN or NETWORK param' - ); - return; - } + // Can't do the following because availableNetworks is loaded + /* + *const isValid = _.some(availableNetworks, network); + *if (!isValid) { + * this.logger.error( + * 'Invalid URL: missing or invalid COIN or NETWORK param' + * ); + * return; + *} + */ this.networkSettings = { availableNetworks, - selectedNetwork: network + selectedNetwork: network, + chainNetworkLookup: this.networkSettings.chainNetworkLookup || {} }; } } diff --git a/packages/insight/src/providers/blocks/blocks.ts b/packages/insight/src/providers/blocks/blocks.ts index 9c068d0e8c0..d27ca65b8c1 100644 --- a/packages/insight/src/providers/blocks/blocks.ts +++ b/packages/insight/src/providers/blocks/blocks.ts @@ -73,15 +73,27 @@ export class BlocksProvider { public httpClient: HttpClient, public currency: CurrencyProvider, private api: ApiProvider - ) { } + ) {} public toEthAppBlock(block: ApiEthBlock): AppEthBlock { - return { ...this.toAppBlock(block), gasLimit: block.gasLimit, gasUsed: block.gasUsed, difficulty: block.difficulty, totalDifficulty: block.totalDifficulty}; + return { + ...this.toAppBlock(block), + gasLimit: block.gasLimit, + gasUsed: block.gasUsed, + difficulty: block.difficulty, + totalDifficulty: block.totalDifficulty + }; } public toUtxoCoinAppBlock(block: ApiUtxoCoinBlock): AppUtxoCoinBlock { const difficulty: number = 0x1d00ffff / block.bits; - return { ...this.toAppBlock(block), merkleroot: block.merkleRoot, version: block.version, bits: block.bits.toString(16), difficulty}; + return { + ...this.toAppBlock(block), + merkleroot: block.merkleRoot, + version: block.version, + bits: block.bits.toString(16), + difficulty + }; } public toAppBlock(block: ApiBlock): AppBlock { @@ -107,10 +119,10 @@ export class BlocksProvider { }; } - public getCurrentHeight(chainNetwork: ChainNetwork): Observable { - const heightUrl = `${this.api.getUrlPrefix()}/${chainNetwork.chain}/${ - chainNetwork.network - }/block/tip`; + public getCurrentHeight( + chainNetwork: ChainNetwork + ): Observable { + const heightUrl = `${this.api.getUrl(chainNetwork)}/block/tip`; return this.httpClient.get(heightUrl); } @@ -118,9 +130,7 @@ export class BlocksProvider { chainNetwork: ChainNetwork, numBlocks: number = 10 ): Observable { - const url = `${this.api.getUrlPrefix()}/${chainNetwork.chain}/${ - chainNetwork.network - }/block?limit=${numBlocks}`; + const url = `${this.api.getUrl(chainNetwork)}/block?limit=${numBlocks}`; return this.httpClient.get(url); } @@ -132,9 +142,7 @@ export class BlocksProvider { numBlocks: number = 10, chainNetwork: ChainNetwork ): Observable { - const url = `${this.api.getUrlPrefix()}/${chainNetwork.chain}/${ - chainNetwork.network - }/block?since=${since}&limit=${numBlocks}&paging=height&direction=-1`; + const url = `${this.api.getUrl(chainNetwork)}/block?since=${since}&limit=${numBlocks}&paging=height&direction=-1`; return this.httpClient.get(url); } @@ -142,9 +150,7 @@ export class BlocksProvider { hash: string, chainNetwork: ChainNetwork ): Observable { - const url = `${this.api.getUrlPrefix()}/${chainNetwork.chain}/${ - chainNetwork.network - }/block/${hash}`; + const url = `${this.api.getUrl(chainNetwork)}/block/${hash}`; return this.httpClient.get(url); } } diff --git a/packages/insight/src/providers/search/search.ts b/packages/insight/src/providers/search/search.ts index d8d0cd9ac58..63008e3105b 100644 --- a/packages/insight/src/providers/search/search.ts +++ b/packages/insight/src/providers/search/search.ts @@ -19,9 +19,7 @@ export class SearchProvider { type: string, chainNetwork: ChainNetwork ): Observable { - this.apiURL = `${this.apiProvider.getUrlPrefix()}/${chainNetwork.chain}/${ - chainNetwork.network - }`; + this.apiURL = `${this.apiProvider.getUrl(chainNetwork)}`; switch (type) { case 'blockOrTx': @@ -36,10 +34,10 @@ export class SearchProvider { public isInputValid(inputValue, chainNetwork) { return this.httpClient - .get<{isValid: boolean, type: string}>(`${this.apiProvider.getUrlPrefix()}/${chainNetwork.chain}/${ - chainNetwork.network - }/valid/${inputValue}`) - .pipe(map(res => ({ isValid: res.isValid , type: res.type}))); + .get<{ isValid: boolean; type: string }>( + `${this.apiProvider.getUrl(chainNetwork)}/valid/${inputValue}` + ) + .pipe(map(res => ({ isValid: res.isValid, type: res.type }))); } private searchBlock(block: string): Observable<{ block: any }> { diff --git a/packages/insight/src/providers/transactions/transactions.ts b/packages/insight/src/providers/transactions/transactions.ts index 8e70a821613..332a4429932 100644 --- a/packages/insight/src/providers/transactions/transactions.ts +++ b/packages/insight/src/providers/transactions/transactions.ts @@ -75,7 +75,7 @@ export interface ApiEthCoin { network: string; nonce: string; to: string; - txid:string; + txid: string; value: number; } @@ -90,11 +90,11 @@ export interface AppCoin { } export interface AppEthCoin { - to: string, - from: string, - txid: string, - fee: number, - valueOut: number, + to: string; + from: string; + txid: string; + fee: number; + valueOut: number; } export interface AppInput { @@ -166,7 +166,7 @@ export class TxsProvider { public currency: CurrencyProvider, public blocksProvider: BlocksProvider, private apiProvider: ApiProvider - ) { } + ) {} public getFee(tx: AppUtxoCoinsTx): number { const sumSatoshis: any = (arr: any): number => @@ -178,16 +178,22 @@ export class TxsProvider { } public toEthAppTx(tx: ApiEthTx): AppEthTx { - return { ...this.toAppTx(tx), to: tx.to, from: tx.from, gasLimit: tx.gasLimit, gasPrice: tx.gasPrice }; + return { + ...this.toAppTx(tx), + to: tx.to, + from: tx.from, + gasLimit: tx.gasLimit, + gasPrice: tx.gasPrice + }; } public toUtxoCoinsAppTx(tx: ApiUtxoCoinTx): AppUtxoCoinsTx { - return { - ...this.toAppTx(tx), + return { + ...this.toAppTx(tx), vin: [], // populated when coins are retrieved vout: [], // populated when coins are retrieved version: tx.version - }; + }; } public toAppTx(tx: ApiUtxoCoinTx | ApiEthTx): AppTx { @@ -212,7 +218,7 @@ export class TxsProvider { from: coin.from, txid: coin.txid, fee: coin.fee, - valueOut: coin.value, + valueOut: coin.value }; } @@ -236,16 +242,15 @@ export class TxsProvider { if (args.blockHash) { queryString += `?blockHash=${args.blockHash}`; } - const url = `${this.apiProvider.getUrlPrefix()}/${chainNetwork.chain}/${ - chainNetwork.network - }/tx/${queryString}`; + const url = `${this.apiProvider.getUrl(chainNetwork)}/tx/${queryString}`; return this.httpClient.get(url); } - public getTx(hash: string, chainNetwork: ChainNetwork): Observable { - const url = `${this.apiProvider.getUrlPrefix()}/${chainNetwork.chain}/${ - chainNetwork.network - }/tx/${hash}`; + public getTx( + hash: string, + chainNetwork: ChainNetwork + ): Observable { + const url = `${this.apiProvider.getUrl(chainNetwork)}/tx/${hash}`; return this.httpClient.get(url); } @@ -253,9 +258,7 @@ export class TxsProvider { txId: string, chainNetwork: ChainNetwork ): Observable { - const url = `${this.apiProvider.getUrlPrefix()}/${chainNetwork.chain}/${ - chainNetwork.network - }/tx/${txId}/coins`; + const url = `${this.apiProvider.getUrl(chainNetwork)}/tx/${txId}/coins`; return this.httpClient.get(url); }