From 2fddfc7fa5d5ffa69d8040450b2fce64de02d4b5 Mon Sep 17 00:00:00 2001 From: Paulius Date: Fri, 25 Nov 2022 10:40:25 +0000 Subject: [PATCH 01/24] IN-421: implementing metrics in servicewatcher. --- app/utils/ServiceWatcher.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index a2f100a..4e48364 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -1,3 +1,5 @@ +import * as client from 'prom-client' + import { TimeoutError } from './Errors.js' import env from '../env.js' @@ -11,6 +13,13 @@ class ServiceWatcher { this.#pollPeriod = env.HEALTHCHECK_POLL_PERIOD_MS this.#timeout = env.HEALTHCHECK_TIMEOUT_MS this.services = this.#init(apis) + this.metrics = { + peerCount: new client.Gauge({ + name: 'dscp_ipfs_swarm_peer_count', + help: 'help needed here', + labelNames: [ 'type' ] + }) + } } delay(ms, service = false) { @@ -54,6 +63,9 @@ class ServiceWatcher { try { const services = await getAll services.forEach(({ name, ...rest }) => this.update(name, rest)) + const { __tmpConnectedPeers, __tmpDiscoveredPeers } = await new Promise((r) => r({ __tmpDiscoveredPeers: 1, __tmpConnectedPeers: 2})) + this.peerCount.set({ type: 'discovered' }, __tmpDiscoveredPeers) + this.peerCount.set({ type: 'connected' }, __tmpConnectedPeers) } catch (error) { // if no service assume that this is server error e.g. TypeError, Parse... const name = error.service || 'server' From ac29362a11467ffe4d7c815ad58dee8785d63f60 Mon Sep 17 00:00:00 2001 From: Paulius Date: Fri, 25 Nov 2022 10:43:01 +0000 Subject: [PATCH 02/24] IN-421: incorrect key used. --- app/utils/ServiceWatcher.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index 4e48364..4e9fb1e 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -63,9 +63,9 @@ class ServiceWatcher { try { const services = await getAll services.forEach(({ name, ...rest }) => this.update(name, rest)) - const { __tmpConnectedPeers, __tmpDiscoveredPeers } = await new Promise((r) => r({ __tmpDiscoveredPeers: 1, __tmpConnectedPeers: 2})) - this.peerCount.set({ type: 'discovered' }, __tmpDiscoveredPeers) - this.peerCount.set({ type: 'connected' }, __tmpConnectedPeers) + const { __tmpConnectedPeers, __tmpDiscoveredPeers } = await new Promise((r) => r({ __tmpDiscoveredPeers: 1, __tmpConnectedPeers: 2 })) + this.metrics.peerCount.set({ type: 'discovered' }, __tmpDiscoveredPeers) + this.metrics.peerCount.set({ type: 'connected' }, __tmpConnectedPeers) } catch (error) { // if no service assume that this is server error e.g. TypeError, Parse... const name = error.service || 'server' From 67a9cf9d753b008692672402c67d214e85312c34 Mon Sep 17 00:00:00 2001 From: Paulius Date: Fri, 25 Nov 2022 11:21:55 +0000 Subject: [PATCH 03/24] IN-421: making some api calls to the ipfs. --- app/utils/ServiceWatcher.js | 22 +++++++-- package-lock.json | 93 ++++++++++++++++++++++++++++++++++--- package.json | 2 +- 3 files changed, 106 insertions(+), 11 deletions(-) diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index 4e9fb1e..d4512d2 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -1,7 +1,9 @@ import * as client from 'prom-client' +import fetch from 'node-fetch' import { TimeoutError } from './Errors.js' import env from '../env.js' +import axios from 'axios' class ServiceWatcher { #pollPeriod @@ -53,6 +55,21 @@ class ServiceWatcher { .filter(Boolean) } + async #updateMetrics() { + const connectedPeers = await axios({ + url: 'http://localhost:5001/api/v0/swarm/peers', + method: 'POST', + }).then(({ data }) => data) + const discoveredPeers = await axios({ + url: 'http://localhost:5001/api/v0/swarm/addrs', + method: 'POST', + }).then(({ data }) => data) + + // update instance's metrics object + this.metrics.peerCount.set({ type: 'discovered' }, Object.keys(discoveredPeers.Addrs).length) // /api/v0/swarm/connect + this.metrics.peerCount.set({ type: 'connected' }, connectedPeers.Peers?.length || 0) // /api/v0/swarm/peers + } + // starts the generator resolving after the first update // use ServiceWatcher.gen.return() to stop async start() { @@ -63,9 +80,8 @@ class ServiceWatcher { try { const services = await getAll services.forEach(({ name, ...rest }) => this.update(name, rest)) - const { __tmpConnectedPeers, __tmpDiscoveredPeers } = await new Promise((r) => r({ __tmpDiscoveredPeers: 1, __tmpConnectedPeers: 2 })) - this.metrics.peerCount.set({ type: 'discovered' }, __tmpDiscoveredPeers) - this.metrics.peerCount.set({ type: 'connected' }, __tmpConnectedPeers) + await this.#updateMetrics() + } catch (error) { // if no service assume that this is server error e.g. TypeError, Parse... const name = error.service || 'server' diff --git a/package-lock.json b/package-lock.json index 4fe273f..bf20d0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@digicatapult/dscp-node": "^4.4.6", + "axios": "^1.2.0", "dotenv": "^16.0.3", "envalid": "^7.3.1", "express": "^4.18.2", @@ -29,7 +30,6 @@ "formdata-node": "^5.0.0", "go-ipfs": "^0.16.0", "mocha": "^10.1.0", - "node-fetch": "^3.2.10", "nodemon": "^2.0.20", "nyc": "^15.1.0", "pino-colada": "^2.2.2", @@ -1627,6 +1627,29 @@ "node": ">=8.0.0" } }, + "node_modules/axios": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz", + "integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==", + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -3336,6 +3359,25 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/foreground-child": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", @@ -4842,9 +4884,9 @@ } }, "node_modules/node-fetch": { - "version": "3.2.10", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz", - "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", + "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -5942,6 +5984,11 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", @@ -8489,6 +8536,28 @@ "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==" }, + "axios": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz", + "integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==", + "requires": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + }, + "dependencies": { + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + } + } + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -9776,6 +9845,11 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + }, "foreground-child": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", @@ -10893,9 +10967,9 @@ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" }, "node-fetch": { - "version": "3.2.10", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz", - "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", + "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", "requires": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -11709,6 +11783,11 @@ "ipaddr.js": "1.9.1" } }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", diff --git a/package.json b/package.json index f249cfd..b453ea4 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "homepage": "https://github.com/digicatapult/dscp-ipfs#readme", "dependencies": { "@digicatapult/dscp-node": "^4.4.6", + "axios": "^1.2.0", "dotenv": "^16.0.3", "envalid": "^7.3.1", "express": "^4.18.2", @@ -52,7 +53,6 @@ "formdata-node": "^5.0.0", "go-ipfs": "^0.16.0", "mocha": "^10.1.0", - "node-fetch": "^3.2.10", "nodemon": "^2.0.20", "nyc": "^15.1.0", "pino-colada": "^2.2.2", From 07d53fd27ee4a1a76426b5801e8badd3fc6e6e92 Mon Sep 17 00:00:00 2001 From: Paulius Date: Fri, 25 Nov 2022 11:24:12 +0000 Subject: [PATCH 04/24] IN-421: version bump. --- app/utils/ServiceWatcher.js | 10 ++++------ helm/dscp-ipfs/Chart.yaml | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index d4512d2..8788682 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -1,9 +1,8 @@ import * as client from 'prom-client' -import fetch from 'node-fetch' +import axios from 'axios' import { TimeoutError } from './Errors.js' import env from '../env.js' -import axios from 'axios' class ServiceWatcher { #pollPeriod @@ -19,8 +18,8 @@ class ServiceWatcher { peerCount: new client.Gauge({ name: 'dscp_ipfs_swarm_peer_count', help: 'help needed here', - labelNames: [ 'type' ] - }) + labelNames: ['type'], + }), } } @@ -66,7 +65,7 @@ class ServiceWatcher { }).then(({ data }) => data) // update instance's metrics object - this.metrics.peerCount.set({ type: 'discovered' }, Object.keys(discoveredPeers.Addrs).length) // /api/v0/swarm/connect + this.metrics.peerCount.set({ type: 'discovered' }, Object.keys(discoveredPeers.Addrs).length) // /api/v0/swarm/connect this.metrics.peerCount.set({ type: 'connected' }, connectedPeers.Peers?.length || 0) // /api/v0/swarm/peers } @@ -81,7 +80,6 @@ class ServiceWatcher { const services = await getAll services.forEach(({ name, ...rest }) => this.update(name, rest)) await this.#updateMetrics() - } catch (error) { // if no service assume that this is server error e.g. TypeError, Parse... const name = error.service || 'server' diff --git a/helm/dscp-ipfs/Chart.yaml b/helm/dscp-ipfs/Chart.yaml index 6d4a0f9..8273f19 100644 --- a/helm/dscp-ipfs/Chart.yaml +++ b/helm/dscp-ipfs/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: dscp-ipfs -appVersion: '2.8.1' +appVersion: '2.9.0' description: A Helm chart for dscp-ipfs -version: '2.8.1' +version: '2.9.0' type: application dependencies: - name: dscp-node diff --git a/package-lock.json b/package-lock.json index bf20d0a..c51c005 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@digicatapult/dscp-ipfs", - "version": "2.8.1", + "version": "2.9.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@digicatapult/dscp-ipfs", - "version": "2.8.1", + "version": "2.9.0", "license": "Apache-2.0", "dependencies": { "@digicatapult/dscp-node": "^4.4.6", diff --git a/package.json b/package.json index b453ea4..32a898d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@digicatapult/dscp-ipfs", - "version": "2.8.1", + "version": "2.9.0", "description": "Service for DSCP", "main": "app/index.js", "type": "module", From 87cfb2ab0ceaa7576dc6a342d241024f9628206b Mon Sep 17 00:00:00 2001 From: Paulius Date: Fri, 25 Nov 2022 11:27:48 +0000 Subject: [PATCH 05/24] IN-421: version update in values.yaml as well. --- helm/dscp-ipfs/values.yaml | 2 +- package-lock.json | 1 + package.json | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/helm/dscp-ipfs/values.yaml b/helm/dscp-ipfs/values.yaml index fc2b612..318cd85 100644 --- a/helm/dscp-ipfs/values.yaml +++ b/helm/dscp-ipfs/values.yaml @@ -52,7 +52,7 @@ statefulSet: image: repository: digicatapult/dscp-ipfs pullPolicy: IfNotPresent - tag: 'v2.8.1' + tag: 'v2.9.0' storage: storageClass: "" diff --git a/package-lock.json b/package-lock.json index c51c005..9bdb202 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ "formdata-node": "^5.0.0", "go-ipfs": "^0.16.0", "mocha": "^10.1.0", + "node-fetch": "^3.3.0", "nodemon": "^2.0.20", "nyc": "^15.1.0", "pino-colada": "^2.2.2", diff --git a/package.json b/package.json index 32a898d..2398efe 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "formdata-node": "^5.0.0", "go-ipfs": "^0.16.0", "mocha": "^10.1.0", + "node-fetch": "^3.3.0", "nodemon": "^2.0.20", "nyc": "^15.1.0", "pino-colada": "^2.2.2", From f0e37a16a938b8df0dffff31564024c41d161f5e Mon Sep 17 00:00:00 2001 From: Paulius Date: Fri, 25 Nov 2022 14:03:12 +0000 Subject: [PATCH 06/24] IN-421: linting. --- app/utils/ServiceWatcher.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index 8788682..c19a7f7 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -17,7 +17,6 @@ class ServiceWatcher { this.metrics = { peerCount: new client.Gauge({ name: 'dscp_ipfs_swarm_peer_count', - help: 'help needed here', labelNames: ['type'], }), } From 1dc079cdaa59bd0dd5d0889386221f6cafb55209 Mon Sep 17 00:00:00 2001 From: Paulius Date: Fri, 25 Nov 2022 14:08:23 +0000 Subject: [PATCH 07/24] IN-421: simplified. --- app/env.js | 1 + app/utils/ServiceWatcher.js | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/env.js b/app/env.js index df52c45..e17a0ae 100644 --- a/app/env.js +++ b/app/env.js @@ -30,6 +30,7 @@ const vars = envalid.cleanEnv( LOG_LEVEL: envalid.str({ default: 'info', devDefault: 'debug' }), PORT: envalid.port({ default: 80, devDefault: 3000 }), NODE_HOST: envalid.host({ devDefault: 'localhost' }), + IPFS_API: envalid.host({ devDefault: 'localhost:5001/api/v0/' }), NODE_PORT: envalid.port({ default: 9944 }), IPFS_PATH: envalid.str({ default: '/ipfs', devDefault: path.resolve(__dirname, '..', `data`) }), IPFS_EXECUTABLE: envalid.str({ diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index c19a7f7..3747a31 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -12,6 +12,7 @@ class ServiceWatcher { constructor(apis) { this.report = {} this.#pollPeriod = env.HEALTHCHECK_POLL_PERIOD_MS + this.ipfsApiUrl = env.IPFS_API this.#timeout = env.HEALTHCHECK_TIMEOUT_MS this.services = this.#init(apis) this.metrics = { @@ -54,18 +55,18 @@ class ServiceWatcher { } async #updateMetrics() { - const connectedPeers = await axios({ - url: 'http://localhost:5001/api/v0/swarm/peers', + const { data: connectedPeers } = await axios({ + url: `${this.ipfsApiUrl}swarm/peers`, method: 'POST', - }).then(({ data }) => data) - const discoveredPeers = await axios({ - url: 'http://localhost:5001/api/v0/swarm/addrs', + }) + const { data: discoveredPeers } = await axios({ + url: `${this.ipfsApiUrl}swarm/addrs`, method: 'POST', - }).then(({ data }) => data) + }) // update instance's metrics object - this.metrics.peerCount.set({ type: 'discovered' }, Object.keys(discoveredPeers.Addrs).length) // /api/v0/swarm/connect - this.metrics.peerCount.set({ type: 'connected' }, connectedPeers.Peers?.length || 0) // /api/v0/swarm/peers + this.metrics.peerCount.set({ type: 'discovered' }, Object.keys(discoveredPeers.Addrs).length) + this.metrics.peerCount.set({ type: 'connected' }, connectedPeers.Peers?.length || 0) } // starts the generator resolving after the first update From 0779a8a1e8be94d9dd9e416dd50fe0c68008a01d Mon Sep 17 00:00:00 2001 From: Paulius Date: Fri, 25 Nov 2022 14:11:24 +0000 Subject: [PATCH 08/24] IN-421: before mocking api endpoint. --- app/utils/ServiceWatcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index 3747a31..be407d0 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -79,7 +79,7 @@ class ServiceWatcher { try { const services = await getAll services.forEach(({ name, ...rest }) => this.update(name, rest)) - await this.#updateMetrics() + await this.#updateMetrics().catch((err) => console.log(err)) } catch (error) { // if no service assume that this is server error e.g. TypeError, Parse... const name = error.service || 'server' From df4b088cc5b2fe427f8f6707631db66b2b65abf2 Mon Sep 17 00:00:00 2001 From: Paulius Date: Fri, 25 Nov 2022 14:12:40 +0000 Subject: [PATCH 09/24] IN-421: re-run --- app/utils/ServiceWatcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index be407d0..3ef5e93 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -79,7 +79,7 @@ class ServiceWatcher { try { const services = await getAll services.forEach(({ name, ...rest }) => this.update(name, rest)) - await this.#updateMetrics().catch((err) => console.log(err)) + await this.#updateMetrics().catch((err) => err) } catch (error) { // if no service assume that this is server error e.g. TypeError, Parse... const name = error.service || 'server' From b4f36ad13ccb83d0b7cde1aab26fdebd1c3ffb8a Mon Sep 17 00:00:00 2001 From: Paulius Date: Fri, 25 Nov 2022 15:52:31 +0000 Subject: [PATCH 10/24] IN-421: set error rather than ignore. --- app/utils/ServiceWatcher.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index 3ef5e93..b091664 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -79,7 +79,9 @@ class ServiceWatcher { try { const services = await getAll services.forEach(({ name, ...rest }) => this.update(name, rest)) - await this.#updateMetrics().catch((err) => err) + await this.#updateMetrics().catch((err) => { + this.metrics = err + }) } catch (error) { // if no service assume that this is server error e.g. TypeError, Parse... const name = error.service || 'server' From 6c6b2cfcc4722f0eb95c4a4ae97537ec9b175489 Mon Sep 17 00:00:00 2001 From: Paulius Date: Fri, 25 Nov 2022 15:55:37 +0000 Subject: [PATCH 11/24] IN-421: Error: Missing mandatory help parameter --- app/utils/ServiceWatcher.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index b091664..7264788 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -18,6 +18,7 @@ class ServiceWatcher { this.metrics = { peerCount: new client.Gauge({ name: 'dscp_ipfs_swarm_peer_count', + help: 'a number of discovered and connected peers', labelNames: ['type'], }), } From d9397a260f31528d97052b54362a6cb7acc65857 Mon Sep 17 00:00:00 2001 From: Paulius Date: Fri, 25 Nov 2022 16:01:09 +0000 Subject: [PATCH 12/24] IN-421: should not need to update tests. --- app/utils/ServiceWatcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index 7264788..8e448b7 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -16,7 +16,7 @@ class ServiceWatcher { this.#timeout = env.HEALTHCHECK_TIMEOUT_MS this.services = this.#init(apis) this.metrics = { - peerCount: new client.Gauge({ + peerCount: this.metrics.peerCount || new client.Gauge({ name: 'dscp_ipfs_swarm_peer_count', help: 'a number of discovered and connected peers', labelNames: ['type'], From 6118f9e1d392fc5256d7829b982b28f6526344e8 Mon Sep 17 00:00:00 2001 From: Paulius Date: Fri, 25 Nov 2022 16:03:00 +0000 Subject: [PATCH 13/24] IN-421: linting --- app/utils/ServiceWatcher.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index 8e448b7..8525a97 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -16,11 +16,13 @@ class ServiceWatcher { this.#timeout = env.HEALTHCHECK_TIMEOUT_MS this.services = this.#init(apis) this.metrics = { - peerCount: this.metrics.peerCount || new client.Gauge({ - name: 'dscp_ipfs_swarm_peer_count', - help: 'a number of discovered and connected peers', - labelNames: ['type'], - }), + peerCount: + this.metrics.peerCount || + new client.Gauge({ + name: 'dscp_ipfs_swarm_peer_count', + help: 'a number of discovered and connected peers', + labelNames: ['type'], + }), } } From 3380ebe4a2481feea8e1b23c5ad0fba6bc2b7291 Mon Sep 17 00:00:00 2001 From: Paulius Date: Mon, 28 Nov 2022 14:13:25 +0000 Subject: [PATCH 14/24] fixing failing tests.' --- app/env.js | 3 ++- app/utils/ServiceWatcher.js | 22 +++++++++++----------- package.json | 2 +- test/test.env | 2 ++ 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/env.js b/app/env.js index e17a0ae..947f6b8 100644 --- a/app/env.js +++ b/app/env.js @@ -30,7 +30,8 @@ const vars = envalid.cleanEnv( LOG_LEVEL: envalid.str({ default: 'info', devDefault: 'debug' }), PORT: envalid.port({ default: 80, devDefault: 3000 }), NODE_HOST: envalid.host({ devDefault: 'localhost' }), - IPFS_API: envalid.host({ devDefault: 'localhost:5001/api/v0/' }), + IPFS_API_HOST: envalid.host({ devDefault: 'localhost' }), + IPFS_API_PORT: envalid.host({ devDefault: '5001' }), NODE_PORT: envalid.port({ default: 9944 }), IPFS_PATH: envalid.str({ default: '/ipfs', devDefault: path.resolve(__dirname, '..', `data`) }), IPFS_EXECUTABLE: envalid.str({ diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index 8525a97..88d2c00 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -12,17 +12,19 @@ class ServiceWatcher { constructor(apis) { this.report = {} this.#pollPeriod = env.HEALTHCHECK_POLL_PERIOD_MS - this.ipfsApiUrl = env.IPFS_API + this.ipfsApiUrl = `http://${env.IPFS_API_HOST}:${env.IPFS_API_PORT}/api/v0/` this.#timeout = env.HEALTHCHECK_TIMEOUT_MS this.services = this.#init(apis) this.metrics = { - peerCount: - this.metrics.peerCount || - new client.Gauge({ - name: 'dscp_ipfs_swarm_peer_count', - help: 'a number of discovered and connected peers', - labelNames: ['type'], - }), + peerCount: () => { + if (!this.metrics.peerCount) { + return new client.Gauge({ + name: 'dscp_ipfs_swarm_peer_count', + help: 'a number of discovered and connected peers', + labelNames: ['type'], + }) + } + }, } } @@ -82,9 +84,7 @@ class ServiceWatcher { try { const services = await getAll services.forEach(({ name, ...rest }) => this.update(name, rest)) - await this.#updateMetrics().catch((err) => { - this.metrics = err - }) + await this.#updateMetrics() } catch (error) { // if no service assume that this is server error e.g. TypeError, Parse... const name = error.service || 'server' diff --git a/package.json b/package.json index 2398efe..16b1d0c 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "test": "NODE_ENV=test mocha --config ./test/mocharc.cjs ./test", "test:integration": "NODE_ENV=test mocha --config ./test/mocharc.cjs ./test/integration", "test:unit": "NODE_ENV=test mocha --config ./test/mocharc-unit.cjs ./test/unit", - "lint": "eslint .", + "lint": "eslint . --fix", "depcheck": "depcheck", "start": "node app/index.js", "dev": "NODE_ENV=dev nodemon app/index.js | pino-colada", diff --git a/test/test.env b/test/test.env index b0cda9b..c6a5331 100644 --- a/test/test.env +++ b/test/test.env @@ -3,3 +3,5 @@ IPFS_LOG_LEVEL=fatal NODE_HOST=localhost HEALTHCHECK_POLL_PERIOD_MS=1000 HEALTHCHECK_TIMEOUT_MS=1000 +IPFS_API_HOST=localhost +IPFS_API_PORT=5001 From 93e91fa9cbb906b82a4c0431f8bacfbf15053283 Mon Sep 17 00:00:00 2001 From: Paulius Date: Mon, 28 Nov 2022 14:22:50 +0000 Subject: [PATCH 15/24] IN-421: sage of fixing failing tests with least effort --- app/env.js | 4 ++-- app/utils/ServiceWatcher.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/env.js b/app/env.js index 947f6b8..0e1bf84 100644 --- a/app/env.js +++ b/app/env.js @@ -30,8 +30,8 @@ const vars = envalid.cleanEnv( LOG_LEVEL: envalid.str({ default: 'info', devDefault: 'debug' }), PORT: envalid.port({ default: 80, devDefault: 3000 }), NODE_HOST: envalid.host({ devDefault: 'localhost' }), - IPFS_API_HOST: envalid.host({ devDefault: 'localhost' }), - IPFS_API_PORT: envalid.host({ devDefault: '5001' }), + IPFS_API_HOST: envalid.host({ default: 'localhost' }), + IPFS_API_PORT: envalid.host({ default: '5001' }), NODE_PORT: envalid.port({ default: 9944 }), IPFS_PATH: envalid.str({ default: '/ipfs', devDefault: path.resolve(__dirname, '..', `data`) }), IPFS_EXECUTABLE: envalid.str({ diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index 88d2c00..558902e 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -84,7 +84,7 @@ class ServiceWatcher { try { const services = await getAll services.forEach(({ name, ...rest }) => this.update(name, rest)) - await this.#updateMetrics() + await this.#updateMetrics().catch((err) => this.metrics.error = err) } catch (error) { // if no service assume that this is server error e.g. TypeError, Parse... const name = error.service || 'server' From 2042416db8a4d143ca2221f6e7692aac6fe0605b Mon Sep 17 00:00:00 2001 From: Paulius Date: Mon, 28 Nov 2022 15:31:37 +0000 Subject: [PATCH 16/24] IN-421: set devDefault instead of default. --- app/env.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/env.js b/app/env.js index 0e1bf84..947f6b8 100644 --- a/app/env.js +++ b/app/env.js @@ -30,8 +30,8 @@ const vars = envalid.cleanEnv( LOG_LEVEL: envalid.str({ default: 'info', devDefault: 'debug' }), PORT: envalid.port({ default: 80, devDefault: 3000 }), NODE_HOST: envalid.host({ devDefault: 'localhost' }), - IPFS_API_HOST: envalid.host({ default: 'localhost' }), - IPFS_API_PORT: envalid.host({ default: '5001' }), + IPFS_API_HOST: envalid.host({ devDefault: 'localhost' }), + IPFS_API_PORT: envalid.host({ devDefault: '5001' }), NODE_PORT: envalid.port({ default: 9944 }), IPFS_PATH: envalid.str({ default: '/ipfs', devDefault: path.resolve(__dirname, '..', `data`) }), IPFS_EXECUTABLE: envalid.str({ From 292ab117b8e273c4f01160edf58b932236afdfd5 Mon Sep 17 00:00:00 2001 From: Paulius Date: Tue, 29 Nov 2022 09:20:27 +0000 Subject: [PATCH 17/24] IN-421: some updates, env vars. --- app/env.js | 2 +- app/utils/ServiceWatcher.js | 2 +- test/integration/fixtures.js | 8 ++++---- test/integration/ipfs.test.js | 9 +++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/env.js b/app/env.js index 947f6b8..46a45e4 100644 --- a/app/env.js +++ b/app/env.js @@ -31,7 +31,7 @@ const vars = envalid.cleanEnv( PORT: envalid.port({ default: 80, devDefault: 3000 }), NODE_HOST: envalid.host({ devDefault: 'localhost' }), IPFS_API_HOST: envalid.host({ devDefault: 'localhost' }), - IPFS_API_PORT: envalid.host({ devDefault: '5001' }), + IPFS_API_PORT: envalid.port({ default: 5001 }), NODE_PORT: envalid.port({ default: 9944 }), IPFS_PATH: envalid.str({ default: '/ipfs', devDefault: path.resolve(__dirname, '..', `data`) }), IPFS_EXECUTABLE: envalid.str({ diff --git a/app/utils/ServiceWatcher.js b/app/utils/ServiceWatcher.js index 558902e..c8bcdf9 100644 --- a/app/utils/ServiceWatcher.js +++ b/app/utils/ServiceWatcher.js @@ -84,7 +84,7 @@ class ServiceWatcher { try { const services = await getAll services.forEach(({ name, ...rest }) => this.update(name, rest)) - await this.#updateMetrics().catch((err) => this.metrics.error = err) + await this.#updateMetrics().catch((err) => (this.metrics.error = err)) } catch (error) { // if no service assume that this is server error e.g. TypeError, Parse... const name = error.service || 'server' diff --git a/test/integration/fixtures.js b/test/integration/fixtures.js index 1fa4626..ca2d82d 100644 --- a/test/integration/fixtures.js +++ b/test/integration/fixtures.js @@ -3,7 +3,7 @@ import fs from 'fs/promises' import { spawnSync } from 'child_process' import { fileURLToPath } from 'url' -import env from '../../app/env.js' +import { IPFS_EXECUTABLE, IPFS_API_PORT, IPFS_PATH } from '../../app/env.js' import { startServer, stopServer } from './helper/server.js' import { waitForIpfsApi } from './helper/ipfs.js' @@ -11,13 +11,13 @@ const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) export const mochaGlobalSetup = async function () { - spawnSync(env.IPFS_EXECUTABLE, ['init']) - await fs.copyFile(path.join(__dirname, '..', 'config', 'node-1.json'), path.join(env.IPFS_PATH, 'config')) + spawnSync(IPFS_EXECUTABLE, ['init']) + await fs.copyFile(path.join(__dirname, '..', 'config', 'node-1.json'), path.join(IPFS_PATH, 'config')) this.stopServer = stopServer await startServer(this) - await waitForIpfsApi(`5001`) + await waitForIpfsApi(IPFS_API_PORT) } export const mochaGlobalTeardown = async function () { diff --git a/test/integration/ipfs.test.js b/test/integration/ipfs.test.js index db83544..ddb22a8 100644 --- a/test/integration/ipfs.test.js +++ b/test/integration/ipfs.test.js @@ -4,13 +4,14 @@ import { FormData, Blob } from 'formdata-node' import { expect } from 'chai' import delay from 'delay' +import { IPFS_API_PORT } from '../../app/env' import { getSwarmKey, setSwarmKey } from './helper/api.js' import { setupIPFS, waitForIpfsApi } from './helper/ipfs.js' const uploadA = async (fileName, contents) => { const form = new FormData() form.append('file', new Blob([contents]), fileName) - const body = await fetch(`http://localhost:5001/api/v0/add?cid-version=0`, { + const body = await fetch(`http://localhost:${IPFS_API_PORT}/api/v0/add?cid-version=0`, { method: 'POST', body: form, }) @@ -32,8 +33,8 @@ const download = (port) => async (hash) => { return contentText } -const downloadA = download(`5001`) -const downloadB = download(`5002`) +const downloadA = download(IPFS_API_PORT) +const downloadB = download(`5002`) //TODO mm? 50/50 to be fair since it's test i think we should ignore const setupIpfsWithSwarm = async (context) => { before(async function () { @@ -113,7 +114,7 @@ describe('ipfs', function () { context.hash = await uploadA('test-file-4.txt', 'Test 4') await setSwarmKey(context.swarmKey) await delay(500) - await waitForIpfsApi(`5001`) + await waitForIpfsApi(IPFS_API_PORT) }) it('should be retrievable', async function () { From ffe864d6b56eb3b4ce46e275c22da160bff6ec2c Mon Sep 17 00:00:00 2001 From: Paulius Date: Tue, 29 Nov 2022 09:56:50 +0000 Subject: [PATCH 18/24] IN-421: add mapping for helm. --- helm/dscp-ipfs/templates/statefulset.yaml | 5 +++++ test/integration/fixtures.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/helm/dscp-ipfs/templates/statefulset.yaml b/helm/dscp-ipfs/templates/statefulset.yaml index e78b563..c6437c3 100644 --- a/helm/dscp-ipfs/templates/statefulset.yaml +++ b/helm/dscp-ipfs/templates/statefulset.yaml @@ -98,6 +98,11 @@ spec: configMapKeyRef: name: {{ include "dscp-ipfs.fullname" . }}-config key: healthCheckPort + - name: IPFS_API_PORT + valueFrom: + configMapKeyRef: + name: {{ include "dscp-ipfs.fullname" . }}-config + key: ipfsApiPort - name: LOG_LEVEL valueFrom: configMapKeyRef: diff --git a/test/integration/fixtures.js b/test/integration/fixtures.js index ca2d82d..a40f67a 100644 --- a/test/integration/fixtures.js +++ b/test/integration/fixtures.js @@ -3,7 +3,7 @@ import fs from 'fs/promises' import { spawnSync } from 'child_process' import { fileURLToPath } from 'url' -import { IPFS_EXECUTABLE, IPFS_API_PORT, IPFS_PATH } from '../../app/env.js' +import { IPFS_EXECUTABLE, IPFS_API_PORT, IPFS_PATH } from '../../app/env' import { startServer, stopServer } from './helper/server.js' import { waitForIpfsApi } from './helper/ipfs.js' From 69b54c5cf28dead0564f8f40810731f7f8df8c8e Mon Sep 17 00:00:00 2001 From: Paulius Date: Tue, 29 Nov 2022 10:00:08 +0000 Subject: [PATCH 19/24] IN-421: missing extension on import. --- test/integration/fixtures.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/fixtures.js b/test/integration/fixtures.js index a40f67a..ca2d82d 100644 --- a/test/integration/fixtures.js +++ b/test/integration/fixtures.js @@ -3,7 +3,7 @@ import fs from 'fs/promises' import { spawnSync } from 'child_process' import { fileURLToPath } from 'url' -import { IPFS_EXECUTABLE, IPFS_API_PORT, IPFS_PATH } from '../../app/env' +import { IPFS_EXECUTABLE, IPFS_API_PORT, IPFS_PATH } from '../../app/env.js' import { startServer, stopServer } from './helper/server.js' import { waitForIpfsApi } from './helper/ipfs.js' From 3986a1d901f3764501d314434fe219506ac8cebb Mon Sep 17 00:00:00 2001 From: Paulius Date: Tue, 29 Nov 2022 10:17:19 +0000 Subject: [PATCH 20/24] IN-421: is it a default export? --- test/integration/fixtures.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration/fixtures.js b/test/integration/fixtures.js index ca2d82d..960a040 100644 --- a/test/integration/fixtures.js +++ b/test/integration/fixtures.js @@ -3,7 +3,7 @@ import fs from 'fs/promises' import { spawnSync } from 'child_process' import { fileURLToPath } from 'url' -import { IPFS_EXECUTABLE, IPFS_API_PORT, IPFS_PATH } from '../../app/env.js' +import env from '../../app/env.js' import { startServer, stopServer } from './helper/server.js' import { waitForIpfsApi } from './helper/ipfs.js' @@ -11,13 +11,13 @@ const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) export const mochaGlobalSetup = async function () { - spawnSync(IPFS_EXECUTABLE, ['init']) - await fs.copyFile(path.join(__dirname, '..', 'config', 'node-1.json'), path.join(IPFS_PATH, 'config')) + spawnSync(env.IPFS_EXECUTABLE, ['init']) + await fs.copyFile(path.join(__dirname, '..', 'config', 'node-1.json'), path.join(env.IPFS_PATH, 'config')) this.stopServer = stopServer await startServer(this) - await waitForIpfsApi(IPFS_API_PORT) + await waitForIpfsApi(env.IPFS_API_PORT) } export const mochaGlobalTeardown = async function () { From cbdf8d6e3e1d62ee053955c01d44a8f4f1471d49 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Tue, 29 Nov 2022 10:17:28 +0000 Subject: [PATCH 21/24] Replace dscp-node package with @polkadot/api (#46) * use polkadot directly * v bump * await api.isReadyOrError --- app/keyWatcher/api.js | 14 +- helm/dscp-ipfs/Chart.yaml | 4 +- helm/dscp-ipfs/values.yaml | 2 +- package-lock.json | 944 +++++++++++++++++++------------------ package.json | 4 +- 5 files changed, 492 insertions(+), 476 deletions(-) diff --git a/app/keyWatcher/api.js b/app/keyWatcher/api.js index 1368e3a..1a9f56d 100644 --- a/app/keyWatcher/api.js +++ b/app/keyWatcher/api.js @@ -1,20 +1,16 @@ -import { buildApi } from '@digicatapult/dscp-node' +import { ApiPromise, WsProvider, Keyring } from '@polkadot/api' import env from '../env.js' export const createNodeApi = async () => { - const { api, keyring } = buildApi({ - options: { - apiHost: env.NODE_HOST, - apiPort: env.NODE_PORT, - }, - }) + const provider = new WsProvider(`ws://${env.NODE_HOST}:${env.NODE_PORT}`) + const api = new ApiPromise({ provider }) - await api.isReady + await api.isReadyOrError.catch(() => {}) // prevent unhandled promise rejection errors return { _api: api, - _keyring: keyring, + _keyring: new Keyring({ type: 'sr25519' }), isEventKeyUpdate: (event) => api.events.ipfsKey.UpdateKey.is(event), getCurrentKey: async () => await api.query.ipfsKey.key(), setupEventProcessor: (eventProcessor) => api.query.system.events(eventProcessor), diff --git a/helm/dscp-ipfs/Chart.yaml b/helm/dscp-ipfs/Chart.yaml index 6d4a0f9..91f68d1 100644 --- a/helm/dscp-ipfs/Chart.yaml +++ b/helm/dscp-ipfs/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: dscp-ipfs -appVersion: '2.8.1' +appVersion: '2.8.2' description: A Helm chart for dscp-ipfs -version: '2.8.1' +version: '2.8.2' type: application dependencies: - name: dscp-node diff --git a/helm/dscp-ipfs/values.yaml b/helm/dscp-ipfs/values.yaml index fc2b612..c2d04cd 100644 --- a/helm/dscp-ipfs/values.yaml +++ b/helm/dscp-ipfs/values.yaml @@ -52,7 +52,7 @@ statefulSet: image: repository: digicatapult/dscp-ipfs pullPolicy: IfNotPresent - tag: 'v2.8.1' + tag: 'v2.8.2' storage: storageClass: "" diff --git a/package-lock.json b/package-lock.json index 4fe273f..dcbb115 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@digicatapult/dscp-ipfs", - "version": "2.8.1", + "version": "2.8.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@digicatapult/dscp-ipfs", - "version": "2.8.1", + "version": "2.8.2", "license": "Apache-2.0", "dependencies": { - "@digicatapult/dscp-node": "^4.4.6", + "@polkadot/api": "^9.9.4", "dotenv": "^16.0.3", "envalid": "^7.3.1", "express": "^4.18.2", @@ -326,11 +326,11 @@ } }, "node_modules/@babel/runtime": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.4.tgz", - "integrity": "sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz", + "integrity": "sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==", "dependencies": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.13.11" }, "engines": { "node": ">=6.9.0" @@ -385,18 +385,6 @@ "node": ">=6.9.0" } }, - "node_modules/@digicatapult/dscp-node": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/@digicatapult/dscp-node/-/dscp-node-4.4.6.tgz", - "integrity": "sha512-h8R2h9mfW3YrhwZ3P3KPKV+uGOlj6kIMBXv7vQmg9cA+0yCBUHHUNwUQp7jpudV7cpTFzV6QNSw9k21IrTGi/w==", - "dependencies": { - "@polkadot/api": "^8.11.3" - }, - "engines": { - "node": "16.x.x", - "npm": "8.x.x" - } - }, "node_modules/@eslint/eslintrc": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", @@ -707,160 +695,160 @@ } }, "node_modules/@polkadot/api": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-8.14.1.tgz", - "integrity": "sha512-jg26eIKFYqVfDBTAopHL3aDaNw9j6TdUkXuvYJOnynpecU4xwbTVKcOtSOjJ2eRX4MgMQ4zlyMHJx3iKw0uUTA==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/api-augment": "8.14.1", - "@polkadot/api-base": "8.14.1", - "@polkadot/api-derive": "8.14.1", - "@polkadot/keyring": "^10.1.1", - "@polkadot/rpc-augment": "8.14.1", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/rpc-provider": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-augment": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/types-create": "8.14.1", - "@polkadot/types-known": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-9.9.4.tgz", + "integrity": "sha512-ze7W/DXsPHsixrFOACzugDQqezzrUGGX1Z2JOl6z+V8pd+ZKLSecsKJFUzf4yoBT82ArITYPtRVx/Dq9b9K2dA==", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@polkadot/api-augment": "9.9.4", + "@polkadot/api-base": "9.9.4", + "@polkadot/api-derive": "9.9.4", + "@polkadot/keyring": "^10.1.14", + "@polkadot/rpc-augment": "9.9.4", + "@polkadot/rpc-core": "9.9.4", + "@polkadot/rpc-provider": "9.9.4", + "@polkadot/types": "9.9.4", + "@polkadot/types-augment": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/types-create": "9.9.4", + "@polkadot/types-known": "9.9.4", + "@polkadot/util": "^10.1.14", + "@polkadot/util-crypto": "^10.1.14", "eventemitter3": "^4.0.7", - "rxjs": "^7.5.6" + "rxjs": "^7.5.7" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/api-augment": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-8.14.1.tgz", - "integrity": "sha512-65GMlgVnZd08Ifh8uAj+p/+MlXxvsAfBcCHjQhOmbCE0dki+rzTPUR31LsWyDKtuw+nUBj0iZN4PelO+wU4r0g==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-9.9.4.tgz", + "integrity": "sha512-+T9YWw5kEi7AkSoS2UfE1nrVeJUtD92elQBZ3bMMkfM1geKWhSnvBLyTMn6kFmNXTfK0qt8YKS1pwbux7cC9tg==", "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/api-base": "8.14.1", - "@polkadot/rpc-augment": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-augment": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/api-base": "9.9.4", + "@polkadot/rpc-augment": "9.9.4", + "@polkadot/types": "9.9.4", + "@polkadot/types-augment": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/util": "^10.1.14" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/api-base": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-8.14.1.tgz", - "integrity": "sha512-EXFhNXIfpirf18IsqcG2pGQW1/Xn+bfjqVYQMMJ4ZONtYH4baZZlXk7SoXCCHonN2x1ixs4DOcRx5oVxjabdIQ==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-9.9.4.tgz", + "integrity": "sha512-G1DcxcMeGcvaAAA3u5Tbf70zE5aIuAPEAXnptFMF0lvJz4O6CM8k8ZZFTSk25hjsYlnx8WI1FTc97q4/tKie+Q==", "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/util": "^10.1.1", - "rxjs": "^7.5.6" + "@babel/runtime": "^7.20.1", + "@polkadot/rpc-core": "9.9.4", + "@polkadot/types": "9.9.4", + "@polkadot/util": "^10.1.14", + "rxjs": "^7.5.7" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/api-derive": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-8.14.1.tgz", - "integrity": "sha512-eWG1MrQhHMUjt9gDHN9/9/ZMATu1MolqcalPFhNoGtdON3+I0J3ntjQ4y5X7+p2OGwQplpYRKqbK4k7tKzu8tA==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/api": "8.14.1", - "@polkadot/api-augment": "8.14.1", - "@polkadot/api-base": "8.14.1", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "rxjs": "^7.5.6" + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-9.9.4.tgz", + "integrity": "sha512-3ka7GzY4QbI3d/DHjQ9SjfDOTDxeU8gM2Dn31BP1oFzGwdFe2GZhDIE//lR5S6UDVxNNlgWz4927AunOQcuAmg==", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@polkadot/api": "9.9.4", + "@polkadot/api-augment": "9.9.4", + "@polkadot/api-base": "9.9.4", + "@polkadot/rpc-core": "9.9.4", + "@polkadot/types": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/util": "^10.1.14", + "@polkadot/util-crypto": "^10.1.14", + "rxjs": "^7.5.7" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/keyring": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-10.1.11.tgz", - "integrity": "sha512-Nv8cZaOA/KbdslDMTklJ58+y+UPpic3+oMQoozuq48Ccjv7WeW2BX47XM/RNE8nYFg6EHa6Whfm4IFaFb8s7ag==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-10.1.14.tgz", + "integrity": "sha512-iejbAfGfdyTB0pixWX6HhWXkUKBHLNy7+Z+F4DU8IwpJE48iOsMRJb3qShbk5NERjx1QIjoOpSZYxiCaF6gd+w==", "dependencies": { - "@babel/runtime": "^7.19.4", - "@polkadot/util": "10.1.11", - "@polkadot/util-crypto": "10.1.11" + "@babel/runtime": "^7.20.1", + "@polkadot/util": "10.1.14", + "@polkadot/util-crypto": "10.1.14" }, "engines": { "node": ">=14.0.0" }, "peerDependencies": { - "@polkadot/util": "10.1.11", - "@polkadot/util-crypto": "10.1.11" + "@polkadot/util": "10.1.14", + "@polkadot/util-crypto": "10.1.14" } }, "node_modules/@polkadot/networks": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-10.1.11.tgz", - "integrity": "sha512-4FfOVETXwh6PL6wd6fYJMkRSQKm+xUw3vR5rHqcAnB696FpMFPPErc6asgZ9lYMyzNJRY3yG86HQpFhtCv1nGA==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-10.1.14.tgz", + "integrity": "sha512-lo4Y57yBqiad4Z2zBW0r7Ct/iKXNgsTfazDTbHRkIh3RuX36PNYshaX3p7R0eNRuetV1jJv7jqwc1nAMNI2KwQ==", "dependencies": { - "@babel/runtime": "^7.19.4", - "@polkadot/util": "10.1.11", - "@substrate/ss58-registry": "^1.33.0" + "@babel/runtime": "^7.20.1", + "@polkadot/util": "10.1.14", + "@substrate/ss58-registry": "^1.35.0" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/rpc-augment": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-8.14.1.tgz", - "integrity": "sha512-0dIsNVIMeCp0kV7+Obz0Odt6K32Ka2ygwhiV5jhhJthy8GJBPo94mKDed5gzln3Dgl2LEdJJt1h/pgCx4a2i4A==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-9.9.4.tgz", + "integrity": "sha512-67zGQAhJuXd/CZlwDZTgxNt3xGtsDwLvLvyFrHuNjJNM0KGCyt/OpQHVBlyZ6xfII0WZpccASN6P2MxsGTMnKw==", "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/rpc-core": "9.9.4", + "@polkadot/types": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/util": "^10.1.14" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/rpc-core": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-8.14.1.tgz", - "integrity": "sha512-deQ8Ob59ao/1fZQdaVtFjYR/HCBdxSYvQGt7/alBu1Uig9Sahx9oKcMkU5rWY36XqGZYos4zLay98W2hDlf+6Q==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-9.9.4.tgz", + "integrity": "sha512-DxhJcq1GAi+28nLMqhTksNMqTX40bGNhYuyQyy/to39VxizAjx+lyAHAMfzG9lvPnTIi2KzXif2pCdWq3AgJag==", "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/rpc-augment": "8.14.1", - "@polkadot/rpc-provider": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/util": "^10.1.1", - "rxjs": "^7.5.6" + "@babel/runtime": "^7.20.1", + "@polkadot/rpc-augment": "9.9.4", + "@polkadot/rpc-provider": "9.9.4", + "@polkadot/types": "9.9.4", + "@polkadot/util": "^10.1.14", + "rxjs": "^7.5.7" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/rpc-provider": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-8.14.1.tgz", - "integrity": "sha512-pAUSHZiSWLhBSYf4LmLc8iCaeqTu7Ajn8AzyqxvZDHGnIrzV5M7eTjpNDP84qno6jWRHKQ/IILr62hausEmS5w==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-support": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "@polkadot/x-fetch": "^10.1.1", - "@polkadot/x-global": "^10.1.1", - "@polkadot/x-ws": "^10.1.1", - "@substrate/connect": "0.7.9", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-9.9.4.tgz", + "integrity": "sha512-aUkPtlYukAOFX3FkUgLw3MNy+T0mCiCX7va3PIts9ggK4vl14NFZHurCZq+5ANvknRU4WG8P5teurH9Rd9oDjQ==", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@polkadot/keyring": "^10.1.14", + "@polkadot/types": "9.9.4", + "@polkadot/types-support": "9.9.4", + "@polkadot/util": "^10.1.14", + "@polkadot/util-crypto": "^10.1.14", + "@polkadot/x-fetch": "^10.1.14", + "@polkadot/x-global": "^10.1.14", + "@polkadot/x-ws": "^10.1.14", + "@substrate/connect": "0.7.17", "eventemitter3": "^4.0.7", "mock-socket": "^9.1.5", "nock": "^13.2.9" @@ -870,101 +858,101 @@ } }, "node_modules/@polkadot/types": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-8.14.1.tgz", - "integrity": "sha512-Xza16ejKrSd4XhTOlbfISyxZ2sRmbMAZk5pX7VEMHVZHqV98o+bJ2f9Kk7F8YJijkHHGosCLDestP9R5nLoOoA==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-9.9.4.tgz", + "integrity": "sha512-/LJ029S0AtKzvV9JoQtIIeHRP/Xoq8MZmDfdHUEgThRd+uvtQzFyGmcupe4EzX0p5VAx93DUFQKm8vUdHE39Tw==", "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.1", - "@polkadot/types-augment": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/types-create": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "rxjs": "^7.5.6" + "@babel/runtime": "^7.20.1", + "@polkadot/keyring": "^10.1.14", + "@polkadot/types-augment": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/types-create": "9.9.4", + "@polkadot/util": "^10.1.14", + "@polkadot/util-crypto": "^10.1.14", + "rxjs": "^7.5.7" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/types-augment": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-8.14.1.tgz", - "integrity": "sha512-Xa4TUFqyZT+IJ6pBSwDjWcF42u/E34OyC+gbs5Z2vWQ4EzSDkq4xNoUKjJlEEgTemsD9lhPOIc4jvqTCefwxEw==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-9.9.4.tgz", + "integrity": "sha512-mQNc0kxt3zM6SC+5hJbsg03fxEFpn5nakki+loE2mNsWr1g+rR7LECagAZ4wT2gvdbzWuY/LlRYyDQxe0PwdZg==", "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/types": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/util": "^10.1.14" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/types-codec": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-8.14.1.tgz", - "integrity": "sha512-y6YDN4HwvEgSWlgrEV04QBBxDxES1cTuUQFzZJzOTuZCWpA371Mdj3M9wYxGXMnj0wa+rCQGECHPZZaNxBMiKg==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-9.9.4.tgz", + "integrity": "sha512-uSHoQQcj4813c9zNkDDH897K6JB0OznTrH5WeZ1wxpjML7lkuTJ2t/GQE9e4q5Ycl7YePZsvEp2qlc3GwrVm/w==", "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.1", - "@polkadot/x-bigint": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/util": "^10.1.14", + "@polkadot/x-bigint": "^10.1.14" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/types-create": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-8.14.1.tgz", - "integrity": "sha512-fb9yyblj5AYAPzeCIq0kYSfzDxRDi/0ud9gN2UzB3H7M/O4n2mPC1vD4UOLF+B7l9QzCrt4e+k+/riGp7GfvyA==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-9.9.4.tgz", + "integrity": "sha512-EOxLryRQ4JVRSRnIMXk3Tjry1tyegNuWK8OUj51A1wHrX76DF9chME27bXUP4d7el1pjqPuQ9/l+/928GG386g==", "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/types-codec": "9.9.4", + "@polkadot/util": "^10.1.14" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/types-known": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-8.14.1.tgz", - "integrity": "sha512-GP7gRo9nmitykkrRnoLF61Qm19UFdTwMsOnJkdm7AOeWDmZGxutacgO6k1tBsHr38hsiCCGsB/JiseUgywvGIw==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-9.9.4.tgz", + "integrity": "sha512-BaKXkg3yZLDv31g0CZPJsZDXX01VTjkQ0tmW9U6fmccEq3zHlxbUiXf3aKlwKRJyDWiEOxr4cQ4GT8jj6uEIuA==", "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/networks": "^10.1.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/types-create": "8.14.1", - "@polkadot/util": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/networks": "^10.1.14", + "@polkadot/types": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/types-create": "9.9.4", + "@polkadot/util": "^10.1.14" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/types-support": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-8.14.1.tgz", - "integrity": "sha512-XqR4qq6pCZyNBuFVod8nFSNUmLssrjoU9bOIn4Ua2cqNlI9xsuKaI1X5ySEn/oWOtKQ2L5hbCm9vkXrEtXBl1w==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-9.9.4.tgz", + "integrity": "sha512-vjhdD7B5kdTLhm2iO0QAb7fM4D2ojNUVVocOJotC9NULYtoC+PkPvkvFbw7VQ1H3u7yxyZfWloMtBnCsIp5EAA==", "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/util": "^10.1.14" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/util": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-10.1.11.tgz", - "integrity": "sha512-6m51lw6g6ilqO/k4BQY7rD0lYM9NCnC4FiM7CEEUc7j8q86qxdcZ88zdNldkhNsTIQnfmCtkK3GRzZW6VYrbUw==", - "dependencies": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-bigint": "10.1.11", - "@polkadot/x-global": "10.1.11", - "@polkadot/x-textdecoder": "10.1.11", - "@polkadot/x-textencoder": "10.1.11", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-10.1.14.tgz", + "integrity": "sha512-DX8IUd3j+S4HJBs73gz5d7Z592aW5vn/aD7hzFUlBduQIYBy+L1KIoGchpD6hSSOs5HSy7owePmBlp1lPjUZBg==", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@polkadot/x-bigint": "10.1.14", + "@polkadot/x-global": "10.1.14", + "@polkadot/x-textdecoder": "10.1.14", + "@polkadot/x-textencoder": "10.1.14", "@types/bn.js": "^5.1.1", "bn.js": "^5.2.1" }, @@ -973,18 +961,18 @@ } }, "node_modules/@polkadot/util-crypto": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-10.1.11.tgz", - "integrity": "sha512-wG63frIMAR5T/HXGM0SFNzZZdk7qDBsfLXfn6PIZiXCCCsdEYPzS5WltB7fkhicYpbePJ7VgdCAddj1l4IcGyg==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-10.1.14.tgz", + "integrity": "sha512-Iq9C0Snv+pScZ9QgJoH7l++x9wdp9vhS3NMLm8ZqlDCNXUUl/3ViafZCfHRILQD9AsLcykE99mNzFDl3u8jZQA==", "dependencies": { - "@babel/runtime": "^7.19.4", + "@babel/runtime": "^7.20.1", "@noble/hashes": "1.1.3", "@noble/secp256k1": "1.7.0", - "@polkadot/networks": "10.1.11", - "@polkadot/util": "10.1.11", + "@polkadot/networks": "10.1.14", + "@polkadot/util": "10.1.14", "@polkadot/wasm-crypto": "^6.3.1", - "@polkadot/x-bigint": "10.1.11", - "@polkadot/x-randomvalues": "10.1.11", + "@polkadot/x-bigint": "10.1.14", + "@polkadot/x-randomvalues": "10.1.14", "@scure/base": "1.1.1", "ed2curve": "^0.3.0", "tweetnacl": "^1.0.3" @@ -993,7 +981,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "@polkadot/util": "10.1.11" + "@polkadot/util": "10.1.14" } }, "node_modules/@polkadot/wasm-bridge": { @@ -1093,85 +1081,85 @@ } }, "node_modules/@polkadot/x-bigint": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-10.1.11.tgz", - "integrity": "sha512-TC4KZ+ni/SJhcf/LIwD49C/kwvACu0nCchETNO+sAfJ7COXZwHDUJXVXmwN5PgkQxwsWsKKuJmzR/Fi1bgMWnQ==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-10.1.14.tgz", + "integrity": "sha512-HgrofhI+WM699ozJ9zFZcPUApB2jqwCEOMUgM1jv2WNxF0ILKNDpH08dB8OBy2SKfnKoSgmXwWtxWl1u+mq10A==", "dependencies": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-global": "10.1.11" + "@babel/runtime": "^7.20.1", + "@polkadot/x-global": "10.1.14" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/x-fetch": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-10.1.11.tgz", - "integrity": "sha512-WtyUr9itVD9BLnxCUloJ1iwrXOY/lnlEShEYKHcSm6MIHtbJolePd3v1+o5mOX+bdDbHXhPZnH8anCCqDNDRqg==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-10.1.14.tgz", + "integrity": "sha512-07H9unwv0tT5RQRkj1WE67ug6x6RlUfGN/mJWSKqf0JjsfQlPMKDC9yZW1oUSsasBUyIf0qbspuVSyhZu+0cpg==", "dependencies": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-global": "10.1.11", + "@babel/runtime": "^7.20.1", + "@polkadot/x-global": "10.1.14", "@types/node-fetch": "^2.6.2", - "node-fetch": "^3.2.10" + "node-fetch": "^3.3.0" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/x-global": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-10.1.11.tgz", - "integrity": "sha512-bWz5gdcELy6+xfr27R1GE5MPX4nfVlchzHQH+DR6OBbSi9g/PeycQAvFB6IkTmP+YEbNNtIpxnSP37zoUaG3xw==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-10.1.14.tgz", + "integrity": "sha512-ye3Yx2bfIoHf5t78rbDad587J16JanrcfpGSWoknWOZ7wmatj/CJKWhJ/VKMPfJGEJm2LidH1B0W8QDfrMEmTA==", "dependencies": { - "@babel/runtime": "^7.19.4" + "@babel/runtime": "^7.20.1" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/x-randomvalues": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-10.1.11.tgz", - "integrity": "sha512-V2V37f5hoM5B32eCpGw87Lwstin2+ArXhOZ8ENKncbQLXzbF9yTODueDoA5Vt0MJCs2CDP9cyiCYykcanqVkxg==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-10.1.14.tgz", + "integrity": "sha512-mrZho4qogLZmox7wuP1XF03HTZ4CwAjzV7RvKmwH8ToNCR6E4NRo2btgG67Z0K+bUOQRbXWL2hQazusa2p2N6w==", "dependencies": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-global": "10.1.11" + "@babel/runtime": "^7.20.1", + "@polkadot/x-global": "10.1.14" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/x-textdecoder": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-10.1.11.tgz", - "integrity": "sha512-QZqie04SR6pAj260PaLBfZUGXWKI357t4ROVJhpaj06qc1zrk1V8Mwkr49+WzjAPFEOqo70HWnzXmPNCH4dQiw==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-10.1.14.tgz", + "integrity": "sha512-qwbeR8v6a5Z9MdbjzcY5gFiRWbp8bBVoDEf1Dd+yH9/UAyFXodlMKs3irDdVhGVPCbZWQTVDEZRUgEqRxwKC7w==", "dependencies": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-global": "10.1.11" + "@babel/runtime": "^7.20.1", + "@polkadot/x-global": "10.1.14" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/x-textencoder": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-10.1.11.tgz", - "integrity": "sha512-UX+uV9AbDID81waaG/NvTkkf7ZNVW7HSHaddgbWjQEVW2Ex4ByccBarY5jEi6cErEPKfzCamKhgXflu0aV9LWw==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-10.1.14.tgz", + "integrity": "sha512-MC30rtQiFVgQDSP8wO5wa1so5tW3T7qs/DCT018A4zgjiK+uFdIGOerAgoxcNw3yC6IGnPIL5lsRO/1C9N60zA==", "dependencies": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-global": "10.1.11" + "@babel/runtime": "^7.20.1", + "@polkadot/x-global": "10.1.14" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/x-ws": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-10.1.11.tgz", - "integrity": "sha512-EUbL/R1A/NxYf6Rnb1M7U9yeTuo5r4y2vcQllE5aBLaQ0cFnRykHzlmZlVX1E7O5uy3lYVdxWC7sNgxItIWkWA==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-10.1.14.tgz", + "integrity": "sha512-xgyMYR34sHxKCtQUJ2btFAyN3fK1OqCqvAyRYmU52801aguLstRhVPAZxXJp3Dahs91FX/h/ZZzmwXD01tJtyA==", "dependencies": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-global": "10.1.11", + "@babel/runtime": "^7.20.1", + "@polkadot/x-global": "10.1.14", "@types/websocket": "^1.0.5", "websocket": "^1.0.34" }, @@ -1238,12 +1226,12 @@ "dev": true }, "node_modules/@substrate/connect": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.7.9.tgz", - "integrity": "sha512-E6bdBhzsfHNAKlmQSvbTW1jyb0WcIvgbrEBfJ4B6FZ3t1wpGjldL6GrYtegVtKr9/ySQ/pFNn0uVbugukpMDjQ==", + "version": "0.7.17", + "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.7.17.tgz", + "integrity": "sha512-s0XBmGpUCFWZFa+TS0TEvOKtWjJP2uT4xKmvzApH8INB5xbz79wqWFX6WWh3AlK/X1P0Smt+RVEH7HQiLJAYAw==", "dependencies": { "@substrate/connect-extension-protocol": "^1.0.1", - "@substrate/smoldot-light": "0.6.25", + "@substrate/smoldot-light": "0.7.7", "eventemitter3": "^4.0.7" } }, @@ -1253,17 +1241,23 @@ "integrity": "sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg==" }, "node_modules/@substrate/smoldot-light": { - "version": "0.6.25", - "resolved": "https://registry.npmjs.org/@substrate/smoldot-light/-/smoldot-light-0.6.25.tgz", - "integrity": "sha512-OQ9/bnJJy90xSRg5Vp9MIvrgbrVt/r/FwXYSmyLeBBNbJt6o1gSeshVo8icD+2VWwd/TJ2oHl5CVQWe89MyByA==", + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/@substrate/smoldot-light/-/smoldot-light-0.7.7.tgz", + "integrity": "sha512-ksxeAed6dIUtYSl0f8ehgWQjwXnpDGTIJt+WVRIGt3OObZkA96ZdBWx0xP7GrXZtj37u4n/Y1z7TyTm4bwQvrw==", "dependencies": { - "websocket": "^1.0.32" + "pako": "^2.0.4", + "ws": "^8.8.1" } }, + "node_modules/@substrate/smoldot-light/node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" + }, "node_modules/@substrate/ss58-registry": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.33.0.tgz", - "integrity": "sha512-DztMuMcEfu+tJrtIQIIp5gO8/XJZ8N8UwPObDCSNgrp7trtSkPJAUFB9qXaReXtN9UvTcVBMTWk6VPfFi04Wkg==" + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.35.0.tgz", + "integrity": "sha512-cIY3J7RlT4mfPNFwd2mv1q9vTp/shImw2gN2y2outMhOcagH/HG+W8/JohpifjxPC/1pbQ0Z8nxfL5Td3EchcA==" }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", @@ -1850,9 +1844,9 @@ } }, "node_modules/bufferutil": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", - "integrity": "sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", + "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", "hasInstallScript": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -4842,9 +4836,9 @@ } }, "node_modules/node-fetch": { - "version": "3.2.10", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz", - "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", + "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -6117,9 +6111,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.10", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz", - "integrity": "sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw==" + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "node_modules/regexpp": { "version": "3.2.0", @@ -6969,9 +6963,9 @@ } }, "node_modules/utf-8-validate": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.9.tgz", - "integrity": "sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", "hasInstallScript": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -7153,6 +7147,26 @@ "typedarray-to-buffer": "^3.1.5" } }, + "node_modules/ws": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -7472,11 +7486,11 @@ "dev": true }, "@babel/runtime": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.4.tgz", - "integrity": "sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz", + "integrity": "sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==", "requires": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.13.11" } }, "@babel/template": { @@ -7519,14 +7533,6 @@ "to-fast-properties": "^2.0.0" } }, - "@digicatapult/dscp-node": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/@digicatapult/dscp-node/-/dscp-node-4.4.6.tgz", - "integrity": "sha512-h8R2h9mfW3YrhwZ3P3KPKV+uGOlj6kIMBXv7vQmg9cA+0yCBUHHUNwUQp7jpudV7cpTFzV6QNSw9k21IrTGi/w==", - "requires": { - "@polkadot/api": "^8.11.3" - } - }, "@eslint/eslintrc": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", @@ -7753,232 +7759,232 @@ } }, "@polkadot/api": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-8.14.1.tgz", - "integrity": "sha512-jg26eIKFYqVfDBTAopHL3aDaNw9j6TdUkXuvYJOnynpecU4xwbTVKcOtSOjJ2eRX4MgMQ4zlyMHJx3iKw0uUTA==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/api-augment": "8.14.1", - "@polkadot/api-base": "8.14.1", - "@polkadot/api-derive": "8.14.1", - "@polkadot/keyring": "^10.1.1", - "@polkadot/rpc-augment": "8.14.1", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/rpc-provider": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-augment": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/types-create": "8.14.1", - "@polkadot/types-known": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-9.9.4.tgz", + "integrity": "sha512-ze7W/DXsPHsixrFOACzugDQqezzrUGGX1Z2JOl6z+V8pd+ZKLSecsKJFUzf4yoBT82ArITYPtRVx/Dq9b9K2dA==", + "requires": { + "@babel/runtime": "^7.20.1", + "@polkadot/api-augment": "9.9.4", + "@polkadot/api-base": "9.9.4", + "@polkadot/api-derive": "9.9.4", + "@polkadot/keyring": "^10.1.14", + "@polkadot/rpc-augment": "9.9.4", + "@polkadot/rpc-core": "9.9.4", + "@polkadot/rpc-provider": "9.9.4", + "@polkadot/types": "9.9.4", + "@polkadot/types-augment": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/types-create": "9.9.4", + "@polkadot/types-known": "9.9.4", + "@polkadot/util": "^10.1.14", + "@polkadot/util-crypto": "^10.1.14", "eventemitter3": "^4.0.7", - "rxjs": "^7.5.6" + "rxjs": "^7.5.7" } }, "@polkadot/api-augment": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-8.14.1.tgz", - "integrity": "sha512-65GMlgVnZd08Ifh8uAj+p/+MlXxvsAfBcCHjQhOmbCE0dki+rzTPUR31LsWyDKtuw+nUBj0iZN4PelO+wU4r0g==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-9.9.4.tgz", + "integrity": "sha512-+T9YWw5kEi7AkSoS2UfE1nrVeJUtD92elQBZ3bMMkfM1geKWhSnvBLyTMn6kFmNXTfK0qt8YKS1pwbux7cC9tg==", "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/api-base": "8.14.1", - "@polkadot/rpc-augment": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-augment": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/api-base": "9.9.4", + "@polkadot/rpc-augment": "9.9.4", + "@polkadot/types": "9.9.4", + "@polkadot/types-augment": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/util": "^10.1.14" } }, "@polkadot/api-base": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-8.14.1.tgz", - "integrity": "sha512-EXFhNXIfpirf18IsqcG2pGQW1/Xn+bfjqVYQMMJ4ZONtYH4baZZlXk7SoXCCHonN2x1ixs4DOcRx5oVxjabdIQ==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-9.9.4.tgz", + "integrity": "sha512-G1DcxcMeGcvaAAA3u5Tbf70zE5aIuAPEAXnptFMF0lvJz4O6CM8k8ZZFTSk25hjsYlnx8WI1FTc97q4/tKie+Q==", "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/util": "^10.1.1", - "rxjs": "^7.5.6" + "@babel/runtime": "^7.20.1", + "@polkadot/rpc-core": "9.9.4", + "@polkadot/types": "9.9.4", + "@polkadot/util": "^10.1.14", + "rxjs": "^7.5.7" } }, "@polkadot/api-derive": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-8.14.1.tgz", - "integrity": "sha512-eWG1MrQhHMUjt9gDHN9/9/ZMATu1MolqcalPFhNoGtdON3+I0J3ntjQ4y5X7+p2OGwQplpYRKqbK4k7tKzu8tA==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/api": "8.14.1", - "@polkadot/api-augment": "8.14.1", - "@polkadot/api-base": "8.14.1", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "rxjs": "^7.5.6" + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-9.9.4.tgz", + "integrity": "sha512-3ka7GzY4QbI3d/DHjQ9SjfDOTDxeU8gM2Dn31BP1oFzGwdFe2GZhDIE//lR5S6UDVxNNlgWz4927AunOQcuAmg==", + "requires": { + "@babel/runtime": "^7.20.1", + "@polkadot/api": "9.9.4", + "@polkadot/api-augment": "9.9.4", + "@polkadot/api-base": "9.9.4", + "@polkadot/rpc-core": "9.9.4", + "@polkadot/types": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/util": "^10.1.14", + "@polkadot/util-crypto": "^10.1.14", + "rxjs": "^7.5.7" } }, "@polkadot/keyring": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-10.1.11.tgz", - "integrity": "sha512-Nv8cZaOA/KbdslDMTklJ58+y+UPpic3+oMQoozuq48Ccjv7WeW2BX47XM/RNE8nYFg6EHa6Whfm4IFaFb8s7ag==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-10.1.14.tgz", + "integrity": "sha512-iejbAfGfdyTB0pixWX6HhWXkUKBHLNy7+Z+F4DU8IwpJE48iOsMRJb3qShbk5NERjx1QIjoOpSZYxiCaF6gd+w==", "requires": { - "@babel/runtime": "^7.19.4", - "@polkadot/util": "10.1.11", - "@polkadot/util-crypto": "10.1.11" + "@babel/runtime": "^7.20.1", + "@polkadot/util": "10.1.14", + "@polkadot/util-crypto": "10.1.14" } }, "@polkadot/networks": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-10.1.11.tgz", - "integrity": "sha512-4FfOVETXwh6PL6wd6fYJMkRSQKm+xUw3vR5rHqcAnB696FpMFPPErc6asgZ9lYMyzNJRY3yG86HQpFhtCv1nGA==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-10.1.14.tgz", + "integrity": "sha512-lo4Y57yBqiad4Z2zBW0r7Ct/iKXNgsTfazDTbHRkIh3RuX36PNYshaX3p7R0eNRuetV1jJv7jqwc1nAMNI2KwQ==", "requires": { - "@babel/runtime": "^7.19.4", - "@polkadot/util": "10.1.11", - "@substrate/ss58-registry": "^1.33.0" + "@babel/runtime": "^7.20.1", + "@polkadot/util": "10.1.14", + "@substrate/ss58-registry": "^1.35.0" } }, "@polkadot/rpc-augment": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-8.14.1.tgz", - "integrity": "sha512-0dIsNVIMeCp0kV7+Obz0Odt6K32Ka2ygwhiV5jhhJthy8GJBPo94mKDed5gzln3Dgl2LEdJJt1h/pgCx4a2i4A==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-9.9.4.tgz", + "integrity": "sha512-67zGQAhJuXd/CZlwDZTgxNt3xGtsDwLvLvyFrHuNjJNM0KGCyt/OpQHVBlyZ6xfII0WZpccASN6P2MxsGTMnKw==", "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/rpc-core": "9.9.4", + "@polkadot/types": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/util": "^10.1.14" } }, "@polkadot/rpc-core": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-8.14.1.tgz", - "integrity": "sha512-deQ8Ob59ao/1fZQdaVtFjYR/HCBdxSYvQGt7/alBu1Uig9Sahx9oKcMkU5rWY36XqGZYos4zLay98W2hDlf+6Q==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-9.9.4.tgz", + "integrity": "sha512-DxhJcq1GAi+28nLMqhTksNMqTX40bGNhYuyQyy/to39VxizAjx+lyAHAMfzG9lvPnTIi2KzXif2pCdWq3AgJag==", "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/rpc-augment": "8.14.1", - "@polkadot/rpc-provider": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/util": "^10.1.1", - "rxjs": "^7.5.6" + "@babel/runtime": "^7.20.1", + "@polkadot/rpc-augment": "9.9.4", + "@polkadot/rpc-provider": "9.9.4", + "@polkadot/types": "9.9.4", + "@polkadot/util": "^10.1.14", + "rxjs": "^7.5.7" } }, "@polkadot/rpc-provider": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-8.14.1.tgz", - "integrity": "sha512-pAUSHZiSWLhBSYf4LmLc8iCaeqTu7Ajn8AzyqxvZDHGnIrzV5M7eTjpNDP84qno6jWRHKQ/IILr62hausEmS5w==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-support": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "@polkadot/x-fetch": "^10.1.1", - "@polkadot/x-global": "^10.1.1", - "@polkadot/x-ws": "^10.1.1", - "@substrate/connect": "0.7.9", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-9.9.4.tgz", + "integrity": "sha512-aUkPtlYukAOFX3FkUgLw3MNy+T0mCiCX7va3PIts9ggK4vl14NFZHurCZq+5ANvknRU4WG8P5teurH9Rd9oDjQ==", + "requires": { + "@babel/runtime": "^7.20.1", + "@polkadot/keyring": "^10.1.14", + "@polkadot/types": "9.9.4", + "@polkadot/types-support": "9.9.4", + "@polkadot/util": "^10.1.14", + "@polkadot/util-crypto": "^10.1.14", + "@polkadot/x-fetch": "^10.1.14", + "@polkadot/x-global": "^10.1.14", + "@polkadot/x-ws": "^10.1.14", + "@substrate/connect": "0.7.17", "eventemitter3": "^4.0.7", "mock-socket": "^9.1.5", "nock": "^13.2.9" } }, "@polkadot/types": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-8.14.1.tgz", - "integrity": "sha512-Xza16ejKrSd4XhTOlbfISyxZ2sRmbMAZk5pX7VEMHVZHqV98o+bJ2f9Kk7F8YJijkHHGosCLDestP9R5nLoOoA==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-9.9.4.tgz", + "integrity": "sha512-/LJ029S0AtKzvV9JoQtIIeHRP/Xoq8MZmDfdHUEgThRd+uvtQzFyGmcupe4EzX0p5VAx93DUFQKm8vUdHE39Tw==", "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.1", - "@polkadot/types-augment": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/types-create": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "rxjs": "^7.5.6" + "@babel/runtime": "^7.20.1", + "@polkadot/keyring": "^10.1.14", + "@polkadot/types-augment": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/types-create": "9.9.4", + "@polkadot/util": "^10.1.14", + "@polkadot/util-crypto": "^10.1.14", + "rxjs": "^7.5.7" } }, "@polkadot/types-augment": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-8.14.1.tgz", - "integrity": "sha512-Xa4TUFqyZT+IJ6pBSwDjWcF42u/E34OyC+gbs5Z2vWQ4EzSDkq4xNoUKjJlEEgTemsD9lhPOIc4jvqTCefwxEw==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-9.9.4.tgz", + "integrity": "sha512-mQNc0kxt3zM6SC+5hJbsg03fxEFpn5nakki+loE2mNsWr1g+rR7LECagAZ4wT2gvdbzWuY/LlRYyDQxe0PwdZg==", "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/types": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/util": "^10.1.14" } }, "@polkadot/types-codec": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-8.14.1.tgz", - "integrity": "sha512-y6YDN4HwvEgSWlgrEV04QBBxDxES1cTuUQFzZJzOTuZCWpA371Mdj3M9wYxGXMnj0wa+rCQGECHPZZaNxBMiKg==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-9.9.4.tgz", + "integrity": "sha512-uSHoQQcj4813c9zNkDDH897K6JB0OznTrH5WeZ1wxpjML7lkuTJ2t/GQE9e4q5Ycl7YePZsvEp2qlc3GwrVm/w==", "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.1", - "@polkadot/x-bigint": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/util": "^10.1.14", + "@polkadot/x-bigint": "^10.1.14" } }, "@polkadot/types-create": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-8.14.1.tgz", - "integrity": "sha512-fb9yyblj5AYAPzeCIq0kYSfzDxRDi/0ud9gN2UzB3H7M/O4n2mPC1vD4UOLF+B7l9QzCrt4e+k+/riGp7GfvyA==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-9.9.4.tgz", + "integrity": "sha512-EOxLryRQ4JVRSRnIMXk3Tjry1tyegNuWK8OUj51A1wHrX76DF9chME27bXUP4d7el1pjqPuQ9/l+/928GG386g==", "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/types-codec": "9.9.4", + "@polkadot/util": "^10.1.14" } }, "@polkadot/types-known": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-8.14.1.tgz", - "integrity": "sha512-GP7gRo9nmitykkrRnoLF61Qm19UFdTwMsOnJkdm7AOeWDmZGxutacgO6k1tBsHr38hsiCCGsB/JiseUgywvGIw==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-9.9.4.tgz", + "integrity": "sha512-BaKXkg3yZLDv31g0CZPJsZDXX01VTjkQ0tmW9U6fmccEq3zHlxbUiXf3aKlwKRJyDWiEOxr4cQ4GT8jj6uEIuA==", "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/networks": "^10.1.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/types-create": "8.14.1", - "@polkadot/util": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/networks": "^10.1.14", + "@polkadot/types": "9.9.4", + "@polkadot/types-codec": "9.9.4", + "@polkadot/types-create": "9.9.4", + "@polkadot/util": "^10.1.14" } }, "@polkadot/types-support": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-8.14.1.tgz", - "integrity": "sha512-XqR4qq6pCZyNBuFVod8nFSNUmLssrjoU9bOIn4Ua2cqNlI9xsuKaI1X5ySEn/oWOtKQ2L5hbCm9vkXrEtXBl1w==", + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-9.9.4.tgz", + "integrity": "sha512-vjhdD7B5kdTLhm2iO0QAb7fM4D2ojNUVVocOJotC9NULYtoC+PkPvkvFbw7VQ1H3u7yxyZfWloMtBnCsIp5EAA==", "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.1" + "@babel/runtime": "^7.20.1", + "@polkadot/util": "^10.1.14" } }, "@polkadot/util": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-10.1.11.tgz", - "integrity": "sha512-6m51lw6g6ilqO/k4BQY7rD0lYM9NCnC4FiM7CEEUc7j8q86qxdcZ88zdNldkhNsTIQnfmCtkK3GRzZW6VYrbUw==", - "requires": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-bigint": "10.1.11", - "@polkadot/x-global": "10.1.11", - "@polkadot/x-textdecoder": "10.1.11", - "@polkadot/x-textencoder": "10.1.11", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-10.1.14.tgz", + "integrity": "sha512-DX8IUd3j+S4HJBs73gz5d7Z592aW5vn/aD7hzFUlBduQIYBy+L1KIoGchpD6hSSOs5HSy7owePmBlp1lPjUZBg==", + "requires": { + "@babel/runtime": "^7.20.1", + "@polkadot/x-bigint": "10.1.14", + "@polkadot/x-global": "10.1.14", + "@polkadot/x-textdecoder": "10.1.14", + "@polkadot/x-textencoder": "10.1.14", "@types/bn.js": "^5.1.1", "bn.js": "^5.2.1" } }, "@polkadot/util-crypto": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-10.1.11.tgz", - "integrity": "sha512-wG63frIMAR5T/HXGM0SFNzZZdk7qDBsfLXfn6PIZiXCCCsdEYPzS5WltB7fkhicYpbePJ7VgdCAddj1l4IcGyg==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-10.1.14.tgz", + "integrity": "sha512-Iq9C0Snv+pScZ9QgJoH7l++x9wdp9vhS3NMLm8ZqlDCNXUUl/3ViafZCfHRILQD9AsLcykE99mNzFDl3u8jZQA==", "requires": { - "@babel/runtime": "^7.19.4", + "@babel/runtime": "^7.20.1", "@noble/hashes": "1.1.3", "@noble/secp256k1": "1.7.0", - "@polkadot/networks": "10.1.11", - "@polkadot/util": "10.1.11", + "@polkadot/networks": "10.1.14", + "@polkadot/util": "10.1.14", "@polkadot/wasm-crypto": "^6.3.1", - "@polkadot/x-bigint": "10.1.11", - "@polkadot/x-randomvalues": "10.1.11", + "@polkadot/x-bigint": "10.1.14", + "@polkadot/x-randomvalues": "10.1.14", "@scure/base": "1.1.1", "ed2curve": "^0.3.0", "tweetnacl": "^1.0.3" @@ -8042,67 +8048,67 @@ } }, "@polkadot/x-bigint": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-10.1.11.tgz", - "integrity": "sha512-TC4KZ+ni/SJhcf/LIwD49C/kwvACu0nCchETNO+sAfJ7COXZwHDUJXVXmwN5PgkQxwsWsKKuJmzR/Fi1bgMWnQ==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-10.1.14.tgz", + "integrity": "sha512-HgrofhI+WM699ozJ9zFZcPUApB2jqwCEOMUgM1jv2WNxF0ILKNDpH08dB8OBy2SKfnKoSgmXwWtxWl1u+mq10A==", "requires": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-global": "10.1.11" + "@babel/runtime": "^7.20.1", + "@polkadot/x-global": "10.1.14" } }, "@polkadot/x-fetch": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-10.1.11.tgz", - "integrity": "sha512-WtyUr9itVD9BLnxCUloJ1iwrXOY/lnlEShEYKHcSm6MIHtbJolePd3v1+o5mOX+bdDbHXhPZnH8anCCqDNDRqg==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-10.1.14.tgz", + "integrity": "sha512-07H9unwv0tT5RQRkj1WE67ug6x6RlUfGN/mJWSKqf0JjsfQlPMKDC9yZW1oUSsasBUyIf0qbspuVSyhZu+0cpg==", "requires": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-global": "10.1.11", + "@babel/runtime": "^7.20.1", + "@polkadot/x-global": "10.1.14", "@types/node-fetch": "^2.6.2", - "node-fetch": "^3.2.10" + "node-fetch": "^3.3.0" } }, "@polkadot/x-global": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-10.1.11.tgz", - "integrity": "sha512-bWz5gdcELy6+xfr27R1GE5MPX4nfVlchzHQH+DR6OBbSi9g/PeycQAvFB6IkTmP+YEbNNtIpxnSP37zoUaG3xw==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-10.1.14.tgz", + "integrity": "sha512-ye3Yx2bfIoHf5t78rbDad587J16JanrcfpGSWoknWOZ7wmatj/CJKWhJ/VKMPfJGEJm2LidH1B0W8QDfrMEmTA==", "requires": { - "@babel/runtime": "^7.19.4" + "@babel/runtime": "^7.20.1" } }, "@polkadot/x-randomvalues": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-10.1.11.tgz", - "integrity": "sha512-V2V37f5hoM5B32eCpGw87Lwstin2+ArXhOZ8ENKncbQLXzbF9yTODueDoA5Vt0MJCs2CDP9cyiCYykcanqVkxg==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-10.1.14.tgz", + "integrity": "sha512-mrZho4qogLZmox7wuP1XF03HTZ4CwAjzV7RvKmwH8ToNCR6E4NRo2btgG67Z0K+bUOQRbXWL2hQazusa2p2N6w==", "requires": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-global": "10.1.11" + "@babel/runtime": "^7.20.1", + "@polkadot/x-global": "10.1.14" } }, "@polkadot/x-textdecoder": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-10.1.11.tgz", - "integrity": "sha512-QZqie04SR6pAj260PaLBfZUGXWKI357t4ROVJhpaj06qc1zrk1V8Mwkr49+WzjAPFEOqo70HWnzXmPNCH4dQiw==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-10.1.14.tgz", + "integrity": "sha512-qwbeR8v6a5Z9MdbjzcY5gFiRWbp8bBVoDEf1Dd+yH9/UAyFXodlMKs3irDdVhGVPCbZWQTVDEZRUgEqRxwKC7w==", "requires": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-global": "10.1.11" + "@babel/runtime": "^7.20.1", + "@polkadot/x-global": "10.1.14" } }, "@polkadot/x-textencoder": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-10.1.11.tgz", - "integrity": "sha512-UX+uV9AbDID81waaG/NvTkkf7ZNVW7HSHaddgbWjQEVW2Ex4ByccBarY5jEi6cErEPKfzCamKhgXflu0aV9LWw==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-10.1.14.tgz", + "integrity": "sha512-MC30rtQiFVgQDSP8wO5wa1so5tW3T7qs/DCT018A4zgjiK+uFdIGOerAgoxcNw3yC6IGnPIL5lsRO/1C9N60zA==", "requires": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-global": "10.1.11" + "@babel/runtime": "^7.20.1", + "@polkadot/x-global": "10.1.14" } }, "@polkadot/x-ws": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-10.1.11.tgz", - "integrity": "sha512-EUbL/R1A/NxYf6Rnb1M7U9yeTuo5r4y2vcQllE5aBLaQ0cFnRykHzlmZlVX1E7O5uy3lYVdxWC7sNgxItIWkWA==", + "version": "10.1.14", + "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-10.1.14.tgz", + "integrity": "sha512-xgyMYR34sHxKCtQUJ2btFAyN3fK1OqCqvAyRYmU52801aguLstRhVPAZxXJp3Dahs91FX/h/ZZzmwXD01tJtyA==", "requires": { - "@babel/runtime": "^7.19.4", - "@polkadot/x-global": "10.1.11", + "@babel/runtime": "^7.20.1", + "@polkadot/x-global": "10.1.14", "@types/websocket": "^1.0.5", "websocket": "^1.0.34" } @@ -8154,12 +8160,12 @@ "dev": true }, "@substrate/connect": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.7.9.tgz", - "integrity": "sha512-E6bdBhzsfHNAKlmQSvbTW1jyb0WcIvgbrEBfJ4B6FZ3t1wpGjldL6GrYtegVtKr9/ySQ/pFNn0uVbugukpMDjQ==", + "version": "0.7.17", + "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.7.17.tgz", + "integrity": "sha512-s0XBmGpUCFWZFa+TS0TEvOKtWjJP2uT4xKmvzApH8INB5xbz79wqWFX6WWh3AlK/X1P0Smt+RVEH7HQiLJAYAw==", "requires": { "@substrate/connect-extension-protocol": "^1.0.1", - "@substrate/smoldot-light": "0.6.25", + "@substrate/smoldot-light": "0.7.7", "eventemitter3": "^4.0.7" } }, @@ -8169,17 +8175,25 @@ "integrity": "sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg==" }, "@substrate/smoldot-light": { - "version": "0.6.25", - "resolved": "https://registry.npmjs.org/@substrate/smoldot-light/-/smoldot-light-0.6.25.tgz", - "integrity": "sha512-OQ9/bnJJy90xSRg5Vp9MIvrgbrVt/r/FwXYSmyLeBBNbJt6o1gSeshVo8icD+2VWwd/TJ2oHl5CVQWe89MyByA==", + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/@substrate/smoldot-light/-/smoldot-light-0.7.7.tgz", + "integrity": "sha512-ksxeAed6dIUtYSl0f8ehgWQjwXnpDGTIJt+WVRIGt3OObZkA96ZdBWx0xP7GrXZtj37u4n/Y1z7TyTm4bwQvrw==", "requires": { - "websocket": "^1.0.32" + "pako": "^2.0.4", + "ws": "^8.8.1" + }, + "dependencies": { + "pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" + } } }, "@substrate/ss58-registry": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.33.0.tgz", - "integrity": "sha512-DztMuMcEfu+tJrtIQIIp5gO8/XJZ8N8UwPObDCSNgrp7trtSkPJAUFB9qXaReXtN9UvTcVBMTWk6VPfFi04Wkg==" + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.35.0.tgz", + "integrity": "sha512-cIY3J7RlT4mfPNFwd2mv1q9vTp/shImw2gN2y2outMhOcagH/HG+W8/JohpifjxPC/1pbQ0Z8nxfL5Td3EchcA==" }, "@szmarczak/http-timer": { "version": "4.0.6", @@ -8653,9 +8667,9 @@ "dev": true }, "bufferutil": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", - "integrity": "sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", + "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", "requires": { "node-gyp-build": "^4.3.0" } @@ -10893,9 +10907,9 @@ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" }, "node-fetch": { - "version": "3.2.10", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz", - "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", + "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", "requires": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -11850,9 +11864,9 @@ "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==" }, "regenerator-runtime": { - "version": "0.13.10", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz", - "integrity": "sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw==" + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "regexpp": { "version": "3.2.0", @@ -12505,9 +12519,9 @@ "integrity": "sha512-yIQdxJpgkPamPPAPuGdS7Q548rLhny42tg8d4vyTNzFqvOnwqrgHXvgehT09U7fwrzxi3RxCiXjoNUNnNOlQ8A==" }, "utf-8-validate": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.9.tgz", - "integrity": "sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", "requires": { "node-gyp-build": "^4.3.0" } @@ -12650,6 +12664,12 @@ "typedarray-to-buffer": "^3.1.5" } }, + "ws": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "requires": {} + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index f249cfd..cedd326 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@digicatapult/dscp-ipfs", - "version": "2.8.1", + "version": "2.8.2", "description": "Service for DSCP", "main": "app/index.js", "type": "module", @@ -32,7 +32,7 @@ }, "homepage": "https://github.com/digicatapult/dscp-ipfs#readme", "dependencies": { - "@digicatapult/dscp-node": "^4.4.6", + "@polkadot/api": "^9.9.4", "dotenv": "^16.0.3", "envalid": "^7.3.1", "express": "^4.18.2", From e54111184a6a25a273c7f48aa5fb7f964cbfe172 Mon Sep 17 00:00:00 2001 From: Paulius Date: Tue, 29 Nov 2022 10:21:12 +0000 Subject: [PATCH 22/24] IN-421: and another one... --- test/integration/ipfs.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration/ipfs.test.js b/test/integration/ipfs.test.js index ddb22a8..bacf715 100644 --- a/test/integration/ipfs.test.js +++ b/test/integration/ipfs.test.js @@ -4,14 +4,14 @@ import { FormData, Blob } from 'formdata-node' import { expect } from 'chai' import delay from 'delay' -import { IPFS_API_PORT } from '../../app/env' +import env from '../../app/env.js' import { getSwarmKey, setSwarmKey } from './helper/api.js' import { setupIPFS, waitForIpfsApi } from './helper/ipfs.js' const uploadA = async (fileName, contents) => { const form = new FormData() form.append('file', new Blob([contents]), fileName) - const body = await fetch(`http://localhost:${IPFS_API_PORT}/api/v0/add?cid-version=0`, { + const body = await fetch(`http://localhost:${env.IPFS_API_PORT}/api/v0/add?cid-version=0`, { method: 'POST', body: form, }) @@ -33,7 +33,7 @@ const download = (port) => async (hash) => { return contentText } -const downloadA = download(IPFS_API_PORT) +const downloadA = download(env.IPFS_API_PORT) const downloadB = download(`5002`) //TODO mm? 50/50 to be fair since it's test i think we should ignore const setupIpfsWithSwarm = async (context) => { @@ -114,7 +114,7 @@ describe('ipfs', function () { context.hash = await uploadA('test-file-4.txt', 'Test 4') await setSwarmKey(context.swarmKey) await delay(500) - await waitForIpfsApi(IPFS_API_PORT) + await waitForIpfsApi(env.IPFS_API_PORT) }) it('should be retrievable', async function () { From 5884a7fa6ea34f5c675a29076a821d69b04b4189 Mon Sep 17 00:00:00 2001 From: Paulius Date: Tue, 29 Nov 2022 10:30:04 +0000 Subject: [PATCH 23/24] IN-421: add axios as dep. --- package-lock.json | 80 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 81 insertions(+) diff --git a/package-lock.json b/package-lock.json index 2e62517..9aa7711 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@polkadot/api": "^9.9.4", + "axios": "^1.2.0", "dotenv": "^16.0.3", "envalid": "^7.3.1", "express": "^4.18.2", @@ -1621,6 +1622,29 @@ "node": ">=8.0.0" } }, + "node_modules/axios": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz", + "integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==", + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -3330,6 +3354,25 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/foreground-child": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", @@ -5936,6 +5979,11 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", @@ -8503,6 +8551,28 @@ "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==" }, + "axios": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz", + "integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==", + "requires": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + }, + "dependencies": { + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + } + } + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -9790,6 +9860,11 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + }, "foreground-child": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", @@ -11723,6 +11798,11 @@ "ipaddr.js": "1.9.1" } }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", diff --git a/package.json b/package.json index 047d7e3..6e41d70 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "homepage": "https://github.com/digicatapult/dscp-ipfs#readme", "dependencies": { "@polkadot/api": "^9.9.4", + "axios": "^1.2.0", "dotenv": "^16.0.3", "envalid": "^7.3.1", "express": "^4.18.2", From 28602d3aa8f669ffbc0eb85528839c213d209ceb Mon Sep 17 00:00:00 2001 From: Paulius Date: Tue, 29 Nov 2022 10:41:14 +0000 Subject: [PATCH 24/24] IN-421: hardcoding. --- helm/dscp-ipfs/templates/statefulset.yaml | 2 +- test/integration/ipfs.test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helm/dscp-ipfs/templates/statefulset.yaml b/helm/dscp-ipfs/templates/statefulset.yaml index c6437c3..c522612 100644 --- a/helm/dscp-ipfs/templates/statefulset.yaml +++ b/helm/dscp-ipfs/templates/statefulset.yaml @@ -98,7 +98,7 @@ spec: configMapKeyRef: name: {{ include "dscp-ipfs.fullname" . }}-config key: healthCheckPort - - name: IPFS_API_PORT + - name: IPFS_API_PORT valueFrom: configMapKeyRef: name: {{ include "dscp-ipfs.fullname" . }}-config diff --git a/test/integration/ipfs.test.js b/test/integration/ipfs.test.js index bacf715..c5c315d 100644 --- a/test/integration/ipfs.test.js +++ b/test/integration/ipfs.test.js @@ -33,8 +33,8 @@ const download = (port) => async (hash) => { return contentText } -const downloadA = download(env.IPFS_API_PORT) -const downloadB = download(`5002`) //TODO mm? 50/50 to be fair since it's test i think we should ignore +const downloadA = download(`5001`) +const downloadB = download(`5002`) const setupIpfsWithSwarm = async (context) => { before(async function () {