From b234ce4645814ff7f9225cca9354ef14df00c1e7 Mon Sep 17 00:00:00 2001 From: zeroxbt <89495162+zeroxbt@users.noreply.github.com> Date: Wed, 31 Aug 2022 12:50:00 +0200 Subject: [PATCH] add publish index and publish assertion (#1996) * update publish request schema * add publish index and publish assertion * fix merge issues * removed unused query * update insert index and insert assertion * remove unused dependencies and update logger * initialize repositorymodulemanager * remove unused file * update package-lock and comunica dependency * remove old dependency injection --- config/config.json | 2 +- ot-node.js | 7 +- package-lock.json | 1396 ++++++++--------- package.json | 43 +- src/commands/command.js | 2 +- .../common/handle-protocol-message-command.js | 5 +- .../common/network-protocol-command.js | 6 +- ...mand.js => handle-publish-init-command.js} | 31 +- ...d.js => handle-publish-request-command.js} | 49 +- .../sender/insert-assertion-command.js | 14 +- .../publish/sender/network-publish-command.js | 20 +- .../publish/sender/publish-init-command.js | 13 +- .../publish/sender/publish-request-command.js | 24 +- .../publish-schedule-messages-command.js | 17 +- .../sender/validate-assertion-command.js | 64 +- src/constants/constants.js | 10 - src/controller/v1/base-controller.js | 10 - src/controller/v1/get-controller.js | 1 + src/controller/v1/publish-controller.js | 82 +- src/logger/logger.js | 53 +- src/logger/pino-pretty-transport.js | 9 - .../ot-parachain/ot-parachain-service.js | 44 - .../implementation/ot-triple-store.js | 18 +- .../triple-store-module-manager.js | 38 +- src/modules/validation/bytes-utilities.js | 108 -- src/service/get-service.js | 2 +- src/service/publish-service.js | 84 +- .../.bootstrap_origintrail_noderc | 6 +- 28 files changed, 1019 insertions(+), 1139 deletions(-) rename src/commands/protocols/publish/receiver/{handle-store-init-command.js => handle-publish-init-command.js} (58%) rename src/commands/protocols/publish/receiver/{handle-store-request-command.js => handle-publish-request-command.js} (71%) delete mode 100644 src/logger/pino-pretty-transport.js delete mode 100644 src/modules/validation/bytes-utilities.js diff --git a/config/config.json b/config/config.json index 16efcea02b..cd39d44487 100644 --- a/config/config.json +++ b/config/config.json @@ -140,7 +140,7 @@ } }, "minimumAckResponses": { - "publish": 5, + "publish": 2, "get": 1 }, "commandExecutorVerboseLoggingEnabled": false, diff --git a/ot-node.js b/ot-node.js index 882b1aeeb5..209fba6c49 100644 --- a/ot-node.js +++ b/ot-node.js @@ -1,7 +1,6 @@ const DeepExtend = require('deep-extend'); const rc = require('rc'); const fs = require('fs'); -const queue = require('fastq'); const appRootPath = require('app-root-path'); const path = require('path'); const EventEmitter = require('events'); @@ -35,7 +34,9 @@ class OTNode { this.logger.info(`Node is running in ${process.env.NODE_ENV} environment`); this.initializeDependencyContainer(); + this.logger.info(`dependency container initialized`); this.initializeEventEmitter(); + this.logger.info(` event emitter initialized`); await this.initializeModules(); await this.saveNetworkModulePeerIdAndPrivKey(); @@ -86,9 +87,6 @@ class OTNode { this.container = DependencyInjection.initialize(); DependencyInjection.registerValue(this.container, 'config', this.config); DependencyInjection.registerValue(this.container, 'logger', this.logger); - DependencyInjection.registerValue(this.container, 'constants', constants); - DependencyInjection.registerValue(this.container, 'blockchainQueue', queue); - DependencyInjection.registerValue(this.container, 'tripleStoreQueue', queue); this.logger.info('Dependency injection module is initialized'); } @@ -97,6 +95,7 @@ class OTNode { const initializationPromises = []; for (const moduleName in this.config.modules) { const moduleManagerName = `${moduleName}ModuleManager`; + this.logger.info(`schedulinginitializing ${moduleManagerName}`); const moduleManager = this.container.resolve(moduleManagerName); initializationPromises.push(moduleManager.initialize()); diff --git a/package-lock.json b/package-lock.json index 6884740fed..456679d9e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,38 +10,26 @@ "license": "ISC", "dependencies": { "@comunica/query-sparql": "^2.2.1", - "@polkadot/api": "^9.2.1", - "@polkadot/keyring": "^10.1.4", + "@polkadot/api": "^9.2.4", "app-root-path": "^3.0.0", "assertion-tools": "^1.0.7", "async": "^3.2.4", "async-mutex": "^0.3.2", "awilix": "^5.0.1", "axios": "^0.24.0", - "big-number": "^2.0.0", - "bl": "^5.0.0", - "bn.js": "^5.2.1", "cors": "^2.8.5", - "crypto-js": "^4.1.1", "deep-extend": "^0.6.0", "dkg-evm-module": "^1.0.1", "dotenv": "^10.0.0", - "elliptic": "^6.5.4", "express": "^4.17.1", "express-fileupload": "^1.2.1", - "express-ipfilter": "^1.2.0", "express-rate-limit": "^6.3.0", - "express-slow-down": "^1.4.0", - "fast-sort": "^3.1.1", - "fastq": "^1.13.0", "fs-extra": "^10.0.0", "graphdb": "^2.0.2", "ip": "^1.1.8", - "it-concat": "^2.0.0", "it-length-prefixed": "^5.0.3", "it-map": "^1.0.6", "it-pipe": "^1.1.0", - "js-sha3": "^0.8.0", "json-2-csv": "^3.14.4", "json-stable-stringify": "^1.0.1", "jsonld": "^5.2.0", @@ -55,35 +43,24 @@ "libp2p-noise": "^4.0.0", "libp2p-record": "^0.10.5", "libp2p-tcp": "^0.17.2", - "merkle-tools": "^1.4.1", "merkletreejs": "^0.2.32", "ms": "^2.1.3", - "multiformats": "^9.4.7", "mysql2": "^2.3.3", - "n3": "^1.12.2", - "ot-telemetry-collector": "^1.0.7", "p-iteration": "^1.1.8", "peer-id": "^0.15.3", - "pino": "^7.5.1", - "pino-multi-stream": "^6.0.0", - "pino-pretty": "^7.2.0", - "qs": "^6.10.3", + "pino": "^8.4.2", + "pino-pretty": "^9.1.0", "rc": "^1.2.8", "rolling-rate-limiter": "^0.2.13", "semver": "^7.3.5", "sequelize": "^6.9.0", "sequelize-cli": "^6.3.0", - "simple-git": "^3.6.0", - "split": "^1.0.1", - "streaming-iterables": "^6.0.0", "timers": "^0.1.1", "toobusy-js": "^0.5.1", "uint8arrays": "^3.0.0", - "underscore": "^1.13.1", "unzipper": "^0.10.11", "uuid": "^8.3.2", "validator": "^13.7.0", - "watchdog": "^0.8.17", "web3": "^1.6.0", "workerpool": "^6.2.0" }, @@ -3406,17 +3383,6 @@ "node": ">=8" } }, - "node_modules/@kwsites/file-exists": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "debug": "^4.1.1" - } - }, - "node_modules/@kwsites/promise-deferred": { - "version": "1.1.1", - "license": "MIT" - }, "node_modules/@motrix/nat-api": { "version": "0.3.2", "license": "MIT", @@ -3457,24 +3423,25 @@ "license": "MIT" }, "node_modules/@polkadot/api": { - "version": "9.2.2", - "license": "Apache-2.0", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-9.2.4.tgz", + "integrity": "sha512-mtTnTpix8lvjZnKgB3vnYE9frGPil2QbUd6uD2Vu/q2izRZuuPrMCAQjMf9o8CRJfeC4149jX3VZ5xq9gmYHrg==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/api-augment": "9.2.2", - "@polkadot/api-base": "9.2.2", - "@polkadot/api-derive": "9.2.2", - "@polkadot/keyring": "^10.1.4", - "@polkadot/rpc-augment": "9.2.2", - "@polkadot/rpc-core": "9.2.2", - "@polkadot/rpc-provider": "9.2.2", - "@polkadot/types": "9.2.2", - "@polkadot/types-augment": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/types-create": "9.2.2", - "@polkadot/types-known": "9.2.2", - "@polkadot/util": "^10.1.4", - "@polkadot/util-crypto": "^10.1.4", + "@polkadot/api-augment": "9.2.4", + "@polkadot/api-base": "9.2.4", + "@polkadot/api-derive": "9.2.4", + "@polkadot/keyring": "^10.1.6", + "@polkadot/rpc-augment": "9.2.4", + "@polkadot/rpc-core": "9.2.4", + "@polkadot/rpc-provider": "9.2.4", + "@polkadot/types": "9.2.4", + "@polkadot/types-augment": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/types-create": "9.2.4", + "@polkadot/types-known": "9.2.4", + "@polkadot/util": "^10.1.6", + "@polkadot/util-crypto": "^10.1.6", "eventemitter3": "^4.0.7", "rxjs": "^7.5.6" }, @@ -3483,29 +3450,31 @@ } }, "node_modules/@polkadot/api-augment": { - "version": "9.2.2", - "license": "Apache-2.0", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-9.2.4.tgz", + "integrity": "sha512-oL8JJS3RClbv+yVdVTjRHoU2d3az/YvD+Ex2UFnMtBCBk22kDnDEoJAstJJjnXW2RT7CsEmCj3ffP0pmJGvF4A==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/api-base": "9.2.2", - "@polkadot/rpc-augment": "9.2.2", - "@polkadot/types": "9.2.2", - "@polkadot/types-augment": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/util": "^10.1.4" + "@polkadot/api-base": "9.2.4", + "@polkadot/rpc-augment": "9.2.4", + "@polkadot/types": "9.2.4", + "@polkadot/types-augment": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/util": "^10.1.6" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/api-base": { - "version": "9.2.2", - "license": "Apache-2.0", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-9.2.4.tgz", + "integrity": "sha512-iTSsenaKAWTrkyDkbvBlhx/hzS/DlPPcw+u/Z2EQfnsh6R8qR7Od5JbFKM5Z81mlBX2R3FYm6r2Cxan0Bb+bDA==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "9.2.2", - "@polkadot/types": "9.2.2", - "@polkadot/util": "^10.1.4", + "@polkadot/rpc-core": "9.2.4", + "@polkadot/types": "9.2.4", + "@polkadot/util": "^10.1.6", "rxjs": "^7.5.6" }, "engines": { @@ -3513,18 +3482,19 @@ } }, "node_modules/@polkadot/api-derive": { - "version": "9.2.2", - "license": "Apache-2.0", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-9.2.4.tgz", + "integrity": "sha512-16V+l8hNe+TMYbZf6Bq27ZT69HXZC1Fn/mq0IrzdAs4jW2mok5tDfHDL+rCGJeRTq1LXFUOfPZGTMR4bqH2VqA==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/api": "9.2.2", - "@polkadot/api-augment": "9.2.2", - "@polkadot/api-base": "9.2.2", - "@polkadot/rpc-core": "9.2.2", - "@polkadot/types": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/util": "^10.1.4", - "@polkadot/util-crypto": "^10.1.4", + "@polkadot/api": "9.2.4", + "@polkadot/api-augment": "9.2.4", + "@polkadot/api-base": "9.2.4", + "@polkadot/rpc-core": "9.2.4", + "@polkadot/types": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/util": "^10.1.6", + "@polkadot/util-crypto": "^10.1.6", "rxjs": "^7.5.6" }, "engines": { @@ -3532,56 +3502,60 @@ } }, "node_modules/@polkadot/keyring": { - "version": "10.1.4", - "license": "Apache-2.0", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-10.1.6.tgz", + "integrity": "sha512-l4kF8SRJwkAfQaPKu15/0cxnSu5kPBj/RM0oJpSxkiqZXMhflU7i1tGX2DNhXST+btyEe0AYDzLg2YSyxYOPQA==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/util": "10.1.4", - "@polkadot/util-crypto": "10.1.4" + "@polkadot/util": "10.1.6", + "@polkadot/util-crypto": "10.1.6" }, "engines": { "node": ">=14.0.0" }, "peerDependencies": { - "@polkadot/util": "10.1.4", - "@polkadot/util-crypto": "10.1.4" + "@polkadot/util": "10.1.6", + "@polkadot/util-crypto": "10.1.6" } }, "node_modules/@polkadot/networks": { - "version": "10.1.4", - "license": "Apache-2.0", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-10.1.6.tgz", + "integrity": "sha512-NINGTVkvAnrBDXbIdcSJ7gCmtXUB6ybI4TLHY2Tf/57hak+hlyQUoHZdaTzpRYrxZ9xoUUS1K83Lr3wfwMblHA==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/util": "10.1.4", - "@substrate/ss58-registry": "^1.25.0" + "@polkadot/util": "10.1.6", + "@substrate/ss58-registry": "^1.28.0" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/rpc-augment": { - "version": "9.2.2", - "license": "Apache-2.0", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-9.2.4.tgz", + "integrity": "sha512-Jhw0r1CDr1CgkXdq/9zVNzQe4Yipk+NZ+uBWgBxfk+5ceaVsPjcwDG4A+J7og6I3fiWpz7srY1MC2Q8tikn6BA==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "9.2.2", - "@polkadot/types": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/util": "^10.1.4" + "@polkadot/rpc-core": "9.2.4", + "@polkadot/types": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/util": "^10.1.6" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/rpc-core": { - "version": "9.2.2", - "license": "Apache-2.0", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-9.2.4.tgz", + "integrity": "sha512-npGOFC3BIjIxb4+jK4hISlUjsY8ay6GsLD5qhxEeiypk3pDNeHuBN/LjN4Z5Cb9N6e2fDgcLP4HRZG+YTf8ccA==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/rpc-augment": "9.2.2", - "@polkadot/rpc-provider": "9.2.2", - "@polkadot/types": "9.2.2", - "@polkadot/util": "^10.1.4", + "@polkadot/rpc-augment": "9.2.4", + "@polkadot/rpc-provider": "9.2.4", + "@polkadot/types": "9.2.4", + "@polkadot/util": "^10.1.6", "rxjs": "^7.5.6" }, "engines": { @@ -3589,19 +3563,20 @@ } }, "node_modules/@polkadot/rpc-provider": { - "version": "9.2.2", - "license": "Apache-2.0", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-9.2.4.tgz", + "integrity": "sha512-qVlaDr/Oax764mps89tQpKFohOacFta5Gp72s81OBxFR1Nxq9qE5uaL5AaXzAxEtL+XVMFYKE508pp2IJW52dw==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.4", - "@polkadot/types": "9.2.2", - "@polkadot/types-support": "9.2.2", - "@polkadot/util": "^10.1.4", - "@polkadot/util-crypto": "^10.1.4", - "@polkadot/x-fetch": "^10.1.4", - "@polkadot/x-global": "^10.1.4", - "@polkadot/x-ws": "^10.1.4", - "@substrate/connect": "0.7.10", + "@polkadot/keyring": "^10.1.6", + "@polkadot/types": "9.2.4", + "@polkadot/types-support": "9.2.4", + "@polkadot/util": "^10.1.6", + "@polkadot/util-crypto": "^10.1.6", + "@polkadot/x-fetch": "^10.1.6", + "@polkadot/x-global": "^10.1.6", + "@polkadot/x-ws": "^10.1.6", + "@substrate/connect": "0.7.11", "eventemitter3": "^4.0.7", "mock-socket": "^9.1.5", "nock": "^13.2.9" @@ -3611,16 +3586,17 @@ } }, "node_modules/@polkadot/types": { - "version": "9.2.2", - "license": "Apache-2.0", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-9.2.4.tgz", + "integrity": "sha512-AnoTE2ORB0GfDz0JXwMqGiUieIxJSledxmiGTMF3Oj68WLWtg5yEMQZzYnbAELBLhscYdp1MHwYNBli72M3Q2Q==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.4", - "@polkadot/types-augment": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/types-create": "9.2.2", - "@polkadot/util": "^10.1.4", - "@polkadot/util-crypto": "^10.1.4", + "@polkadot/keyring": "^10.1.6", + "@polkadot/types-augment": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/types-create": "9.2.4", + "@polkadot/util": "^10.1.6", + "@polkadot/util-crypto": "^10.1.6", "rxjs": "^7.5.6" }, "engines": { @@ -3628,77 +3604,83 @@ } }, "node_modules/@polkadot/types-augment": { - "version": "9.2.2", - "license": "Apache-2.0", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-9.2.4.tgz", + "integrity": "sha512-3Y8I7ZjCBWJwnooegEqBvsbYk9EOAfYhX1g+IxYFL/xTUO4mdNrgmaslHele2M7h//N+xW+iZ5R8IGRYOka1ew==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/types": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/util": "^10.1.4" + "@polkadot/types": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/util": "^10.1.6" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/types-codec": { - "version": "9.2.2", - "license": "Apache-2.0", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-9.2.4.tgz", + "integrity": "sha512-3Wy7KOk6qd0v6rUQ2Qq5bz6xAo2KCp1Sn1GYa7VPNcFZfZaBO3Axgg3w3++ckDqLt8bI99Y/wCuAKhzvnMs/WA==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.4", - "@polkadot/x-bigint": "^10.1.4" + "@polkadot/util": "^10.1.6", + "@polkadot/x-bigint": "^10.1.6" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/types-create": { - "version": "9.2.2", - "license": "Apache-2.0", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-9.2.4.tgz", + "integrity": "sha512-RU5r4GlhNFhd3QUzUj9gxfRNlH4LgvHEXTS/K5pprlKTmoJk9HcpzbnkydM8qb1kc3JJWpYgG3Ov82y6HWDjDg==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/types-codec": "9.2.2", - "@polkadot/util": "^10.1.4" + "@polkadot/types-codec": "9.2.4", + "@polkadot/util": "^10.1.6" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/types-known": { - "version": "9.2.2", - "license": "Apache-2.0", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-9.2.4.tgz", + "integrity": "sha512-AEf0Qj/HjoCZTbIdNHXFQt+bbjaNpVdSV+yWIJNTtpRz6IcFNkddiW+4VRlesJh8M6zNy1S4BUcJlee3OqWJbg==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/networks": "^10.1.4", - "@polkadot/types": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/types-create": "9.2.2", - "@polkadot/util": "^10.1.4" + "@polkadot/networks": "^10.1.6", + "@polkadot/types": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/types-create": "9.2.4", + "@polkadot/util": "^10.1.6" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/types-support": { - "version": "9.2.2", - "license": "Apache-2.0", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-9.2.4.tgz", + "integrity": "sha512-+Ci3dr6vieIybtfNERMeujzhr1P6i0napLm1bFb3QAiZ8sOaeF9i1y/LUsIHSFCb7D4joyJpaRK0WwLSV17WBA==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.4" + "@polkadot/util": "^10.1.6" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/util": { - "version": "10.1.4", - "license": "Apache-2.0", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-10.1.6.tgz", + "integrity": "sha512-k+gCKmgwxp0smmLIR7SfiEYEToayWXjrC7pQ0PqAGxpBNOdVMSCzLMnOHf9AI5cjs/lx6ULr1fHn721wLVonkw==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/x-bigint": "10.1.4", - "@polkadot/x-global": "10.1.4", - "@polkadot/x-textdecoder": "10.1.4", - "@polkadot/x-textencoder": "10.1.4", + "@polkadot/x-bigint": "10.1.6", + "@polkadot/x-global": "10.1.6", + "@polkadot/x-textdecoder": "10.1.6", + "@polkadot/x-textencoder": "10.1.6", "@types/bn.js": "^5.1.0", "bn.js": "^5.2.1" }, @@ -3707,17 +3689,18 @@ } }, "node_modules/@polkadot/util-crypto": { - "version": "10.1.4", - "license": "Apache-2.0", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-10.1.6.tgz", + "integrity": "sha512-r3XWcCERomcGyB5PT7Qa1LYtCHfspVbehPGvraRlX5xhZBihpU4zMRWTSBNMPNaeIjUJmmSQHeG0ZnQVvnwzkg==", "dependencies": { "@babel/runtime": "^7.18.9", "@noble/hashes": "1.1.2", "@noble/secp256k1": "1.6.3", - "@polkadot/networks": "10.1.4", - "@polkadot/util": "10.1.4", + "@polkadot/networks": "10.1.6", + "@polkadot/util": "10.1.6", "@polkadot/wasm-crypto": "^6.3.1", - "@polkadot/x-bigint": "10.1.4", - "@polkadot/x-randomvalues": "10.1.4", + "@polkadot/x-bigint": "10.1.6", + "@polkadot/x-randomvalues": "10.1.6", "@scure/base": "1.1.1", "ed2curve": "^0.3.0", "tweetnacl": "^1.0.3" @@ -3726,7 +3709,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "@polkadot/util": "10.1.4" + "@polkadot/util": "10.1.6" } }, "node_modules/@polkadot/util-crypto/node_modules/tweetnacl": { @@ -3824,22 +3807,24 @@ } }, "node_modules/@polkadot/x-bigint": { - "version": "10.1.4", - "license": "Apache-2.0", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-10.1.6.tgz", + "integrity": "sha512-yeBZQ9+u49KqDBaeSw+ytshqzyaScKrDjAxpWCfOGxJaB+5Nv1W7fqi3OJ4S/HN5DYItr0a6UC14e1hiZUtZCg==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/x-global": "10.1.4" + "@polkadot/x-global": "10.1.6" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/x-fetch": { - "version": "10.1.4", - "license": "Apache-2.0", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-10.1.6.tgz", + "integrity": "sha512-LxsMtrQCgEC+ySRjS94voxY34OsL5qi4HBo6p8QWuXJB9pCuyGmnuFa8hJ0eMJ1Ne0SRo4gbasKWux6E5b00eg==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/x-global": "10.1.4", + "@polkadot/x-global": "10.1.6", "@types/node-fetch": "^2.6.2", "node-fetch": "^3.2.10" }, @@ -3849,13 +3834,16 @@ }, "node_modules/@polkadot/x-fetch/node_modules/data-uri-to-buffer": { "version": "4.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", + "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==", "engines": { "node": ">= 12" } }, "node_modules/@polkadot/x-fetch/node_modules/fetch-blob": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", "funding": [ { "type": "github", @@ -3866,7 +3854,6 @@ "url": "https://paypal.me/jimmywarting" } ], - "license": "MIT", "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" @@ -3877,7 +3864,8 @@ }, "node_modules/@polkadot/x-fetch/node_modules/node-fetch": { "version": "3.2.10", - "license": "MIT", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz", + "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==", "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -3892,8 +3880,9 @@ } }, "node_modules/@polkadot/x-global": { - "version": "10.1.4", - "license": "Apache-2.0", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-10.1.6.tgz", + "integrity": "sha512-/nraYZg0hdSjbczhDBAsHlEqeZLs0u0xa8HJrfH2lq8+HOIYkQpJPHOqiQIvEe/VFRq7Xnbij+4uffV+otzB/w==", "dependencies": { "@babel/runtime": "^7.18.9" }, @@ -3902,44 +3891,48 @@ } }, "node_modules/@polkadot/x-randomvalues": { - "version": "10.1.4", - "license": "Apache-2.0", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-10.1.6.tgz", + "integrity": "sha512-NDOr7Zvv3lN0Z3+gt/RfmZbeOXg21402ggiBdL8ni9rf0ZMUzFLqRNsbm0334L0lApfhfvxm98MGfK+gq6uVZg==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/x-global": "10.1.4" + "@polkadot/x-global": "10.1.6" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/x-textdecoder": { - "version": "10.1.4", - "license": "Apache-2.0", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-10.1.6.tgz", + "integrity": "sha512-T+jvyv6OvUgGfOlMDLkPKEmQnZGP1CNohdEDeRr93AmeYikIfbC20qYuAc0bEBXR7/rPXgnqiEfrpkL2W3r/Ig==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/x-global": "10.1.4" + "@polkadot/x-global": "10.1.6" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/x-textencoder": { - "version": "10.1.4", - "license": "Apache-2.0", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-10.1.6.tgz", + "integrity": "sha512-e+iHdR1P/8xAc54l3gHfqozH6ZfxPkKlVVaz3vOMnzfc8cA3Zw93mLYkGtLDqv+825LkSrWSmb/bDZb6YyEEXg==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/x-global": "10.1.4" + "@polkadot/x-global": "10.1.6" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/x-ws": { - "version": "10.1.4", - "license": "Apache-2.0", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-10.1.6.tgz", + "integrity": "sha512-PNDM4/fPECz2rTsE3lS+KiF87QN7mrN79yp2CsTHUVYKDg511Hp85wvtGkVgUoA98JWYETpVO7kUR1wSRDf46A==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/x-global": "10.1.4", + "@polkadot/x-global": "10.1.6", "@types/websocket": "^1.0.5", "websocket": "^1.0.34" }, @@ -4217,33 +4210,58 @@ } }, "node_modules/@substrate/connect": { - "version": "0.7.10", - "license": "GPL-3.0-only", + "version": "0.7.11", + "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.7.11.tgz", + "integrity": "sha512-/xiOlkmJfl2XPYQTmyWKEh2AXryEAPSMAxZXs6D/aqYDy0TKZDAp1dfQiHyPt1vMwOlnM4WJv9lPks3ZMwCP+w==", "dependencies": { "@substrate/connect-extension-protocol": "^1.0.1", - "@substrate/smoldot-light": "0.6.27", + "@substrate/smoldot-light": "0.6.30", "eventemitter3": "^4.0.7" } }, "node_modules/@substrate/connect-extension-protocol": { "version": "1.0.1", - "license": "GPL-3.0-only" + "resolved": "https://registry.npmjs.org/@substrate/connect-extension-protocol/-/connect-extension-protocol-1.0.1.tgz", + "integrity": "sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg==" }, "node_modules/@substrate/smoldot-light": { - "version": "0.6.27", - "license": "GPL-3.0-or-later WITH Classpath-exception-2.0", + "version": "0.6.30", + "resolved": "https://registry.npmjs.org/@substrate/smoldot-light/-/smoldot-light-0.6.30.tgz", + "integrity": "sha512-U/F75XzxuNG+KGSujxsMAm8zUBpBON+l0oX19EnSWjvqD+smYjvcj1SeqQhFYxJjtoCQyZLedKBsZGyNbG3FbQ==", "dependencies": { "pako": "^2.0.4", - "websocket": "^1.0.32" + "ws": "^8.8.1" } }, "node_modules/@substrate/smoldot-light/node_modules/pako": { "version": "2.0.4", - "license": "(MIT AND Zlib)" + "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz", + "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==" + }, + "node_modules/@substrate/smoldot-light/node_modules/ws": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", + "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/@substrate/ss58-registry": { - "version": "1.25.0", - "license": "Apache-2.0" + "version": "1.28.0", + "resolved": "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.28.0.tgz", + "integrity": "sha512-XPSwSq4CThLyg+OnZ5/LHh3SPDQjRdGS3Ux5ClgWhRCQamlU86FCT1LBwQ/i+ximbdBfqKRRzVhm1ql3AJ9FKQ==" }, "node_modules/@szmarczak/http-timer": { "version": "5.0.1", @@ -5185,7 +5203,8 @@ }, "node_modules/@types/node-fetch": { "version": "2.6.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz", + "integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==", "dependencies": { "@types/node": "*", "form-data": "^3.0.0" @@ -5193,7 +5212,8 @@ }, "node_modules/@types/node-fetch/node_modules/form-data": { "version": "3.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -5266,7 +5286,8 @@ }, "node_modules/@types/websocket": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.5.tgz", + "integrity": "sha512-NbsqiNX9CnEfC1Z0Vf4mE1SgAJ07JnRYcNex7AJ9zAVzmiGHmjKFEk7O4TJIsgv2B1sLEb6owKFZrACwdYngsQ==", "dependencies": { "@types/node": "*" } @@ -5700,45 +5721,6 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/args": { - "version": "5.0.1", - "license": "MIT", - "dependencies": { - "camelcase": "5.0.0", - "chalk": "2.4.2", - "leven": "2.1.0", - "mri": "1.1.4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/args/node_modules/camelcase": { - "version": "5.0.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/args/node_modules/chalk": { - "version": "2.4.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/args/node_modules/escape-string-regexp": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/aria-query": { "version": "4.2.2", "dev": true, @@ -6359,6 +6341,7 @@ }, "node_modules/big-number": { "version": "2.0.0", + "dev": true, "license": "MIT" }, "node_modules/big.js": { @@ -6487,10 +6470,6 @@ "node": ">=8" } }, - "node_modules/brolog": { - "version": "1.12.4", - "license": "Apache-2.0" - }, "node_modules/brorand": { "version": "1.1.0", "license": "MIT" @@ -7366,13 +7345,6 @@ "wrap-ansi": "^6.2.0" } }, - "node_modules/clone": { - "version": "1.0.4", - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, "node_modules/clone-response": { "version": "1.0.3", "license": "MIT", @@ -7826,6 +7798,7 @@ }, "node_modules/crypto-js": { "version": "4.1.1", + "dev": true, "license": "MIT" }, "node_modules/cyclist": { @@ -7985,13 +7958,6 @@ "node": ">=8" } }, - "node_modules/defaults": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "clone": "^1.0.2" - } - }, "node_modules/defer-to-connect": { "version": "2.0.1", "license": "MIT", @@ -8790,16 +8756,6 @@ "version": "0.1.5", "license": "BSD-3-Clause" }, - "node_modules/duplexify": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, "node_modules/duration": { "version": "0.2.2", "dev": true, @@ -10184,19 +10140,6 @@ "node": ">=12.0.0" } }, - "node_modules/express-ipfilter": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "ip": "~1.1.0", - "lodash": "^4.17.11", - "proxy-addr": "^2.0.4", - "range_check": "^1.2.0" - }, - "engines": { - "node": ">=8.9.0" - } - }, "node_modules/express-rate-limit": { "version": "6.3.0", "license": "MIT", @@ -10207,13 +10150,6 @@ "express": "^4" } }, - "node_modules/express-slow-down": { - "version": "1.4.0", - "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" - } - }, "node_modules/express/node_modules/debug": { "version": "2.6.9", "license": "MIT", @@ -10362,6 +10298,11 @@ "url": "https://opencollective.com/fast-check" } }, + "node_modules/fast-copy": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-2.1.3.tgz", + "integrity": "sha512-LDzYKNTHhD+XOp8wGMuCkY4eTxFZOOycmpwLBiuF3r3OjOmZnURRD8t2dUAbmKuXGbo/MGggwbSjcBdp8QT0+g==" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "license": "MIT" @@ -10389,17 +10330,6 @@ "version": "2.1.1", "license": "MIT" }, - "node_modules/fast-sort": { - "version": "3.1.1", - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.13.0", - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, "node_modules/fecha": { "version": "4.2.3", "license": "MIT" @@ -10761,6 +10691,7 @@ }, "node_modules/form-data": { "version": "4.0.0", + "dev": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", @@ -20168,6 +20099,52 @@ "node_modules/heap": { "version": "0.2.6" }, + "node_modules/help-me": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/help-me/-/help-me-4.0.1.tgz", + "integrity": "sha512-PLv01Z+OhEPKj2QPYB4kjoCUkopYNPUK3EROlaPIf5bib752fZ+VCvGDAoA+FXo/OwCyLEA4D2e0mX8+Zhcplw==", + "dependencies": { + "glob": "^8.0.0", + "readable-stream": "^3.6.0" + } + }, + "node_modules/help-me/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/help-me/node_modules/glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/help-me/node_modules/minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/hex-to-binary": { "version": "1.0.1", "license": "MIT" @@ -20553,10 +20530,6 @@ "node": ">=8" } }, - "node_modules/ip6": { - "version": "0.0.4", - "license": "MIT" - }, "node_modules/ipaddr.js": { "version": "1.9.1", "license": "MIT", @@ -21274,13 +21247,6 @@ "buffer": "^6.0.3" } }, - "node_modules/it-concat": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "bl": "^5.0.0" - } - }, "node_modules/it-drain": { "version": "1.0.4", "license": "ISC" @@ -21922,13 +21888,6 @@ "semver": "bin/semver" } }, - "node_modules/leven": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/levn": { "version": "0.4.1", "license": "MIT", @@ -23380,7 +23339,8 @@ }, "node_modules/mock-socket": { "version": "9.1.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mock-socket/-/mock-socket-9.1.5.tgz", + "integrity": "sha512-3DeNIcsQixWHHKk6NdoBhWI4t1VMj5/HzfnI1rE/pLl5qKx7+gd4DNA07ehTaZ6MoUU053si6Hd+YtiM/tQZfg==", "engines": { "node": ">= 8" } @@ -23437,13 +23397,6 @@ "rimraf": "bin.js" } }, - "node_modules/mri": { - "version": "1.1.4", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/ms": { "version": "2.1.3", "license": "MIT" @@ -23837,7 +23790,8 @@ }, "node_modules/nock": { "version": "13.2.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.2.9.tgz", + "integrity": "sha512-1+XfJNYF1cjGB+TKMWi29eZ0b82QOvQs2YoLNzbpWGqFMtRQHTa57osqdGj4FrFPgkO4D4AZinzUJR9VvW3QUA==", "dependencies": { "debug": "^4.1.0", "json-stringify-safe": "^5.0.1", @@ -24478,8 +24432,9 @@ } }, "node_modules/on-exit-leak-free": { - "version": "0.2.0", - "license": "MIT" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.0.tgz", + "integrity": "sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w==" }, "node_modules/on-finished": { "version": "2.3.0", @@ -24571,16 +24526,6 @@ "node": ">=0.10.0" } }, - "node_modules/ot-telemetry-collector": { - "version": "1.0.7", - "license": "ISC", - "dependencies": { - "axios": "^0.24.0", - "form-data": "^4.0.0", - "json-2-csv": "^3.15.1", - "split": "^1.0.1" - } - }, "node_modules/p-any": { "version": "3.0.0", "license": "MIT", @@ -25102,54 +25047,64 @@ } }, "node_modules/pino": { - "version": "7.6.3", - "license": "MIT", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.4.2.tgz", + "integrity": "sha512-PlXDeGhJZfAuVay+wtlS02s5j8uisQveZExYdAm9MwwxUQSz9R7Q78XtjM2tTa4sa5KJmygimZjZxXXuHgV6ew==", "dependencies": { - "fast-redact": "^3.0.0", - "on-exit-leak-free": "^0.2.0", - "pino-abstract-transport": "v0.5.0", - "pino-std-serializers": "^4.0.0", - "process-warning": "^1.0.0", + "atomic-sleep": "^1.0.0", + "fast-redact": "^3.1.1", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "v1.0.0", + "pino-std-serializers": "^6.0.0", + "process-warning": "^2.0.0", "quick-format-unescaped": "^4.0.3", - "real-require": "^0.1.0", - "safe-stable-stringify": "^2.1.0", - "sonic-boom": "^2.2.1", - "thread-stream": "^0.13.0" + "real-require": "^0.2.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^3.1.0", + "thread-stream": "^2.0.0" }, "bin": { "pino": "bin.js" } }, "node_modules/pino-abstract-transport": { - "version": "0.5.0", - "license": "MIT", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.0.0.tgz", + "integrity": "sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA==", "dependencies": { - "duplexify": "^4.1.2", + "readable-stream": "^4.0.0", "split2": "^4.0.0" } }, - "node_modules/pino-multi-stream": { - "version": "6.0.0", - "license": "MIT", + "node_modules/pino-abstract-transport/node_modules/readable-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.1.0.tgz", + "integrity": "sha512-sVisi3+P2lJ2t0BPbpK629j8wRW06yKGJUcaLAGXPAUhyUxVJm7VsCTit1PFgT4JHUDMrGNR+ZjSKpzGaRF3zw==", "dependencies": { - "pino": "^7.0.0" + "abort-controller": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/pino-pretty": { - "version": "7.3.0", - "license": "MIT", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-9.1.0.tgz", + "integrity": "sha512-IM6NY9LLo/dVgY7/prJhCh4rAJukafdt0ibxeNOWc2fxKMyTk90SOB9Ao2HfbtShT9QPeP0ePpJktksMhSQMYA==", "dependencies": { - "args": "^5.0.1", "colorette": "^2.0.7", "dateformat": "^4.6.3", - "fast-safe-stringify": "^2.0.7", + "fast-copy": "^2.1.1", + "fast-safe-stringify": "^2.1.1", + "help-me": "^4.0.1", "joycon": "^3.1.1", - "pino-abstract-transport": "^0.5.0", + "minimist": "^1.2.6", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^1.0.0", "pump": "^3.0.0", - "readable-stream": "^3.6.0", - "rfdc": "^1.3.0", + "readable-stream": "^4.0.0", "secure-json-parse": "^2.4.0", - "sonic-boom": "^2.2.0", + "sonic-boom": "^3.0.0", "strip-json-comments": "^3.1.1" }, "bin": { @@ -25160,9 +25115,21 @@ "version": "2.0.16", "license": "MIT" }, + "node_modules/pino-pretty/node_modules/readable-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.1.0.tgz", + "integrity": "sha512-sVisi3+P2lJ2t0BPbpK629j8wRW06yKGJUcaLAGXPAUhyUxVJm7VsCTit1PFgT4JHUDMrGNR+ZjSKpzGaRF3zw==", + "dependencies": { + "abort-controller": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/pino-pretty/node_modules/sonic-boom": { - "version": "2.5.0", - "license": "MIT", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.2.0.tgz", + "integrity": "sha512-SbbZ+Kqj/XIunvIAgUZRlqd6CGQYq71tRRbXR92Za8J/R3Yh4Av+TWENiSiEgnlwckYLyP0YZQWVfyNC0dzLaA==", "dependencies": { "atomic-sleep": "^1.0.0" } @@ -25172,23 +25139,26 @@ "license": "MIT" }, "node_modules/pino/node_modules/fast-redact": { - "version": "3.0.2", - "license": "MIT", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.1.2.tgz", + "integrity": "sha512-+0em+Iya9fKGfEQGcd62Yv6onjBmmhV1uh86XVfOU8VwAe6kaFdQCWI9s0/Nnugx5Vd9tdbZ7e6gE2tR9dzXdw==", "engines": { "node": ">=6" } }, "node_modules/pino/node_modules/pino-std-serializers": { - "version": "4.0.0", - "license": "MIT" + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.0.0.tgz", + "integrity": "sha512-mMMOwSKrmyl+Y12Ri2xhH1lbzQxwwpuru9VjyJpgFIH4asSj88F2csdMwN6+M5g1Ll4rmsYghHLQJw81tgZ7LQ==" }, "node_modules/pino/node_modules/quick-format-unescaped": { "version": "4.0.4", "license": "MIT" }, "node_modules/pino/node_modules/sonic-boom": { - "version": "2.5.0", - "license": "MIT", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.2.0.tgz", + "integrity": "sha512-SbbZ+Kqj/XIunvIAgUZRlqd6CGQYq71tRRbXR92Za8J/R3Yh4Av+TWENiSiEgnlwckYLyP0YZQWVfyNC0dzLaA==", "dependencies": { "atomic-sleep": "^1.0.0" } @@ -25330,8 +25300,9 @@ } }, "node_modules/process-warning": { - "version": "1.0.0", - "license": "MIT" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.0.0.tgz", + "integrity": "sha512-+MmoAXoUX+VTHAlwns0h+kFUWFs/3FZy+ZuchkgjyOu3oioLAo2LB5aCfKPh2+P9O18i3m43tUEv3YqttSy0Ww==" }, "node_modules/progress": { "version": "2.0.3", @@ -25381,7 +25352,8 @@ }, "node_modules/propagate": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", + "integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", "engines": { "node": ">= 8" } @@ -25620,21 +25592,6 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/range_check": { - "version": "1.4.0", - "license": "BSD", - "dependencies": { - "ip6": "0.0.4", - "ipaddr.js": "1.2" - } - }, - "node_modules/range_check/node_modules/ipaddr.js": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, "node_modules/range-parser": { "version": "1.2.1", "license": "MIT", @@ -25933,8 +25890,9 @@ } }, "node_modules/real-require": { - "version": "0.1.0", - "license": "MIT", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", "engines": { "node": ">= 12.13.0" } @@ -26285,16 +26243,9 @@ "any-promise": "^1.3.0" } }, - "node_modules/reusify": { - "version": "1.0.4", - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, "node_modules/rfdc": { "version": "1.3.0", + "dev": true, "license": "MIT" }, "node_modules/rimraf": { @@ -26806,19 +26757,6 @@ "node": ">=4" } }, - "node_modules/simple-git": { - "version": "3.7.1", - "license": "MIT", - "dependencies": { - "@kwsites/file-exists": "^1.1.1", - "@kwsites/promise-deferred": "^1.1.1", - "debug": "^4.3.3" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/steveukx/" - } - }, "node_modules/simple-swizzle": { "version": "0.2.2", "license": "MIT", @@ -27384,16 +27322,6 @@ "license": "CC0-1.0", "peer": true }, - "node_modules/split": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "through": "2" - }, - "engines": { - "node": "*" - } - }, "node_modules/split-string": { "version": "3.1.0", "dev": true, @@ -27430,7 +27358,8 @@ }, "node_modules/split2": { "version": "4.1.0", - "license": "ISC", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.1.0.tgz", + "integrity": "sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==", "engines": { "node": ">= 10.x" } @@ -27539,6 +27468,7 @@ }, "node_modules/stream-shift": { "version": "1.0.1", + "dev": true, "license": "MIT" }, "node_modules/stream-to-it": { @@ -28249,10 +28179,11 @@ } }, "node_modules/thread-stream": { - "version": "0.13.0", - "license": "MIT", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.1.0.tgz", + "integrity": "sha512-5+Pf2Ya31CsZyIPYYkhINzdTZ3guL+jHq7D8lkBybgGcSQIKDbid3NJku3SpCKeE/gACWAccDA/rH2B6doC5aA==", "dependencies": { - "real-require": "^0.1.0" + "real-require": "^0.2.0" } }, "node_modules/through": { @@ -28893,6 +28824,7 @@ }, "node_modules/underscore": { "version": "1.13.4", + "dev": true, "license": "MIT" }, "node_modules/undici": { @@ -29270,13 +29202,6 @@ "license": "MIT", "peer": true }, - "node_modules/watchdog": { - "version": "0.8.17", - "license": "Apache-2.0", - "dependencies": { - "brolog": "^1.3.3" - } - }, "node_modules/watchpack": { "version": "1.7.5", "dev": true, @@ -33321,15 +33246,6 @@ "version": "0.1.3", "dev": true }, - "@kwsites/file-exists": { - "version": "1.1.1", - "requires": { - "debug": "^4.1.1" - } - }, - "@kwsites/promise-deferred": { - "version": "1.1.1" - }, "@motrix/nat-api": { "version": "0.3.2", "requires": { @@ -33351,198 +33267,232 @@ "version": "4.7.2" }, "@polkadot/api": { - "version": "9.2.2", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-9.2.4.tgz", + "integrity": "sha512-mtTnTpix8lvjZnKgB3vnYE9frGPil2QbUd6uD2Vu/q2izRZuuPrMCAQjMf9o8CRJfeC4149jX3VZ5xq9gmYHrg==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/api-augment": "9.2.2", - "@polkadot/api-base": "9.2.2", - "@polkadot/api-derive": "9.2.2", - "@polkadot/keyring": "^10.1.4", - "@polkadot/rpc-augment": "9.2.2", - "@polkadot/rpc-core": "9.2.2", - "@polkadot/rpc-provider": "9.2.2", - "@polkadot/types": "9.2.2", - "@polkadot/types-augment": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/types-create": "9.2.2", - "@polkadot/types-known": "9.2.2", - "@polkadot/util": "^10.1.4", - "@polkadot/util-crypto": "^10.1.4", + "@polkadot/api-augment": "9.2.4", + "@polkadot/api-base": "9.2.4", + "@polkadot/api-derive": "9.2.4", + "@polkadot/keyring": "^10.1.6", + "@polkadot/rpc-augment": "9.2.4", + "@polkadot/rpc-core": "9.2.4", + "@polkadot/rpc-provider": "9.2.4", + "@polkadot/types": "9.2.4", + "@polkadot/types-augment": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/types-create": "9.2.4", + "@polkadot/types-known": "9.2.4", + "@polkadot/util": "^10.1.6", + "@polkadot/util-crypto": "^10.1.6", "eventemitter3": "^4.0.7", "rxjs": "^7.5.6" } }, "@polkadot/api-augment": { - "version": "9.2.2", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-9.2.4.tgz", + "integrity": "sha512-oL8JJS3RClbv+yVdVTjRHoU2d3az/YvD+Ex2UFnMtBCBk22kDnDEoJAstJJjnXW2RT7CsEmCj3ffP0pmJGvF4A==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/api-base": "9.2.2", - "@polkadot/rpc-augment": "9.2.2", - "@polkadot/types": "9.2.2", - "@polkadot/types-augment": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/util": "^10.1.4" + "@polkadot/api-base": "9.2.4", + "@polkadot/rpc-augment": "9.2.4", + "@polkadot/types": "9.2.4", + "@polkadot/types-augment": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/util": "^10.1.6" } }, "@polkadot/api-base": { - "version": "9.2.2", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-9.2.4.tgz", + "integrity": "sha512-iTSsenaKAWTrkyDkbvBlhx/hzS/DlPPcw+u/Z2EQfnsh6R8qR7Od5JbFKM5Z81mlBX2R3FYm6r2Cxan0Bb+bDA==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "9.2.2", - "@polkadot/types": "9.2.2", - "@polkadot/util": "^10.1.4", + "@polkadot/rpc-core": "9.2.4", + "@polkadot/types": "9.2.4", + "@polkadot/util": "^10.1.6", "rxjs": "^7.5.6" } }, "@polkadot/api-derive": { - "version": "9.2.2", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-9.2.4.tgz", + "integrity": "sha512-16V+l8hNe+TMYbZf6Bq27ZT69HXZC1Fn/mq0IrzdAs4jW2mok5tDfHDL+rCGJeRTq1LXFUOfPZGTMR4bqH2VqA==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/api": "9.2.2", - "@polkadot/api-augment": "9.2.2", - "@polkadot/api-base": "9.2.2", - "@polkadot/rpc-core": "9.2.2", - "@polkadot/types": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/util": "^10.1.4", - "@polkadot/util-crypto": "^10.1.4", + "@polkadot/api": "9.2.4", + "@polkadot/api-augment": "9.2.4", + "@polkadot/api-base": "9.2.4", + "@polkadot/rpc-core": "9.2.4", + "@polkadot/types": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/util": "^10.1.6", + "@polkadot/util-crypto": "^10.1.6", "rxjs": "^7.5.6" } }, "@polkadot/keyring": { - "version": "10.1.4", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-10.1.6.tgz", + "integrity": "sha512-l4kF8SRJwkAfQaPKu15/0cxnSu5kPBj/RM0oJpSxkiqZXMhflU7i1tGX2DNhXST+btyEe0AYDzLg2YSyxYOPQA==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/util": "10.1.4", - "@polkadot/util-crypto": "10.1.4" + "@polkadot/util": "10.1.6", + "@polkadot/util-crypto": "10.1.6" } }, "@polkadot/networks": { - "version": "10.1.4", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-10.1.6.tgz", + "integrity": "sha512-NINGTVkvAnrBDXbIdcSJ7gCmtXUB6ybI4TLHY2Tf/57hak+hlyQUoHZdaTzpRYrxZ9xoUUS1K83Lr3wfwMblHA==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/util": "10.1.4", - "@substrate/ss58-registry": "^1.25.0" + "@polkadot/util": "10.1.6", + "@substrate/ss58-registry": "^1.28.0" } }, "@polkadot/rpc-augment": { - "version": "9.2.2", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-9.2.4.tgz", + "integrity": "sha512-Jhw0r1CDr1CgkXdq/9zVNzQe4Yipk+NZ+uBWgBxfk+5ceaVsPjcwDG4A+J7og6I3fiWpz7srY1MC2Q8tikn6BA==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "9.2.2", - "@polkadot/types": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/util": "^10.1.4" + "@polkadot/rpc-core": "9.2.4", + "@polkadot/types": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/util": "^10.1.6" } }, "@polkadot/rpc-core": { - "version": "9.2.2", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-9.2.4.tgz", + "integrity": "sha512-npGOFC3BIjIxb4+jK4hISlUjsY8ay6GsLD5qhxEeiypk3pDNeHuBN/LjN4Z5Cb9N6e2fDgcLP4HRZG+YTf8ccA==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/rpc-augment": "9.2.2", - "@polkadot/rpc-provider": "9.2.2", - "@polkadot/types": "9.2.2", - "@polkadot/util": "^10.1.4", + "@polkadot/rpc-augment": "9.2.4", + "@polkadot/rpc-provider": "9.2.4", + "@polkadot/types": "9.2.4", + "@polkadot/util": "^10.1.6", "rxjs": "^7.5.6" } }, "@polkadot/rpc-provider": { - "version": "9.2.2", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-9.2.4.tgz", + "integrity": "sha512-qVlaDr/Oax764mps89tQpKFohOacFta5Gp72s81OBxFR1Nxq9qE5uaL5AaXzAxEtL+XVMFYKE508pp2IJW52dw==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.4", - "@polkadot/types": "9.2.2", - "@polkadot/types-support": "9.2.2", - "@polkadot/util": "^10.1.4", - "@polkadot/util-crypto": "^10.1.4", - "@polkadot/x-fetch": "^10.1.4", - "@polkadot/x-global": "^10.1.4", - "@polkadot/x-ws": "^10.1.4", - "@substrate/connect": "0.7.10", + "@polkadot/keyring": "^10.1.6", + "@polkadot/types": "9.2.4", + "@polkadot/types-support": "9.2.4", + "@polkadot/util": "^10.1.6", + "@polkadot/util-crypto": "^10.1.6", + "@polkadot/x-fetch": "^10.1.6", + "@polkadot/x-global": "^10.1.6", + "@polkadot/x-ws": "^10.1.6", + "@substrate/connect": "0.7.11", "eventemitter3": "^4.0.7", "mock-socket": "^9.1.5", "nock": "^13.2.9" } }, "@polkadot/types": { - "version": "9.2.2", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-9.2.4.tgz", + "integrity": "sha512-AnoTE2ORB0GfDz0JXwMqGiUieIxJSledxmiGTMF3Oj68WLWtg5yEMQZzYnbAELBLhscYdp1MHwYNBli72M3Q2Q==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.4", - "@polkadot/types-augment": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/types-create": "9.2.2", - "@polkadot/util": "^10.1.4", - "@polkadot/util-crypto": "^10.1.4", + "@polkadot/keyring": "^10.1.6", + "@polkadot/types-augment": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/types-create": "9.2.4", + "@polkadot/util": "^10.1.6", + "@polkadot/util-crypto": "^10.1.6", "rxjs": "^7.5.6" } }, "@polkadot/types-augment": { - "version": "9.2.2", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-9.2.4.tgz", + "integrity": "sha512-3Y8I7ZjCBWJwnooegEqBvsbYk9EOAfYhX1g+IxYFL/xTUO4mdNrgmaslHele2M7h//N+xW+iZ5R8IGRYOka1ew==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/types": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/util": "^10.1.4" + "@polkadot/types": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/util": "^10.1.6" } }, "@polkadot/types-codec": { - "version": "9.2.2", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-9.2.4.tgz", + "integrity": "sha512-3Wy7KOk6qd0v6rUQ2Qq5bz6xAo2KCp1Sn1GYa7VPNcFZfZaBO3Axgg3w3++ckDqLt8bI99Y/wCuAKhzvnMs/WA==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.4", - "@polkadot/x-bigint": "^10.1.4" + "@polkadot/util": "^10.1.6", + "@polkadot/x-bigint": "^10.1.6" } }, "@polkadot/types-create": { - "version": "9.2.2", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-9.2.4.tgz", + "integrity": "sha512-RU5r4GlhNFhd3QUzUj9gxfRNlH4LgvHEXTS/K5pprlKTmoJk9HcpzbnkydM8qb1kc3JJWpYgG3Ov82y6HWDjDg==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/types-codec": "9.2.2", - "@polkadot/util": "^10.1.4" + "@polkadot/types-codec": "9.2.4", + "@polkadot/util": "^10.1.6" } }, "@polkadot/types-known": { - "version": "9.2.2", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-9.2.4.tgz", + "integrity": "sha512-AEf0Qj/HjoCZTbIdNHXFQt+bbjaNpVdSV+yWIJNTtpRz6IcFNkddiW+4VRlesJh8M6zNy1S4BUcJlee3OqWJbg==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/networks": "^10.1.4", - "@polkadot/types": "9.2.2", - "@polkadot/types-codec": "9.2.2", - "@polkadot/types-create": "9.2.2", - "@polkadot/util": "^10.1.4" + "@polkadot/networks": "^10.1.6", + "@polkadot/types": "9.2.4", + "@polkadot/types-codec": "9.2.4", + "@polkadot/types-create": "9.2.4", + "@polkadot/util": "^10.1.6" } }, "@polkadot/types-support": { - "version": "9.2.2", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-9.2.4.tgz", + "integrity": "sha512-+Ci3dr6vieIybtfNERMeujzhr1P6i0napLm1bFb3QAiZ8sOaeF9i1y/LUsIHSFCb7D4joyJpaRK0WwLSV17WBA==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.4" + "@polkadot/util": "^10.1.6" } }, "@polkadot/util": { - "version": "10.1.4", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-10.1.6.tgz", + "integrity": "sha512-k+gCKmgwxp0smmLIR7SfiEYEToayWXjrC7pQ0PqAGxpBNOdVMSCzLMnOHf9AI5cjs/lx6ULr1fHn721wLVonkw==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/x-bigint": "10.1.4", - "@polkadot/x-global": "10.1.4", - "@polkadot/x-textdecoder": "10.1.4", - "@polkadot/x-textencoder": "10.1.4", + "@polkadot/x-bigint": "10.1.6", + "@polkadot/x-global": "10.1.6", + "@polkadot/x-textdecoder": "10.1.6", + "@polkadot/x-textencoder": "10.1.6", "@types/bn.js": "^5.1.0", "bn.js": "^5.2.1" } }, "@polkadot/util-crypto": { - "version": "10.1.4", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-10.1.6.tgz", + "integrity": "sha512-r3XWcCERomcGyB5PT7Qa1LYtCHfspVbehPGvraRlX5xhZBihpU4zMRWTSBNMPNaeIjUJmmSQHeG0ZnQVvnwzkg==", "requires": { "@babel/runtime": "^7.18.9", "@noble/hashes": "1.1.2", "@noble/secp256k1": "1.6.3", - "@polkadot/networks": "10.1.4", - "@polkadot/util": "10.1.4", + "@polkadot/networks": "10.1.6", + "@polkadot/util": "10.1.6", "@polkadot/wasm-crypto": "^6.3.1", - "@polkadot/x-bigint": "10.1.4", - "@polkadot/x-randomvalues": "10.1.4", + "@polkadot/x-bigint": "10.1.6", + "@polkadot/x-randomvalues": "10.1.6", "@scure/base": "1.1.1", "ed2curve": "^0.3.0", "tweetnacl": "^1.0.3" @@ -33599,26 +33549,34 @@ } }, "@polkadot/x-bigint": { - "version": "10.1.4", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-10.1.6.tgz", + "integrity": "sha512-yeBZQ9+u49KqDBaeSw+ytshqzyaScKrDjAxpWCfOGxJaB+5Nv1W7fqi3OJ4S/HN5DYItr0a6UC14e1hiZUtZCg==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/x-global": "10.1.4" + "@polkadot/x-global": "10.1.6" } }, "@polkadot/x-fetch": { - "version": "10.1.4", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-10.1.6.tgz", + "integrity": "sha512-LxsMtrQCgEC+ySRjS94voxY34OsL5qi4HBo6p8QWuXJB9pCuyGmnuFa8hJ0eMJ1Ne0SRo4gbasKWux6E5b00eg==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/x-global": "10.1.4", + "@polkadot/x-global": "10.1.6", "@types/node-fetch": "^2.6.2", "node-fetch": "^3.2.10" }, "dependencies": { "data-uri-to-buffer": { - "version": "4.0.0" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", + "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==" }, "fetch-blob": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", "requires": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" @@ -33626,6 +33584,8 @@ }, "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==", "requires": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -33635,37 +33595,47 @@ } }, "@polkadot/x-global": { - "version": "10.1.4", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-10.1.6.tgz", + "integrity": "sha512-/nraYZg0hdSjbczhDBAsHlEqeZLs0u0xa8HJrfH2lq8+HOIYkQpJPHOqiQIvEe/VFRq7Xnbij+4uffV+otzB/w==", "requires": { "@babel/runtime": "^7.18.9" } }, "@polkadot/x-randomvalues": { - "version": "10.1.4", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-10.1.6.tgz", + "integrity": "sha512-NDOr7Zvv3lN0Z3+gt/RfmZbeOXg21402ggiBdL8ni9rf0ZMUzFLqRNsbm0334L0lApfhfvxm98MGfK+gq6uVZg==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/x-global": "10.1.4" + "@polkadot/x-global": "10.1.6" } }, "@polkadot/x-textdecoder": { - "version": "10.1.4", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-10.1.6.tgz", + "integrity": "sha512-T+jvyv6OvUgGfOlMDLkPKEmQnZGP1CNohdEDeRr93AmeYikIfbC20qYuAc0bEBXR7/rPXgnqiEfrpkL2W3r/Ig==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/x-global": "10.1.4" + "@polkadot/x-global": "10.1.6" } }, "@polkadot/x-textencoder": { - "version": "10.1.4", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-10.1.6.tgz", + "integrity": "sha512-e+iHdR1P/8xAc54l3gHfqozH6ZfxPkKlVVaz3vOMnzfc8cA3Zw93mLYkGtLDqv+825LkSrWSmb/bDZb6YyEEXg==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/x-global": "10.1.4" + "@polkadot/x-global": "10.1.6" } }, "@polkadot/x-ws": { - "version": "10.1.4", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-10.1.6.tgz", + "integrity": "sha512-PNDM4/fPECz2rTsE3lS+KiF87QN7mrN79yp2CsTHUVYKDg511Hp85wvtGkVgUoA98JWYETpVO7kUR1wSRDf46A==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/x-global": "10.1.4", + "@polkadot/x-global": "10.1.6", "@types/websocket": "^1.0.5", "websocket": "^1.0.34" } @@ -33885,30 +33855,46 @@ } }, "@substrate/connect": { - "version": "0.7.10", + "version": "0.7.11", + "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.7.11.tgz", + "integrity": "sha512-/xiOlkmJfl2XPYQTmyWKEh2AXryEAPSMAxZXs6D/aqYDy0TKZDAp1dfQiHyPt1vMwOlnM4WJv9lPks3ZMwCP+w==", "requires": { "@substrate/connect-extension-protocol": "^1.0.1", - "@substrate/smoldot-light": "0.6.27", + "@substrate/smoldot-light": "0.6.30", "eventemitter3": "^4.0.7" } }, "@substrate/connect-extension-protocol": { - "version": "1.0.1" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@substrate/connect-extension-protocol/-/connect-extension-protocol-1.0.1.tgz", + "integrity": "sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg==" }, "@substrate/smoldot-light": { - "version": "0.6.27", + "version": "0.6.30", + "resolved": "https://registry.npmjs.org/@substrate/smoldot-light/-/smoldot-light-0.6.30.tgz", + "integrity": "sha512-U/F75XzxuNG+KGSujxsMAm8zUBpBON+l0oX19EnSWjvqD+smYjvcj1SeqQhFYxJjtoCQyZLedKBsZGyNbG3FbQ==", "requires": { "pako": "^2.0.4", - "websocket": "^1.0.32" + "ws": "^8.8.1" }, "dependencies": { "pako": { - "version": "2.0.4" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz", + "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==" + }, + "ws": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", + "requires": {} } } }, "@substrate/ss58-registry": { - "version": "1.25.0" + "version": "1.28.0", + "resolved": "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.28.0.tgz", + "integrity": "sha512-XPSwSq4CThLyg+OnZ5/LHh3SPDQjRdGS3Ux5ClgWhRCQamlU86FCT1LBwQ/i+ximbdBfqKRRzVhm1ql3AJ9FKQ==" }, "@szmarczak/http-timer": { "version": "5.0.1", @@ -34649,6 +34635,8 @@ }, "@types/node-fetch": { "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz", + "integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==", "requires": { "@types/node": "*", "form-data": "^3.0.0" @@ -34656,6 +34644,8 @@ "dependencies": { "form-data": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -34716,6 +34706,8 @@ }, "@types/websocket": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.5.tgz", + "integrity": "sha512-NbsqiNX9CnEfC1Z0Vf4mE1SgAJ07JnRYcNex7AJ9zAVzmiGHmjKFEk7O4TJIsgv2B1sLEb6owKFZrACwdYngsQ==", "requires": { "@types/node": "*" } @@ -35044,31 +35036,6 @@ "sprintf-js": "~1.0.2" } }, - "args": { - "version": "5.0.1", - "requires": { - "camelcase": "5.0.0", - "chalk": "2.4.2", - "leven": "2.1.0", - "mri": "1.1.4" - }, - "dependencies": { - "camelcase": { - "version": "5.0.0" - }, - "chalk": { - "version": "2.4.2", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5" - } - } - }, "aria-query": { "version": "4.2.2", "dev": true, @@ -35453,7 +35420,8 @@ "version": "1.6.51" }, "big-number": { - "version": "2.0.0" + "version": "2.0.0", + "dev": true }, "big.js": { "version": "6.2.1" @@ -35542,9 +35510,6 @@ "fill-range": "^7.0.1" } }, - "brolog": { - "version": "1.12.4" - }, "brorand": { "version": "1.1.0" }, @@ -36114,9 +36079,6 @@ "wrap-ansi": "^6.2.0" } }, - "clone": { - "version": "1.0.4" - }, "clone-response": { "version": "1.0.3", "requires": { @@ -36448,7 +36410,8 @@ } }, "crypto-js": { - "version": "4.1.1" + "version": "4.1.1", + "dev": true }, "cyclist": { "version": "1.0.1", @@ -36541,12 +36504,6 @@ } } }, - "defaults": { - "version": "1.0.3", - "requires": { - "clone": "^1.0.2" - } - }, "defer-to-connect": { "version": "2.0.1" }, @@ -37057,15 +37014,6 @@ "duplexer3": { "version": "0.1.5" }, - "duplexify": { - "version": "4.1.2", - "requires": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, "duration": { "version": "0.2.2", "dev": true, @@ -38142,25 +38090,10 @@ "busboy": "^1.6.0" } }, - "express-ipfilter": { - "version": "1.2.0", - "requires": { - "ip": "~1.1.0", - "lodash": "^4.17.11", - "proxy-addr": "^2.0.4", - "range_check": "^1.2.0" - } - }, "express-rate-limit": { "version": "6.3.0", "requires": {} }, - "express-slow-down": { - "version": "1.4.0", - "requires": { - "defaults": "^1.0.3" - } - }, "ext": { "version": "1.6.0", "requires": { @@ -38250,6 +38183,11 @@ "pure-rand": "^5.0.1" } }, + "fast-copy": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-2.1.3.tgz", + "integrity": "sha512-LDzYKNTHhD+XOp8wGMuCkY4eTxFZOOycmpwLBiuF3r3OjOmZnURRD8t2dUAbmKuXGbo/MGggwbSjcBdp8QT0+g==" + }, "fast-deep-equal": { "version": "3.1.3" }, @@ -38268,15 +38206,6 @@ "fast-safe-stringify": { "version": "2.1.1" }, - "fast-sort": { - "version": "3.1.1" - }, - "fastq": { - "version": "1.13.0", - "requires": { - "reusify": "^1.0.4" - } - }, "fecha": { "version": "4.2.3" }, @@ -38516,6 +38445,7 @@ }, "form-data": { "version": "4.0.0", + "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -45700,6 +45630,45 @@ "heap": { "version": "0.2.6" }, + "help-me": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/help-me/-/help-me-4.0.1.tgz", + "integrity": "sha512-PLv01Z+OhEPKj2QPYB4kjoCUkopYNPUK3EROlaPIf5bib752fZ+VCvGDAoA+FXo/OwCyLEA4D2e0mX8+Zhcplw==", + "requires": { + "glob": "^8.0.0", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, "hex-to-binary": { "version": "1.0.1" }, @@ -45953,9 +45922,6 @@ "ip-regex": { "version": "4.3.0" }, - "ip6": { - "version": "0.0.4" - }, "ipaddr.js": { "version": "1.9.1" }, @@ -46382,12 +46348,6 @@ "buffer": "^6.0.3" } }, - "it-concat": { - "version": "2.0.0", - "requires": { - "bl": "^5.0.0" - } - }, "it-drain": { "version": "1.0.4" }, @@ -46865,9 +46825,6 @@ } } }, - "leven": { - "version": "2.1.0" - }, "levn": { "version": "0.4.1", "requires": { @@ -47916,7 +47873,9 @@ "version": "4.14.0" }, "mock-socket": { - "version": "9.1.5" + "version": "9.1.5", + "resolved": "https://registry.npmjs.org/mock-socket/-/mock-socket-9.1.5.tgz", + "integrity": "sha512-3DeNIcsQixWHHKk6NdoBhWI4t1VMj5/HzfnI1rE/pLl5qKx7+gd4DNA07ehTaZ6MoUU053si6Hd+YtiM/tQZfg==" }, "moment": { "version": "2.29.4" @@ -47955,9 +47914,6 @@ } } }, - "mri": { - "version": "1.1.4" - }, "ms": { "version": "2.1.3" }, @@ -48239,6 +48195,8 @@ }, "nock": { "version": "13.2.9", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.2.9.tgz", + "integrity": "sha512-1+XfJNYF1cjGB+TKMWi29eZ0b82QOvQs2YoLNzbpWGqFMtRQHTa57osqdGj4FrFPgkO4D4AZinzUJR9VvW3QUA==", "requires": { "debug": "^4.1.0", "json-stringify-safe": "^5.0.1", @@ -48675,7 +48633,9 @@ } }, "on-exit-leak-free": { - "version": "0.2.0" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.0.tgz", + "integrity": "sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w==" }, "on-finished": { "version": "2.3.0", @@ -48735,15 +48695,6 @@ "version": "1.0.2", "dev": true }, - "ot-telemetry-collector": { - "version": "1.0.7", - "requires": { - "axios": "^0.24.0", - "form-data": "^4.0.0", - "json-2-csv": "^3.15.1", - "split": "^1.0.1" - } - }, "p-any": { "version": "3.0.0", "requires": { @@ -49083,31 +49034,40 @@ "version": "3.0.0" }, "pino": { - "version": "7.6.3", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.4.2.tgz", + "integrity": "sha512-PlXDeGhJZfAuVay+wtlS02s5j8uisQveZExYdAm9MwwxUQSz9R7Q78XtjM2tTa4sa5KJmygimZjZxXXuHgV6ew==", "requires": { - "fast-redact": "^3.0.0", - "on-exit-leak-free": "^0.2.0", - "pino-abstract-transport": "v0.5.0", - "pino-std-serializers": "^4.0.0", - "process-warning": "^1.0.0", + "atomic-sleep": "^1.0.0", + "fast-redact": "^3.1.1", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "v1.0.0", + "pino-std-serializers": "^6.0.0", + "process-warning": "^2.0.0", "quick-format-unescaped": "^4.0.3", - "real-require": "^0.1.0", - "safe-stable-stringify": "^2.1.0", - "sonic-boom": "^2.2.1", - "thread-stream": "^0.13.0" + "real-require": "^0.2.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^3.1.0", + "thread-stream": "^2.0.0" }, "dependencies": { "fast-redact": { - "version": "3.0.2" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.1.2.tgz", + "integrity": "sha512-+0em+Iya9fKGfEQGcd62Yv6onjBmmhV1uh86XVfOU8VwAe6kaFdQCWI9s0/Nnugx5Vd9tdbZ7e6gE2tR9dzXdw==" }, "pino-std-serializers": { - "version": "4.0.0" + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.0.0.tgz", + "integrity": "sha512-mMMOwSKrmyl+Y12Ri2xhH1lbzQxwwpuru9VjyJpgFIH4asSj88F2csdMwN6+M5g1Ll4rmsYghHLQJw81tgZ7LQ==" }, "quick-format-unescaped": { "version": "4.0.4" }, "sonic-boom": { - "version": "2.5.0", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.2.0.tgz", + "integrity": "sha512-SbbZ+Kqj/XIunvIAgUZRlqd6CGQYq71tRRbXR92Za8J/R3Yh4Av+TWENiSiEgnlwckYLyP0YZQWVfyNC0dzLaA==", "requires": { "atomic-sleep": "^1.0.0" } @@ -49115,40 +49075,60 @@ } }, "pino-abstract-transport": { - "version": "0.5.0", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.0.0.tgz", + "integrity": "sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA==", "requires": { - "duplexify": "^4.1.2", + "readable-stream": "^4.0.0", "split2": "^4.0.0" - } - }, - "pino-multi-stream": { - "version": "6.0.0", - "requires": { - "pino": "^7.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.1.0.tgz", + "integrity": "sha512-sVisi3+P2lJ2t0BPbpK629j8wRW06yKGJUcaLAGXPAUhyUxVJm7VsCTit1PFgT4JHUDMrGNR+ZjSKpzGaRF3zw==", + "requires": { + "abort-controller": "^3.0.0" + } + } } }, "pino-pretty": { - "version": "7.3.0", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-9.1.0.tgz", + "integrity": "sha512-IM6NY9LLo/dVgY7/prJhCh4rAJukafdt0ibxeNOWc2fxKMyTk90SOB9Ao2HfbtShT9QPeP0ePpJktksMhSQMYA==", "requires": { - "args": "^5.0.1", "colorette": "^2.0.7", "dateformat": "^4.6.3", - "fast-safe-stringify": "^2.0.7", + "fast-copy": "^2.1.1", + "fast-safe-stringify": "^2.1.1", + "help-me": "^4.0.1", "joycon": "^3.1.1", - "pino-abstract-transport": "^0.5.0", + "minimist": "^1.2.6", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^1.0.0", "pump": "^3.0.0", - "readable-stream": "^3.6.0", - "rfdc": "^1.3.0", + "readable-stream": "^4.0.0", "secure-json-parse": "^2.4.0", - "sonic-boom": "^2.2.0", + "sonic-boom": "^3.0.0", "strip-json-comments": "^3.1.1" }, "dependencies": { "colorette": { "version": "2.0.16" }, + "readable-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.1.0.tgz", + "integrity": "sha512-sVisi3+P2lJ2t0BPbpK629j8wRW06yKGJUcaLAGXPAUhyUxVJm7VsCTit1PFgT4JHUDMrGNR+ZjSKpzGaRF3zw==", + "requires": { + "abort-controller": "^3.0.0" + } + }, "sonic-boom": { - "version": "2.5.0", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.2.0.tgz", + "integrity": "sha512-SbbZ+Kqj/XIunvIAgUZRlqd6CGQYq71tRRbXR92Za8J/R3Yh4Av+TWENiSiEgnlwckYLyP0YZQWVfyNC0dzLaA==", "requires": { "atomic-sleep": "^1.0.0" } @@ -49244,7 +49224,9 @@ } }, "process-warning": { - "version": "1.0.0" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.0.0.tgz", + "integrity": "sha512-+MmoAXoUX+VTHAlwns0h+kFUWFs/3FZy+ZuchkgjyOu3oioLAo2LB5aCfKPh2+P9O18i3m43tUEv3YqttSy0Ww==" }, "progress": { "version": "2.0.3" @@ -49281,7 +49263,9 @@ } }, "propagate": { - "version": "2.0.1" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", + "integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==" }, "proto-list": { "version": "1.2.4" @@ -49447,18 +49431,6 @@ "safe-buffer": "^5.1.0" } }, - "range_check": { - "version": "1.4.0", - "requires": { - "ip6": "0.0.4", - "ipaddr.js": "1.2" - }, - "dependencies": { - "ipaddr.js": { - "version": "1.2.0" - } - } - }, "range-parser": { "version": "1.2.1" }, @@ -49687,7 +49659,9 @@ } }, "real-require": { - "version": "0.1.0" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==" }, "receptacle": { "version": "1.3.2", @@ -49926,11 +49900,9 @@ "any-promise": "^1.3.0" } }, - "reusify": { - "version": "1.0.4" - }, "rfdc": { - "version": "1.3.0" + "version": "1.3.0", + "dev": true }, "rimraf": { "version": "3.0.2", @@ -50280,14 +50252,6 @@ } } }, - "simple-git": { - "version": "3.7.1", - "requires": { - "@kwsites/file-exists": "^1.1.1", - "@kwsites/promise-deferred": "^1.1.1", - "debug": "^4.3.3" - } - }, "simple-swizzle": { "version": "0.2.2", "requires": { @@ -50713,12 +50677,6 @@ "dev": true, "peer": true }, - "split": { - "version": "1.0.1", - "requires": { - "through": "2" - } - }, "split-string": { "version": "3.1.0", "dev": true, @@ -50744,7 +50702,9 @@ } }, "split2": { - "version": "4.1.0" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.1.0.tgz", + "integrity": "sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==" }, "sprintf-js": { "version": "1.0.3" @@ -50818,7 +50778,8 @@ } }, "stream-shift": { - "version": "1.0.1" + "version": "1.0.1", + "dev": true }, "stream-to-it": { "version": "0.2.4", @@ -51281,9 +51242,11 @@ } }, "thread-stream": { - "version": "0.13.0", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.1.0.tgz", + "integrity": "sha512-5+Pf2Ya31CsZyIPYYkhINzdTZ3guL+jHq7D8lkBybgGcSQIKDbid3NJku3SpCKeE/gACWAccDA/rH2B6doC5aA==", "requires": { - "real-require": "^0.1.0" + "real-require": "^0.2.0" } }, "through": { @@ -51717,7 +51680,8 @@ "dev": true }, "underscore": { - "version": "1.13.4" + "version": "1.13.4", + "dev": true }, "undici": { "version": "5.8.0" @@ -51979,12 +51943,6 @@ "dev": true, "peer": true }, - "watchdog": { - "version": "0.8.17", - "requires": { - "brolog": "^1.3.3" - } - }, "watchpack": { "version": "1.7.5", "dev": true, diff --git a/package.json b/package.json index aefebb0f7b..eb234995a3 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,12 @@ "@babel/core": "^7.15.5", "@babel/eslint-parser": "^7.16.5", "@cucumber/cucumber": "^8.0.0-rc.2", + "@ethersproject/bytes": "^5.6.1", + "@ethersproject/hash": "^5.6.1", + "@ethersproject/wallet": "^5.6.2", "@openzeppelin/contracts": "^4.6.0", + "@polkadot/util": "^10.1.4", + "@polkadot/util-crypto": "^10.1.4", "bn.js": "^5.1.3", "chai": "^4.3.6", "chai-as-promised": "^7.1.1", @@ -50,8 +55,8 @@ "eslint-config-prettier": "^8.5.0", "ethereumjs-wallet": "^1.0.2", "ganache": "^7.0.4", - "husky": "^6.0.0", "ganache-core": "^2.13.2", + "husky": "^6.0.0", "lint-staged": "^12.3.7", "mocha": "^9.2.2", "nodemon": "^2.0.15", @@ -61,47 +66,30 @@ "request": "^2.88.2", "sinon": "^14.0.0", "slugify": "^1.6.5", - "solc": "0.7.6", - "@ethersproject/bytes": "^5.6.1", - "@ethersproject/hash": "^5.6.1", - "@ethersproject/wallet": "^5.6.2", - "@polkadot/util": "^10.1.4", - "@polkadot/util-crypto": "^10.1.4" + "solc": "0.7.6" }, "dependencies": { "@comunica/query-sparql": "^2.2.1", - "@polkadot/api": "^9.2.1", - "@polkadot/keyring": "^10.1.4", + "@polkadot/api": "^9.2.4", "app-root-path": "^3.0.0", "assertion-tools": "^1.0.7", "async": "^3.2.4", "async-mutex": "^0.3.2", "awilix": "^5.0.1", "axios": "^0.24.0", - "big-number": "^2.0.0", - "bl": "^5.0.0", - "bn.js": "^5.2.1", "cors": "^2.8.5", - "crypto-js": "^4.1.1", "deep-extend": "^0.6.0", "dkg-evm-module": "^1.0.1", "dotenv": "^10.0.0", - "elliptic": "^6.5.4", "express": "^4.17.1", "express-fileupload": "^1.2.1", - "express-ipfilter": "^1.2.0", "express-rate-limit": "^6.3.0", - "express-slow-down": "^1.4.0", - "fast-sort": "^3.1.1", - "fastq": "^1.13.0", "fs-extra": "^10.0.0", "graphdb": "^2.0.2", "ip": "^1.1.8", - "it-concat": "^2.0.0", "it-length-prefixed": "^5.0.3", "it-map": "^1.0.6", "it-pipe": "^1.1.0", - "js-sha3": "^0.8.0", "json-2-csv": "^3.14.4", "json-stable-stringify": "^1.0.1", "jsonld": "^5.2.0", @@ -115,35 +103,24 @@ "libp2p-noise": "^4.0.0", "libp2p-record": "^0.10.5", "libp2p-tcp": "^0.17.2", - "merkle-tools": "^1.4.1", "merkletreejs": "^0.2.32", "ms": "^2.1.3", - "multiformats": "^9.4.7", "mysql2": "^2.3.3", - "n3": "^1.12.2", - "ot-telemetry-collector": "^1.0.7", "p-iteration": "^1.1.8", "peer-id": "^0.15.3", - "pino": "^7.5.1", - "pino-multi-stream": "^6.0.0", - "pino-pretty": "^7.2.0", - "qs": "^6.10.3", + "pino": "^8.4.2", + "pino-pretty": "^9.1.0", "rc": "^1.2.8", "rolling-rate-limiter": "^0.2.13", "semver": "^7.3.5", "sequelize": "^6.9.0", "sequelize-cli": "^6.3.0", - "simple-git": "^3.6.0", - "split": "^1.0.1", - "streaming-iterables": "^6.0.0", "timers": "^0.1.1", "toobusy-js": "^0.5.1", "uint8arrays": "^3.0.0", - "underscore": "^1.13.1", "unzipper": "^0.10.11", "uuid": "^8.3.2", "validator": "^13.7.0", - "watchdog": "^0.8.17", "web3": "^1.6.0", "workerpool": "^6.2.0" } diff --git a/src/commands/command.js b/src/commands/command.js index ea538aac58..ce50f146eb 100644 --- a/src/commands/command.js +++ b/src/commands/command.js @@ -104,7 +104,7 @@ class Command { } async retryFinished(command) { - this.logger.trace(`Retry count for command: ${command.name} reached!`); + this.logger.trace(`Max retry count for command: ${command.name} reached!`); } /** diff --git a/src/commands/protocols/common/handle-protocol-message-command.js b/src/commands/protocols/common/handle-protocol-message-command.js index 61fd71db24..ca793172a5 100644 --- a/src/commands/protocols/common/handle-protocol-message-command.js +++ b/src/commands/protocols/common/handle-protocol-message-command.js @@ -28,7 +28,10 @@ class HandleProtocolMessageCommand extends Command { messageData, ); } catch (error) { - if (command.retries) return Command.retry(); + if (command.retries) { + this.logger.warn(error.message); + return Command.retry(); + } await this.handleError(error.message, command); } diff --git a/src/commands/protocols/common/network-protocol-command.js b/src/commands/protocols/common/network-protocol-command.js index 36fb8cb59f..9d20ee386c 100644 --- a/src/commands/protocols/common/network-protocol-command.js +++ b/src/commands/protocols/common/network-protocol-command.js @@ -3,8 +3,6 @@ const Command = require('../../command'); class NetworkProtocolCommand extends Command { constructor(ctx) { super(ctx); - this.config = ctx.config; - this.logger = ctx.logger; this.commandExecutor = ctx.commandExecutor; } @@ -13,7 +11,6 @@ class NetworkProtocolCommand extends Command { * @param command */ async execute(command) { - const { operationId } = command.data; const keywords = this.getKeywords(command); const commandSequence = [ 'findNodesCommand', @@ -26,9 +23,8 @@ class NetworkProtocolCommand extends Command { sequence: commandSequence.slice(1), delay: 0, data: { - ...this.getNextCommandData(command), + ...command.data, keyword, - operationId, minimumAckResponses: this.operationService.getMinimumAckResponses(), errorType: this.errorType, networkProtocol: this.operationService.getNetworkProtocol(), diff --git a/src/commands/protocols/publish/receiver/handle-store-init-command.js b/src/commands/protocols/publish/receiver/handle-publish-init-command.js similarity index 58% rename from src/commands/protocols/publish/receiver/handle-store-init-command.js rename to src/commands/protocols/publish/receiver/handle-publish-init-command.js index 184511173c..1bffb3c531 100644 --- a/src/commands/protocols/publish/receiver/handle-store-init-command.js +++ b/src/commands/protocols/publish/receiver/handle-publish-init-command.js @@ -3,27 +3,42 @@ const { NETWORK_MESSAGE_TYPES, ERROR_TYPE, OPERATION_ID_STATUS, + PUBLISH_TYPES, } = require('../../../../constants/constants'); -class HandleStoreInitCommand extends HandleProtocolMessageCommand { +class HandlePublishInitCommand extends HandleProtocolMessageCommand { constructor(ctx) { super(ctx); this.operationService = ctx.publishService; + this.ualService = ctx.ualService; this.errorType = ERROR_TYPE.PUBLISH.PUBLISH_REMOTE_ERROR; } async prepareMessage(commandData) { - const { operationId, ual } = commandData; - - this.logger.info(`Validating assertion with ual: ${ual}`); + const { publishType, operationId, assertionId } = commandData; await this.operationIdService.updateOperationIdStatus( operationId, OPERATION_ID_STATUS.PUBLISH.VALIDATING_ASSERTION_REMOTE_START, ); - const assertionId = await this.operationService.getAssertion(ual, operationId); + if (publishType === PUBLISH_TYPES.ASSET) { + const { blockchain, contract, tokenId } = commandData; + const ual = this.ualService.deriveUAL(blockchain, contract, tokenId); + this.logger.info(`Validating assertion with ual: ${ual}`); + + const blockchainAssertionId = await this.operationService.getAssertion( + blockchain, + contract, + tokenId, + ); + if (blockchainAssertionId !== assertionId) { + throw Error( + `Invalid assertion id for asset ${ual}. Received value from blockchain: ${blockchainAssertionId}, received value from request: ${assertionId}`, + ); + } + } await Promise.all([ this.operationIdService.cacheOperationIdData(operationId, { assertionId }), @@ -45,13 +60,13 @@ class HandleStoreInitCommand extends HandleProtocolMessageCommand { } /** - * Builds default handleStoreInitCommand + * Builds default handlePublishInitCommand * @param map * @returns {{add, data: *, delay: *, deadline: *}} */ default(map) { const command = { - name: 'handleStoreInitCommand', + name: 'handlePublishInitCommand', delay: 0, transactional: false, }; @@ -60,4 +75,4 @@ class HandleStoreInitCommand extends HandleProtocolMessageCommand { } } -module.exports = HandleStoreInitCommand; +module.exports = HandlePublishInitCommand; diff --git a/src/commands/protocols/publish/receiver/handle-store-request-command.js b/src/commands/protocols/publish/receiver/handle-publish-request-command.js similarity index 71% rename from src/commands/protocols/publish/receiver/handle-store-request-command.js rename to src/commands/protocols/publish/receiver/handle-publish-request-command.js index 0abcacb396..3c4c03b72a 100644 --- a/src/commands/protocols/publish/receiver/handle-store-request-command.js +++ b/src/commands/protocols/publish/receiver/handle-publish-request-command.js @@ -3,9 +3,10 @@ const { NETWORK_MESSAGE_TYPES, OPERATION_ID_STATUS, ERROR_TYPE, + PUBLISH_TYPES, } = require('../../../../constants/constants'); -class HandleStoreRequestCommand extends HandleProtocolMessageCommand { +class HandlePublishRequestCommand extends HandleProtocolMessageCommand { constructor(ctx) { super(ctx); this.operationService = ctx.publishService; @@ -14,12 +15,8 @@ class HandleStoreRequestCommand extends HandleProtocolMessageCommand { } async prepareMessage(commandData) { - const { ual, operationId, assertionId } = commandData; + const { publishType, operationId, assertionId } = commandData; - await this.operationIdService.updateOperationIdStatus( - operationId, - OPERATION_ID_STATUS.PUBLISH.PUBLISH_LOCAL_STORE_START, - ); const { assertionId: storeInitAssertionId } = await this.operationIdService.getCachedOperationIdData(operationId); @@ -39,7 +36,39 @@ class HandleStoreRequestCommand extends HandleProtocolMessageCommand { operationId, OPERATION_ID_STATUS.PUBLISH.VALIDATING_ASSERTION_REMOTE_END, ); - await this.operationService.localStore(ual, assertionId, operationId); + + await this.operationIdService.updateOperationIdStatus( + operationId, + OPERATION_ID_STATUS.PUBLISH.PUBLISH_LOCAL_STORE_START, + ); + + switch (publishType) { + case PUBLISH_TYPES.ASSERTION: + await this.operationService.localStoreAssertion(assertionId, operationId); + break; + case PUBLISH_TYPES.ASSET: + await this.operationService.localStoreAsset( + assertionId, + commandData.blockchain, + commandData.contract, + commandData.tokenId, + operationId, + ); + break; + case PUBLISH_TYPES.INDEX: + await this.operationService.localStoreIndex( + assertionId, + commandData.blockchain, + commandData.contract, + commandData.tokenId, + commandData.keyword, + operationId, + ); + break; + default: + throw Error(`Unknown publish type ${publishType}`); + } + await this.operationIdService.updateOperationIdStatus( operationId, OPERATION_ID_STATUS.PUBLISH.PUBLISH_LOCAL_STORE_END, @@ -73,13 +102,13 @@ class HandleStoreRequestCommand extends HandleProtocolMessageCommand { } /** - * Builds default handleStoreRequestCommand + * Builds default handlePublishRequestCommand * @param map * @returns {{add, data: *, delay: *, deadline: *}} */ default(map) { const command = { - name: 'handleStoreRequestCommand', + name: 'handlePublishRequestCommand', delay: 0, transactional: false, }; @@ -88,4 +117,4 @@ class HandleStoreRequestCommand extends HandleProtocolMessageCommand { } } -module.exports = HandleStoreRequestCommand; +module.exports = HandlePublishRequestCommand; diff --git a/src/commands/protocols/publish/sender/insert-assertion-command.js b/src/commands/protocols/publish/sender/insert-assertion-command.js index a1acb47010..b4c6b0b12e 100644 --- a/src/commands/protocols/publish/sender/insert-assertion-command.js +++ b/src/commands/protocols/publish/sender/insert-assertion-command.js @@ -1,23 +1,17 @@ const Command = require('../../../command'); -const { OPERATION_ID_STATUS, ERROR_TYPE } = require('../../../../constants/constants'); +const { ERROR_TYPE } = require('../../../../constants/constants'); class InsertAssertionCommand extends Command { constructor(ctx) { super(ctx); - this.logger = ctx.logger; this.tripleStoreModuleManager = ctx.tripleStoreModuleManager; - this.fileService = ctx.fileService; this.operationIdService = ctx.operationIdService; this.errorType = ERROR_TYPE.PUBLISH.PUBLISH_LOCAL_STORE_ERROR; } - /** - * Executes command and produces one or more events - * @param command - */ - async execute(command) { - const { operationId, ual, assertionId } = command.data; + async execute() { + /* const { operationId, ual, assertionId } = command.data; await this.operationIdService.updateOperationIdStatus( operationId, @@ -34,7 +28,7 @@ class InsertAssertionCommand extends Command { } catch (error) { this.handleError(operationId, error.message, this.errorType, true); return Command.empty(); - } + } */ } /** diff --git a/src/commands/protocols/publish/sender/network-publish-command.js b/src/commands/protocols/publish/sender/network-publish-command.js index 49e01e4df0..1fe28c9bd6 100644 --- a/src/commands/protocols/publish/sender/network-publish-command.js +++ b/src/commands/protocols/publish/sender/network-publish-command.js @@ -1,5 +1,5 @@ const NetworkProtocolCommand = require('../../common/network-protocol-command'); -const { ERROR_TYPE } = require('../../../../constants/constants'); +const { ERROR_TYPE, PUBLISH_TYPES } = require('../../../../constants/constants'); class NetworkPublishCommand extends NetworkProtocolCommand { constructor(ctx) { @@ -10,16 +10,20 @@ class NetworkPublishCommand extends NetworkProtocolCommand { } getKeywords(command) { - const { assertionId } = command.data; - return [assertionId]; + const { publishType } = command.data; + + if (publishType === PUBLISH_TYPES.INDEX) return [...command.data.keywords]; + + return [command.data.assertionId]; } getNextCommandData(command) { - const { assertionId, ual } = command.data; - return { - assertionId, - ual, - }; + const { publishType, assertionId, blockchain, contract } = command.data; + const assertionCommandData = { publishType, assertionId, blockchain, contract }; + + if (publishType === PUBLISH_TYPES.ASSERTION) return assertionCommandData; + + return { ...assertionCommandData, tokenId: command.data.tokenId }; } /** diff --git a/src/commands/protocols/publish/sender/publish-init-command.js b/src/commands/protocols/publish/sender/publish-init-command.js index 1840b87377..77794a5f69 100644 --- a/src/commands/protocols/publish/sender/publish-init-command.js +++ b/src/commands/protocols/publish/sender/publish-init-command.js @@ -1,20 +1,21 @@ const ProtocolInitCommand = require('../../common/protocol-init-command'); -const { ERROR_TYPE } = require('../../../../constants/constants'); +const { ERROR_TYPE, PUBLISH_TYPES } = require('../../../../constants/constants'); class PublishInitCommand extends ProtocolInitCommand { constructor(ctx) { super(ctx); - - this.repositoryModuleManager = ctx.repositoryModuleManager; this.operationService = ctx.publishService; this.errorType = ERROR_TYPE.PUBLISH.PUBLISH_STORE_INIT_ERROR; } async prepareMessage(command) { - const { assertionId, ual } = command.data; + const { publishType, assertionId, blockchain, contract } = command.data; + const assertionMessage = { publishType, assertionId, blockchain, contract }; + + if (publishType === PUBLISH_TYPES.ASSERTION) return assertionMessage; - return { assertionId, ual }; + return { ...assertionMessage, tokenId: command.data.tokenId }; } /** @@ -26,8 +27,6 @@ class PublishInitCommand extends ProtocolInitCommand { const command = { name: 'publishInitCommand', delay: 0, - period: 5000, - retries: 3, transactional: false, }; Object.assign(command, map); diff --git a/src/commands/protocols/publish/sender/publish-request-command.js b/src/commands/protocols/publish/sender/publish-request-command.js index 1ce951146d..2db7b8b431 100644 --- a/src/commands/protocols/publish/sender/publish-request-command.js +++ b/src/commands/protocols/publish/sender/publish-request-command.js @@ -1,23 +1,35 @@ const ProtocolRequestCommand = require('../../common/protocol-request-command'); -const { ERROR_TYPE } = require('../../../../constants/constants'); +const { ERROR_TYPE, PUBLISH_TYPES } = require('../../../../constants/constants'); class PublishRequestCommand extends ProtocolRequestCommand { constructor(ctx) { super(ctx); this.operationService = ctx.publishService; - this.repositoryModuleManager = ctx.repositoryModuleManager; this.errorType = ERROR_TYPE.PUBLISH.PUBLISH_STORE_REQUEST_ERROR; } async prepareMessage(command) { - const { operationId, assertionId, ual } = command.data; + const { publishType, operationId, assertionId, blockchain, contract } = command.data; const { assertion } = await this.operationIdService.getCachedOperationIdData(operationId); - return { - assertion, + const assertionMessage = { + publishType, assertionId, - ual, + blockchain, + contract, + assertion, + }; + + if (publishType === PUBLISH_TYPES.ASSERTION) return assertionMessage; + + if (publishType === PUBLISH_TYPES.ASSET) + return { ...assertionMessage, tokenId: command.data.tokenId }; + + return { + ...assertionMessage, + tokenId: command.data.tokenId, + keyword: command.data.keyword, }; } diff --git a/src/commands/protocols/publish/sender/publish-schedule-messages-command.js b/src/commands/protocols/publish/sender/publish-schedule-messages-command.js index d25c729de7..63fc105498 100644 --- a/src/commands/protocols/publish/sender/publish-schedule-messages-command.js +++ b/src/commands/protocols/publish/sender/publish-schedule-messages-command.js @@ -1,5 +1,9 @@ const ProtocolScheduleMessagesCommand = require('../../common/protocol-schedule-messages-command'); -const { OPERATION_ID_STATUS, ERROR_TYPE } = require('../../../../constants/constants'); +const { + OPERATION_ID_STATUS, + ERROR_TYPE, + PUBLISH_TYPES, +} = require('../../../../constants/constants'); class PublishScheduleMessagesCommand extends ProtocolScheduleMessagesCommand { constructor(ctx) { @@ -7,16 +11,15 @@ class PublishScheduleMessagesCommand extends ProtocolScheduleMessagesCommand { this.operationService = ctx.publishService; this.startEvent = OPERATION_ID_STATUS.PUBLISH.PUBLISH_REPLICATE_START; - this.errorType = ERROR_TYPE.PUBLISH.PUBLISH_START_ERROR; } getNextCommandData(command) { - const { assertionId, ual } = command.data; - return { - assertionId, - ual, - }; + const { publishType, assertionId, blockchain, contract } = command.data; + const assertionCommandData = { publishType, assertionId, blockchain, contract }; + + if (publishType === PUBLISH_TYPES.ASSERTION) return assertionCommandData; + return { ...assertionCommandData, tokenId: command.data.tokenId }; } /** diff --git a/src/commands/protocols/publish/sender/validate-assertion-command.js b/src/commands/protocols/publish/sender/validate-assertion-command.js index 7e7df55793..f2cde873ff 100644 --- a/src/commands/protocols/publish/sender/validate-assertion-command.js +++ b/src/commands/protocols/publish/sender/validate-assertion-command.js @@ -1,10 +1,15 @@ const Command = require('../../../command'); -const { ERROR_TYPE, OPERATION_ID_STATUS } = require('../../../../constants/constants'); +const { + ERROR_TYPE, + OPERATION_ID_STATUS, + PUBLISH_TYPES, +} = require('../../../../constants/constants'); class ValidateAssertionCommand extends Command { constructor(ctx) { super(ctx); this.operationService = ctx.publishService; + this.ualService = ctx.ualService; this.errorType = ERROR_TYPE.PUBLISH.PUBLISH_VALIDATE_ASSERTION_ERROR; } @@ -14,37 +19,58 @@ class ValidateAssertionCommand extends Command { * @param command */ async execute(command) { - const { ual, operationId } = command.data; + const { publishType, assertionId, operationId } = command.data; await this.operationIdService.updateOperationIdStatus( operationId, OPERATION_ID_STATUS.PUBLISH.VALIDATING_ASSERTION_START, ); - try { - const assertionId = await this.operationService.getAssertion(ual, operationId); - await this.operationService.validateAssertion(assertionId, operationId); - await this.operationIdService.updateOperationIdStatus( - operationId, - OPERATION_ID_STATUS.PUBLISH.VALIDATING_ASSERTION_END, - ); - return this.continueSequence( - { ...command.data, assertionId, retry: undefined, period: undefined }, - command.sequence, - ); - } catch (error) { - this.logger.warn( - `Unable to validate blockchain data for ual: ${ual}. Received error: ${error.message}, retrying.`, - ); - return Command.retry(); + if (publishType === PUBLISH_TYPES.ASSET) { + const { blockchain, contract, tokenId } = command.data; + const ual = this.ualService.deriveUAL(blockchain, contract, tokenId); + this.logger.info(`Validating assertion with ual: ${ual}`); + + let blockchainAssertionId; + try { + blockchainAssertionId = await this.operationService.getAssertion( + blockchain, + contract, + tokenId, + ); + } catch (error) { + this.logger.warn( + `Unable to validate blockchain data for ual: ${ual}. Received error: ${error.message}, retrying.`, + ); + return Command.retry(); + } + if (blockchainAssertionId !== assertionId) { + await this.handleError( + operationId, + `Invalid assertion id for asset ${ual}. Received value from blockchain: ${blockchainAssertionId}, received value from request: ${assertionId}`, + this.errorType, + true, + ); + return Command.empty(); + } } + + await this.operationService.validateAssertion(assertionId, operationId); + await this.operationIdService.updateOperationIdStatus( + operationId, + OPERATION_ID_STATUS.PUBLISH.VALIDATING_ASSERTION_END, + ); + return this.continueSequence( + { ...command.data, retry: undefined, period: undefined }, + command.sequence, + ); } async retryFinished(command) { const { ual, operationId } = command.data; await this.handleError( operationId, - `Retry count for command: ${command.name} reached! Unable to validate ual: ${ual}`, + `Max retry count for command: ${command.name} reached! Unable to validate ual: ${ual}`, this.errorType, true, ); diff --git a/src/constants/constants.js b/src/constants/constants.js index fc1b447c66..362542ce88 100644 --- a/src/constants/constants.js +++ b/src/constants/constants.js @@ -324,16 +324,6 @@ exports.GET_REQUEST_STATUS = { COMPLETED: 'COMPLETED', }; -/** - * @constant {object} PUBLISH_METHOD - - * Possible methods for publish - */ -exports.PUBLISH_METHOD = { - PUBLISH: 'PUBLISH', - PROVISION: 'PROVISION', - UPDATE: 'UPDATE', -}; - /** * Local query types * @type {{CONSTRUCT: string, SELECT: string}} diff --git a/src/controller/v1/base-controller.js b/src/controller/v1/base-controller.js index db2a05f2de..006abb4d7b 100644 --- a/src/controller/v1/base-controller.js +++ b/src/controller/v1/base-controller.js @@ -1,21 +1,11 @@ -const { v1: uuidv1 } = require('uuid'); - class BaseController { constructor(ctx) { - this.repositoryModuleManager = ctx.repositoryModuleManager; - this.fileService = ctx.fileService; this.logger = ctx.logger; } returnResponse(res, status, data) { res.status(status).send(data); } - - generateOperationId() { - const operationId = uuidv1(); - this.logger.debug(`Generated operation id for request ${operationId}`); - return operationId; - } } module.exports = BaseController; diff --git a/src/controller/v1/get-controller.js b/src/controller/v1/get-controller.js index a7f280bff9..e3d734388c 100644 --- a/src/controller/v1/get-controller.js +++ b/src/controller/v1/get-controller.js @@ -7,6 +7,7 @@ class GetController extends BaseController { this.commandExecutor = ctx.commandExecutor; this.operationIdService = ctx.operationIdService; this.getService = ctx.getService; + this.repositoryModuleManager = ctx.repositoryModuleManager; } async handleHttpApiGetRequest(req, res) { diff --git a/src/controller/v1/publish-controller.js b/src/controller/v1/publish-controller.js index 0a849487c4..ab85a123ac 100644 --- a/src/controller/v1/publish-controller.js +++ b/src/controller/v1/publish-controller.js @@ -1,30 +1,17 @@ const BaseController = require('./base-controller'); -const { PUBLISH_METHOD, ERROR_TYPE, NETWORK_MESSAGE_TYPES } = require('../../constants/constants'); +const { ERROR_TYPE, NETWORK_MESSAGE_TYPES, PUBLISH_TYPES } = require('../../constants/constants'); const { OPERATION_ID_STATUS } = require('../../constants/constants'); class PublishController extends BaseController { constructor(ctx) { super(ctx); - this.publishService = ctx.publishService; - this.ualService = ctx.ualService; + this.operationService = ctx.publishService; this.commandExecutor = ctx.commandExecutor; this.operationIdService = ctx.operationIdService; this.repositoryModuleManager = ctx.repositoryModuleManager; } async handleHttpApiPublishRequest(req, res) { - return this.handleHttpApiPublishMethod(req, res, PUBLISH_METHOD.PUBLISH); - } - - handleHttpApiProvisionRequest(req, res) { - return this.handleHttpApiPublishMethod(req, res, PUBLISH_METHOD.PROVISION); - } - - handleHttpApiUpdateRequest(req, res) { - return this.handleHttpApiPublishMethod(req, res, PUBLISH_METHOD.UPDATE); - } - - async handleHttpApiPublishMethod(req, res) { const operationId = await this.operationIdService.generateOperationId( OPERATION_ID_STATUS.PUBLISH.PUBLISH_START, ); @@ -38,26 +25,26 @@ class PublishController extends BaseController { operationId, }); - const { assertion, blockchain, contract, tokenId } = req.body; await this.operationIdService.updateOperationIdStatus( operationId, OPERATION_ID_STATUS.PUBLISH.PUBLISH_INIT_END, ); - try { - await this.repositoryModuleManager.createOperationRecord( - this.publishService.getOperationName(), - operationId, - this.publishService.getOperationStatus().IN_PROGRESS, - ); - await this.operationIdService.cacheOperationIdData(operationId, { assertion }); - - const ual = this.ualService.deriveUAL(blockchain, contract, tokenId); + const { assertion } = req.body; + try { + await Promise.all([ + this.repositoryModuleManager.createOperationRecord( + this.operationService.getOperationName(), + operationId, + this.operationService.getOperationStatus().IN_PROGRESS, + ), + this.operationIdService.cacheOperationIdData(operationId, { assertion }), + ]); - this.logger.info(`Received assertion with ual: ${ual}`); + this.logReceivedAssertionMessage(req.body); const commandData = { - ual, + ...req.body, operationId, }; @@ -87,16 +74,28 @@ class PublishController extends BaseController { async handleNetworkStoreRequest(message, remotePeerId) { const { operationId, keywordUuid, messageType } = message.header; - const { assertionId, ual } = message.data; + const { publishType, assertionId, blockchain, contract } = message.data; + let commandData = { + remotePeerId, + operationId, + keywordUuid, + publishType, + assertionId, + blockchain, + contract, + }; + if (publishType === PUBLISH_TYPES.ASSET || PUBLISH_TYPES.INDEX) { + commandData = { ...commandData, tokenId: message.data.tokenId }; + } const command = { sequence: [], delay: 0, - data: { remotePeerId, operationId, keywordUuid, assertionId, ual }, + data: commandData, transactional: false, }; switch (messageType) { case NETWORK_MESSAGE_TYPES.REQUESTS.PROTOCOL_INIT: - command.name = 'handleStoreInitCommand'; + command.name = 'handlePublishInitCommand'; command.period = 5000; command.retries = 3; @@ -109,15 +108,34 @@ class PublishController extends BaseController { assertionId: cachedAssertionId, assertion: message.data.assertion, }); - command.name = 'handleStoreRequestCommand'; + command.name = 'handlePublishRequestCommand'; + command.data.keyword = message.data.keyword; break; default: - throw Error('unknown messageType'); + throw Error('unknown message type'); } await this.commandExecutor.add(command); } + + logReceivedAssertionMessage(requestBody) { + const { publishType, assertionId, blockchain, contract } = requestBody; + let receivedAssertionMessage = `Received ${publishType} with assertion id: ${assertionId}, blockchain: ${blockchain}, hub contract: ${contract}`; + switch (publishType) { + case PUBLISH_TYPES.ASSERTION: + break; + case PUBLISH_TYPES.ASSET: + receivedAssertionMessage += `, token id: ${requestBody.tokenId}`; + break; + case PUBLISH_TYPES.INDEX: + receivedAssertionMessage += `, token id: ${requestBody.tokenId}, keywords: ${requestBody.keywords}`; + break; + default: + throw Error(`Unknown publish type ${publishType}`); + } + this.logger.info(receivedAssertionMessage); + } } module.exports = PublishController; diff --git a/src/logger/logger.js b/src/logger/logger.js index ea5972c46b..ec9c5cdb3d 100644 --- a/src/logger/logger.js +++ b/src/logger/logger.js @@ -1,45 +1,32 @@ const pino = require('pino'); -const path = require('path'); -const { existsSync } = require('fs'); -const { mkdirpSync } = require('fs-extra'); +const pretty = require('pino-pretty'); class Logger { - constructor(logLevel = 'trace', telemetryHubEnabled) { + constructor(logLevel = 'trace') { this.logLevel = logLevel; - this.initialize(logLevel, telemetryHubEnabled); + this.initialize(logLevel); } - initialize(logLevel, telemetryHubEnabled) { + initialize(logLevel) { try { - const logFilename = path.join(path.resolve(__dirname, '../../'), 'logs/active.log'); - const logDirname = path.join(path.resolve(__dirname, '../../'), 'logs'); - if (!existsSync(logDirname)) { - mkdirpSync(logDirname); - } - const chosenTargets = [ + const stream = pretty({ + colorize: true, + level: this.logLevel, + translateTime: 'yyyy-mm-dd HH:MM:ss', + ignore: 'pid,hostname,Event_name,Operation_name,Id_operation', + hideObject: true, + messageFormat: (log, messageKey) => `${log[messageKey]}`, + }); + this.pinoLogger = pino( { - target: './pino-pretty-transport', - options: { colorize: true }, - level: this.logLevel, - }, - ]; - if (telemetryHubEnabled) { - chosenTargets.push({ - target: 'pino/file', - level: this.logLevel, - options: { destination: logFilename }, - }); - } - this.pinoLogger = pino({ - transport: { - targets: chosenTargets, + customLevels: { + emit: 15, + api: 25, + }, + level: logLevel, }, - customLevels: { - emit: 15, - api: 25, - }, - level: logLevel, - }); + stream, + ); } catch (e) { // eslint-disable-next-line no-console console.error(`Failed to create logger. Error message: ${e.message}`); diff --git a/src/logger/pino-pretty-transport.js b/src/logger/pino-pretty-transport.js deleted file mode 100644 index d8624d8bb7..0000000000 --- a/src/logger/pino-pretty-transport.js +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-disable global-require */ -module.exports = (opts) => - require('pino-pretty')({ - ...opts, - translateTime: 'yyyy-mm-dd HH:MM:ss', - ignore: 'pid,hostname,Event_name,Operation_name,Id_operation', - hideObject: true, - messageFormat: (log, messageKey) => `${log[messageKey]}`, - }); diff --git a/src/modules/blockchain/implementation/ot-parachain/ot-parachain-service.js b/src/modules/blockchain/implementation/ot-parachain/ot-parachain-service.js index 3fb02be020..d1659c47a4 100644 --- a/src/modules/blockchain/implementation/ot-parachain/ot-parachain-service.js +++ b/src/modules/blockchain/implementation/ot-parachain/ot-parachain-service.js @@ -1,5 +1,4 @@ const { ApiPromise, WsProvider } = require('@polkadot/api'); -const { Keyring } = require('@polkadot/keyring'); const Web3Service = require('../web3-service'); const NATIVE_TOKEN_DECIMALS = 12; @@ -39,49 +38,6 @@ class OtParachainService extends Web3Service { } } - async initializeEvmAccounts() { - const { - substrateOperationalWalletPrivateKey, - substrateManagementWalletPrivateKey, - evmOperationalWalletPublicKey, - evmOperationalWalletPrivateKey, - evmManagementWalletPublicKey, - evmManagementWalletPrivateKey, - } = this.config; - - await Promise.all([ - this.bindEvmAccount( - evmOperationalWalletPublicKey, - evmOperationalWalletPrivateKey, - substrateOperationalWalletPrivateKey, - ), - this.bindEvmAccount( - evmManagementWalletPublicKey, - evmManagementWalletPrivateKey, - substrateManagementWalletPrivateKey, - ), - ]); - } - - async bindEvmAccount(evmPublicKey, evmPrivateKey, substratePrivateKey) { - let account = await this.queryParachainState('evmAccounts', 'accounts', [evmPublicKey]); - - if (account.toHex() === '0x') { - const { signature } = await this.web3.eth.accounts.sign(evmPublicKey, evmPrivateKey); - const keyring = new Keyring({ type: 'sr25519' }); - account = await this.callParachainExtrinsic( - keyring.createFromUri(substratePrivateKey), - 'evmAccounts', - 'claimAccount', - [evmPublicKey, signature], - ); - } - - if (account.toHex() === '0x') throw Error('Unable to create account mapping for otp'); - - return account; - } - async callParachainExtrinsic(keyring, extrinsic, method, args) { let result; while (!result) { diff --git a/src/modules/triple-store/implementation/ot-triple-store.js b/src/modules/triple-store/implementation/ot-triple-store.js index 5048eb6015..8dff0df048 100644 --- a/src/modules/triple-store/implementation/ot-triple-store.js +++ b/src/modules/triple-store/implementation/ot-triple-store.js @@ -61,7 +61,7 @@ class OtTripleStore { return true; } - async updateAssetsGraph(ual, assetNquads) { + async insertAsset(ual, assetNquads) { const insertion = ` PREFIX schema: <${SCHEMA_CONTEXT}> DELETE {<${ual}> schema:latestAssertion ?o} @@ -74,7 +74,21 @@ class OtTripleStore { INSERT DATA { GRAPH { ${assetNquads} - } + } + }`; + await this.queryEngine.queryVoid(insertion, this.insertContext); + } + + async insertIndex(keyword, indexNquads, assetNquads) { + const insertion = ` + PREFIX schema: <${SCHEMA_CONTEXT}> + INSERT DATA { + GRAPH { + ${assetNquads} + } + GRAPH { + ${indexNquads} + } }`; await this.queryEngine.queryVoid(insertion, this.insertContext); } diff --git a/src/modules/triple-store/triple-store-module-manager.js b/src/modules/triple-store/triple-store-module-manager.js index 1e021d6bab..8991c07922 100644 --- a/src/modules/triple-store/triple-store-module-manager.js +++ b/src/modules/triple-store/triple-store-module-manager.js @@ -5,15 +5,21 @@ class TripleStoreModuleManager extends BaseModuleManager { return 'tripleStore'; } + async insertAsset(ual, assetNquads) { + if (this.initialized) { + return this.getImplementation().module.insertAsset(ual, assetNquads); + } + } + async insertAssertion(assertionId, assertionNquads) { if (this.initialized) { return this.getImplementation().module.insertAssertion(assertionId, assertionNquads); } } - async updateAssetsGraph(ual, assetNquads) { + async insertIndex(keyword, indexNquads, assetNquads) { if (this.initialized) { - return this.getImplementation().module.updateAssetsGraph(ual, assetNquads); + return this.getImplementation().module.insertIndex(keyword, indexNquads, assetNquads); } } @@ -29,28 +35,6 @@ class TripleStoreModuleManager extends BaseModuleManager { } } - async assertionsByAsset(uri) { - if (this.initialized) { - return this.getImplementation().module.assertionsByAsset(uri); - } - } - - async findAssetsByKeyword(query, options, localQuery) { - if (this.initialized) { - return this.getImplementation().module.findAssetsByKeyword(query, options, localQuery); - } - } - - async findAssertionsByKeyword(query, options, localQuery) { - if (this.initialized) { - return this.getImplementation().module.findAssertionsByKeyword( - query, - options, - localQuery, - ); - } - } - async construct(query) { if (this.initialized) { return this.getImplementation().module.construct(query); @@ -63,12 +47,6 @@ class TripleStoreModuleManager extends BaseModuleManager { } } - async findAssertions(nquads) { - if (this.initialized) { - return this.getImplementation().module.findAssertions(nquads); - } - } - async healthCheck() { if (this.initialized) { return this.getImplementation().module.healthCheck(); diff --git a/src/modules/validation/bytes-utilities.js b/src/modules/validation/bytes-utilities.js deleted file mode 100644 index d9a39cbe66..0000000000 --- a/src/modules/validation/bytes-utilities.js +++ /dev/null @@ -1,108 +0,0 @@ -const BN = require('bn.js'); -const _ = require('underscore'); - -class BytesUtilities { - /** - * Normalizes hex number - * @param number Hex number - * @returns {string|null} Normalized hex number - */ - static normalizeHex(number) { - if (number == null) { - return null; - } - const lowerCaseNumber = number.toLowerCase(); - if (!lowerCaseNumber.startsWith('0x')) { - return `0x${lowerCaseNumber}`; - } - return lowerCaseNumber; - } - - /** - * Denormalizes hex number - * @param number Hex number - * @returns {string|null} Normalized hex number - */ - static denormalizeHex(number) { - if (number == null) { - return null; - } - const lowerCaseNumber = number.toLowerCase(); - if (lowerCaseNumber.startsWith('0x')) { - return lowerCaseNumber.substring(2); - } - return lowerCaseNumber; - } - - /** - * Compare HEX numbers in string representation - * @param hex1 - * @param hex2 - * @return {*} - */ - static compareHexStrings(hex1, hex2) { - const denormalized1 = BytesUtilities.denormalizeHex(hex1); - const denormalized2 = BytesUtilities.denormalizeHex(hex2); - return new BN(denormalized1, 16).eq(new BN(denormalized2, 16)); - } - - static fromNumber(num) { - const hex = num.toString(16); - return hex.length % 2 === 0 ? `0x${hex}` : `0x0${hex}`; - } - - static toNumber(hex) { - return parseInt(hex.slice(2), 16); - } - - static fromString(str) { - const bn = `0x${(str.slice(0, 2) === '0x' - ? new BN(str.slice(2), 16) - : new BN(str, 10) - ).toString('hex')}`; - return bn === '0x0' ? '0x' : bn; - } - - static fromNat(bn) { - const intermediateNumber = bn.length % 2 === 0 ? bn : `0x0${bn.slice(2)}`; - return bn === '0x0' ? '0x' : intermediateNumber; - } - - static pad(l, hex) { - return hex.length === l * 2 + 2 ? hex : BytesUtilities.pad(l, `0x0${hex.slice(2)}`); - } - - static flatten(a) { - return `0x${a.reduce((r, s) => r + s.slice(2), '')}`; - } - - static slice(i, j, bs) { - return `0x${bs.slice(i * 2 + 2, j * 2 + 2)}`; - } - - static length(a) { - return (a.length - 2) / 2; - } - - static isHexStrict(hex) { - return (_.isString(hex) || _.isNumber(hex)) && /^(-)?0x[0-9a-f]*$/i.test(hex); - } - - static hexToBytes(number) { - let hex = number.toString(16); - - if (!BytesUtilities.isHexStrict(hex)) { - throw new Error(`Given value "${hex}" is not a valid hex string.`); - } - - hex = hex.replace(/^0x/i, ''); - let bytes; - let c; - for (bytes = [], c = 0; c < hex.length; c += 2) { - bytes.push(parseInt(hex.substring(c, 2), 16)); - } - return bytes; - } -} - -module.exports = BytesUtilities; diff --git a/src/service/get-service.js b/src/service/get-service.js index c14c26d38e..6550ee0086 100644 --- a/src/service/get-service.js +++ b/src/service/get-service.js @@ -81,7 +81,7 @@ class GetService extends OperationService { this.logger.debug( `Assertion: ${assertionId} for operationId: ${operationId} ${ nquads.length ? '' : 'not' - } found in local database.`, + } found in local triple store.`, ); if (nquads.length) { diff --git a/src/service/publish-service.js b/src/service/publish-service.js index 8fd79b6b22..ea2bdc9d50 100644 --- a/src/service/publish-service.js +++ b/src/service/publish-service.js @@ -85,17 +85,12 @@ class PublishService extends OperationService { } } - async getAssertion(ual) { - this.logger.info(`Getting assertion for ual: ${ual}`); + async getAssertion(blockchain, contract, tokenId) { + const ual = this.ualService.deriveUAL(blockchain, contract, tokenId); - const { blockchain, contract, tokenId } = this.ualService.resolveUAL(ual); - const assertionId = await this.blockchainModuleManager.getLatestCommitHash( - blockchain, - contract, - tokenId, - ); + this.logger.info(`Getting assertion for ual: ${ual}`); - return assertionId; + return this.blockchainModuleManager.getLatestCommitHash(blockchain, contract, tokenId); } async validateAssertion(assertionId, operationId) { @@ -106,35 +101,88 @@ class PublishService extends OperationService { if (assertionId !== calculatedAssertionId) { throw Error( - `Invalid root hash. Received value from blockchain: ${assertionId}, calculated: ${calculatedAssertionId}`, + `Invalid assertion id. Received value from blockchain: ${assertionId}, calculated: ${calculatedAssertionId}`, ); } this.logger.info(`Assertion integrity validated!`); } - async localStore(ual, assertionId, operationId) { + async localStoreIndex(assertionId, blockchain, contract, tokenId, keyword, operationId) { const { assertion } = await this.operationIdService.getCachedOperationIdData(operationId); - const { blockchain, contract, tokenId } = this.ualService.resolveUAL(ual); + const ual = this.ualService.deriveUAL(blockchain, contract, tokenId); - const assertionGraphName = `assertion:${assertionId}`; + // TODO get rank from blockchain + const rank = 1; + const indexNquads = await formatAssertion({ + '@context': SCHEMA_CONTEXT, + '@id': ual, + rank, + metadata: { '@id': `assertion:${assertionId}` }, + }); const assetNquads = await formatAssertion({ '@context': SCHEMA_CONTEXT, '@id': ual, blockchain, contract, tokenId, - assertion: { '@id': assertionGraphName }, - latestAssertion: { '@id': assertionGraphName }, }); - this.logger.info(`Inserting assertion with ual: ${ual} in database.`); + + this.logger.info( + `Inserting index for asset: ${ual}, keyword: ${keyword}, with assertion id: ${assertionId} in triple store.`, + ); + + await Promise.all( + this.tripleStoreModuleManager.insertIndex( + keyword, + indexNquads.join('\n'), + assetNquads.join('\n'), + ), + this.tripleStoreModuleManager.insertAssertion(assertionId, assertion.join('\n')), + ); + + this.logger.info( + `Index for asset: ${ual}, keyword: ${keyword}, with assertion id ${assertionId} has been successfully inserted!`, + ); + } + + async localStoreAssertion(assertionId, operationId) { + const { assertion } = await this.operationIdService.getCachedOperationIdData(operationId); + + this.logger.info(`Inserting assertion with id: ${assertionId} in triple store.`); + + await this.tripleStoreModuleManager.insertAssertion(assertionId, assertion.join('\n')); + + this.logger.info(`Assertion with id ${assertionId} has been successfully inserted!`); + } + + async localStoreAsset(assertionId, blockchain, contract, tokenId, operationId) { + const { assertion } = await this.operationIdService.getCachedOperationIdData(operationId); + const ual = this.ualService.deriveUAL(blockchain, contract, tokenId); + + const assetNquads = await formatAssertion({ + '@context': SCHEMA_CONTEXT, + '@id': ual, + blockchain, + contract, + tokenId, + assertion: { '@id': `assertion:${assertionId}` }, + latestAssertion: { '@id': `assertion:${assertionId}` }, + }); + + this.logger.info( + `Inserting asset with assertion id: ${assertionId}, ual: ${ual} in triple store.`, + ); + await Promise.all([ - this.tripleStoreModuleManager.updateAssetsGraph(ual, assetNquads.join('\n')), + this.tripleStoreModuleManager.insertAsset(ual, assetNquads.join('\n')), this.tripleStoreModuleManager.insertAssertion(assertionId, assertion.join('\n')), ]); - this.logger.info(`Assertion ${ual} has been successfully inserted!`); + this.logger.info( + `Asset with assertion id: ${assertionId}, ual: ${ual} has been successfully inserted!`, + ); } } diff --git a/tools/local-network-setup/.bootstrap_origintrail_noderc b/tools/local-network-setup/.bootstrap_origintrail_noderc index a66d4d7127..466adf4509 100644 --- a/tools/local-network-setup/.bootstrap_origintrail_noderc +++ b/tools/local-network-setup/.bootstrap_origintrail_noderc @@ -45,14 +45,14 @@ ], "evmOperationalWalletPublicKey": "0xd6879C0A03aDD8cFc43825A42a3F3CF44DB7D2b9", "evmOperationalWalletPrivateKey": "0x02b39cac1532bef9dba3e36ec32d3de1e9a88f1dda597d3ac6e2130aed9adc4e", - "evmManagementWalletPublicKey": "0x64B592e8e9AF51Eb0DBa5d4c18b817C01e8e75a8" + "evmManagementWalletPublicKey": "0xBaF76aC0d0ef9a2FFF76884d54C9D3e270290a43" } }, "otp": { "config": { "evmOperationalWalletPublicKey": "0xd6879C0A03aDD8cFc43825A42a3F3CF44DB7D2b9", "evmOperationalWalletPrivateKey": "0x02b39cac1532bef9dba3e36ec32d3de1e9a88f1dda597d3ac6e2130aed9adc4e", - "evmManagementWalletPublicKey": "0x64B592e8e9AF51Eb0DBa5d4c18b817C01e8e75a8" + "evmManagementWalletPublicKey": "0xBaF76aC0d0ef9a2FFF76884d54C9D3e270290a43" } }, "polygon": { @@ -65,7 +65,7 @@ ], "evmOperationalWalletPublicKey": "0xd6879C0A03aDD8cFc43825A42a3F3CF44DB7D2b9", "evmOperationalWalletPrivateKey": "0x02b39cac1532bef9dba3e36ec32d3de1e9a88f1dda597d3ac6e2130aed9adc4e", - "evmManagementWalletPublicKey": "0x64B592e8e9AF51Eb0DBa5d4c18b817C01e8e75a8" + "evmManagementWalletPublicKey": "0xBaF76aC0d0ef9a2FFF76884d54C9D3e270290a43" } } }