diff --git a/.eslintrc b/.eslintrc index e8842b69..8c78401f 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,10 +1,10 @@ { "root": true, "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint", - "prettier" - ], + "plugins": ["@typescript-eslint", "prettier"], + "parserOptions": { + "project": ["tsconfig.json"] + }, "extends": [ "eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", @@ -12,8 +12,9 @@ "prettier" ], "rules": { - "no-console": 1, // Means warning - "prettier/prettier": 2 // Means error + "no-console": 1, // Means warning + "prettier/prettier": 2, // Means error + "@typescript-eslint/no-floating-promises": ["error"] }, "ignorePatterns": ["dist", "node_modules"] } diff --git a/package-lock.json b/package-lock.json index 2fbc3e4c..03f6408f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "@0xpolygonid/js-sdk", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@0xpolygonid/js-sdk", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "license": "AGPL-3.0", "dependencies": { - "@iden3/js-crypto": "1.0.0-beta.0", - "@iden3/js-iden3-core": "1.0.0-beta.0", - "@iden3/js-jsonld-merklization": "1.0.0-beta.3", + "@iden3/js-crypto": "1.0.0-beta.1", + "@iden3/js-iden3-core": "1.0.0-beta.2", + "@iden3/js-jsonld-merklization": "1.0.0-beta.6", "@iden3/js-jwz": "1.0.0-beta.2", - "@iden3/js-merkletree": "1.0.0-beta.0", + "@iden3/js-merkletree": "1.0.0-beta.2", "@lumeweb/js-sha3-browser": "^0.8.1", "ajv": "^6.12.6", "axios": "^1.2.1", @@ -23,6 +23,7 @@ "crypto-browserify": "^3.12.0", "ethers": "^5.7.2", "ffjavascript": "^0.2.57", + "idb-keyval": "^6.2.0", "ipfs-http-client": "56.0.3", "rfc4648": "^1.5.2", "snarkjs": "^0.5.0", @@ -100,16 +101,72 @@ "esbuild": "*" } }, + "node_modules/@esbuild/android-arm": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.18.tgz", + "integrity": "sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.18.tgz", + "integrity": "sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz", + "integrity": "sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.0.tgz", + "integrity": "sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", - "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", + "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", "dev": true, "peer": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", + "espree": "^9.5.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -144,6 +201,16 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/@eslint/js": { + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", + "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", + "dev": true, + "peer": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@ethersproject/abi": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", @@ -866,31 +933,31 @@ } }, "node_modules/@iden3/js-crypto": { - "version": "1.0.0-beta.0", - "resolved": "https://registry.npmjs.org/@iden3/js-crypto/-/js-crypto-1.0.0-beta.0.tgz", - "integrity": "sha512-T+aC/MInoAPhutGTSCIUN7dwSS72C4QrXF0Cjd5OlQdlv7HpamFRo4ma+trMGSIwgCvhmjDrslP4uhSMxWLYww==", + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/@iden3/js-crypto/-/js-crypto-1.0.0-beta.1.tgz", + "integrity": "sha512-axRGUuHJsLrPksjPZY+5ZFncWPUyo8Inhqh+gNLkxEbMKp0wo7TK4p0KNv9mDKqtNMP3A/MpeqDX/FbFTWfkPw==", "dependencies": { "blake-hash": "^2.0.0", "ffjavascript": "^0.2.57" } }, "node_modules/@iden3/js-iden3-core": { - "version": "1.0.0-beta.0", - "resolved": "https://registry.npmjs.org/@iden3/js-iden3-core/-/js-iden3-core-1.0.0-beta.0.tgz", - "integrity": "sha512-+xxJcKFDJuz5hLMIDGxeC8w+TPeOqndgphnqGviGR0H4jlXs9xmdQUarH+x6IEndhn3Y7MbpXEnNBnA6xIZCTQ==", + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@iden3/js-iden3-core/-/js-iden3-core-1.0.0-beta.2.tgz", + "integrity": "sha512-1nQQa1NavQ2+6REmpVG7kawN+P4PmSFKYwDK/UIcQl94oNMgwfQm0ygVwWePVGqHrQSlidD9mH7C874tJlXzJA==", "dependencies": { - "@iden3/js-crypto": "1.0.0-beta.0", + "@iden3/js-crypto": "1.0.0-beta.1", "base58-js": "^1.0.4", "cross-sha256": "^1.2.0" } }, "node_modules/@iden3/js-jsonld-merklization": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@iden3/js-jsonld-merklization/-/js-jsonld-merklization-1.0.0-beta.3.tgz", - "integrity": "sha512-HGau5bd7L4PbA5zVQp4NROnYVjkg7vs49H5/81WvffMyMHAY8mZj//Y7w5o3s+64Ox7wU6Z/WZRXxP6K0DNeUw==", + "version": "1.0.0-beta.6", + "resolved": "https://registry.npmjs.org/@iden3/js-jsonld-merklization/-/js-jsonld-merklization-1.0.0-beta.6.tgz", + "integrity": "sha512-Wtu843yXOoaq2e5O9Dd8g/BQcX1bS036l7jdvcsuvNNPkj2YnCmrx0wHQf6F9aTCCt2QHBJvIX8UhHZACi5cmw==", "dependencies": { - "@iden3/js-crypto": "v1.0.0-beta.0", - "@iden3/js-merkletree": "v1.0.0-beta.0", + "@iden3/js-crypto": "1.0.0-beta.1", + "@iden3/js-merkletree": "1.0.0-beta.2", "jsonld": "8.1.0", "jsonld-context-parser": "^2.2.2", "n3": "^1.16.3", @@ -912,7 +979,26 @@ "snarkjs": "0.5.0" } }, - "node_modules/@iden3/js-merkletree": { + "node_modules/@iden3/js-jwz/node_modules/@iden3/js-crypto": { + "version": "1.0.0-beta.0", + "resolved": "https://registry.npmjs.org/@iden3/js-crypto/-/js-crypto-1.0.0-beta.0.tgz", + "integrity": "sha512-T+aC/MInoAPhutGTSCIUN7dwSS72C4QrXF0Cjd5OlQdlv7HpamFRo4ma+trMGSIwgCvhmjDrslP4uhSMxWLYww==", + "dependencies": { + "blake-hash": "^2.0.0", + "ffjavascript": "^0.2.57" + } + }, + "node_modules/@iden3/js-jwz/node_modules/@iden3/js-iden3-core": { + "version": "1.0.0-beta.0", + "resolved": "https://registry.npmjs.org/@iden3/js-iden3-core/-/js-iden3-core-1.0.0-beta.0.tgz", + "integrity": "sha512-+xxJcKFDJuz5hLMIDGxeC8w+TPeOqndgphnqGviGR0H4jlXs9xmdQUarH+x6IEndhn3Y7MbpXEnNBnA6xIZCTQ==", + "dependencies": { + "@iden3/js-crypto": "1.0.0-beta.0", + "base58-js": "^1.0.4", + "cross-sha256": "^1.2.0" + } + }, + "node_modules/@iden3/js-jwz/node_modules/@iden3/js-merkletree": { "version": "1.0.0-beta.0", "resolved": "https://registry.npmjs.org/@iden3/js-merkletree/-/js-merkletree-1.0.0-beta.0.tgz", "integrity": "sha512-1CGhecr4TgD8/jbTKO0cONj/poDVd2tToVSnu4XKjWlUTbuxw1CZEL7yi3g0V5nuhFuAGqcIZhCZmVucBdYxsw==", @@ -920,6 +1006,15 @@ "@iden3/js-crypto": "1.0.0-beta.0" } }, + "node_modules/@iden3/js-merkletree": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@iden3/js-merkletree/-/js-merkletree-1.0.0-beta.2.tgz", + "integrity": "sha512-7Q9QnvHSZOZw9vNa7OWsc7Y+gmnHFAGLFo0l1PlaUlNHz1Yji/CFDPcCR6/LuYvvGfyMkn4BIcbu0tWtiIA+SQ==", + "dependencies": { + "@iden3/js-crypto": "1.0.0-beta.1", + "idb-keyval": "^6.2.0" + } + }, "node_modules/@ipld/dag-cbor": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/@ipld/dag-cbor/-/dag-cbor-7.0.3.tgz", @@ -1013,9 +1108,9 @@ "integrity": "sha512-eHKfv4NzuqTYBk2Hn1IVb/vVUd5+g8xqcXZumwqp2FH5hwv02f9cyhpV8ZQRU9IOhBidddFktbB6r/ifKhWnlw==" }, "node_modules/@microsoft/api-documenter": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.21.5.tgz", - "integrity": "sha512-RTYtqbNqlPvDSqYV2ZCNWSajSieXG58mG1w4MFkHdHhxhWbC9FHqQk7MwIMUKBQBNagW3rE/11Jv5cV0TXuW2Q==", + "version": "7.21.6", + "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.21.6.tgz", + "integrity": "sha512-Z7orii4J9nsPfiehngONhKHQJwqfHaqwr8CvhHkgeK1jf1stECBMaej/+iKw/+KzXpP9eDdJDEGCnMprxU0kjg==", "dev": true, "dependencies": { "@microsoft/api-extractor-model": "7.26.4", @@ -1288,9 +1383,9 @@ } }, "node_modules/@types/eslint": { - "version": "8.21.1", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.1.tgz", - "integrity": "sha512-rc9K8ZpVjNcLs8Fp0dkozd5Pt2Apk1glO4Vgz8ix1u6yFByxfqo5Yavpy65o+93TAe24jr7v+eSBtFLvOQtCRQ==", + "version": "8.21.3", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.3.tgz", + "integrity": "sha512-fa7GkppZVEByMWGbTtE5MbmXWJTVbrjjaS8K6uQj+XtuuUv1fsuPAxhygfqLmsb/Ufb3CV8deFCpiMfAgi00Sw==", "dev": true, "peer": true, "dependencies": { @@ -1347,9 +1442,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.14.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.0.tgz", - "integrity": "sha512-5EWrvLmglK+imbCJY0+INViFWUHg1AHel1sq4ZVSfdcNqGy9Edv3UB9IIzzg+xPaUcAgZYcfVs2fBcwDeZzU0A==" + "version": "18.15.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz", + "integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw==" }, "node_modules/@types/semver": { "version": "7.3.13", @@ -1358,19 +1453,19 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.52.0.tgz", - "integrity": "sha512-lHazYdvYVsBokwCdKOppvYJKaJ4S41CgKBcPvyd0xjZNbvQdhn/pnJlGtQksQ/NhInzdaeaSarlBjDXHuclEbg==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.55.0.tgz", + "integrity": "sha512-IZGc50rtbjk+xp5YQoJvmMPmJEYoC53SiKPXyqWfv15XoD2Y5Kju6zN0DwlmaGJp1Iw33JsWJcQ7nw0lGCGjVg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/type-utils": "5.52.0", - "@typescript-eslint/utils": "5.52.0", + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.55.0", + "@typescript-eslint/type-utils": "5.55.0", + "@typescript-eslint/utils": "5.55.0", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", - "regexpp": "^3.2.0", "semver": "^7.3.7", "tsutils": "^3.21.0" }, @@ -1392,15 +1487,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.52.0.tgz", - "integrity": "sha512-e2KiLQOZRo4Y0D/b+3y08i3jsekoSkOYStROYmPUnGMEoA0h+k2qOH5H6tcjIc68WDvGwH+PaOrP1XRzLJ6QlA==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.55.0.tgz", + "integrity": "sha512-ppvmeF7hvdhUUZWSd2EEWfzcFkjJzgNQzVST22nzg958CR+sphy8A6K7LXQZd6V75m1VKjp+J4g/PCEfSCmzhw==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/typescript-estree": "5.52.0", + "@typescript-eslint/scope-manager": "5.55.0", + "@typescript-eslint/types": "5.55.0", + "@typescript-eslint/typescript-estree": "5.55.0", "debug": "^4.3.4" }, "engines": { @@ -1420,13 +1515,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.52.0.tgz", - "integrity": "sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.55.0.tgz", + "integrity": "sha512-OK+cIO1ZGhJYNCL//a3ROpsd83psf4dUJ4j7pdNVzd5DmIk+ffkuUIX2vcZQbEW/IR41DYsfJTB19tpCboxQuw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0" + "@typescript-eslint/types": "5.55.0", + "@typescript-eslint/visitor-keys": "5.55.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1437,13 +1532,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.52.0.tgz", - "integrity": "sha512-tEKuUHfDOv852QGlpPtB3lHOoig5pyFQN/cUiZtpw99D93nEBjexRLre5sQZlkMoHry/lZr8qDAt2oAHLKA6Jw==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.55.0.tgz", + "integrity": "sha512-ObqxBgHIXj8rBNm0yh8oORFrICcJuZPZTqtAFh0oZQyr5DnAHZWfyw54RwpEEH+fD8suZaI0YxvWu5tYE/WswA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.52.0", - "@typescript-eslint/utils": "5.52.0", + "@typescript-eslint/typescript-estree": "5.55.0", + "@typescript-eslint/utils": "5.55.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1464,9 +1559,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.52.0.tgz", - "integrity": "sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.55.0.tgz", + "integrity": "sha512-M4iRh4AG1ChrOL6Y+mETEKGeDnT7Sparn6fhZ5LtVJF1909D5O4uqK+C5NPbLmpfZ0XIIxCdwzKiijpZUOvOug==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1477,13 +1572,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.52.0.tgz", - "integrity": "sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.55.0.tgz", + "integrity": "sha512-I7X4A9ovA8gdpWMpr7b1BN9eEbvlEtWhQvpxp/yogt48fy9Lj3iE3ild/1H3jKBBIYj5YYJmS2+9ystVhC7eaQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0", + "@typescript-eslint/types": "5.55.0", + "@typescript-eslint/visitor-keys": "5.55.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1504,18 +1599,18 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.52.0.tgz", - "integrity": "sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.55.0.tgz", + "integrity": "sha512-FkW+i2pQKcpDC3AY6DU54yl8Lfl14FVGYDgBTyGKB75cCwV3KpkpTMFi9d9j2WAJ4271LR2HeC5SEWF/CZmmfw==", "dev": true, "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/typescript-estree": "5.52.0", + "@typescript-eslint/scope-manager": "5.55.0", + "@typescript-eslint/types": "5.55.0", + "@typescript-eslint/typescript-estree": "5.55.0", "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0", "semver": "^7.3.7" }, "engines": { @@ -1530,12 +1625,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.52.0.tgz", - "integrity": "sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.55.0.tgz", + "integrity": "sha512-q2dlHHwWgirKh1D3acnuApXG+VNXpEY5/AwRxDVuEQpxWaB0jCDe0jFMVMALJ3ebSfuOVE8/rMS+9ZOYGg1GWw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.52.0", + "@typescript-eslint/types": "5.55.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -1913,9 +2008,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.3.tgz", - "integrity": "sha512-eYq77dYIFS77AQlhzEL937yUBSepBfPIe8FcgEDN35vMNZKMrs81pgnyrQpwfy4NF4b4XWX1Zgx7yX+25w8QJA==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", + "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -1936,9 +2031,9 @@ } }, "node_modules/b4a": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.1.tgz", - "integrity": "sha512-AsKjNhz72yxteo/0EtQEiwkMUgk/tGmycXlbG4g3Ard2/ULtNLUykGOkeK0egmN27h0xMAhb76jYccW+XTBExA==" + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.3.tgz", + "integrity": "sha512-aX6/FqpWQve8VN9kyTExy7GlmwNShvxcCWWD5QVR3ZbRlyBGtCrG5Autu95xxSPH4CRs+5PSV4d7PRnWpmqFlA==" }, "node_modules/balanced-match": { "version": "1.0.2", @@ -2252,9 +2347,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001457", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001457.tgz", - "integrity": "sha512-SDIV6bgE1aVbK6XyxdURbUE89zY7+k1BBBaOwYwkNCglXlel/E7mELiHC64HQ+W0xSKlqWhV9Wh7iHxUjMs4fA==", + "version": "1.0.30001468", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001468.tgz", + "integrity": "sha512-zgAo8D5kbOyUcRAgSmgyuvBkjrGk5CGYG5TYgFdpQv+ywcyEpo1LOWoG8YmoflGnh+V+UsNuKYedsoYs0hzV5A==", "dev": true, "funding": [ { @@ -2274,9 +2369,9 @@ "integrity": "sha512-0CNTVCLZggSh7bc5VkX5WWPWO+cyZbNd07IHIsSXLia/eAq+r836hgk+8BKoEh7949Mda87VUOitx5OddVj64A==" }, "node_modules/cborg": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/cborg/-/cborg-1.10.0.tgz", - "integrity": "sha512-/eM0JCaL99HDHxjySNQJLaolZFVdl6VA0/hEKIoiQPcQzE5LrG5QHdml0HaBt31brgB9dNe1zMr3f8IVrpotRQ==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/cborg/-/cborg-1.10.1.tgz", + "integrity": "sha512-et6Qm8MOUY2kCWa5GKk2MlBVoPjHv0hQBmlzI/Z7+5V3VJCeIkGehIB3vWknNsm2kOkAIs6wEKJFJo8luWQQ/w==", "bin": { "cborg": "cli.js" } @@ -2732,9 +2827,9 @@ } }, "node_modules/ejs": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", - "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", + "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", "dependencies": { "jake": "^10.8.5" }, @@ -2757,9 +2852,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.302", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.302.tgz", - "integrity": "sha512-Uk7C+7aPBryUR1Fwvk9VmipBcN9fVsqBO57jV2ZjTm+IZ6BMNqu7EDVEg2HxCNufk6QcWlFsBkhQyQroB2VWKw==", + "version": "1.4.333", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.333.tgz", + "integrity": "sha512-YyE8+GKyGtPEP1/kpvqsdhD6rA/TP1DUFDN4uiU/YI52NzDxmwHkEb3qjId8hLBa5siJvG0sfC3O66501jMruQ==", "dev": true, "peer": true }, @@ -2858,6 +2953,54 @@ "esbuild-windows-arm64": "0.15.18" } }, + "node_modules/esbuild-android-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.18.tgz", + "integrity": "sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-android-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.18.tgz", + "integrity": "sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.18.tgz", + "integrity": "sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/esbuild-darwin-arm64": { "version": "0.15.18", "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.18.tgz", @@ -2874,6 +3017,262 @@ "node": ">=12" } }, + "node_modules/esbuild-freebsd-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.18.tgz", + "integrity": "sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.18.tgz", + "integrity": "sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-32": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.18.tgz", + "integrity": "sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz", + "integrity": "sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.18.tgz", + "integrity": "sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.18.tgz", + "integrity": "sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-mips64le": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.18.tgz", + "integrity": "sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-ppc64le": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.18.tgz", + "integrity": "sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-riscv64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.18.tgz", + "integrity": "sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-s390x": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.18.tgz", + "integrity": "sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-netbsd-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.18.tgz", + "integrity": "sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-openbsd-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.18.tgz", + "integrity": "sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-sunos-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.18.tgz", + "integrity": "sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-32": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.18.tgz", + "integrity": "sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.18.tgz", + "integrity": "sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.18.tgz", + "integrity": "sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -2896,13 +3295,16 @@ } }, "node_modules/eslint": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.34.0.tgz", - "integrity": "sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", + "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", "dev": true, "peer": true, "dependencies": { - "@eslint/eslintrc": "^1.4.1", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.1", + "@eslint/js": "8.36.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -2913,10 +3315,9 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "espree": "^9.5.0", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", @@ -2937,7 +3338,6 @@ "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" @@ -2953,9 +3353,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz", - "integrity": "sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.7.0.tgz", + "integrity": "sha512-HHVXLSlVUhMSmyW4ZzEuvjpwqamgmlfkutD53cYXLikh4pt/modINRcCIApJ84czDxM4GZInwUrromsDdTImTA==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -2998,33 +3398,6 @@ "node": ">=8.0.0" } }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint-visitor-keys": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", @@ -3092,9 +3465,9 @@ } }, "node_modules/espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", + "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", "dev": true, "peer": true, "dependencies": { @@ -3123,9 +3496,9 @@ } }, "node_modules/esquery": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", - "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "peer": true, "dependencies": { @@ -3649,9 +4022,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "node_modules/grapheme-splitter": { @@ -3748,6 +4121,14 @@ "node": ">=0.10.0" } }, + "node_modules/idb-keyval": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/idb-keyval/-/idb-keyval-6.2.0.tgz", + "integrity": "sha512-uw+MIyQn2jl3+hroD7hF8J7PUviBU7BPKWw4f/ISf32D4LoGu98yHjrzWWJDASu9QNrX10tCJqk9YY0ClWm8Ng==", + "dependencies": { + "safari-14-idb-fix": "^3.0.0" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -4048,9 +4429,9 @@ } }, "node_modules/is-electron": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.1.tgz", - "integrity": "sha512-r8EEQQsqT+Gn0aXFx7lTFygYQhILLCB+wn0WCDL5LZRINeLH/Rvw1j2oKodELLXYNImQ3CRlVsY8wW4cGOsyuw==" + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz", + "integrity": "sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg==" }, "node_modules/is-extglob": { "version": "2.1.1", @@ -4378,9 +4759,9 @@ } }, "node_modules/ky": { - "version": "0.33.2", - "resolved": "https://registry.npmjs.org/ky/-/ky-0.33.2.tgz", - "integrity": "sha512-f6oS2rKUcPu5FzdqCDbFpmzis/JlqFZw8uIHm/jf8Kc3vtnW+VDhuashOAKyBZv8bFiZFZUMNxTC0JtahEvujA==", + "version": "0.33.3", + "resolved": "https://registry.npmjs.org/ky/-/ky-0.33.3.tgz", + "integrity": "sha512-CasD9OCEQSFIam2U8efFK81Yeg8vNMTBUqtMOHlrcWQHqUX3HeCl9Dr31u4toV7emlH8Mymk5+9p0lL6mKb/Xw==", "engines": { "node": ">=14.16" }, @@ -4413,9 +4794,9 @@ } }, "node_modules/ky-universal/node_modules/node-fetch": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", - "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", + "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -5086,9 +5467,9 @@ } }, "node_modules/parse-duration": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-duration/-/parse-duration-1.0.2.tgz", - "integrity": "sha512-Dg27N6mfok+ow1a2rj/nRjtCfaKrHUZV2SJpEn/s8GaVUSlf4GGRCRP1c13Hj+wfPKVMrFDqLMLITkYKgKxyyg==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/parse-duration/-/parse-duration-1.0.3.tgz", + "integrity": "sha512-o6NAh12na5VvR6nFejkU0gpQ8jmOY9Y9sTU2ke3L3G/d/3z8jqmbBbeyBGHU73P4JLXfc7tJARygIK3WGIkloA==" }, "node_modules/path-exists": { "version": "4.0.0", @@ -5187,9 +5568,9 @@ } }, "node_modules/prettier": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", - "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.5.tgz", + "integrity": "sha512-3gzuxrHbKUePRBB4ZeU08VNkUcqEHaUaouNt0m7LGP4Hti/NuB07C7PPTM/LkWqXoJYJn2McEo5+kxPNrtQkLQ==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -5354,9 +5735,9 @@ } }, "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -5386,18 +5767,6 @@ "ms": "^2.1.1" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/relative-to-absolute-iri": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/relative-to-absolute-iri/-/relative-to-absolute-iri-1.0.7.tgz", @@ -5533,6 +5902,11 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safari-14-idb-fix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/safari-14-idb-fix/-/safari-14-idb-fix-3.0.0.tgz", + "integrity": "sha512-eBNFLob4PMq8JA1dGyFn6G97q3/WzNtFK4RnzT1fnLq+9RyrGknzYiM/9B12MnKAxuj1IXr7UKYtTNtjyKMBog==" + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -5834,9 +6208,9 @@ "integrity": "sha512-sMNggMeS6trCgMQuudgFHhX1gtBK3e+AT1zGrMsFYG1wlqtRT5E9rcvm3I1iNlvHpJX/3DO6L4qtWAuEl/T04Q==" }, "node_modules/terser": { - "version": "5.16.4", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.4.tgz", - "integrity": "sha512-5yEGuZ3DZradbogeYQ1NaGz7rXVBDWujWlx1PT8efXO6Txn+eWbfKqB2bTDVmFXmePFkoLU6XI8UektMIEA0ug==", + "version": "5.16.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.6.tgz", + "integrity": "sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg==", "dev": true, "peer": true, "dependencies": { @@ -5853,17 +6227,17 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.6", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", - "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz", + "integrity": "sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==", "dev": true, "peer": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.14", + "@jridgewell/trace-mapping": "^0.3.17", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "terser": "^5.14.1" + "serialize-javascript": "^6.0.1", + "terser": "^5.16.5" }, "engines": { "node": ">= 10.13.0" @@ -5898,6 +6272,16 @@ "@jridgewell/sourcemap-codec": "1.4.14" } }, + "node_modules/terser-webpack-plugin/node_modules/serialize-javascript": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, + "peer": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -6084,9 +6468,9 @@ } }, "node_modules/undici": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.20.0.tgz", - "integrity": "sha512-J3j60dYzuo6Eevbawwp1sdg16k5Tf768bxYK4TUJRH7cBM4kFCbf3mOnM/0E3vQYXvpxITbbWmBafaDbxLDz3g==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.21.0.tgz", + "integrity": "sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA==", "dependencies": { "busboy": "^1.6.0" }, @@ -6217,9 +6601,9 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/webpack": { - "version": "5.75.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", - "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "version": "5.76.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.2.tgz", + "integrity": "sha512-Th05ggRm23rVzEOlX8y67NkYCHa9nTNcwHPBhdg+lKG+mtiW7XgggjAeeLnADAe7mLjJ6LUNfgHAuRRh+Z6J7w==", "dev": true, "peer": true, "dependencies": { @@ -6503,16 +6887,45 @@ "rollup-plugin-node-polyfills": "^0.2.1" } }, + "@esbuild/android-arm": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.18.tgz", + "integrity": "sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.18.tgz", + "integrity": "sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==", + "dev": true, + "optional": true + }, + "@eslint-community/eslint-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz", + "integrity": "sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.0.tgz", + "integrity": "sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==", + "dev": true + }, "@eslint/eslintrc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", - "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", + "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", "dev": true, "peer": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", + "espree": "^9.5.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -6540,6 +6953,13 @@ } } }, + "@eslint/js": { + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", + "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", + "dev": true, + "peer": true + }, "@ethersproject/abi": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", @@ -6952,31 +7372,31 @@ } }, "@iden3/js-crypto": { - "version": "1.0.0-beta.0", - "resolved": "https://registry.npmjs.org/@iden3/js-crypto/-/js-crypto-1.0.0-beta.0.tgz", - "integrity": "sha512-T+aC/MInoAPhutGTSCIUN7dwSS72C4QrXF0Cjd5OlQdlv7HpamFRo4ma+trMGSIwgCvhmjDrslP4uhSMxWLYww==", + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/@iden3/js-crypto/-/js-crypto-1.0.0-beta.1.tgz", + "integrity": "sha512-axRGUuHJsLrPksjPZY+5ZFncWPUyo8Inhqh+gNLkxEbMKp0wo7TK4p0KNv9mDKqtNMP3A/MpeqDX/FbFTWfkPw==", "requires": { "blake-hash": "^2.0.0", "ffjavascript": "^0.2.57" } }, "@iden3/js-iden3-core": { - "version": "1.0.0-beta.0", - "resolved": "https://registry.npmjs.org/@iden3/js-iden3-core/-/js-iden3-core-1.0.0-beta.0.tgz", - "integrity": "sha512-+xxJcKFDJuz5hLMIDGxeC8w+TPeOqndgphnqGviGR0H4jlXs9xmdQUarH+x6IEndhn3Y7MbpXEnNBnA6xIZCTQ==", + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@iden3/js-iden3-core/-/js-iden3-core-1.0.0-beta.2.tgz", + "integrity": "sha512-1nQQa1NavQ2+6REmpVG7kawN+P4PmSFKYwDK/UIcQl94oNMgwfQm0ygVwWePVGqHrQSlidD9mH7C874tJlXzJA==", "requires": { - "@iden3/js-crypto": "1.0.0-beta.0", + "@iden3/js-crypto": "1.0.0-beta.1", "base58-js": "^1.0.4", "cross-sha256": "^1.2.0" } }, "@iden3/js-jsonld-merklization": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@iden3/js-jsonld-merklization/-/js-jsonld-merklization-1.0.0-beta.3.tgz", - "integrity": "sha512-HGau5bd7L4PbA5zVQp4NROnYVjkg7vs49H5/81WvffMyMHAY8mZj//Y7w5o3s+64Ox7wU6Z/WZRXxP6K0DNeUw==", + "version": "1.0.0-beta.6", + "resolved": "https://registry.npmjs.org/@iden3/js-jsonld-merklization/-/js-jsonld-merklization-1.0.0-beta.6.tgz", + "integrity": "sha512-Wtu843yXOoaq2e5O9Dd8g/BQcX1bS036l7jdvcsuvNNPkj2YnCmrx0wHQf6F9aTCCt2QHBJvIX8UhHZACi5cmw==", "requires": { - "@iden3/js-crypto": "v1.0.0-beta.0", - "@iden3/js-merkletree": "v1.0.0-beta.0", + "@iden3/js-crypto": "1.0.0-beta.1", + "@iden3/js-merkletree": "1.0.0-beta.2", "jsonld": "8.1.0", "jsonld-context-parser": "^2.2.2", "n3": "^1.16.3", @@ -6996,14 +7416,44 @@ "ffjavascript": "^0.2.57", "rfc4648": "^1.5.2", "snarkjs": "0.5.0" + }, + "dependencies": { + "@iden3/js-crypto": { + "version": "1.0.0-beta.0", + "resolved": "https://registry.npmjs.org/@iden3/js-crypto/-/js-crypto-1.0.0-beta.0.tgz", + "integrity": "sha512-T+aC/MInoAPhutGTSCIUN7dwSS72C4QrXF0Cjd5OlQdlv7HpamFRo4ma+trMGSIwgCvhmjDrslP4uhSMxWLYww==", + "requires": { + "blake-hash": "^2.0.0", + "ffjavascript": "^0.2.57" + } + }, + "@iden3/js-iden3-core": { + "version": "1.0.0-beta.0", + "resolved": "https://registry.npmjs.org/@iden3/js-iden3-core/-/js-iden3-core-1.0.0-beta.0.tgz", + "integrity": "sha512-+xxJcKFDJuz5hLMIDGxeC8w+TPeOqndgphnqGviGR0H4jlXs9xmdQUarH+x6IEndhn3Y7MbpXEnNBnA6xIZCTQ==", + "requires": { + "@iden3/js-crypto": "1.0.0-beta.0", + "base58-js": "^1.0.4", + "cross-sha256": "^1.2.0" + } + }, + "@iden3/js-merkletree": { + "version": "1.0.0-beta.0", + "resolved": "https://registry.npmjs.org/@iden3/js-merkletree/-/js-merkletree-1.0.0-beta.0.tgz", + "integrity": "sha512-1CGhecr4TgD8/jbTKO0cONj/poDVd2tToVSnu4XKjWlUTbuxw1CZEL7yi3g0V5nuhFuAGqcIZhCZmVucBdYxsw==", + "requires": { + "@iden3/js-crypto": "1.0.0-beta.0" + } + } } }, "@iden3/js-merkletree": { - "version": "1.0.0-beta.0", - "resolved": "https://registry.npmjs.org/@iden3/js-merkletree/-/js-merkletree-1.0.0-beta.0.tgz", - "integrity": "sha512-1CGhecr4TgD8/jbTKO0cONj/poDVd2tToVSnu4XKjWlUTbuxw1CZEL7yi3g0V5nuhFuAGqcIZhCZmVucBdYxsw==", + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@iden3/js-merkletree/-/js-merkletree-1.0.0-beta.2.tgz", + "integrity": "sha512-7Q9QnvHSZOZw9vNa7OWsc7Y+gmnHFAGLFo0l1PlaUlNHz1Yji/CFDPcCR6/LuYvvGfyMkn4BIcbu0tWtiIA+SQ==", "requires": { - "@iden3/js-crypto": "1.0.0-beta.0" + "@iden3/js-crypto": "1.0.0-beta.1", + "idb-keyval": "^6.2.0" } }, "@ipld/dag-cbor": { @@ -7090,9 +7540,9 @@ "integrity": "sha512-eHKfv4NzuqTYBk2Hn1IVb/vVUd5+g8xqcXZumwqp2FH5hwv02f9cyhpV8ZQRU9IOhBidddFktbB6r/ifKhWnlw==" }, "@microsoft/api-documenter": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.21.5.tgz", - "integrity": "sha512-RTYtqbNqlPvDSqYV2ZCNWSajSieXG58mG1w4MFkHdHhxhWbC9FHqQk7MwIMUKBQBNagW3rE/11Jv5cV0TXuW2Q==", + "version": "7.21.6", + "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.21.6.tgz", + "integrity": "sha512-Z7orii4J9nsPfiehngONhKHQJwqfHaqwr8CvhHkgeK1jf1stECBMaej/+iKw/+KzXpP9eDdJDEGCnMprxU0kjg==", "dev": true, "requires": { "@microsoft/api-extractor-model": "7.26.4", @@ -7336,9 +7786,9 @@ } }, "@types/eslint": { - "version": "8.21.1", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.1.tgz", - "integrity": "sha512-rc9K8ZpVjNcLs8Fp0dkozd5Pt2Apk1glO4Vgz8ix1u6yFByxfqo5Yavpy65o+93TAe24jr7v+eSBtFLvOQtCRQ==", + "version": "8.21.3", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.3.tgz", + "integrity": "sha512-fa7GkppZVEByMWGbTtE5MbmXWJTVbrjjaS8K6uQj+XtuuUv1fsuPAxhygfqLmsb/Ufb3CV8deFCpiMfAgi00Sw==", "dev": true, "peer": true, "requires": { @@ -7395,9 +7845,9 @@ "dev": true }, "@types/node": { - "version": "18.14.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.0.tgz", - "integrity": "sha512-5EWrvLmglK+imbCJY0+INViFWUHg1AHel1sq4ZVSfdcNqGy9Edv3UB9IIzzg+xPaUcAgZYcfVs2fBcwDeZzU0A==" + "version": "18.15.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz", + "integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw==" }, "@types/semver": { "version": "7.3.13", @@ -7406,72 +7856,72 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.52.0.tgz", - "integrity": "sha512-lHazYdvYVsBokwCdKOppvYJKaJ4S41CgKBcPvyd0xjZNbvQdhn/pnJlGtQksQ/NhInzdaeaSarlBjDXHuclEbg==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.55.0.tgz", + "integrity": "sha512-IZGc50rtbjk+xp5YQoJvmMPmJEYoC53SiKPXyqWfv15XoD2Y5Kju6zN0DwlmaGJp1Iw33JsWJcQ7nw0lGCGjVg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/type-utils": "5.52.0", - "@typescript-eslint/utils": "5.52.0", + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.55.0", + "@typescript-eslint/type-utils": "5.55.0", + "@typescript-eslint/utils": "5.55.0", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", - "regexpp": "^3.2.0", "semver": "^7.3.7", "tsutils": "^3.21.0" } }, "@typescript-eslint/parser": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.52.0.tgz", - "integrity": "sha512-e2KiLQOZRo4Y0D/b+3y08i3jsekoSkOYStROYmPUnGMEoA0h+k2qOH5H6tcjIc68WDvGwH+PaOrP1XRzLJ6QlA==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.55.0.tgz", + "integrity": "sha512-ppvmeF7hvdhUUZWSd2EEWfzcFkjJzgNQzVST22nzg958CR+sphy8A6K7LXQZd6V75m1VKjp+J4g/PCEfSCmzhw==", "dev": true, "peer": true, "requires": { - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/typescript-estree": "5.52.0", + "@typescript-eslint/scope-manager": "5.55.0", + "@typescript-eslint/types": "5.55.0", + "@typescript-eslint/typescript-estree": "5.55.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.52.0.tgz", - "integrity": "sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.55.0.tgz", + "integrity": "sha512-OK+cIO1ZGhJYNCL//a3ROpsd83psf4dUJ4j7pdNVzd5DmIk+ffkuUIX2vcZQbEW/IR41DYsfJTB19tpCboxQuw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0" + "@typescript-eslint/types": "5.55.0", + "@typescript-eslint/visitor-keys": "5.55.0" } }, "@typescript-eslint/type-utils": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.52.0.tgz", - "integrity": "sha512-tEKuUHfDOv852QGlpPtB3lHOoig5pyFQN/cUiZtpw99D93nEBjexRLre5sQZlkMoHry/lZr8qDAt2oAHLKA6Jw==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.55.0.tgz", + "integrity": "sha512-ObqxBgHIXj8rBNm0yh8oORFrICcJuZPZTqtAFh0oZQyr5DnAHZWfyw54RwpEEH+fD8suZaI0YxvWu5tYE/WswA==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.52.0", - "@typescript-eslint/utils": "5.52.0", + "@typescript-eslint/typescript-estree": "5.55.0", + "@typescript-eslint/utils": "5.55.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.52.0.tgz", - "integrity": "sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.55.0.tgz", + "integrity": "sha512-M4iRh4AG1ChrOL6Y+mETEKGeDnT7Sparn6fhZ5LtVJF1909D5O4uqK+C5NPbLmpfZ0XIIxCdwzKiijpZUOvOug==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.52.0.tgz", - "integrity": "sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.55.0.tgz", + "integrity": "sha512-I7X4A9ovA8gdpWMpr7b1BN9eEbvlEtWhQvpxp/yogt48fy9Lj3iE3ild/1H3jKBBIYj5YYJmS2+9ystVhC7eaQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0", + "@typescript-eslint/types": "5.55.0", + "@typescript-eslint/visitor-keys": "5.55.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -7480,28 +7930,28 @@ } }, "@typescript-eslint/utils": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.52.0.tgz", - "integrity": "sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.55.0.tgz", + "integrity": "sha512-FkW+i2pQKcpDC3AY6DU54yl8Lfl14FVGYDgBTyGKB75cCwV3KpkpTMFi9d9j2WAJ4271LR2HeC5SEWF/CZmmfw==", "dev": true, "requires": { + "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/typescript-estree": "5.52.0", + "@typescript-eslint/scope-manager": "5.55.0", + "@typescript-eslint/types": "5.55.0", + "@typescript-eslint/typescript-estree": "5.55.0", "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0", "semver": "^7.3.7" } }, "@typescript-eslint/visitor-keys": { - "version": "5.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.52.0.tgz", - "integrity": "sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.55.0.tgz", + "integrity": "sha512-q2dlHHwWgirKh1D3acnuApXG+VNXpEY5/AwRxDVuEQpxWaB0jCDe0jFMVMALJ3ebSfuOVE8/rMS+9ZOYGg1GWw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.52.0", + "@typescript-eslint/types": "5.55.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -7831,9 +8281,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "axios": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.3.tgz", - "integrity": "sha512-eYq77dYIFS77AQlhzEL937yUBSepBfPIe8FcgEDN35vMNZKMrs81pgnyrQpwfy4NF4b4XWX1Zgx7yX+25w8QJA==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", + "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -7851,9 +8301,9 @@ } }, "b4a": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.1.tgz", - "integrity": "sha512-AsKjNhz72yxteo/0EtQEiwkMUgk/tGmycXlbG4g3Ard2/ULtNLUykGOkeK0egmN27h0xMAhb76jYccW+XTBExA==" + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.3.tgz", + "integrity": "sha512-aX6/FqpWQve8VN9kyTExy7GlmwNShvxcCWWD5QVR3ZbRlyBGtCrG5Autu95xxSPH4CRs+5PSV4d7PRnWpmqFlA==" }, "balanced-match": { "version": "1.0.2", @@ -8093,9 +8543,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001457", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001457.tgz", - "integrity": "sha512-SDIV6bgE1aVbK6XyxdURbUE89zY7+k1BBBaOwYwkNCglXlel/E7mELiHC64HQ+W0xSKlqWhV9Wh7iHxUjMs4fA==", + "version": "1.0.30001468", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001468.tgz", + "integrity": "sha512-zgAo8D5kbOyUcRAgSmgyuvBkjrGk5CGYG5TYgFdpQv+ywcyEpo1LOWoG8YmoflGnh+V+UsNuKYedsoYs0hzV5A==", "dev": true, "peer": true }, @@ -8105,9 +8555,9 @@ "integrity": "sha512-0CNTVCLZggSh7bc5VkX5WWPWO+cyZbNd07IHIsSXLia/eAq+r836hgk+8BKoEh7949Mda87VUOitx5OddVj64A==" }, "cborg": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/cborg/-/cborg-1.10.0.tgz", - "integrity": "sha512-/eM0JCaL99HDHxjySNQJLaolZFVdl6VA0/hEKIoiQPcQzE5LrG5QHdml0HaBt31brgB9dNe1zMr3f8IVrpotRQ==" + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/cborg/-/cborg-1.10.1.tgz", + "integrity": "sha512-et6Qm8MOUY2kCWa5GKk2MlBVoPjHv0hQBmlzI/Z7+5V3VJCeIkGehIB3vWknNsm2kOkAIs6wEKJFJo8luWQQ/w==" }, "chai": { "version": "4.3.7", @@ -8480,9 +8930,9 @@ } }, "ejs": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", - "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", + "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", "requires": { "jake": "^10.8.5" } @@ -8496,9 +8946,9 @@ } }, "electron-to-chromium": { - "version": "1.4.302", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.302.tgz", - "integrity": "sha512-Uk7C+7aPBryUR1Fwvk9VmipBcN9fVsqBO57jV2ZjTm+IZ6BMNqu7EDVEg2HxCNufk6QcWlFsBkhQyQroB2VWKw==", + "version": "1.4.333", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.333.tgz", + "integrity": "sha512-YyE8+GKyGtPEP1/kpvqsdhD6rA/TP1DUFDN4uiU/YI52NzDxmwHkEb3qjId8hLBa5siJvG0sfC3O66501jMruQ==", "dev": true, "peer": true }, @@ -8589,6 +9039,27 @@ "esbuild-windows-arm64": "0.15.18" } }, + "esbuild-android-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.18.tgz", + "integrity": "sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==", + "dev": true, + "optional": true + }, + "esbuild-android-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.18.tgz", + "integrity": "sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==", + "dev": true, + "optional": true + }, + "esbuild-darwin-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.18.tgz", + "integrity": "sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==", + "dev": true, + "optional": true + }, "esbuild-darwin-arm64": { "version": "0.15.18", "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.18.tgz", @@ -8596,6 +9067,118 @@ "dev": true, "optional": true }, + "esbuild-freebsd-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.18.tgz", + "integrity": "sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.18.tgz", + "integrity": "sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==", + "dev": true, + "optional": true + }, + "esbuild-linux-32": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.18.tgz", + "integrity": "sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==", + "dev": true, + "optional": true + }, + "esbuild-linux-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz", + "integrity": "sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.18.tgz", + "integrity": "sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.18.tgz", + "integrity": "sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==", + "dev": true, + "optional": true + }, + "esbuild-linux-mips64le": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.18.tgz", + "integrity": "sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-ppc64le": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.18.tgz", + "integrity": "sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==", + "dev": true, + "optional": true + }, + "esbuild-linux-riscv64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.18.tgz", + "integrity": "sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==", + "dev": true, + "optional": true + }, + "esbuild-linux-s390x": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.18.tgz", + "integrity": "sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==", + "dev": true, + "optional": true + }, + "esbuild-netbsd-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.18.tgz", + "integrity": "sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==", + "dev": true, + "optional": true + }, + "esbuild-openbsd-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.18.tgz", + "integrity": "sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==", + "dev": true, + "optional": true + }, + "esbuild-sunos-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.18.tgz", + "integrity": "sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==", + "dev": true, + "optional": true + }, + "esbuild-windows-32": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.18.tgz", + "integrity": "sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==", + "dev": true, + "optional": true + }, + "esbuild-windows-64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.18.tgz", + "integrity": "sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==", + "dev": true, + "optional": true + }, + "esbuild-windows-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.18.tgz", + "integrity": "sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==", + "dev": true, + "optional": true + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -8609,13 +9192,16 @@ "dev": true }, "eslint": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.34.0.tgz", - "integrity": "sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", + "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", "dev": true, "peer": true, "requires": { - "@eslint/eslintrc": "^1.4.1", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.1", + "@eslint/js": "8.36.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -8626,10 +9212,9 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "espree": "^9.5.0", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", @@ -8650,7 +9235,6 @@ "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" @@ -8704,9 +9288,9 @@ } }, "eslint-config-prettier": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz", - "integrity": "sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.7.0.tgz", + "integrity": "sha512-HHVXLSlVUhMSmyW4ZzEuvjpwqamgmlfkutD53cYXLikh4pt/modINRcCIApJ84czDxM4GZInwUrromsDdTImTA==", "dev": true, "requires": {} }, @@ -8729,23 +9313,6 @@ "estraverse": "^4.1.1" } }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, "eslint-visitor-keys": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", @@ -8753,9 +9320,9 @@ "dev": true }, "espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", + "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", "dev": true, "peer": true, "requires": { @@ -8771,9 +9338,9 @@ "dev": true }, "esquery": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", - "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "peer": true, "requires": { @@ -9171,9 +9738,9 @@ } }, "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "grapheme-splitter": { @@ -9249,6 +9816,14 @@ "safer-buffer": ">= 2.1.2 < 3.0.0" } }, + "idb-keyval": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/idb-keyval/-/idb-keyval-6.2.0.tgz", + "integrity": "sha512-uw+MIyQn2jl3+hroD7hF8J7PUviBU7BPKWw4f/ISf32D4LoGu98yHjrzWWJDASu9QNrX10tCJqk9YY0ClWm8Ng==", + "requires": { + "safari-14-idb-fix": "^3.0.0" + } + }, "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -9456,9 +10031,9 @@ } }, "is-electron": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.1.tgz", - "integrity": "sha512-r8EEQQsqT+Gn0aXFx7lTFygYQhILLCB+wn0WCDL5LZRINeLH/Rvw1j2oKodELLXYNImQ3CRlVsY8wW4cGOsyuw==" + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz", + "integrity": "sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg==" }, "is-extglob": { "version": "2.1.1", @@ -9704,9 +10279,9 @@ } }, "ky": { - "version": "0.33.2", - "resolved": "https://registry.npmjs.org/ky/-/ky-0.33.2.tgz", - "integrity": "sha512-f6oS2rKUcPu5FzdqCDbFpmzis/JlqFZw8uIHm/jf8Kc3vtnW+VDhuashOAKyBZv8bFiZFZUMNxTC0JtahEvujA==" + "version": "0.33.3", + "resolved": "https://registry.npmjs.org/ky/-/ky-0.33.3.tgz", + "integrity": "sha512-CasD9OCEQSFIam2U8efFK81Yeg8vNMTBUqtMOHlrcWQHqUX3HeCl9Dr31u4toV7emlH8Mymk5+9p0lL6mKb/Xw==" }, "ky-universal": { "version": "0.11.0", @@ -9718,9 +10293,9 @@ }, "dependencies": { "node-fetch": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", - "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", + "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", "requires": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -10224,9 +10799,9 @@ } }, "parse-duration": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-duration/-/parse-duration-1.0.2.tgz", - "integrity": "sha512-Dg27N6mfok+ow1a2rj/nRjtCfaKrHUZV2SJpEn/s8GaVUSlf4GGRCRP1c13Hj+wfPKVMrFDqLMLITkYKgKxyyg==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/parse-duration/-/parse-duration-1.0.3.tgz", + "integrity": "sha512-o6NAh12na5VvR6nFejkU0gpQ8jmOY9Y9sTU2ke3L3G/d/3z8jqmbBbeyBGHU73P4JLXfc7tJARygIK3WGIkloA==" }, "path-exists": { "version": "4.0.0", @@ -10298,9 +10873,9 @@ "peer": true }, "prettier": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", - "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.5.tgz", + "integrity": "sha512-3gzuxrHbKUePRBB4ZeU08VNkUcqEHaUaouNt0m7LGP4Hti/NuB07C7PPTM/LkWqXoJYJn2McEo5+kxPNrtQkLQ==", "dev": true }, "prettier-linter-helpers": { @@ -10429,9 +11004,9 @@ } }, "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -10455,12 +11030,6 @@ "ms": "^2.1.1" } }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, "relative-to-absolute-iri": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/relative-to-absolute-iri/-/relative-to-absolute-iri-1.0.7.tgz", @@ -10562,6 +11131,11 @@ "queue-microtask": "^1.2.2" } }, + "safari-14-idb-fix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/safari-14-idb-fix/-/safari-14-idb-fix-3.0.0.tgz", + "integrity": "sha512-eBNFLob4PMq8JA1dGyFn6G97q3/WzNtFK4RnzT1fnLq+9RyrGknzYiM/9B12MnKAxuj1IXr7UKYtTNtjyKMBog==" + }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -10789,9 +11363,9 @@ "integrity": "sha512-sMNggMeS6trCgMQuudgFHhX1gtBK3e+AT1zGrMsFYG1wlqtRT5E9rcvm3I1iNlvHpJX/3DO6L4qtWAuEl/T04Q==" }, "terser": { - "version": "5.16.4", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.4.tgz", - "integrity": "sha512-5yEGuZ3DZradbogeYQ1NaGz7rXVBDWujWlx1PT8efXO6Txn+eWbfKqB2bTDVmFXmePFkoLU6XI8UektMIEA0ug==", + "version": "5.16.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.6.tgz", + "integrity": "sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg==", "dev": true, "peer": true, "requires": { @@ -10802,17 +11376,17 @@ } }, "terser-webpack-plugin": { - "version": "5.3.6", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", - "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz", + "integrity": "sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==", "dev": true, "peer": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.14", + "@jridgewell/trace-mapping": "^0.3.17", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "terser": "^5.14.1" + "serialize-javascript": "^6.0.1", + "terser": "^5.16.5" }, "dependencies": { "@jridgewell/trace-mapping": { @@ -10825,6 +11399,16 @@ "@jridgewell/resolve-uri": "3.1.0", "@jridgewell/sourcemap-codec": "1.4.14" } + }, + "serialize-javascript": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, + "peer": true, + "requires": { + "randombytes": "^2.1.0" + } } } }, @@ -10956,9 +11540,9 @@ } }, "undici": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.20.0.tgz", - "integrity": "sha512-J3j60dYzuo6Eevbawwp1sdg16k5Tf768bxYK4TUJRH7cBM4kFCbf3mOnM/0E3vQYXvpxITbbWmBafaDbxLDz3g==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.21.0.tgz", + "integrity": "sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA==", "requires": { "busboy": "^1.6.0" } @@ -11055,9 +11639,9 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "webpack": { - "version": "5.75.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", - "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "version": "5.76.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.2.tgz", + "integrity": "sha512-Th05ggRm23rVzEOlX8y67NkYCHa9nTNcwHPBhdg+lKG+mtiW7XgggjAeeLnADAe7mLjJ6LUNfgHAuRRh+Z6J7w==", "dev": true, "peer": true, "requires": { diff --git a/package.json b/package.json index 6a0527da..fa724d1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@0xpolygonid/js-sdk", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "description": "SDK to work with Polygon ID", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", @@ -62,11 +62,11 @@ "typescript": "^4.8.4" }, "dependencies": { - "@iden3/js-crypto": "1.0.0-beta.0", - "@iden3/js-iden3-core": "1.0.0-beta.0", - "@iden3/js-jsonld-merklization": "1.0.0-beta.3", + "@iden3/js-crypto": "1.0.0-beta.1", + "@iden3/js-iden3-core": "1.0.0-beta.2", + "@iden3/js-jsonld-merklization": "1.0.0-beta.6", "@iden3/js-jwz": "1.0.0-beta.2", - "@iden3/js-merkletree": "1.0.0-beta.0", + "@iden3/js-merkletree": "1.0.0-beta.2", "@lumeweb/js-sha3-browser": "^0.8.1", "ajv": "^6.12.6", "axios": "^1.2.1", @@ -76,6 +76,7 @@ "crypto-browserify": "^3.12.0", "ethers": "^5.7.2", "ffjavascript": "^0.2.57", + "idb-keyval": "^6.2.0", "ipfs-http-client": "56.0.3", "rfc4648": "^1.5.2", "snarkjs": "^0.5.0", diff --git a/src/credentials/revocation.ts b/src/credentials/revocation.ts index d12ff341..27b54091 100644 --- a/src/credentials/revocation.ts +++ b/src/credentials/revocation.ts @@ -272,7 +272,11 @@ export async function pushHashesToRHS( // add new state node if (!state.bytes.every((b) => b === 0)) { nb.addProofNode( - new ProofNode(state, [trees.claimsTree.root, trees.revocationTree.root, trees.rootsTree.root]) + new ProofNode(state, [ + await trees.claimsTree.root(), + await trees.revocationTree.root(), + await trees.rootsTree.root() + ]) ); } @@ -290,7 +294,7 @@ async function addRoRNode(nb: NodesBuilder, trees: TreesModel): Promise { const currentRootsTree = trees.rootsTree; const claimsTree = trees.claimsTree; - return nb.addKey(currentRootsTree, claimsTree.root.bigInt()); + return nb.addKey(currentRootsTree, (await claimsTree.root()).bigInt()); } async function addRevocationNode( nb: NodesBuilder, diff --git a/src/identity/identity-wallet.ts b/src/identity/identity-wallet.ts index fd47f390..d4b87e6d 100644 --- a/src/identity/identity-wallet.ts +++ b/src/identity/identity-wallet.ts @@ -332,7 +332,7 @@ export class IdentityWallet implements IIdentityWallet { ); const currentState = await hashElems([ - claimsTree.root.bigInt(), + (await claimsTree.root()).bigInt(), ZERO_HASH.bigInt(), ZERO_HASH.bigInt() ]); @@ -377,10 +377,11 @@ export class IdentityWallet implements IIdentityWallet { } const index = authClaim.hIndex(); + const ctr = await claimsTree.root(); - const { proof } = await claimsTree.generateProof(index, claimsTree.root); + const { proof } = await claimsTree.generateProof(index, ctr); - const claimsTreeHex = claimsTree.root.hex(); + const claimsTreeHex = ctr.hex(); const stateHex = currentState.hex(); const mtpProof: Iden3SparseMerkleTreeProof = new Iden3SparseMerkleTreeProof({ @@ -466,9 +467,9 @@ export class IdentityWallet implements IIdentityWallet { MerkleTreeType.Roots ); const state = await hashElems([ - claimsTree.root.bigInt(), - revocationTree.root.bigInt(), - rootsTree.root.bigInt() + (await claimsTree.root()).bigInt(), + (await revocationTree.root()).bigInt(), + (await rootsTree.root()).bigInt() ]); return { @@ -494,18 +495,21 @@ export class IdentityWallet implements IIdentityWallet { MerkleTreeType.Claims ); + const claimsRoot = await treesModel.claimsTree.root(); + const rootOfRoots = await treesModel.rootsTree.root(); + const revocationRoot = await treesModel.revocationTree.root(); const { proof } = await claimsTree.generateProof( coreClaim.hIndex(), - treeState ? treeState.claimsRoot : treesModel.claimsTree.root + treeState ? treeState.claimsRoot : claimsRoot ); return { proof, treeState: treeState ?? { state: treesModel.state, - claimsRoot: treesModel.claimsTree.root, - rootOfRoots: treesModel.rootsTree.root, - revocationRoot: treesModel.revocationTree.root + claimsRoot, + rootOfRoots, + revocationRoot } }; } @@ -527,18 +531,21 @@ export class IdentityWallet implements IIdentityWallet { MerkleTreeType.Revocations ); + const claimsRoot = await treesModel.claimsTree.root(); + const rootOfRoots = await treesModel.rootsTree.root(); + const revocationRoot = await treesModel.revocationTree.root(); const { proof } = await revocationTree.generateProof( revNonce, - treeState ? treeState.revocationRoot : treesModel.revocationTree.root + treeState ? treeState.revocationRoot : revocationRoot ); return { proof, treeState: treeState ?? { state: treesModel.state, - claimsRoot: treesModel.claimsTree.root, - rootOfRoots: treesModel.rootsTree.root, - revocationRoot: treesModel.revocationTree.root + claimsRoot, + rootOfRoots, + revocationRoot } }; } @@ -671,12 +678,14 @@ export class IdentityWallet implements IIdentityWallet { issuerDID: DID ): Promise { const oldIssuerTree = await this.getDIDTreeModel(issuerDID); - + let claimsRoot = await oldIssuerTree.claimsTree.root(); + let rootOfRoots = await oldIssuerTree.rootsTree.root(); + let revocationRoot = await oldIssuerTree.revocationTree.root(); const oldTreeState: TreeState = { - revocationRoot: oldIssuerTree.revocationTree.root, - claimsRoot: oldIssuerTree.claimsTree.root, state: oldIssuerTree.state, - rootOfRoots: oldIssuerTree.rootsTree.root + claimsRoot, + revocationRoot, + rootOfRoots }; for (let index = 0; index < credentials.length; index++) { @@ -698,22 +707,25 @@ export class IdentityWallet implements IIdentityWallet { } const newIssuerTreeState = await this.getDIDTreeModel(issuerDID); - + const claimTreeRoot = await newIssuerTreeState.claimsTree.root(); await this._storage.mt.addToMerkleTree( issuerDID.toString(), MerkleTreeType.Roots, - newIssuerTreeState.claimsTree.root.bigInt(), + claimTreeRoot.bigInt(), BigInt(0) ); const newIssuerTreeStateWithROR = await this.getDIDTreeModel(issuerDID); + claimsRoot = await newIssuerTreeStateWithROR.claimsTree.root(); + rootOfRoots = await newIssuerTreeStateWithROR.rootsTree.root(); + revocationRoot = await newIssuerTreeStateWithROR.revocationTree.root(); return { credentials, newTreeState: { - revocationRoot: newIssuerTreeStateWithROR.revocationTree.root, - claimsRoot: newIssuerTreeStateWithROR.claimsTree.root, state: newIssuerTreeStateWithROR.state, - rootOfRoots: newIssuerTreeStateWithROR.rootsTree.root + claimsRoot, + rootOfRoots, + revocationRoot }, oldTreeState: oldTreeState }; diff --git a/src/kms/store/index.ts b/src/kms/store/index.ts index 6d1d4d24..17b8586b 100644 --- a/src/kms/store/index.ts +++ b/src/kms/store/index.ts @@ -2,3 +2,4 @@ export * from './abstract-key-store'; export * from './memory-key-store'; export * from './types'; export * from './local-storage-key-store'; +export * from './indexed-db-key-store'; diff --git a/src/kms/store/indexed-db-key-store.ts b/src/kms/store/indexed-db-key-store.ts new file mode 100644 index 00000000..1af84224 --- /dev/null +++ b/src/kms/store/indexed-db-key-store.ts @@ -0,0 +1,46 @@ +import { UseStore, createStore, get, set } from 'idb-keyval'; +import { AbstractPrivateKeyStore } from './abstract-key-store'; + +/** + * Allows storing keys in the indexed db storage of the browser + * (NOT ENCRYPTED: DO NOT USE IN THE PRODUCTION) + * + * @export + * @beta + * @class IndexedDBPrivateKeyStore + * @implements implements AbstractPrivateKeyStore interface + */ +export class IndexedDBPrivateKeyStore implements AbstractPrivateKeyStore { + static readonly storageKey = 'keystore'; + private readonly _store: UseStore; + + constructor() { + this._store = createStore( + `${IndexedDBPrivateKeyStore.storageKey}-db`, + IndexedDBPrivateKeyStore.storageKey + ); + } + /** + * Gets key from the indexed db storage + * + * @param {{ alias: string }} args + * @returns hex string + */ + async get(args: { alias: string }): Promise { + const key = await get(args.alias, this._store); + if (!key) { + throw new Error('no key under given alias'); + } + return key.value; + } + + /** + * Import key to the indexed db storage + * + * @param {{ alias: string; key: string }} args - alias and private key in the hex + * @returns void + */ + async import(args: { alias: string; key: string }): Promise { + await set(args.alias, { value: args.key }, this._store); + } +} diff --git a/src/proof/proof-service.ts b/src/proof/proof-service.ts index 5ea496c3..894e0bd8 100644 --- a/src/proof/proof-service.ts +++ b/src/proof/proof-service.ts @@ -203,12 +203,15 @@ export class ProofService implements IProofService { const authInfo = await this.prepareAuthBJJCredential(did, oldTreeState); const newTreeModel = await this._identityWallet.getDIDTreeModel(did); + const claimsRoot = await newTreeModel.claimsTree.root(); + const rootOfRoots = await newTreeModel.rootsTree.root(); + const revocationRoot = await newTreeModel.revocationTree.root(); const newTreeState: TreeState = { - revocationRoot: newTreeModel.revocationTree.root, - claimsRoot: newTreeModel.claimsTree.root, + revocationRoot, + claimsRoot, state: newTreeModel.state, - rootOfRoots: newTreeModel.rootsTree.root + rootOfRoots }; const challenge = Poseidon.hash([oldTreeState.state.bigInt(), newTreeState.state.bigInt()]); diff --git a/src/schema-processor/json/parser.ts b/src/schema-processor/json/parser.ts index 08f29b2f..0eb0f59f 100644 --- a/src/schema-processor/json/parser.ts +++ b/src/schema-processor/json/parser.ts @@ -142,12 +142,12 @@ export class Parser { switch (opts.merklizedRootPosition) { case MerklizedRootPosition.Index: { const mk = await credential.merklize(); - claim.setIndexMerklizedRoot(mk.root().bigInt()); + claim.setIndexMerklizedRoot((await mk.root()).bigInt()); break; } case MerklizedRootPosition.Value: { const mk = await credential.merklize(); - claim.setValueMerklizedRoot(mk.root().bigInt()); + claim.setValueMerklizedRoot((await mk.root()).bigInt()); break; } case MerklizedRootPosition.None: diff --git a/src/storage/index.ts b/src/storage/index.ts index 043c0b26..b30a254d 100644 --- a/src/storage/index.ts +++ b/src/storage/index.ts @@ -4,4 +4,5 @@ export * from './entities'; export * from './filters'; export * from './memory'; export * from './local-storage'; +export * from './indexed-db'; export * from './shared'; diff --git a/src/storage/indexed-db/data-source.ts b/src/storage/indexed-db/data-source.ts new file mode 100644 index 00000000..ff0effa1 --- /dev/null +++ b/src/storage/indexed-db/data-source.ts @@ -0,0 +1,60 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { IDataSource } from '../interfaces/data-source'; +import { set, get, del, values, createStore, UseStore } from 'idb-keyval'; + +/** + * Storage in the browser, uses indexed db storage + * + * @export + * @beta + * @class IndexedDBDataSource + * @template Type + */ +export class IndexedDBDataSource implements IDataSource { + /** + * Creates an instance of IndexedDBDataSource. + * + * @param {string} _storageKey - key string to put storage name + */ + private readonly _store: UseStore; + constructor(private _storageKey: string) { + this._store = createStore(`${_storageKey}-db`, _storageKey); + } + + /** + * Saves value to the indexed db storage + * + * @param {string} key - key value + * @param {Type} value - value to store + * @param {string} [keyName='id'] - key name + */ + async save(key: string, value: Type, keyName = 'id'): Promise { + return set(key, value, this._store); + } + + /** + * Gets value from the indexed db storage by given key + * + * @param {string} key - key value + * @param {string} [keyName='id'] - key name + */ + + async get(key: string, keyName = 'id'): Promise { + return get(key, this._store); + } + + /** + * loads all from the indexed db storage + */ + async load(): Promise { + return values(this._store); + } + /** + * deletes item from the indexed db storage + * @param {string} key - key value + * @param {string} [keyName='id'] - key name + */ + async delete(key: string, keyName = 'id'): Promise { + return del(key, this._store); + } +} diff --git a/src/storage/indexed-db/index.ts b/src/storage/indexed-db/index.ts new file mode 100644 index 00000000..9ceb585a --- /dev/null +++ b/src/storage/indexed-db/index.ts @@ -0,0 +1,2 @@ +export * from './data-source'; +export * from './merkletree'; diff --git a/src/storage/indexed-db/merkletree.ts b/src/storage/indexed-db/merkletree.ts new file mode 100644 index 00000000..f27d7a8f --- /dev/null +++ b/src/storage/indexed-db/merkletree.ts @@ -0,0 +1,134 @@ +import { createStore, UseStore, get, set, del } from 'idb-keyval'; +import { IndexedDBStorage, Merkletree, str2Bytes } from '@iden3/js-merkletree'; +import { IdentityMerkleTreeMetaInformation, MerkleTreeType } from '../entities/mt'; +import * as uuid from 'uuid'; + +import { IMerkleTreeStorage } from '../interfaces/merkletree'; + +const mtTypes = [MerkleTreeType.Claims, MerkleTreeType.Revocations, MerkleTreeType.Roots]; + +/** + * Merkle tree storage that uses browser indexed db storage + * + * @export + * @beta + * @class MerkleTreeIndexedDBStorage + * @implements implements IMerkleTreeStorage interface + */ +export class MerkleTreeIndexedDBStorage implements IMerkleTreeStorage { + /** + * key for the storage key metadata + * + * @static + */ + static readonly storageKeyMeta = 'merkle-tree-meta'; + + private readonly _merkleTreeMetaStore: UseStore; + + /** + * Creates an instance of MerkleTreeIndexedDBStorage. + * @param {number} _mtDepth + */ + constructor(private readonly _mtDepth: number) { + this._merkleTreeMetaStore = createStore( + `${MerkleTreeIndexedDBStorage.storageKeyMeta}-db`, + MerkleTreeIndexedDBStorage.storageKeyMeta + ); + } + + /** creates a tree in the indexed db storage */ + async createIdentityMerkleTrees( + identifier: string + ): Promise { + if (!identifier) { + identifier = `${uuid.v4()}`; + } + const createMetaInfo = () => { + const treesMeta: IdentityMerkleTreeMetaInformation[] = []; + for (let index = 0; index < mtTypes.length; index++) { + const mType = mtTypes[index]; + const treeId = identifier.concat('+' + mType.toString()); + const metaInfo = { treeId, identifier, type: mType }; + treesMeta.push(metaInfo); + } + return treesMeta; + }; + const meta = await get(identifier, this._merkleTreeMetaStore); + if (meta) { + return meta; + } + const treesMeta = createMetaInfo(); + await set(identifier, treesMeta, this._merkleTreeMetaStore); + return treesMeta; + } + /** + * + * getIdentityMerkleTreesInfo from the indexed db storage + * @param {string} identifier + * @returns `{Promise}` + */ + async getIdentityMerkleTreesInfo( + identifier: string + ): Promise { + const meta = await get(identifier, this._merkleTreeMetaStore); + if (meta) { + return meta; + } + throw new Error(`Merkle tree meta not found for identifier ${identifier}`); + } + + /** get merkle tree from the indexed db storage */ + async getMerkleTreeByIdentifierAndType( + identifier: string, + mtType: MerkleTreeType + ): Promise { + const meta = await get(identifier, this._merkleTreeMetaStore); + const err = new Error(`Merkle tree not found for identifier ${identifier} and type ${mtType}`); + if (!meta) { + throw err; + } + + const resultMeta = meta.find((m) => m.identifier === identifier && m.type === mtType); + if (!resultMeta) { + throw err; + } + return new Merkletree(new IndexedDBStorage(str2Bytes(resultMeta.treeId)), true, this._mtDepth); + } + /** adds to merkle tree in the indexed db storage */ + async addToMerkleTree( + identifier: string, + mtType: MerkleTreeType, + hindex: bigint, + hvalue: bigint + ): Promise { + const meta = await get(identifier, this._merkleTreeMetaStore); + if (!meta) { + throw new Error(`Merkle tree meta not found for identifier ${identifier}`); + } + const resultMeta = meta.find((m) => m.identifier === identifier && m.type === mtType); + if (!resultMeta) { + throw new Error(`Merkle tree not found for identifier ${identifier} and type ${mtType}`); + } + + const tree = new Merkletree( + new IndexedDBStorage(str2Bytes(resultMeta.treeId)), + true, + this._mtDepth + ); + + await tree.add(hindex, hvalue); + } + + /** binds merkle tree in the indexed db storage to the new identifiers */ + async bindMerkleTreeToNewIdentifier(oldIdentifier: string, newIdentifier: string): Promise { + const meta = await get(oldIdentifier, this._merkleTreeMetaStore); + if (!meta || !meta?.length) { + throw new Error(`Merkle tree meta not found for identifier ${oldIdentifier}`); + } + + const treesMeta = meta.map((m) => ({ ...m, identifier: newIdentifier })); + + await set(newIdentifier, treesMeta, this._merkleTreeMetaStore); + await del(oldIdentifier, this._merkleTreeMetaStore); + } +} diff --git a/src/storage/interfaces/data-source.ts b/src/storage/interfaces/data-source.ts index e81b15f0..65738564 100644 --- a/src/storage/interfaces/data-source.ts +++ b/src/storage/interfaces/data-source.ts @@ -12,7 +12,7 @@ export interface IDataSource { * * @returns `{Type[]}` */ - load(): Type[]; + load(): Promise; /** * Save value under the key with optional key name @@ -21,7 +21,7 @@ export interface IDataSource { * @param {Type} value - value to store * @param {string} [keyName] - key name */ - save(key: string, value: Type, keyName?: string): void; + save(key: string, value: Type, keyName?: string): Promise; /** * returns data value for key value and optional key name @@ -30,7 +30,7 @@ export interface IDataSource { * @param {string} [keyName] - key name * @returns ` {(Type | undefined)}` */ - get(key: string, keyName?: string): Type | undefined; + get(key: string, keyName?: string): Promise; /** * deletes data value for given key with an optional key name @@ -38,5 +38,5 @@ export interface IDataSource { * @param {string} key - key value * @param {string} [keyName] - key name */ - delete(key: string, keyName?: string): void; + delete(key: string, keyName?: string): Promise; } diff --git a/src/storage/local-storage/data-source.ts b/src/storage/local-storage/data-source.ts index bc08e032..f6babc4e 100644 --- a/src/storage/local-storage/data-source.ts +++ b/src/storage/local-storage/data-source.ts @@ -28,7 +28,7 @@ export class BrowserDataSource implements IDataSource { * @param {Type} value - value to store * @param {string} [keyName='id'] - key name */ - save(key: string, value: Type, keyName = 'id'): void { + async save(key: string, value: Type, keyName = 'id'): Promise { if (localStorage) { const data = localStorage.getItem(this._localStorageKey); const items = JSON.parse(data) as Type[]; @@ -42,24 +42,13 @@ export class BrowserDataSource implements IDataSource { } } - /** - * updates data with a total reset - * - * @param {Type[]} value - value array to update - */ - patchData(value: Type[]): void { - if (localStorage) { - localStorage.setItem(this._localStorageKey, JSON.stringify(value)); - } - } - /** * gets value from the local storage by given key * @param {string} key - key value * @param {string} [keyName='id'] - key name */ - get(key: string, keyName = 'id'): Type | undefined { + async get(key: string, keyName = 'id'): Promise { const data = localStorage.getItem(this._localStorageKey); const parsedData = data && (JSON.parse(data) as Type[]); return parsedData.find((t) => t[keyName] === key); @@ -68,7 +57,7 @@ export class BrowserDataSource implements IDataSource { /** * loads all from the local storage */ - load(): Type[] { + async load(): Promise { const data = localStorage.getItem(this._localStorageKey); return data && JSON.parse(data); } @@ -77,7 +66,7 @@ export class BrowserDataSource implements IDataSource { * @param {string} key - key value * @param {string} [keyName='id'] - key name */ - delete(key: string, keyName = 'id'): void { + async delete(key: string, keyName = 'id'): Promise { const dataStr = localStorage.getItem(this._localStorageKey); const data = JSON.parse(dataStr) as Type[]; const items = data.filter((i) => i[keyName] !== key); diff --git a/src/storage/local-storage/merkletree.ts b/src/storage/local-storage/merkletree.ts index 7b060242..51a80616 100644 --- a/src/storage/local-storage/merkletree.ts +++ b/src/storage/local-storage/merkletree.ts @@ -15,12 +15,6 @@ const mtTypes = [MerkleTreeType.Claims, MerkleTreeType.Revocations, MerkleTreeTy * @implements implements IMerkleTreeStorage interface */ export class MerkleTreeLocalStorage implements IMerkleTreeStorage { - /** - * key for the local storage - * - * @static - */ - static readonly storageKey = 'merkle-tree'; /** * key for the storage key metadata * diff --git a/src/storage/memory/data-source.ts b/src/storage/memory/data-source.ts index e5a41c94..553b96d7 100644 --- a/src/storage/memory/data-source.ts +++ b/src/storage/memory/data-source.ts @@ -13,7 +13,7 @@ export class InMemoryDataSource implements IDataSource { private _data: Type[] = []; /** saves in the memory */ - save(key: string, value: Type, keyName = 'id'): void { + async save(key: string, value: Type, keyName = 'id'): Promise { const itemIndex = this._data.findIndex((i) => i[keyName] === key); if (itemIndex === -1) { this._data.push(value); @@ -22,20 +22,18 @@ export class InMemoryDataSource implements IDataSource { } } - /** updates in the memory */ - patchData(value: Type[]): void { - this._data = value; - } /** gets value from from the memory */ - get(key: string, keyName = 'id'): Type | undefined { + async get(key: string, keyName = 'id'): Promise { return this._data.find((t) => t[keyName] === key); } + /** loads from value from the memory */ - load(): Type[] { + async load(): Promise { return this._data; } + /** deletes from value from the memory */ - delete(key: string, keyName = 'id'): void { + async delete(key: string, keyName = 'id'): Promise { const newData = this._data.filter((i) => i[keyName] !== key); if (newData.length === this._data.length) { diff --git a/src/storage/shared/circuit-storage.ts b/src/storage/shared/circuit-storage.ts index e1626875..c1fd18fa 100644 --- a/src/storage/shared/circuit-storage.ts +++ b/src/storage/shared/circuit-storage.ts @@ -13,6 +13,10 @@ import { IDataSource } from '../interfaces/data-source'; * @implements implements ICircuitStorage interface */ export class CircuitStorage implements ICircuitStorage { + /** + * storage key for circuits + */ + static readonly storageKey = 'circuits'; /** * Creates an instance of CircuitStorage. * @param {IDataSource} _dataSource - data source to store circuit keys @@ -26,7 +30,7 @@ export class CircuitStorage implements ICircuitStorage { * @returns `Promise` */ async loadCircuitData(circuitId: CircuitId): Promise { - const circuitData = this._dataSource.get(circuitId.toString(), 'circuitId'); + const circuitData = await this._dataSource.get(circuitId.toString(), 'circuitId'); if (!circuitData) { throw new Error(`${StorageErrors.ItemNotFound}: ${circuitId}`); } @@ -41,6 +45,6 @@ export class CircuitStorage implements ICircuitStorage { * @returns `Promise` */ async saveCircuitData(circuitId: CircuitId, circuitData: CircuitData): Promise { - this._dataSource.save(circuitId.toString(), circuitData, 'circuitId'); + await this._dataSource.save(circuitId.toString(), circuitData, 'circuitId'); } } diff --git a/src/storage/shared/credential-storage.ts b/src/storage/shared/credential-storage.ts index 178e18e1..9e8e608e 100644 --- a/src/storage/shared/credential-storage.ts +++ b/src/storage/shared/credential-storage.ts @@ -26,31 +26,31 @@ export class CredentialStorage implements ICredentialStorage { /** {@inheritdoc ICredentialStorage.listCredentials } */ async listCredentials(): Promise { - let creds = this._dataSource.load(); + let creds = await this._dataSource.load(); creds = creds.map((cred) => (cred ? Object.assign(new W3CCredential(), cred) : undefined)); return creds; } /** @inheritdoc */ async saveCredential(credential: W3CCredential): Promise { - this._dataSource.save(credential.id, credential); + return this._dataSource.save(credential.id, credential); } /** {@inheritdoc ICredentialStorage.listCredentials } */ async saveAllCredentials(credentials: W3CCredential[]): Promise { for (const credential of credentials) { - this._dataSource.save(credential.id, credential); + await this._dataSource.save(credential.id, credential); } } /** {@inheritdoc ICredentialStorage.listCredentials } */ async removeCredential(id: string): Promise { - this._dataSource.delete(id); + return this._dataSource.delete(id); } /** {@inheritdoc ICredentialStorage.listCredentials } */ async findCredentialById(id: string): Promise { - const cred = this._dataSource.get(id); + const cred = await this._dataSource.get(id); return cred ? Object.assign(new W3CCredential(), cred) : undefined; } @@ -59,9 +59,9 @@ export class CredentialStorage implements ICredentialStorage { */ async findCredentialsByQuery(query: ProofQuery): Promise { const filters = StandardJSONCredentialsQueryFilter(query); - let creds = this._dataSource - .load() - .filter((credential) => filters.every((filter) => filter.execute(credential))); + let creds = (await this._dataSource.load()).filter((credential) => + filters.every((filter) => filter.execute(credential)) + ); creds = creds.map((cred) => (cred ? Object.assign(new W3CCredential(), cred) : undefined)); return creds; diff --git a/src/storage/shared/identity-storage.ts b/src/storage/shared/identity-storage.ts index 62207283..3104c8fc 100644 --- a/src/storage/shared/identity-storage.ts +++ b/src/storage/shared/identity-storage.ts @@ -35,19 +35,19 @@ export class IdentityStorage implements IIdentityStorage { ) {} async saveProfile(profile: Profile): Promise { - const profiles = this._profileDataSource.load(); + const profiles = await this._profileDataSource.load(); const identityProfiles = profiles.filter( (p) => p.genesisIdentifier === profile.genesisIdentifier ); const toSave = identityProfiles.length ? [...identityProfiles, profile] : [profile]; for (let index = 0; index < toSave.length; index++) { const element = toSave[index]; - this._profileDataSource.save(element.id, element); + await this._profileDataSource.save(element.id, element); } } async getProfileByVerifier(verifier: string): Promise { - const profile = this._profileDataSource.get(verifier, 'verifier'); + const profile = await this._profileDataSource.get(verifier, 'verifier'); if (!profile) { throw new Error('profile not found'); } @@ -55,7 +55,7 @@ export class IdentityStorage implements IIdentityStorage { } async getProfileById(profileId: string): Promise { - const profile = this._profileDataSource.get(profileId); + const profile = await this._profileDataSource.get(profileId); if (!profile) { throw new Error('profile not found'); } @@ -63,7 +63,9 @@ export class IdentityStorage implements IIdentityStorage { } async getProfilesByGenesisIdentifier(genesisIdentifier: string): Promise { - return this._profileDataSource.load().filter((p) => p.genesisIdentifier === genesisIdentifier); + return (await this._profileDataSource.load()).filter( + (p) => p.genesisIdentifier === genesisIdentifier + ); } async getAllIdentities(): Promise { @@ -71,7 +73,7 @@ export class IdentityStorage implements IIdentityStorage { } async saveIdentity(identity: Identity): Promise { - this._identityDataSource.save(identity.identifier, identity, 'identifier'); + return this._identityDataSource.save(identity.identifier, identity, 'identifier'); } async getIdentity(identifier: string): Promise { diff --git a/tests/circuits/atomic-query-mtp-v2.test.ts b/tests/circuits/atomic-query-mtp-v2.test.ts index 166e4495..35e05065 100644 --- a/tests/circuits/atomic-query-mtp-v2.test.ts +++ b/tests/circuits/atomic-query-mtp-v2.test.ts @@ -48,20 +48,20 @@ describe('atomic-query-mtp-v2', () => { claim: claim, nonRevProof: { treeState: { - state: issuer.state(), - claimsRoot: issuer.clt.root, - revocationRoot: issuer.ret.root, - rootOfRoots: issuer.rot.root + state: await issuer.state(), + claimsRoot: await issuer.clt.root(), + revocationRoot: await issuer.ret.root(), + rootOfRoots: await issuer.rot.root() }, proof: issuerClaimNonRevMtp.proof }, incProof: { proof: issuerClaimMtp.proof, treeState: { - state: issuer.state(), - claimsRoot: issuer.clt.root, - revocationRoot: issuer.ret.root, - rootOfRoots: issuer.rot.root + state: await issuer.state(), + claimsRoot: await issuer.clt.root(), + revocationRoot: await issuer.ret.root(), + rootOfRoots: await issuer.rot.root() } } }; diff --git a/tests/circuits/atomic-query-sig-v2.test.ts b/tests/circuits/atomic-query-sig-v2.test.ts index 0313622e..9c17f343 100644 --- a/tests/circuits/atomic-query-sig-v2.test.ts +++ b/tests/circuits/atomic-query-sig-v2.test.ts @@ -49,10 +49,10 @@ describe('atomic-query-sig-v2', () => { claim: claim, nonRevProof: { treeState: { - state: issuer.state(), - claimsRoot: issuer.clt.root, - revocationRoot: issuer.ret.root, - rootOfRoots: issuer.rot.root + state: await issuer.state(), + claimsRoot: await issuer.clt.root(), + revocationRoot: await issuer.ret.root(), + rootOfRoots: await issuer.rot.root() }, proof: issuerClaimNonRevMtp.proof }, @@ -61,19 +61,19 @@ describe('atomic-query-sig-v2', () => { issuerAuthClaim: issuer.authClaim, issuerAuthIncProof: { treeState: { - state: issuer.state(), - claimsRoot: issuer.clt.root, - revocationRoot: issuer.ret.root, - rootOfRoots: issuer.rot.root + state: await issuer.state(), + claimsRoot: await issuer.clt.root(), + revocationRoot: await issuer.ret.root(), + rootOfRoots: await issuer.rot.root() }, proof: issuerAuthClaimMtp.proof }, issuerAuthNonRevProof: { treeState: { - state: issuer.state(), - claimsRoot: issuer.clt.root, - revocationRoot: issuer.ret.root, - rootOfRoots: issuer.rot.root + state: await issuer.state(), + claimsRoot: await issuer.clt.root(), + revocationRoot: await issuer.ret.root(), + rootOfRoots: await issuer.rot.root() }, proof: issuerAuthClaimNonRevMtp.proof } diff --git a/tests/circuits/auth-v2.test.ts b/tests/circuits/auth-v2.test.ts index aadbe08e..effd35dd 100644 --- a/tests/circuits/auth-v2.test.ts +++ b/tests/circuits/auth-v2.test.ts @@ -16,7 +16,7 @@ describe('auth-v2', () => { const gTree = globalTree(); - await gTree.add(user2.id.bigInt(), user2.state().bigInt()); + await gTree.add(user2.id.bigInt(), (await user2.state()).bigInt()); const globalProof = await gTree.generateProof(user.id.bigInt()); const authClaimIncMTP = await user.claimMTPRaw(user.authClaim); @@ -31,15 +31,15 @@ describe('auth-v2', () => { inputs.authClaimIncMtp = authClaimIncMTP.proof; inputs.authClaimNonRevMtp = authClaimNonRevMTP.proof; inputs.treeState = { - state: user.state(), - claimsRoot: user.clt.root, - revocationRoot: user.ret.root, - rootOfRoots: user.rot.root + state: await user.state(), + claimsRoot: await user.clt.root(), + revocationRoot: await user.ret.root(), + rootOfRoots: await user.rot.root() }; inputs.signature = signature; inputs.challenge = challenge; inputs.gistProof = { - root: gTree.root, + root: await gTree.root(), proof: globalProof.proof }; diff --git a/tests/circuits/state-transition.test.ts b/tests/circuits/state-transition.test.ts index 322cb7ef..b5780c95 100644 --- a/tests/circuits/state-transition.test.ts +++ b/tests/circuits/state-transition.test.ts @@ -38,41 +38,41 @@ describe('state-transition', () => { const { identity, claimsTree, revTree, authClaim, privateKey } = await generate(userPK); const genesisState = await hashElems([ - claimsTree.root.bigInt(), - revTree.root.bigInt(), + (await claimsTree.root()).bigInt(), + (await revTree.root()).bigInt(), ZERO_HASH.bigInt() ]); const genesisTreeState: TreeState = { state: genesisState, - claimsRoot: claimsTree.root, - revocationRoot: revTree.root, + claimsRoot: await claimsTree.root(), + revocationRoot: await revTree.root(), rootOfRoots: ZERO_HASH }; const index = authClaim.hIndex(); - const authMTPProof = await claimsTree.generateProof(index, claimsTree.root); + const authMTPProof = await claimsTree.generateProof(index, await claimsTree.root()); const nonce = authClaim.getRevocationNonce(); - const authNonRevMTPProof = await revTree.generateProof(nonce, revTree.root); + const authNonRevMTPProof = await revTree.generateProof(nonce, await revTree.root()); // update rev tree await revTree.add(BigInt(1), BigInt(0)); const newState = await hashElems([ - claimsTree.root.bigInt(), - revTree.root.bigInt(), + (await claimsTree.root()).bigInt(), + (await revTree.root()).bigInt(), ZERO_HASH.bigInt() ]); const newTreeState: TreeState = { state: newState, - claimsRoot: claimsTree.root, - revocationRoot: revTree.root, + claimsRoot: await claimsTree.root(), + revocationRoot: await revTree.root(), rootOfRoots: ZERO_HASH }; - const authMTPNewStateIncProof = await claimsTree.generateProof(index, claimsTree.root); + const authMTPNewStateIncProof = await claimsTree.generateProof(index, await claimsTree.root()); // signature const hashOldAndNewStates = poseidon.hash([genesisState.bigInt(), newState.bigInt()]); diff --git a/tests/circuits/utils.ts b/tests/circuits/utils.ts index 200eeba6..eea4b925 100644 --- a/tests/circuits/utils.ts +++ b/tests/circuits/utils.ts @@ -114,12 +114,16 @@ export async function authClaimFullInfo( //Proof claim exists const { indexHash } = await claimsIndexValueHashes(data.authClaim); - const claimEntryMTP = await data.claimsTree.generateProof(indexHash, data.claimsTree.root); + const claimEntryMTP = await data.claimsTree.generateProof( + indexHash, + await data.claimsTree.root() + ); //Proof claim not revoked const revNonce = data.authClaim.getRevocationNonce(); const revNonceInt = BigInt(revNonce); - const claimNonRevMTP = await data.revTree.generateProof(revNonceInt, data.revTree.root); + const root = await data.revTree.root() + const claimNonRevMTP = await data.revTree.generateProof(revNonceInt, root); //Calculate state const state = await calcStateFromRoots(data.claimsTree, data.revTree, data.rootsTree); @@ -162,8 +166,8 @@ export async function generate(privKeyHex: string): Promise<{ // add auth claim to claimsMT const { indexHash, valueHash } = claimsIndexValueHashes(authClaim); await claimsTree.add(indexHash, valueHash); - - const state = poseidon.hash([claimsTree.root.bigInt(), BigInt(0), BigInt(0)]); + const ctr = await claimsTree.root(); + const state = poseidon.hash([ctr.bigInt(), BigInt(0), BigInt(0)]); // create new identity const identity = Id.idGenesisFromIdenState( buildDIDType('iden3', Blockchain.Polygon, NetworkId.Mumbai), @@ -180,12 +184,15 @@ async function calcStateFromRoots(claimsTree: Merkletree, ...args: Merkletree[]) let revTreeRoot = ZERO_HASH.bigInt(); let rootsTreeRoot = ZERO_HASH.bigInt(); if (args.length > 0) { - revTreeRoot = args[0].root.bigInt(); + const root = await args[0].root(); + revTreeRoot = root.bigInt(); } - if (args.length > 0) { - rootsTreeRoot = args[1].root.bigInt(); + if (args.length > 1) { + const root = await args[1].root(); + rootsTreeRoot = root.bigInt(); } - const state = await hashElems([claimsTree.root.bigInt(), revTreeRoot, rootsTreeRoot]); + const root = await claimsTree.root(); + const state = await hashElems([root.bigInt(), revTreeRoot, rootsTreeRoot]); return state; } @@ -251,15 +258,19 @@ export class IdentityTest { await it.clt.add(hi, hv); - const state = it.state(); + const state = await it.state(); it.id = idFromState(state.bigInt()); return it; } - state(): Hash { - const state = idenState(this.clt.root.bigInt(), this.ret.root.bigInt(), this.rot.root.bigInt()); + async state(): Promise { + const clt = await this.clt.root(); + const ret = await this.ret.root(); + const rot = await this.rot.root(); + + const state = idenState(clt.bigInt(), ret.bigInt(), rot.bigInt()); const hash = newHashFromBigInt(state); return hash; } @@ -288,17 +299,17 @@ export async function defaultJSONUserClaim(subject: Id): Promise<{ mz: Merklizer ClaimOptions.withIndexId(subject), ClaimOptions.withExpirationDate(getDateFromUnixTimestamp(1669884010)), //Thu Dec 01 2022 08:40:10 GMT+0000 ClaimOptions.withRevocationNonce(nonce), - ClaimOptions.withIndexMerklizedRoot(mz.root().bigInt()) + ClaimOptions.withIndexMerklizedRoot((await mz.root()).bigInt()) ); return { mz, claim }; } -export const getTreeState = (it: IdentityTest): TreeState => ({ - state: it.state(), - claimsRoot: it.clt.root, - revocationRoot: it.ret.root, - rootOfRoots: it.rot.root +export const getTreeState = async (it: IdentityTest): Promise => ({ + state: await it.state(), + claimsRoot: await it.clt.root(), + revocationRoot: await it.ret.root(), + rootOfRoots: await it.rot.root() }); export const userPK = '28156abe7fe2fd433dc9df969286b96666489bac508612d0e16593e944c4f69f'; diff --git a/tests/identity/id.test.ts b/tests/identity/id.test.ts index 4d9aa03f..ea87e407 100644 --- a/tests/identity/id.test.ts +++ b/tests/identity/id.test.ts @@ -84,7 +84,7 @@ describe('identity', () => { ); console.log(JSON.stringify(credential)); - expect(claimsTree?.root.bigInt()).not.to.equal(0); + expect((await claimsTree?.root()).bigInt()).not.to.equal(0); }); it('createProfile', async () => { const seedPhrase: Uint8Array = new TextEncoder().encode('seedseedseedseedseedseedseedseed'); diff --git a/tests/rhs/rhs.test.ts b/tests/rhs/rhs.test.ts index b2a405d7..0be7a9e8 100644 --- a/tests/rhs/rhs.test.ts +++ b/tests/rhs/rhs.test.ts @@ -368,9 +368,11 @@ describe.skip('rhs', () => { const rhsStatus = await getStatusFromRHS(issuerDID, credRHSStatus, dataStorage.states); expect(rhsStatus.issuer.state).to.equal(latestTree.state.hex()); - expect(rhsStatus.issuer.claimsTreeRoot).to.equal(latestTree.claimsTree.root.hex()); - expect(rhsStatus.issuer.revocationTreeRoot).to.equal(latestTree.revocationTree.root.hex()); - expect(rhsStatus.issuer.rootOfRoots).to.equal(latestTree.rootsTree.root.hex()); + expect(rhsStatus.issuer.claimsTreeRoot).to.equal((await latestTree.claimsTree.root()).hex()); + expect(rhsStatus.issuer.revocationTreeRoot).to.equal( + (await latestTree.revocationTree.root()).hex() + ); + expect(rhsStatus.issuer.rootOfRoots).to.equal((await latestTree.rootsTree.root()).hex()); expect(rhsStatus.mtp.existence).to.equal(false); }); });