diff --git a/package-lock.json b/package-lock.json index 97126c1..ed82466 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@oasisprotocol/sapphire-paratime": "^1.3.2", "@oceanprotocol/contracts": "^2.5.0", "@oceanprotocol/ddo-js": "^0.1.4", - "@oceanprotocol/lib": "^5.1.2", + "@oceanprotocol/lib": "^5.1.3", "commander": "^13.1.0", "cross-fetch": "^3.1.5", "crypto-js": "^4.1.1", @@ -98,6 +98,7 @@ "integrity": "sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", @@ -2433,7 +2434,6 @@ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.5.tgz", "integrity": "sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA==", "license": "MIT", - "peer": true, "dependencies": { "crc-32": "^1.2.0", "ethereumjs-util": "^7.1.5" @@ -2444,7 +2444,6 @@ "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", "license": "MPL-2.0", - "peer": true, "bin": { "rlp": "bin/rlp" }, @@ -2457,7 +2456,6 @@ "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.5.2.tgz", "integrity": "sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw==", "license": "MPL-2.0", - "peer": true, "dependencies": { "@ethereumjs/common": "^2.6.4", "ethereumjs-util": "^7.1.5" @@ -2468,7 +2466,6 @@ "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", "license": "MPL-2.0", - "peer": true, "dependencies": { "@ethereumjs/rlp": "^4.0.1", "ethereum-cryptography": "^2.0.0", @@ -2493,7 +2490,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/address": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", @@ -2521,7 +2517,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", @@ -2547,7 +2542,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/abstract-provider": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", @@ -2571,7 +2565,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", @@ -2595,7 +2588,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/bytes": "^5.8.0" } @@ -2615,7 +2607,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", @@ -2626,8 +2617,7 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@ethersproject/bytes": { "version": "5.8.0", @@ -2644,7 +2634,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/logger": "^5.8.0" } @@ -2664,7 +2653,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/bignumber": "^5.8.0" } @@ -2684,7 +2672,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/abstract-signer": "^5.8.0", "@ethersproject/address": "^5.8.0", @@ -2712,7 +2699,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/bytes": "^5.8.0", "js-sha3": "0.8.0" @@ -2732,8 +2718,7 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@ethersproject/networks": { "version": "5.8.0", @@ -2750,7 +2735,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/logger": "^5.8.0" } @@ -2770,7 +2754,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/logger": "^5.8.0" } @@ -2790,7 +2773,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0" @@ -2811,7 +2793,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", @@ -2825,8 +2806,7 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@ethersproject/strings": { "version": "5.8.0", @@ -2843,7 +2823,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/constants": "^5.8.0", @@ -2865,7 +2844,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/address": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", @@ -2893,7 +2871,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@ethersproject/base64": "^5.8.0", "@ethersproject/bytes": "^5.8.0", @@ -3230,9 +3207,9 @@ } }, "node_modules/@oceanprotocol/lib": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-5.1.2.tgz", - "integrity": "sha512-7O0/OK+LKhUyZyC/DFlakJnRGDP5zfT8Wx7Ju6g5I33pygSN6Tm3TitNqRqOsIpQOd+XKTo8wSNr4joiIH4a7A==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-5.1.3.tgz", + "integrity": "sha512-ZlLF8SM129fo+Iy2zD6aQaWfPTsirRnhg6OweIZ5QfAQJWGfCmG96GxyPvw6BgYgkdJzBT64kAKLE4P7k7P3gg==", "license": "Apache-2.0", "dependencies": { "@oasisprotocol/sapphire-paratime": "^1.3.2", @@ -3502,6 +3479,7 @@ "resolved": "https://registry.npmjs.org/@rdfjs/types/-/types-2.0.1.tgz", "integrity": "sha512-uyAzpugX7KekAXAHq26m3JlUIZJOC0uSBhpnefGV5i15bevDyyejoB7I+9MKeUrzXD8OOUI3+4FeV1wwQr5ihA==", "license": "MIT", + "peer": true, "dependencies": { "@types/node": "*" } @@ -3651,7 +3629,6 @@ "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", "license": "MIT", - "peer": true, "funding": { "url": "https://paulmillr.com/funding/" } @@ -3661,7 +3638,6 @@ "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", "license": "MIT", - "peer": true, "dependencies": { "@noble/curves": "~1.4.0", "@noble/hashes": "~1.4.0", @@ -3676,7 +3652,6 @@ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", "license": "MIT", - "peer": true, "dependencies": { "@noble/hashes": "1.4.0" }, @@ -3689,7 +3664,6 @@ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 16" }, @@ -3702,7 +3676,6 @@ "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", "license": "MIT", - "peer": true, "dependencies": { "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" @@ -3716,7 +3689,6 @@ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 16" }, @@ -3735,7 +3707,6 @@ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", "license": "MIT", - "peer": true, "engines": { "node": ">=10" }, @@ -3761,7 +3732,6 @@ "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", "license": "MIT", - "peer": true, "dependencies": { "defer-to-connect": "^2.0.1" }, @@ -3821,7 +3791,6 @@ "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.2.0.tgz", "integrity": "sha512-DLbJ1BPqxvQhIGbeu8VbUC1DiAiahHtAYvA0ZEAa4P31F7IaArc8z3C3BRQdWX4mtLQuABG4yzp76ZrS02Ui1Q==", "license": "MIT", - "peer": true, "dependencies": { "@types/node": "*" } @@ -3831,7 +3800,6 @@ "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", "license": "MIT", - "peer": true, "dependencies": { "@types/http-cache-semantics": "*", "@types/keyv": "^3.1.4", @@ -3868,8 +3836,7 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@types/http-link-header": { "version": "1.0.7", @@ -3905,7 +3872,6 @@ "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", "license": "MIT", - "peer": true, "dependencies": { "@types/node": "*" } @@ -3922,6 +3888,7 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.9.tgz", "integrity": "sha512-cuVNgarYWZqxRJDQHEB58GEONhOK79QVR/qYx4S7kcUObQvUwvFnYxJuuHUKm2aieN9X3yZB4LZsuYNU1Qphsw==", "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~6.21.0" } @@ -3938,7 +3905,6 @@ "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz", "integrity": "sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==", "license": "MIT", - "peer": true, "dependencies": { "@types/node": "*" } @@ -4037,6 +4003,7 @@ "resolved": "https://registry.npmjs.org/@types/rdfjs__namespace/-/rdfjs__namespace-2.0.10.tgz", "integrity": "sha512-xoVzEIOxcpyteEmzaj94MSBbrBFs+vqv05joMhzLEiPRwsBBDnhkdBCaaDxR1Tf7wOW0kB2R1IYe4C3vEBFPgA==", "license": "MIT", + "peer": true, "dependencies": { "@rdfjs/types": "*" } @@ -4065,7 +4032,6 @@ "resolved": "https://registry.npmjs.org/@types/rdfjs__prefix-map/-/rdfjs__prefix-map-0.1.5.tgz", "integrity": "sha512-RAwyS/2dT9X79QwM0F8KLweTfuBoe6xtiAlU7wKPB+/t/sfk6A50LYtAWaDVP5qBjcu50UkKkZT+VR47CiLkfg==", "license": "MIT", - "peer": true, "dependencies": { "@rdfjs/types": "*" } @@ -4084,7 +4050,6 @@ "resolved": "https://registry.npmjs.org/@types/rdfjs__serializer-jsonld-ext/-/rdfjs__serializer-jsonld-ext-4.0.1.tgz", "integrity": "sha512-jgbQ/1kV7nESKG7SY8FJED6K4OFznr6Sz3ybF1ncpBR7TUBTuy3InpZOVRK4Wjpy2zi84iIAzJ1CIIo9NZh2Xw==", "license": "MIT", - "peer": true, "dependencies": { "@rdfjs/types": ">=1.0.0", "@types/jsonld": "*", @@ -4105,7 +4070,6 @@ "resolved": "https://registry.npmjs.org/@types/rdfjs__serializer-turtle/-/rdfjs__serializer-turtle-1.1.0.tgz", "integrity": "sha512-NGHnbz5985UwS/YS6WL/FkS94B+QiVTdsfvJCqPwLmY3E7UeClw91c2KbiphZUR/uh7uwLwxeKKhV2T1gYgT5Q==", "license": "MIT", - "peer": true, "dependencies": { "@rdfjs/types": ">=1.0.0", "@types/node": "*", @@ -4175,7 +4139,6 @@ "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", "license": "MIT", - "peer": true, "dependencies": { "@types/node": "*" } @@ -4185,7 +4148,6 @@ "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz", "integrity": "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==", "license": "MIT", - "peer": true, "dependencies": { "@types/node": "*" } @@ -4238,6 +4200,7 @@ "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "5.62.0", "@typescript-eslint/types": "5.62.0", @@ -4506,15 +4469,13 @@ "version": "1.7.8", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.8.tgz", "integrity": "sha512-9f1iZ2uWh92VcrU9Y8x+LdM4DLj75VE0MJB8zuF1iUnroEptStw+DQ8EQPMUdfe5k+PkB1uUfDQfWbhstH8LrQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "license": "MIT", - "peer": true, "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -4528,6 +4489,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -4661,8 +4623,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/array-includes": { "version": "3.1.9", @@ -4822,7 +4783,6 @@ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "license": "MIT", - "peer": true, "dependencies": { "safer-buffer": "~2.1.0" } @@ -4832,7 +4792,6 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.8" } @@ -4868,8 +4827,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/asynckit": { "version": "0.4.0", @@ -4942,7 +4900,6 @@ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "license": "Apache-2.0", - "peer": true, "engines": { "node": "*" } @@ -4951,8 +4908,7 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/babel-plugin-macros": { "version": "3.1.0", @@ -5054,7 +5010,6 @@ "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz", "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==", "license": "MIT", - "peer": true, "dependencies": { "safe-buffer": "^5.0.1" } @@ -5084,7 +5039,6 @@ "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "license": "BSD-3-Clause", - "peer": true, "dependencies": { "tweetnacl": "^0.14.3" } @@ -5093,8 +5047,7 @@ "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "license": "Unlicense", - "peer": true + "license": "Unlicense" }, "node_modules/bignumber.js": { "version": "9.3.1", @@ -5122,29 +5075,25 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/bn.js": { "version": "4.12.2", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/body-parser": { "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "license": "MIT", - "peer": true, "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -5169,7 +5118,6 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "license": "MIT", - "peer": true, "dependencies": { "ms": "2.0.0" } @@ -5178,8 +5126,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/boolbase": { "version": "1.0.0", @@ -5216,8 +5163,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/brotli-size": { "version": "4.0.0", @@ -5244,7 +5190,6 @@ "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "license": "MIT", - "peer": true, "dependencies": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -5274,6 +5219,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001726", "electron-to-chromium": "^1.5.173", @@ -5292,7 +5238,6 @@ "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", "license": "MIT", - "peer": true, "dependencies": { "base-x": "^3.0.2" } @@ -5302,7 +5247,6 @@ "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", "license": "MIT", - "peer": true, "dependencies": { "bs58": "^4.0.0", "create-hash": "^1.1.0", @@ -5359,15 +5303,13 @@ "version": "0.0.5", "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", "integrity": "sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/bufferutil": { "version": "4.0.9", @@ -5375,7 +5317,6 @@ "integrity": "sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw==", "hasInstallScript": true, "license": "MIT", - "peer": true, "dependencies": { "node-gyp-build": "^4.3.0" }, @@ -5411,7 +5352,6 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -5421,7 +5361,6 @@ "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz", "integrity": "sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==", "license": "MIT", - "peer": true, "engines": { "node": ">=10.6.0" } @@ -5431,7 +5370,6 @@ "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", "license": "MIT", - "peer": true, "dependencies": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", @@ -5450,7 +5388,6 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "license": "MIT", - "peer": true, "dependencies": { "pump": "^3.0.0" }, @@ -5466,7 +5403,6 @@ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "license": "MIT", - "peer": true, "engines": { "node": ">=8" } @@ -5585,8 +5521,7 @@ "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "license": "Apache-2.0", - "peer": true + "license": "Apache-2.0" }, "node_modules/cborg": { "version": "1.10.2", @@ -5688,8 +5623,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/cids": { "version": "0.7.5", @@ -5697,7 +5631,6 @@ "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", "deprecated": "This module has been superseded by the multiformats module", "license": "MIT", - "peer": true, "dependencies": { "buffer": "^5.5.0", "class-is": "^1.1.0", @@ -5729,7 +5662,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -5741,7 +5673,6 @@ "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", "deprecated": "This module has been superseded by the multiformats module", "license": "MIT", - "peer": true, "dependencies": { "buffer": "^5.6.0", "varint": "^5.0.0" @@ -5752,7 +5683,6 @@ "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz", "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==", "license": "MIT", - "peer": true, "dependencies": { "inherits": "^2.0.4", "safe-buffer": "^5.2.1" @@ -5765,8 +5695,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/cliui": { "version": "7.0.4", @@ -5785,7 +5714,6 @@ "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", "license": "MIT", - "peer": true, "dependencies": { "mimic-response": "^1.0.0" }, @@ -5881,7 +5809,6 @@ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "license": "MIT", - "peer": true, "dependencies": { "safe-buffer": "5.2.1" }, @@ -5894,7 +5821,6 @@ "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", "license": "ISC", - "peer": true, "dependencies": { "cids": "^0.7.1", "multicodec": "^0.5.5", @@ -5906,7 +5832,6 @@ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } @@ -5923,7 +5848,6 @@ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } @@ -5932,8 +5856,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/core-js-compat": { "version": "3.45.0", @@ -5953,15 +5876,13 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/cors": { "version": "2.8.5", "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", "license": "MIT", - "peer": true, "dependencies": { "object-assign": "^4", "vary": "^1" @@ -5992,7 +5913,6 @@ "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", "license": "Apache-2.0", - "peer": true, "bin": { "crc32": "bin/crc32.njs" }, @@ -6005,7 +5925,6 @@ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "license": "MIT", - "peer": true, "dependencies": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -6019,7 +5938,6 @@ "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "license": "MIT", - "peer": true, "dependencies": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -6240,7 +6158,6 @@ "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", "license": "ISC", - "peer": true, "dependencies": { "es5-ext": "^0.10.64", "type": "^2.7.2" @@ -6254,7 +6171,6 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "license": "MIT", - "peer": true, "dependencies": { "assert-plus": "^1.0.0" }, @@ -6366,7 +6282,6 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10" } @@ -6376,7 +6291,6 @@ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "license": "MIT", - "peer": true, "dependencies": { "mimic-response": "^3.1.0" }, @@ -6392,7 +6306,6 @@ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=10" }, @@ -6435,7 +6348,6 @@ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", "license": "MIT", - "peer": true, "engines": { "node": ">=10" } @@ -6499,7 +6411,6 @@ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -6509,7 +6420,6 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -6569,8 +6479,7 @@ "node_modules/dom-walk": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", - "peer": true + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" }, "node_modules/domelementtype": { "version": "2.3.0", @@ -6647,7 +6556,6 @@ "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "license": "MIT", - "peer": true, "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -6666,8 +6574,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/ejs": { "version": "3.1.10", @@ -6697,7 +6604,6 @@ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", "license": "MIT", - "peer": true, "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -6720,7 +6626,6 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -6946,7 +6851,6 @@ "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "hasInstallScript": true, "license": "ISC", - "peer": true, "dependencies": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", @@ -6962,7 +6866,6 @@ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", "license": "MIT", - "peer": true, "dependencies": { "d": "1", "es5-ext": "^0.10.35", @@ -6973,15 +6876,13 @@ "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/es6-symbol": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", "license": "ISC", - "peer": true, "dependencies": { "d": "^1.0.2", "ext": "^1.7.0" @@ -7046,8 +6947,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/escape-string-regexp": { "version": "4.0.0", @@ -7069,6 +6969,7 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -7309,6 +7210,7 @@ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -7376,6 +7278,7 @@ "integrity": "sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "builtins": "^5.0.1", "eslint-plugin-es": "^4.1.0", @@ -7501,6 +7404,7 @@ "integrity": "sha512-57Zzfw8G6+Gq7axm2Pdo3gW/Rx3h9Yywgn61uE/3elTCOePEHVrn2i5CdfBwA1BLK0Q0WqctICIUSqXZW/VprQ==", "dev": true, "license": "ISC", + "peer": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -7517,6 +7421,7 @@ "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "array-includes": "^3.1.8", "array.prototype.findlast": "^1.2.5", @@ -7731,7 +7636,6 @@ "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", "license": "ISC", - "peer": true, "dependencies": { "d": "^1.0.1", "es5-ext": "^0.10.62", @@ -7818,7 +7722,6 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } @@ -7828,7 +7731,6 @@ "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", "integrity": "sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw==", "license": "ISC", - "peer": true, "dependencies": { "idna-uts46-hx": "^2.3.1", "js-sha3": "^0.5.7" @@ -7838,15 +7740,13 @@ "version": "0.5.7", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/eth-lib": { "version": "0.1.29", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", "license": "MIT", - "peer": true, "dependencies": { "bn.js": "^4.11.6", "elliptic": "^6.4.0", @@ -7860,15 +7760,13 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/eth-lib/node_modules/ws": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", "license": "MIT", - "peer": true, "dependencies": { "async-limiter": "~1.0.0", "safe-buffer": "~5.1.0", @@ -7880,7 +7778,6 @@ "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.2.0.tgz", "integrity": "sha512-28hyiE7HVsWubqhpVLVmZXFd4ITeHi+BUu05o9isf0GUpMtzBUi+8/gFrGaGYzvGAJQmJ3JKj77Mk9G98T84rA==", "license": "MIT", - "peer": true, "dependencies": { "@noble/hashes": "^1.4.0" } @@ -7890,7 +7787,6 @@ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", "license": "MIT", - "peer": true, "engines": { "node": "^14.21.3 || >=16" }, @@ -7903,7 +7799,6 @@ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", "license": "MIT", - "peer": true, "dependencies": { "@noble/curves": "1.4.2", "@noble/hashes": "1.4.0", @@ -7916,7 +7811,6 @@ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", "license": "MIT", - "peer": true, "dependencies": { "@noble/hashes": "1.4.0" }, @@ -7929,7 +7823,6 @@ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 16" }, @@ -7942,7 +7835,6 @@ "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", "license": "MPL-2.0", - "peer": true, "dependencies": { "@types/bn.js": "^5.1.0", "bn.js": "^5.1.2", @@ -7958,15 +7850,13 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/ethereumjs-util/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", "license": "MIT", - "peer": true, "dependencies": { "@types/pbkdf2": "^3.0.0", "@types/secp256k1": "^4.0.1", @@ -8033,7 +7923,6 @@ "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", "license": "MIT", - "peer": true, "dependencies": { "bn.js": "4.11.6", "number-to-bn": "1.7.0" @@ -8047,15 +7936,13 @@ "version": "4.11.6", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", "license": "MIT", - "peer": true, "dependencies": { "d": "1", "es5-ext": "~0.10.14" @@ -8091,7 +7978,6 @@ "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "license": "MIT", - "peer": true, "dependencies": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -8155,7 +8041,6 @@ "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "license": "MIT", - "peer": true, "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -8202,7 +8087,6 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "license": "MIT", - "peer": true, "dependencies": { "ms": "2.0.0" } @@ -8211,15 +8095,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/ext": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", "license": "ISC", - "peer": true, "dependencies": { "type": "^2.7.2" } @@ -8228,8 +8110,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/extsprintf": { "version": "1.3.0", @@ -8238,8 +8119,7 @@ "engines": [ "node >=0.6.0" ], - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -8440,7 +8320,6 @@ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", "license": "MIT", - "peer": true, "dependencies": { "debug": "2.6.9", "encodeurl": "~2.0.0", @@ -8459,7 +8338,6 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "license": "MIT", - "peer": true, "dependencies": { "ms": "2.0.0" } @@ -8468,8 +8346,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/find-cache-dir": { "version": "3.3.2", @@ -8558,7 +8435,6 @@ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "license": "Apache-2.0", - "peer": true, "engines": { "node": "*" } @@ -8584,8 +8460,7 @@ "version": "1.7.1", "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.1.tgz", "integrity": "sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/formdata-polyfill": { "version": "4.0.10", @@ -8604,7 +8479,6 @@ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } @@ -8628,7 +8502,6 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } @@ -8653,7 +8526,6 @@ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", "license": "ISC", - "peer": true, "dependencies": { "minipass": "^2.6.0" } @@ -8849,7 +8721,6 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "license": "MIT", - "peer": true, "dependencies": { "assert-plus": "^1.0.0" } @@ -8894,7 +8765,6 @@ "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", "license": "MIT", - "peer": true, "dependencies": { "min-document": "^2.19.0", "process": "^0.11.10" @@ -8982,7 +8852,6 @@ "resolved": "https://registry.npmjs.org/got/-/got-12.1.0.tgz", "integrity": "sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==", "license": "MIT", - "peer": true, "dependencies": { "@sindresorhus/is": "^4.6.0", "@szmarczak/http-timer": "^5.0.1", @@ -9010,7 +8879,6 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "license": "MIT", - "peer": true, "engines": { "node": ">=10" }, @@ -9059,7 +8927,6 @@ "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", "license": "ISC", - "peer": true, "engines": { "node": ">=4" } @@ -9070,7 +8937,6 @@ "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "deprecated": "this library is no longer supported", "license": "MIT", - "peer": true, "dependencies": { "ajv": "^6.12.3", "har-schema": "^2.0.0" @@ -9185,7 +9051,6 @@ "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "license": "MIT", - "peer": true, "dependencies": { "inherits": "^2.0.4", "readable-stream": "^3.6.0", @@ -9200,7 +9065,6 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "license": "MIT", - "peer": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -9215,7 +9079,6 @@ "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "license": "MIT", - "peer": true, "dependencies": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -9248,7 +9111,6 @@ "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", "license": "MIT", - "peer": true, "dependencies": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -9259,15 +9121,13 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", - "license": "BSD-2-Clause", - "peer": true + "license": "BSD-2-Clause" }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "license": "MIT", - "peer": true, "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -9283,8 +9143,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", "integrity": "sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg==", - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/http-link-header": { "version": "1.1.3", @@ -9300,7 +9159,6 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", "license": "MIT", - "peer": true, "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -9316,7 +9174,6 @@ "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", "license": "MIT", - "peer": true, "dependencies": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.2.0" @@ -9340,7 +9197,6 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "license": "MIT", - "peer": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -9373,7 +9229,6 @@ "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", "license": "MIT", - "peer": true, "dependencies": { "punycode": "2.1.0" }, @@ -9386,7 +9241,6 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", "integrity": "sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA==", "license": "MIT", - "peer": true, "engines": { "node": ">=6" } @@ -9522,7 +9376,6 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.10" } @@ -9532,7 +9385,6 @@ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz", "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", "license": "MIT", - "peer": true, "dependencies": { "call-bound": "^1.0.2", "has-tostringtag": "^1.0.2" @@ -9754,8 +9606,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/is-generator-function": { "version": "1.1.0", @@ -9793,7 +9644,6 @@ "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", "license": "MIT", - "peer": true, "engines": { "node": ">=6.5.0", "npm": ">=3" @@ -10002,8 +9852,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/is-unicode-supported": { "version": "0.1.0", @@ -10094,8 +9943,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/iterator.prototype": { "version": "1.1.5", @@ -10152,8 +10000,7 @@ "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/js-tokens": { "version": "4.0.0", @@ -10179,8 +10026,7 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/jsesc": { "version": "3.1.0", @@ -10212,8 +10058,7 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "license": "(AFL-2.1 OR BSD-3-Clause)", - "peer": true + "license": "(AFL-2.1 OR BSD-3-Clause)" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -10232,8 +10077,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/json5": { "version": "2.2.3", @@ -10354,7 +10198,6 @@ "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "license": "MIT", - "peer": true, "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -10408,7 +10251,6 @@ "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", "hasInstallScript": true, "license": "MIT", - "peer": true, "dependencies": { "node-addon-api": "^2.0.0", "node-gyp-build": "^4.2.0", @@ -10423,7 +10265,6 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "license": "MIT", - "peer": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -10457,6 +10298,7 @@ "resolved": "https://registry.npmjs.org/ky/-/ky-0.33.3.tgz", "integrity": "sha512-CasD9OCEQSFIam2U8efFK81Yeg8vNMTBUqtMOHlrcWQHqUX3HeCl9Dr31u4toV7emlH8Mymk5+9p0lL6mKb/Xw==", "license": "MIT", + "peer": true, "engines": { "node": ">=14.16" }, @@ -10692,7 +10534,6 @@ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", "license": "MIT", - "peer": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -10880,7 +10721,6 @@ "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "license": "MIT", - "peer": true, "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -10899,7 +10739,6 @@ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } @@ -10909,7 +10748,6 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/sindresorhus" } @@ -10936,7 +10774,6 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } @@ -10945,8 +10782,7 @@ "version": "0.3.1", "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/microbundle": { "version": "0.15.1", @@ -11035,7 +10871,6 @@ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "license": "MIT", - "peer": true, "bin": { "mime": "cli.js" }, @@ -11079,7 +10914,6 @@ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=4" } @@ -11088,7 +10922,6 @@ "version": "2.19.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==", - "peer": true, "dependencies": { "dom-walk": "^0.1.0" } @@ -11097,15 +10930,13 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/minimatch": { "version": "3.1.2", @@ -11134,7 +10965,6 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", "license": "ISC", - "peer": true, "dependencies": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -11144,15 +10974,13 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/minizlib": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", "license": "MIT", - "peer": true, "dependencies": { "minipass": "^2.9.0" } @@ -11162,7 +10990,6 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", "license": "MIT", - "peer": true, "bin": { "mkdirp": "dist/cjs/src/bin.js" }, @@ -11179,7 +11006,6 @@ "integrity": "sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w==", "deprecated": "This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.", "license": "ISC", - "peer": true, "dependencies": { "mkdirp": "*" }, @@ -11287,8 +11113,7 @@ "version": "4.14.0", "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/mri": { "version": "1.2.0", @@ -11312,7 +11137,6 @@ "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", "deprecated": "This module has been superseded by the multiformats module", "license": "MIT", - "peer": true, "dependencies": { "base-x": "^3.0.8", "buffer": "^5.5.0" @@ -11337,7 +11161,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -11349,7 +11172,6 @@ "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", "deprecated": "This module has been superseded by the multiformats module", "license": "MIT", - "peer": true, "dependencies": { "varint": "^5.0.0" } @@ -11359,7 +11181,6 @@ "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", "license": "MIT", - "peer": true, "dependencies": { "buffer": "^5.5.0", "multibase": "^0.7.0", @@ -11385,7 +11206,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -11397,7 +11217,6 @@ "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", "deprecated": "This module has been superseded by the multiformats module", "license": "MIT", - "peer": true, "dependencies": { "base-x": "^3.0.8", "buffer": "^5.5.0" @@ -11420,8 +11239,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", "integrity": "sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/nanoid": { "version": "3.3.11", @@ -11461,7 +11279,6 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } @@ -11470,15 +11287,13 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/node-addon-api": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/node-domexception": { "version": "1.0.0", @@ -11525,7 +11340,6 @@ "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", "license": "MIT", - "peer": true, "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -11642,7 +11456,6 @@ "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", "license": "MIT", - "peer": true, "dependencies": { "bn.js": "4.11.6", "strip-hex-prefix": "1.0.0" @@ -11656,15 +11469,13 @@ "version": "4.11.6", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "license": "Apache-2.0", - "peer": true, "engines": { "node": "*" } @@ -11795,7 +11606,6 @@ "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", "integrity": "sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA==", "license": "BSD", - "peer": true, "dependencies": { "http-https": "^1.0.0" } @@ -11805,7 +11615,6 @@ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "license": "MIT", - "peer": true, "dependencies": { "ee-first": "1.1.1" }, @@ -11897,7 +11706,6 @@ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", "license": "MIT", - "peer": true, "engines": { "node": ">=12.20" } @@ -12001,8 +11809,7 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.6.tgz", "integrity": "sha512-Tz11t3uKztEW5FEVZnj1ox8GKblWn+PvHY9TmJV5Mll2uHEwRdR/5Li1OlXoECjLYkApdhWy44ocONwXLiKO5A==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/parse-json": { "version": "5.2.0", @@ -12028,7 +11835,6 @@ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -12074,8 +11880,7 @@ "version": "0.1.12", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/path-type": { "version": "4.0.0", @@ -12102,7 +11907,6 @@ "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.3.tgz", "integrity": "sha512-wfRLBZ0feWRhCIkoMB6ete7czJcnNnqRpcoWQBLqatqXXmelSRqfdDK4F3u9T2s2cXas/hQJcryI/4lAL+XTlA==", "license": "MIT", - "peer": true, "dependencies": { "create-hash": "~1.1.3", "create-hmac": "^1.1.7", @@ -12120,7 +11924,6 @@ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", "integrity": "sha512-snRpch/kwQhcdlnZKYanNF1m0RDlrCdSKQaH87w1FCFPVPNCQ/Il9QJKAX2jVBZddRdaHBMC+zXa9Gw9tmkNUA==", "license": "MIT", - "peer": true, "dependencies": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -12133,7 +11936,6 @@ "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", "integrity": "sha512-0TROgQ1/SxE6KmxWSvXHvRj90/Xo1JvZShofnYF+f6ZsGtR4eES7WfrQzPalmyagfKZCXpVnitiRebZulWsbiw==", "license": "MIT", - "peer": true, "dependencies": { "inherits": "^2.0.1" } @@ -12143,7 +11945,6 @@ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", "integrity": "sha512-J7f4wutN8mdbV08MJnXibYpCOPHR+yzy+iQ/AsjMv2j8cLavQ8VGagDFUwwTAdF8FmRKVeNpbTTEwNHCW1g94w==", "license": "MIT", - "peer": true, "dependencies": { "hash-base": "^2.0.0", "inherits": "^2.0.1" @@ -12153,8 +11954,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/picocolors": { "version": "1.1.1", @@ -12287,6 +12087,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -12906,6 +12707,7 @@ "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "license": "MIT", + "peer": true, "bin": { "prettier": "bin-prettier.js" }, @@ -13072,7 +12874,6 @@ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "license": "MIT", - "peer": true, "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -13086,7 +12887,6 @@ "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", "license": "MIT", - "peer": true, "dependencies": { "punycode": "^2.3.1" }, @@ -13118,7 +12918,6 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "license": "BSD-3-Clause", - "peer": true, "dependencies": { "side-channel": "^1.0.6" }, @@ -13134,7 +12933,6 @@ "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "license": "MIT", - "peer": true, "dependencies": { "decode-uri-component": "^0.2.0", "object-assign": "^4.1.0", @@ -13170,7 +12968,6 @@ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", "license": "MIT", - "peer": true, "engines": { "node": ">=10" }, @@ -13192,7 +12989,6 @@ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } @@ -13202,7 +12998,6 @@ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "license": "MIT", - "peer": true, "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -13555,7 +13350,6 @@ "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", "license": "Apache-2.0", - "peer": true, "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -13587,7 +13381,6 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "license": "MIT", - "peer": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -13602,7 +13395,6 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "license": "BSD-3-Clause", - "peer": true, "engines": { "node": ">=0.6" } @@ -13642,8 +13434,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/resolve-from": { "version": "4.0.0", @@ -13670,7 +13461,6 @@ "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", "license": "MIT", - "peer": true, "dependencies": { "lowercase-keys": "^2.0.0" }, @@ -13683,7 +13473,6 @@ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "license": "MIT", - "peer": true, "engines": { "node": ">=8" } @@ -13721,7 +13510,6 @@ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "license": "MIT", - "peer": true, "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -13732,7 +13520,6 @@ "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", "license": "MPL-2.0", - "peer": true, "dependencies": { "bn.js": "^5.2.0" }, @@ -13744,8 +13531,7 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/rollup": { "version": "2.79.2", @@ -13753,6 +13539,7 @@ "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", "dev": true, "license": "MIT", + "peer": true, "bin": { "rollup": "dist/bin/rollup" }, @@ -14178,15 +13965,13 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/scrypt-js": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/secp256k1": { "version": "4.0.4", @@ -14194,7 +13979,6 @@ "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", "hasInstallScript": true, "license": "MIT", - "peer": true, "dependencies": { "elliptic": "^6.5.7", "node-addon-api": "^5.0.0", @@ -14208,8 +13992,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/semver": { "version": "7.7.2", @@ -14228,7 +14011,6 @@ "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "license": "MIT", - "peer": true, "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -14253,7 +14035,6 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "license": "MIT", - "peer": true, "dependencies": { "ms": "2.0.0" } @@ -14262,15 +14043,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/send/node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -14290,7 +14069,6 @@ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", "license": "MIT", - "peer": true, "dependencies": { "encodeurl": "~2.0.0", "escape-html": "~1.0.3", @@ -14306,7 +14084,6 @@ "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", "license": "MIT", - "peer": true, "dependencies": { "body-parser": "^1.16.0", "cors": "^2.8.1", @@ -14376,15 +14153,13 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/sha.js": { "version": "2.4.12", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", "license": "(MIT AND BSD-3-Clause)", - "peer": true, "dependencies": { "inherits": "^2.0.4", "safe-buffer": "^5.2.1", @@ -14520,15 +14295,13 @@ "url": "https://feross.org/support" } ], - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/simple-get": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.2.tgz", "integrity": "sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==", "license": "MIT", - "peer": true, "dependencies": { "decompress-response": "^3.3.0", "once": "^1.3.1", @@ -14540,7 +14313,6 @@ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", "license": "MIT", - "peer": true, "dependencies": { "mimic-response": "^1.0.0" }, @@ -14602,7 +14374,6 @@ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", "license": "MIT", - "peer": true, "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -14627,8 +14398,7 @@ "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "license": "Unlicense", - "peer": true + "license": "Unlicense" }, "node_modules/stable": { "version": "0.1.8", @@ -14643,7 +14413,6 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -14677,7 +14446,6 @@ "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "integrity": "sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -14848,7 +14616,6 @@ "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", "license": "MIT", - "peer": true, "dependencies": { "is-hex-prefixed": "1.0.0" }, @@ -14957,7 +14724,6 @@ "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.42.tgz", "integrity": "sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ==", "license": "MIT", - "peer": true, "dependencies": { "bluebird": "^3.5.0", "buffer": "^5.0.5", @@ -14977,7 +14743,6 @@ "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", "license": "MIT", - "peer": true, "dependencies": { "defer-to-connect": "^2.0.0" }, @@ -15004,7 +14769,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -15015,7 +14779,6 @@ "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", "license": "MIT", - "peer": true, "engines": { "node": ">=10.6.0" } @@ -15025,7 +14788,6 @@ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", "license": "MIT", - "peer": true, "dependencies": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", @@ -15037,7 +14799,6 @@ "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", "license": "MIT", - "peer": true, "dependencies": { "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", @@ -15063,7 +14824,6 @@ "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", "license": "MIT", - "peer": true, "dependencies": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.0.0" @@ -15077,7 +14837,6 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "license": "MIT", - "peer": true, "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -15087,7 +14846,6 @@ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "license": "MIT", - "peer": true, "engines": { "node": ">=8" } @@ -15097,7 +14855,6 @@ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", "license": "MIT", - "peer": true, "engines": { "node": ">=8" } @@ -15107,7 +14864,6 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 4.0.0" } @@ -15117,7 +14873,6 @@ "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", "license": "ISC", - "peer": true, "dependencies": { "chownr": "^1.1.4", "fs-minipass": "^1.2.7", @@ -15136,7 +14891,6 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "license": "MIT", - "peer": true, "dependencies": { "minimist": "^1.2.6" }, @@ -15148,8 +14902,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/terser": { "version": "5.43.1", @@ -15189,7 +14942,6 @@ "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -15210,7 +14962,6 @@ "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz", "integrity": "sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==", "license": "MIT", - "peer": true, "dependencies": { "isarray": "^2.0.5", "safe-buffer": "^5.2.1", @@ -15238,7 +14989,6 @@ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.6" } @@ -15248,7 +14998,6 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "license": "BSD-3-Clause", - "peer": true, "dependencies": { "psl": "^1.1.28", "punycode": "^2.1.1" @@ -15408,7 +15157,6 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "license": "Apache-2.0", - "peer": true, "dependencies": { "safe-buffer": "^5.0.1" }, @@ -15426,8 +15174,7 @@ "version": "2.7.3", "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==", - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/type-check": { "version": "0.4.0", @@ -15469,7 +15216,6 @@ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "license": "MIT", - "peer": true, "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -15560,7 +15306,6 @@ "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "license": "MIT", - "peer": true, "dependencies": { "is-typedarray": "^1.0.0" } @@ -15570,6 +15315,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -15645,6 +15391,7 @@ "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "7.18.0", "@typescript-eslint/types": "7.18.0", @@ -15834,8 +15581,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/unbox-primitive": { "version": "1.1.0", @@ -15933,7 +15679,6 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -15982,8 +15727,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", "integrity": "sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/utf-8-validate": { "version": "5.0.10", @@ -15991,7 +15735,6 @@ "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", "hasInstallScript": true, "license": "MIT", - "peer": true, "dependencies": { "node-gyp-build": "^4.3.0" }, @@ -16003,15 +15746,13 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/util": { "version": "0.12.5", "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", "license": "MIT", - "peer": true, "dependencies": { "inherits": "^2.0.3", "is-arguments": "^1.0.4", @@ -16031,7 +15772,6 @@ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.4.0" } @@ -16042,7 +15782,6 @@ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", "license": "MIT", - "peer": true, "bin": { "uuid": "bin/uuid" } @@ -16063,15 +15802,13 @@ "version": "5.0.2", "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -16084,7 +15821,6 @@ "node >=0.6.0" ], "license": "MIT", - "peer": true, "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -16126,7 +15862,6 @@ "integrity": "sha512-ZZ/X4sJ0Uh2teU9lAGNS8EjveEppoHNQiKlOXAjedsrdWuaMErBPdLQjXfcrYvN6WM6Su9PMsAxf3FXXZ+HwQw==", "hasInstallScript": true, "license": "LGPL-3.0", - "peer": true, "dependencies": { "@types/node": "^12.12.6", "got": "12.1.0", @@ -16140,15 +15875,13 @@ "version": "12.20.55", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/web3-core": { "version": "1.10.4", "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.4.tgz", "integrity": "sha512-B6elffYm81MYZDTrat7aEhnhdtVE3lDBUZft16Z8awYMZYJDbnykEbJVS+l3mnA7AQTnSDr/1MjWofGDLBJPww==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "@types/bn.js": "^5.1.1", "@types/node": "^12.12.6", @@ -16167,7 +15900,6 @@ "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.4.tgz", "integrity": "sha512-r+L5ylA17JlD1vwS8rjhWr0qg7zVoVMDvWhajWA5r5+USdh91jRUYosp19Kd1m2vE034v7Dfqe1xYRoH2zvG0g==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "web3-eth-iban": "1.10.4", "web3-utils": "1.10.4" @@ -16181,7 +15913,6 @@ "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.4.tgz", "integrity": "sha512-uZTb7flr+Xl6LaDsyTeE2L1TylokCJwTDrIVfIfnrGmnwLc6bmTWCCrm71sSrQ0hqs6vp/MKbQYIYqUN0J8WyA==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "@ethersproject/transactions": "^5.6.2", "web3-core-helpers": "1.10.4", @@ -16198,7 +15929,6 @@ "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.4.tgz", "integrity": "sha512-2de5WnJQ72YcIhYwV/jHLc4/cWJnznuoGTJGD29ncFQHAfwW/MItHFSVKPPA5v8AhJe+r6y4Y12EKvZKjQVBvQ==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "eventemitter3": "4.0.4" }, @@ -16210,15 +15940,13 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/web3-core-requestmanager": { "version": "1.10.4", "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.4.tgz", "integrity": "sha512-vqP6pKH8RrhT/2MoaU+DY/OsYK9h7HmEBNCdoMj+4ZwujQtw/Mq2JifjwsJ7gits7Q+HWJwx8q6WmQoVZAWugg==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "util": "^0.12.5", "web3-core-helpers": "1.10.4", @@ -16235,7 +15963,6 @@ "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.4.tgz", "integrity": "sha512-o0lSQo/N/f7/L76C0HV63+S54loXiE9fUPfHFcTtpJRQNDBVsSDdWRdePbWwR206XlsBqD5VHApck1//jEafTw==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "eventemitter3": "4.0.4", "web3-core-helpers": "1.10.4" @@ -16248,22 +15975,19 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/web3-core/node_modules/@types/node": { "version": "12.20.55", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/web3-eth": { "version": "1.10.4", "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.4.tgz", "integrity": "sha512-Sql2kYKmgt+T/cgvg7b9ce24uLS7xbFrxE4kuuor1zSCGrjhTJ5rRNG8gTJUkAJGKJc7KgnWmgW+cOfMBPUDSA==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "web3-core": "1.10.4", "web3-core-helpers": "1.10.4", @@ -16287,7 +16011,6 @@ "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.4.tgz", "integrity": "sha512-cZ0q65eJIkd/jyOlQPDjr8X4fU6CRL1eWgdLwbWEpo++MPU/2P4PFk5ZLAdye9T5Sdp+MomePPJ/gHjLMj2VfQ==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "@ethersproject/abi": "^5.6.3", "web3-utils": "1.10.4" @@ -16301,7 +16024,6 @@ "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.4.tgz", "integrity": "sha512-ysy5sVTg9snYS7tJjxVoQAH6DTOTkRGR8emEVCWNGLGiB9txj+qDvSeT0izjurS/g7D5xlMAgrEHLK1Vi6I3yg==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "@ethereumjs/common": "2.6.5", "@ethereumjs/tx": "3.5.2", @@ -16323,7 +16045,6 @@ "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", "license": "MIT", - "peer": true, "dependencies": { "bn.js": "^4.11.6", "elliptic": "^6.4.0", @@ -16339,7 +16060,6 @@ "https://github.com/sponsors/ctavan" ], "license": "MIT", - "peer": true, "bin": { "uuid": "dist/bin/uuid" } @@ -16349,7 +16069,6 @@ "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.4.tgz", "integrity": "sha512-Q8PfolOJ4eV9TvnTj1TGdZ4RarpSLmHnUnzVxZ/6/NiTfe4maJz99R0ISgwZkntLhLRtw0C7LRJuklzGYCNN3A==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "@types/bn.js": "^5.1.1", "web3-core": "1.10.4", @@ -16369,7 +16088,6 @@ "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.4.tgz", "integrity": "sha512-LLrvxuFeVooRVZ9e5T6OWKVflHPFgrVjJ/jtisRWcmI7KN/b64+D/wJzXqgmp6CNsMQcE7rpmf4CQmJCrTdsgg==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "content-hash": "^2.5.2", "eth-ens-namehash": "2.0.8", @@ -16389,7 +16107,6 @@ "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.4.tgz", "integrity": "sha512-0gE5iNmOkmtBmbKH2aTodeompnNE8jEyvwFJ6s/AF6jkw9ky9Op9cqfzS56AYAbrqEFuClsqB/AoRves7LDELw==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "bn.js": "^5.2.1", "web3-utils": "1.10.4" @@ -16402,15 +16119,13 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/web3-eth-personal": { "version": "1.10.4", "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.4.tgz", "integrity": "sha512-BRa/hs6jU1hKHz+AC/YkM71RP3f0Yci1dPk4paOic53R4ZZG4MgwKRkJhgt3/GPuPliwS46f/i5A7fEGBT4F9w==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "@types/node": "^12.12.6", "web3-core": "1.10.4", @@ -16427,15 +16142,13 @@ "version": "12.20.55", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/web3-net": { "version": "1.10.4", "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.4.tgz", "integrity": "sha512-mKINnhOOnZ4koA+yV2OT5s5ztVjIx7IY9a03w6s+yao/BUn+Luuty0/keNemZxTr1E8Ehvtn28vbOtW7Ids+Ow==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "web3-core": "1.10.4", "web3-core-method": "1.10.4", @@ -16450,7 +16163,6 @@ "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.4.tgz", "integrity": "sha512-m2P5Idc8hdiO0l60O6DSCPw0kw64Zgi0pMjbEFRmxKIck2Py57RQMu4bxvkxJwkF06SlGaEQF8rFZBmuX7aagQ==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "abortcontroller-polyfill": "^1.7.5", "cross-fetch": "^4.0.0", @@ -16466,7 +16178,6 @@ "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.1.0.tgz", "integrity": "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==", "license": "MIT", - "peer": true, "dependencies": { "node-fetch": "^2.7.0" } @@ -16476,7 +16187,6 @@ "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.4.tgz", "integrity": "sha512-YRF/bpQk9z3WwjT+A6FI/GmWRCASgd+gC0si7f9zbBWLXjwzYAKG73bQBaFRAHex1hl4CVcM5WUMaQXf3Opeuw==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "oboe": "2.1.5", "web3-core-helpers": "1.10.4" @@ -16490,7 +16200,6 @@ "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.4.tgz", "integrity": "sha512-j3FBMifyuFFmUIPVQR4pj+t5ILhAexAui0opgcpu9R5LxQrLRUZxHSnU+YO25UycSOa/NAX8A+qkqZNpcFAlxA==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "eventemitter3": "4.0.4", "web3-core-helpers": "1.10.4", @@ -16504,8 +16213,7 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/web3-shh": { "version": "1.10.4", @@ -16513,7 +16221,6 @@ "integrity": "sha512-cOH6iFFM71lCNwSQrC3niqDXagMqrdfFW85hC9PFUrAr3PUrIem8TNstTc3xna2bwZeWG6OBy99xSIhBvyIACw==", "hasInstallScript": true, "license": "LGPL-3.0", - "peer": true, "dependencies": { "web3-core": "1.10.4", "web3-core-method": "1.10.4", @@ -16529,7 +16236,6 @@ "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", "license": "LGPL-3.0", - "peer": true, "dependencies": { "@ethereumjs/util": "^8.1.0", "bn.js": "^5.2.1", @@ -16548,8 +16254,7 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/webidl-conversions": { "version": "3.0.1", @@ -16562,7 +16267,6 @@ "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.35.tgz", "integrity": "sha512-/REy6amwPZl44DDzvRCkaI1q1bIiQB0mEFQLUrhz3z2EK91cp3n72rAjUlrTP0zV22HJIUOVHQGPxhFRjxjt+Q==", "license": "Apache-2.0", - "peer": true, "dependencies": { "bufferutil": "^4.0.1", "debug": "^2.2.0", @@ -16580,7 +16284,6 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "license": "MIT", - "peer": true, "dependencies": { "ms": "2.0.0" } @@ -16589,8 +16292,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/whatwg-url": { "version": "5.0.0", @@ -16773,7 +16475,6 @@ "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", "license": "MIT", - "peer": true, "dependencies": { "global": "~4.4.0", "is-function": "^1.0.1", @@ -16786,7 +16487,6 @@ "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", "license": "MIT", - "peer": true, "dependencies": { "buffer-to-arraybuffer": "^0.0.5", "object-assign": "^4.1.1", @@ -16802,7 +16502,6 @@ "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", "license": "MIT", - "peer": true, "dependencies": { "xhr-request": "^1.1.0" } @@ -16818,7 +16517,6 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.4" } @@ -16839,7 +16537,6 @@ "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==", "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.32" } diff --git a/package.json b/package.json index da7b7c0..2f64ec4 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@oasisprotocol/sapphire-paratime": "^1.3.2", "@oceanprotocol/contracts": "^2.5.0", "@oceanprotocol/ddo-js": "^0.1.4", - "@oceanprotocol/lib": "^5.1.2", + "@oceanprotocol/lib": "^5.1.3", "commander": "^13.1.0", "cross-fetch": "^3.1.5", "crypto-js": "^4.1.1", diff --git a/src/cli.ts b/src/cli.ts index 54dcb44..833e9b9 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,14 +1,13 @@ -import { Command } from 'commander'; -import { Commands } from './commands.js'; -import { JsonRpcProvider, Signer, ethers } from 'ethers'; -import chalk from 'chalk'; -import { stdin as input, stdout as output } from 'node:process'; -import { createInterface } from 'readline/promises'; -import { unitsToAmount } from '@oceanprotocol/lib'; -import { toBoolean } from './helpers.js'; +import { Command } from "commander"; +import { Commands } from "./commands.js"; +import { JsonRpcProvider, Signer, ethers } from "ethers"; +import chalk from "chalk"; +import { stdin as input, stdout as output } from "node:process"; +import { createInterface } from "readline/promises"; +import { unitsToAmount } from "@oceanprotocol/lib"; +import { toBoolean } from "./helpers.js"; async function initializeSigner() { - const provider = new JsonRpcProvider(process.env.RPC); let signer: Signer; @@ -23,7 +22,6 @@ async function initializeSigner() { } export async function createCLI() { - if (!process.env.MNEMONIC && !process.env.PRIVATE_KEY) { console.error(chalk.red("Have you forgot to set MNEMONIC or PRIVATE_KEY?")); process.exit(1); @@ -41,33 +39,33 @@ export async function createCLI() { const program = new Command(); program - .name('ocean-cli') - .description('CLI tool to interact with Ocean Protocol') - .version('2.0.0') - .helpOption('-h, --help', 'Display help for command'); + .name("ocean-cli") + .description("CLI tool to interact with Ocean Protocol") + .version("2.0.0") + .helpOption("-h, --help", "Display help for command"); // Custom help command to support legacy "h" invocation. // Note: We use console.log(program.helpInformation()) to print the full help output. program - .command('help') - .alias('h') - .description('Display help for all commands') + .command("help") + .alias("h") + .description("Display help for all commands") .action(() => { console.log(program.helpInformation()); }); // getDDO command program - .command('getDDO') - .description('Gets DDO for an asset using the asset did') - .argument('', 'The asset DID') - .option('-d, --did ', 'The asset DID') + .command("getDDO") + .description("Gets DDO for an asset using the asset did") + .argument("", "The asset DID") + .option("-d, --did ", "The asset DID") .action(async (did, options) => { const assetDid = options.did || did; if (!assetDid) { - console.error(chalk.red('DID is required')); + console.error(chalk.red("DID is required")); // process.exit(1); - return + return; } const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -76,17 +74,17 @@ export async function createCLI() { // publish command program - .command('publish') - .description('Publishes a new asset with access service or compute service') - .argument('', 'Path to metadata file') - .option('-f, --file ', 'Path to metadata file') - .option('-e, --encrypt [boolean]', 'Encrypt DDO', true) + .command("publish") + .description("Publishes a new asset with access service or compute service") + .argument("", "Path to metadata file") + .option("-f, --file ", "Path to metadata file") + .option("-e, --encrypt [boolean]", "Encrypt DDO", true) .action(async (metadataFile, options) => { const file = options.file || metadataFile; if (!file) { - console.error(chalk.red('Metadata file is required')); + console.error(chalk.red("Metadata file is required")); // process.exit(1); - return + return; } const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -95,17 +93,17 @@ export async function createCLI() { // publishAlgo command program - .command('publishAlgo') - .description('Publishes a new algorithm') - .argument('', 'Path to metadata file') - .option('-f, --file ', 'Path to metadata file') - .option('-e, --encrypt [boolean]', 'Encrypt DDO', true) + .command("publishAlgo") + .description("Publishes a new algorithm") + .argument("", "Path to metadata file") + .option("-f, --file ", "Path to metadata file") + .option("-e, --encrypt [boolean]", "Encrypt DDO", true) .action(async (metadataFile, options) => { const file = options.file || metadataFile; if (!file) { - console.error(chalk.red('Metadata file is required')); + console.error(chalk.red("Metadata file is required")); // process.exit(1); - return + return; } const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -114,21 +112,21 @@ export async function createCLI() { // editAsset command (alias "edit" for backwards compatibility) program - .command('editAsset') - .alias('edit') - .description('Updates DDO using the metadata items in the file') - .argument('', 'Dataset DID') - .argument('', 'Updated metadata file') - .option('-d, --did ', 'Dataset DID') - .option('-f, --file ', 'Updated metadata file') - .option('-e, --encrypt [boolean]', 'Encrypt DDO', true) + .command("editAsset") + .alias("edit") + .description("Updates DDO using the metadata items in the file") + .argument("", "Dataset DID") + .argument("", "Updated metadata file") + .option("-d, --did ", "Dataset DID") + .option("-f, --file ", "Updated metadata file") + .option("-e, --encrypt [boolean]", "Encrypt DDO", true) .action(async (datasetDid, metadataFile, options) => { const dsDid = options.did || datasetDid; const file = options.file || metadataFile; if (!dsDid || !file) { - console.error(chalk.red('Dataset DID and metadata file are required')); + console.error(chalk.red("Dataset DID and metadata file are required")); // process.exit(1); - return + return; } const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -137,19 +135,19 @@ export async function createCLI() { // download command program - .command('download') - .description('Downloads an asset into specified folder') - .argument('', 'The asset DID') - .argument('[folder]', 'Destination folder', '.') - .option('-d, --did ', 'The asset DID') - .option('-f, --folder [folder]', 'Destination folder', '.') + .command("download") + .description("Downloads an asset into specified folder") + .argument("", "The asset DID") + .argument("[folder]", "Destination folder", ".") + .option("-d, --did ", "The asset DID") + .option("-f, --folder [folder]", "Destination folder", ".") .action(async (did, folder, options) => { const assetDid = options.did || did; - const destFolder = options.folder || folder || '.'; + const destFolder = options.folder || folder || "."; if (!assetDid) { - console.error(chalk.red('DID is required')); + console.error(chalk.red("DID is required")); // process.exit(1); - return + return; } const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -158,20 +156,20 @@ export async function createCLI() { // allowAlgo command program - .command('allowAlgo') - .description('Approves an algorithm to run on a dataset') - .argument('', 'Dataset DID') - .argument('', 'Algorithm DID') - .option('-d, --dataset ', 'Dataset DID') - .option('-a, --algo ', 'Algorithm DID') - .option('-e, --encrypt [boolean]', 'Encrypt DDO', true) + .command("allowAlgo") + .description("Approves an algorithm to run on a dataset") + .argument("", "Dataset DID") + .argument("", "Algorithm DID") + .option("-d, --dataset ", "Dataset DID") + .option("-a, --algo ", "Algorithm DID") + .option("-e, --encrypt [boolean]", "Encrypt DDO", true) .action(async (datasetDid, algoDid, options) => { const dsDid = options.dataset || datasetDid; const aDid = options.algo || algoDid; if (!dsDid || !aDid) { - console.error(chalk.red('Dataset DID and Algorithm DID are required')); + console.error(chalk.red("Dataset DID and Algorithm DID are required")); // process.exit(1); - return + return; } const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -180,89 +178,137 @@ export async function createCLI() { // startCompute command program - .command('startCompute') - .description('Starts a compute job') - .argument('', 'Dataset DIDs (comma-separated) OR (empty array for none)') - .argument('', 'Algorithm DID') - .argument('', 'Compute environment ID') - .argument('', 'maxJobDuration for compute job') - .argument('', 'Payment token for compute') - .argument('', 'Resources of compute environment stringified') - .option('-d, --datasets ', 'Dataset DIDs (comma-separated) OR (empty array for none)') - .option('-a, --algo ', 'Algorithm DID') - .option('-e, --env ', 'Compute environment ID') - .option('--maxJobDuration ', 'Compute maxJobDuration') - .option('-t, --token ', 'Compute payment token') - .option('--resources ', 'Compute resources') - .option('--accept [boolean]', 'Auto-confirm payment for compute job (true/false)', toBoolean) - .action(async (datasetDids, algoDid, computeEnvId, maxJobDuration, paymentToken, resources, options) => { - const dsDids = options.datasets || datasetDids; - const aDid = options.algo || algoDid; - const envId = options.env || computeEnvId; - const jobDuration = options.maxJobDuration || maxJobDuration; - const token = options.token || paymentToken; - const res = options.resources || resources; - if (!dsDids || !aDid || !envId || !jobDuration || !token || !res) { - console.error(chalk.red('Missing required arguments')); - // process.exit(1); - return - } - const { signer, chainId } = await initializeSigner(); - const commands = new Commands(signer, chainId); - - const initArgs = [null, dsDids, aDid, envId, jobDuration, token, res]; - const initResp = await commands.initializeCompute(initArgs); - - if (!initResp) { - console.error(chalk.red('Initialization failed. Aborting.')); - return; - } + .command("startCompute") + .description("Starts a compute job") + .argument( + "", + "Dataset DIDs (comma-separated) OR (empty array for none)" + ) + .argument("", "Algorithm DID") + .argument("", "Compute environment ID") + .argument("", "maxJobDuration for compute job") + .argument("", "Payment token for compute") + .argument("", "Resources of compute environment stringified") + .option( + "-d, --datasets ", + "Dataset DIDs (comma-separated) OR (empty array for none)" + ) + .option("-a, --algo ", "Algorithm DID") + .option("-e, --env ", "Compute environment ID") + .option("--maxJobDuration ", "Compute maxJobDuration") + .option("-t, --token ", "Compute payment token") + .option("--resources ", "Compute resources") + .option( + "--accept [boolean]", + "Auto-confirm payment for compute job (true/false)", + toBoolean + ) + .action( + async ( + datasetDids, + algoDid, + computeEnvId, + maxJobDuration, + paymentToken, + resources, + options + ) => { + const dsDids = options.datasets || datasetDids; + const aDid = options.algo || algoDid; + const envId = options.env || computeEnvId; + const jobDuration = options.maxJobDuration || maxJobDuration; + const token = options.token || paymentToken; + const res = options.resources || resources; + if (!dsDids || !aDid || !envId || !jobDuration || !token || !res) { + console.error(chalk.red("Missing required arguments")); + // process.exit(1); + return; + } + const { signer, chainId } = await initializeSigner(); + const commands = new Commands(signer, chainId); - console.log(chalk.yellow('\n--- Payment Details ---')); - console.log(JSON.stringify(initResp, null, 2)); - const amount = await unitsToAmount(signer, initResp.payment.token, initResp.payment.amount.toString()); + const initArgs = [null, dsDids, aDid, envId, jobDuration, token, res]; + const initResp = await commands.initializeCompute(initArgs); - const proceed = options.accept; - if (!proceed) { - if (!process.stdin.isTTY) { - console.error(chalk.red('Cannot prompt for confirmation (non-TTY). Use "--accept true" to skip.')); - process.exit(1); - } - const rl = createInterface({ input, output }); - const confirmation = await rl.question(`\nProceed with payment for starting compute job at price ${amount} in tokens from address ${initResp.payment.token}? (y/n): `); - rl.close(); - if (confirmation.toLowerCase() !== 'y' && confirmation.toLowerCase() !== 'yes') { - console.log(chalk.red('Compute job canceled by user.')); + if (!initResp) { + console.error(chalk.red("Initialization failed. Aborting.")); return; } - } else { - console.log(chalk.cyan('Auto-confirm enabled with --yes flag.')); - } - const computeArgs = [null, dsDids, aDid, envId, JSON.stringify(initResp), jobDuration, token, res]; + console.log(chalk.yellow("\n--- Payment Details ---")); + console.log(JSON.stringify(initResp, null, 2)); + const amount = await unitsToAmount( + signer, + initResp.payment.token, + initResp.payment.amount.toString() + ); + + const proceed = options.accept; + if (!proceed) { + if (!process.stdin.isTTY) { + console.error( + chalk.red( + 'Cannot prompt for confirmation (non-TTY). Use "--accept true" to skip.' + ) + ); + process.exit(1); + } + const rl = createInterface({ input, output }); + const confirmation = await rl.question( + `\nProceed with payment for starting compute job at price ${amount} in tokens from address ${initResp.payment.token}? (y/n): ` + ); + rl.close(); + if ( + confirmation.toLowerCase() !== "y" && + confirmation.toLowerCase() !== "yes" + ) { + console.log(chalk.red("Compute job canceled by user.")); + return; + } + } else { + console.log(chalk.cyan("Auto-confirm enabled with --yes flag.")); + } - await commands.computeStart(computeArgs); - console.log(chalk.green('Compute job started successfully.')); - }); + const computeArgs = [ + null, + dsDids, + aDid, + envId, + JSON.stringify(initResp), + jobDuration, + token, + res, + ]; + + await commands.computeStart(computeArgs); + console.log(chalk.green("Compute job started successfully.")); + } + ); // startFreeCompute command program - .command('startFreeCompute') - .description('Starts a FREE compute job') - .argument('', 'Dataset DIDs (comma-separated) OR (empty array for none)') - .argument('', 'Algorithm DID') - .argument('', 'Compute environment ID') - .option('-d, --datasets ', 'Dataset DIDs (comma-separated) OR (empty array for none)') - .option('-a, --algo ', 'Algorithm DID') - .option('-e, --env ', 'Compute environment ID') + .command("startFreeCompute") + .description("Starts a FREE compute job") + .argument( + "", + "Dataset DIDs (comma-separated) OR (empty array for none)" + ) + .argument("", "Algorithm DID") + .argument("", "Compute environment ID") + .option( + "-d, --datasets ", + "Dataset DIDs (comma-separated) OR (empty array for none)" + ) + .option("-a, --algo ", "Algorithm DID") + .option("-e, --env ", "Compute environment ID") .action(async (datasetDids, algoDid, computeEnvId, options) => { const dsDids = options.datasets || datasetDids; const aDid = options.algo || algoDid; const envId = options.env || computeEnvId; if (!dsDids || !aDid || !envId) { - console.error(chalk.red('Missing required arguments')); + console.error(chalk.red("Missing required arguments")); // process.exit(1); - return + return; } const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -271,9 +317,9 @@ export async function createCLI() { // getComputeEnvironments command program - .command('getComputeEnvironments') - .alias('getC2DEnvs') - .description('Gets the existing compute environments') + .command("getComputeEnvironments") + .alias("getC2DEnvs") + .description("Gets the existing compute environments") .action(async () => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -282,35 +328,35 @@ export async function createCLI() { // startFreeCompute command program - .command('computeStreamableLogs') - .description('Gets the existing compute streamable logs') - .argument('', 'Job ID') - .option('-j, --job ', 'Job ID') + .command("computeStreamableLogs") + .description("Gets the existing compute streamable logs") + .argument("", "Job ID") + .option("-j, --job ", "Job ID") .action(async (jobId, options) => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); - const args = jobId || options.job + const args = jobId || options.job; await commands.computeStreamableLogs([args]); }); // stopCompute command program - .command('stopCompute') - .description('Stops a compute job') - .argument('', 'Dataset DID') - .argument('', 'Job ID') - .argument('', 'Agreement ID') - .option('-d, --dataset ', 'Dataset DID') - .option('-j, --job ', 'Job ID') - .option('-a, --agreement [agreementId]', 'Agreement ID') + .command("stopCompute") + .description("Stops a compute job") + .argument("", "Dataset DID") + .argument("", "Job ID") + .argument("", "Agreement ID") + .option("-d, --dataset ", "Dataset DID") + .option("-j, --job ", "Job ID") + .option("-a, --agreement [agreementId]", "Agreement ID") .action(async (datasetDid, jobId, agreementId, options) => { const dsDid = options.dataset || datasetDid; const jId = options.job || jobId; const agrId = options.agreement || agreementId; if (!dsDid || !jId) { - console.error(chalk.red('Dataset DID and Job ID are required')); + console.error(chalk.red("Dataset DID and Job ID are required")); // process.exit(1); - return + return; } const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -321,22 +367,22 @@ export async function createCLI() { // getJobStatus command program - .command('getJobStatus') - .description('Displays the compute job status') - .argument('', 'Dataset DID') - .argument('', 'Job ID') - .argument('', 'Agreement ID') - .option('-d, --dataset ', 'Dataset DID') - .option('-j, --job ', 'Job ID') - .option('-a, --agreement [agreementId]', 'Agreement ID') + .command("getJobStatus") + .description("Displays the compute job status") + .argument("", "Dataset DID") + .argument("", "Job ID") + .argument("", "Agreement ID") + .option("-d, --dataset ", "Dataset DID") + .option("-j, --job ", "Job ID") + .option("-a, --agreement [agreementId]", "Agreement ID") .action(async (datasetDid, jobId, agreementId, options) => { const dsDid = options.dataset || datasetDid; const jId = options.job || jobId; const agrId = options.agreement || agreementId; if (!dsDid || !jId) { - console.error(chalk.red('Dataset DID and Job ID are required')); + console.error(chalk.red("Dataset DID and Job ID are required")); // process.exit(1); - return + return; } const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -347,21 +393,26 @@ export async function createCLI() { // downloadJobResults command program - .command('downloadJobResults') - .description('Downloads compute job results') - .argument('', 'Job ID') - .argument('', 'Result index', parseInt) - .argument('[destinationFolder]', 'Destination folder', '.') + .command("downloadJobResults") + .description("Downloads compute job results") + .argument("", "Job ID") + .argument("", "Result index", parseInt) + .argument("[destinationFolder]", "Destination folder", ".") .action(async (jobId, resultIndex, destinationFolder) => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); - await commands.downloadJobResults([null, jobId, resultIndex, destinationFolder]); + await commands.downloadJobResults([ + null, + jobId, + resultIndex, + destinationFolder, + ]); }); // mintOcean command program - .command('mintOcean') - .description('Mints Ocean tokens') + .command("mintOcean") + .description("Mints Ocean tokens") .action(async () => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -370,21 +421,20 @@ export async function createCLI() { // Generate new auth token program - .command('generateAuthToken') - .description('Generate new auth token') + .command("generateAuthToken") + .description("Generate new auth token") .action(async () => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); await commands.generateAuthToken(); }); - // Invalidate auth token program - .command('invalidateAuthToken') - .description('Invalidate auth token') - .argument('', 'Auth token') - .option('-t, --token ', 'Auth token') + .command("invalidateAuthToken") + .description("Invalidate auth token") + .argument("", "Auth token") + .option("-t, --token ", "Auth token") .action(async (token, options) => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -393,32 +443,37 @@ export async function createCLI() { // Escrow deposit command program - .command('depositEscrow') - .description('Deposit tokens into the escrow contract') - .argument('', 'Address of the token to deposit') - .argument('', 'Amount of tokens to deposit') - .option('-t, --token ', 'Address of the token to deposit') - .option('-a, --amount ', 'Amount of tokens to deposit') + .command("depositEscrow") + .description("Deposit tokens into the escrow contract") + .argument("", "Address of the token to deposit") + .argument("", "Amount of tokens to deposit") + .option("-t, --token ", "Address of the token to deposit") + .option("-a, --amount ", "Amount of tokens to deposit") .action(async (token, amount, options) => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); const tokenAddress = options.token || token; const amountToDeposit = options.amount || amount; - const success = await commands.depositToEscrow(signer, tokenAddress, amountToDeposit, chainId); + const success = await commands.depositToEscrow( + signer, + tokenAddress, + amountToDeposit, + chainId + ); if (!success) { - console.log(chalk.red('Deposit failed')); + console.log(chalk.red("Deposit failed")); return; } - console.log(chalk.green('Deposit successful')); + console.log(chalk.green("Deposit successful")); }); // Check escrow deposited balance program - .command('getUserFundsEscrow') - .description('Get deposited token amount in escrow for user') - .argument('', 'Address of the token to check') - .option('-t, --token ', 'Address of the token to check') + .command("getUserFundsEscrow") + .description("Get deposited token amount in escrow for user") + .argument("", "Address of the token to check") + .option("-t, --token ", "Address of the token to check") .action(async (token, options) => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -427,12 +482,12 @@ export async function createCLI() { // Withdraw from escrow program - .command('withdrawFromEscrow') - .description('Withdraw tokens from escrow') - .argument('', 'Address of the token to check') - .argument('', 'Amount of tokens to withdraw') - .option('-t, --token ', 'Address of the token to check') - .option('-a, --amount ', 'Amount of tokens to withdraw') + .command("withdrawFromEscrow") + .description("Withdraw tokens from escrow") + .argument("", "Address of the token to check") + .argument("", "Amount of tokens to withdraw") + .option("-t, --token ", "Address of the token to check") + .option("-a, --amount ", "Amount of tokens to withdraw") .action(async (token, amount, options) => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -441,67 +496,104 @@ export async function createCLI() { // Escrow authorization command program - .command('authorizeEscrow') - .description('Authorize a payee to lock and claim funds from escrow') - .argument('', 'Address of the token to authorize') - .argument('', 'Address of the payee to authorize') - .argument('', 'Maximum amount that can be locked by payee') - .argument('', 'Maximum lock duration in seconds') - .argument('', 'Maximum number of locks allowed') - .option('-t, --token ', 'Address of the token to authorize') - .option('-p, --payee ', 'Address of the payee to authorize') - .option('-m, --maxLockedAmount ', 'Maximum amount that can be locked by payee') - .option('-s, --maxLockSeconds ', 'Maximum lock duration in seconds') - .option('-c, --maxLockCounts ', 'Maximum number of locks allowed') - .action(async (token, payee, maxLockedAmount, maxLockSeconds, maxLockCounts, options) => { - const { signer, chainId } = await initializeSigner(); - const commands = new Commands(signer, chainId); - const tokenAddress = options.token || token; - const payeeAddress = options.payee || payee; - const maxLockedAmountValue = options.maxLockedAmount || maxLockedAmount; - const maxLockSecondsValue = options.maxLockSeconds || maxLockSeconds; - const maxLockCountsValue = options.maxLockCounts || maxLockCounts; - - const success = await commands.authorizeEscrowPayee( - tokenAddress, - payeeAddress, - maxLockedAmountValue, - maxLockSecondsValue, - maxLockCountsValue, - ); + .command("authorizeEscrow") + .description("Authorize a payee to lock and claim funds from escrow") + .argument("", "Address of the token to authorize") + .argument("", "Address of the payee to authorize") + .argument("", "Maximum amount that can be locked by payee") + .argument("", "Maximum lock duration in seconds") + .argument("", "Maximum number of locks allowed") + .option("-t, --token ", "Address of the token to authorize") + .option("-p, --payee ", "Address of the payee to authorize") + .option( + "-m, --maxLockedAmount ", + "Maximum amount that can be locked by payee" + ) + .option( + "-s, --maxLockSeconds ", + "Maximum lock duration in seconds" + ) + .option( + "-c, --maxLockCounts ", + "Maximum number of locks allowed" + ) + .action( + async ( + token, + payee, + maxLockedAmount, + maxLockSeconds, + maxLockCounts, + options + ) => { + const { signer, chainId } = await initializeSigner(); + const commands = new Commands(signer, chainId); + const tokenAddress = options.token || token; + const payeeAddress = options.payee || payee; + const maxLockedAmountValue = options.maxLockedAmount || maxLockedAmount; + const maxLockSecondsValue = options.maxLockSeconds || maxLockSeconds; + const maxLockCountsValue = options.maxLockCounts || maxLockCounts; + + const success = await commands.authorizeEscrowPayee( + tokenAddress, + payeeAddress, + maxLockedAmountValue, + maxLockSecondsValue, + maxLockCountsValue + ); + + if (!success) { + console.log(chalk.red("Authorization failed")); + return; + } - if (!success) { - console.log(chalk.red('Authorization failed')); - return; + console.log(chalk.green("Authorization successful")); } - - console.log(chalk.green('Authorization successful')); - }); + ); program - .command('getAuthorizationsEscrow') - .description('Get authorizations for escrow') - .argument('', 'Address of the token to check') - .argument('', 'Address of the payee to check') - .option('-t, --token ', 'Address of the token to check') - .option('-p, --payee ', 'Address of the payee to check') + .command("getAuthorizationsEscrow") + .description("Get authorizations for escrow") + .argument("", "Address of the token to check") + .argument("", "Address of the payee to check") + .option("-t, --token ", "Address of the token to check") + .option("-p, --payee ", "Address of the payee to check") .action(async (token, payee, options) => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); - await commands.getAuthorizationsEscrow(token || options.token, payee || options.payee); + await commands.getAuthorizationsEscrow( + token || options.token, + payee || options.payee + ); }); program - .command('createAccessList') - .description('Create a new access list contract') - .argument('', 'Name for the access list') - .argument('', 'Symbol for the access list') - .argument('[transferable]', 'Whether tokens are transferable (true/false)', 'false') - .argument('[initialUsers]', 'Comma-separated list of initial user addresses', '') - .option('-n, --name ', 'Name for the access list') - .option('-s, --symbol ', 'Symbol for the access list') - .option('-t, --transferable [transferable]', 'Whether tokens are transferable (true/false)', 'false') - .option('-u, --users [initialUsers]', 'Comma-separated list of initial user addresses', '') + .command("createAccessList") + .description("Create a new access list contract") + .argument("", "Name for the access list") + .argument("", "Symbol for the access list") + .argument( + "[transferable]", + "Whether tokens are transferable (true/false)", + "false" + ) + .argument( + "[initialUsers]", + "Comma-separated list of initial user addresses", + "" + ) + .option("-n, --name ", "Name for the access list") + .option("-s, --symbol ", "Symbol for the access list") + .option( + "-t, --transferable [transferable]", + "Whether tokens are transferable (true/false)", + "false" + ) + .option( + "-u, --users [initialUsers]", + "Comma-separated list of initial user addresses", + "" + ) .action(async (name, symbol, transferable, initialUsers, options) => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); @@ -509,58 +601,103 @@ export async function createCLI() { options.name || name, options.symbol || symbol, options.transferable || transferable, - options.users || initialUsers + options.users || initialUsers, ]); }); program - .command('addToAccessList') - .description('Add user(s) to an access list') - .argument('', 'Address of the access list contract') - .argument('', 'Comma-separated list of user addresses to add') - .option('-a, --address ', 'Address of the access list contract') - .option('-u, --users ', 'Comma-separated list of user addresses to add') + .command("addToAccessList") + .description("Add user(s) to an access list") + .argument("", "Address of the access list contract") + .argument("", "Comma-separated list of user addresses to add") + .option( + "-a, --address ", + "Address of the access list contract" + ) + .option( + "-u, --users ", + "Comma-separated list of user addresses to add" + ) .action(async (accessListAddress, users, options) => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); await commands.addToAccessList([ options.address || accessListAddress, - options.users || users + options.users || users, ]); }); program - .command('checkAccessList') - .description('Check if user(s) are on an access list') - .argument('', 'Address of the access list contract') - .argument('', 'Comma-separated list of user addresses to check') - .option('-a, --address ', 'Address of the access list contract') - .option('-u, --users ', 'Comma-separated list of user addresses to check') + .command("checkAccessList") + .description("Check if user(s) are on an access list") + .argument("", "Address of the access list contract") + .argument("", "Comma-separated list of user addresses to check") + .option( + "-a, --address ", + "Address of the access list contract" + ) + .option( + "-u, --users ", + "Comma-separated list of user addresses to check" + ) .action(async (accessListAddress, users, options) => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); await commands.checkAccessList([ options.address || accessListAddress, - options.users || users + options.users || users, ]); }); program - .command('removeFromAccessList') - .description('Remove user(s) from an access list') - .argument('', 'Address of the access list contract') - .argument('', 'Comma-separated list of user addresses to remove') - .option('-a, --address ', 'Address of the access list contract') - .option('-u, --users ', 'Comma-separated list of user addresses to remove') + .command("removeFromAccessList") + .description("Remove user(s) from an access list") + .argument("", "Address of the access list contract") + .argument("", "Comma-separated list of user addresses to remove") + .option( + "-a, --address ", + "Address of the access list contract" + ) + .option( + "-u, --users ", + "Comma-separated list of user addresses to remove" + ) .action(async (accessListAddress, users, options) => { const { signer, chainId } = await initializeSigner(); const commands = new Commands(signer, chainId); await commands.removeFromAccessList([ options.address || accessListAddress, - options.users || users + options.users || users, ]); }); + program + .command("downloadNodeLogs") + .description("Download logs from a node as an admin") + .argument("", "Output directory to save the logs") + .argument( + "[last]", + "Period of time to get logs from now (in hours). Use either last or from-to" + ) + .argument("[from]", "Start time (epoch ms) to get logs from") + .argument("[to]", "End time (epoch ms) to get logs to") + .argument("[maxLogs]", "Maximum number of logs to retrieve (default: 100, max: 1000)") + .option("-o, --output ", "Output directory to save the logs") + .option("-l, --last [last]", "Period of time to get logs from now (in hours)") + .option("-f, --from [from]", "Start time (epoch ms) to get logs from") + .option("-t, --to [to]", "End time (epoch ms) to get logs to") + .option("-m, --maxLogs [maxLogs]", "Maximum number of logs to retrieve (default: 100, max: 1000)") + .action(async (output, last, from, to, options) => { + const { signer, chainId } = await initializeSigner(); + const commands = new Commands(signer, chainId); + await commands.downloadNodeLogs([ + options.output || output, + options.last || last, + options.from || from, + options.to || to, + options.maxLogs, + ]); + }); return program; -} \ No newline at end of file +} diff --git a/src/commands.ts b/src/commands.ts index 112e8e2..165624b 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -1,1632 +1,1780 @@ import fs from "fs"; import util from "util"; import { - createAssetUtil, - handleComputeOrder, - updateAssetMetadata, - downloadFile, - isOrderable, - getMetadataURI, - getIndexingWaitSettings, - IndexerWaitParams, - fixAndParseProviderFees, - getConfigByChainId + createAssetUtil, + handleComputeOrder, + updateAssetMetadata, + downloadFile, + isOrderable, + getMetadataURI, + getIndexingWaitSettings, + IndexerWaitParams, + fixAndParseProviderFees, + getConfigByChainId, } from "./helpers.js"; import { - Aquarius, - ComputeAlgorithm, - ComputeJob, - ComputeOutput, - Config, - ConfigHelper, - Datatoken, - ProviderInstance, - amountToUnits, - getHash, - orderAsset, - sendTx, - unitsToAmount, - EscrowContract, - getTokenDecimals, - AccesslistFactory, - AccessListContract + Aquarius, + ComputeAlgorithm, + ComputeJob, + ComputeOutput, + Config, + ConfigHelper, + Datatoken, + ProviderInstance, + amountToUnits, + getHash, + orderAsset, + sendTx, + unitsToAmount, + EscrowContract, + getTokenDecimals, + AccesslistFactory, + AccessListContract, } from "@oceanprotocol/lib"; -import { Asset } from '@oceanprotocol/ddo-js'; +import { Asset } from "@oceanprotocol/ddo-js"; import { Signer, ethers, getAddress } from "ethers"; import { interactiveFlow } from "./interactiveFlow.js"; import { publishAsset } from "./publishAsset.js"; -import chalk from 'chalk'; +import chalk from "chalk"; export class Commands { - public signer: Signer; - public config: Config; - public aquarius: Aquarius; - public oceanNodeUrl: string; - // optional settings for indexing wait time - private indexingParams: IndexerWaitParams; - - constructor(signer: Signer, network: string | number, config?: Config) { - this.signer = signer; - this.config = config || new ConfigHelper().getConfig(network); - this.oceanNodeUrl = process.env.NODE_URL; - this.indexingParams = getIndexingWaitSettings(); - console.log("Using Ocean Node URL :", this.oceanNodeUrl); - this.config.nodeUri = this.oceanNodeUrl; - this.aquarius = new Aquarius(this.oceanNodeUrl); - } - - public async start() { - console.log("Starting the interactive CLI flow...\n\n"); - const data = await interactiveFlow(this.oceanNodeUrl); // Collect data via CLI - await publishAsset(this.aquarius, data, this.signer, this.config); // Publish asset with collected data - } - - // utils - public async sleep(ms: number) { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); - } - - // commands - public async publish(args: string[]) { - console.log("start publishing"); - let asset; - try { - asset = JSON.parse(fs.readFileSync(args[1], "utf8")); - } catch (e) { - console.error("Cannot read metadata from " + args[1]); - console.error(e); - return; - } - const encryptDDO = args[2] === "false" ? false : true; - try { - // add some more checks - const urlAssetId = await createAssetUtil( - asset.indexedMetadata.nft.name, - asset.indexedMetadata.nft.symbol, - this.signer, - asset.services[0].files, - asset, - this.oceanNodeUrl, - this.config, - this.aquarius, - encryptDDO - ); - console.log("Asset published. ID: " + urlAssetId); - } catch (e) { - console.error("Error when publishing dataset from file: " + args[1]); - console.error(e); - return; - } - } - - public async publishAlgo(args: string[]) { - let algoAsset: Asset; - try { - algoAsset = JSON.parse(fs.readFileSync(args[1], "utf8")); - } catch (e) { - console.error("Cannot read metadata from " + args[1]); - console.error(e); - return; - } - const encryptDDO = args[2] === "false" ? false : true; - // add some more checks - try { - const algoDid = await createAssetUtil( - algoAsset.indexedMetadata.nft.name, - algoAsset.indexedMetadata.nft.symbol, - this.signer, - algoAsset.services[0].files, - algoAsset, - this.oceanNodeUrl, - this.config, - this.aquarius, - encryptDDO - ); - // add some more checks - console.log("Algorithm published. DID: " + algoDid); - } catch (e) { - console.error("Error when publishing dataset from file: " + args[1]); - console.error(e); - return; - } - } - - public async editAsset(args: string[]) { - const asset = await this.aquarius.waitForIndexer( - args[1], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!asset) { - console.error( - "Error fetching DDO " + args[1] + ". Does this asset exists?" - ); - return; - } - const encryptDDO = args[3] === "false" ? false : true; - let updateJson; - try { - updateJson = JSON.parse(fs.readFileSync(args[2], "utf8")); - } catch (e) { - console.error("Cannot read metadata from " + args[2]); - console.error(e); - return; - } - // Get keys and values - const keys = Object.keys(updateJson); - - for (const key of keys) { - asset[key] = updateJson[key]; - } - - const updateAssetTx = await updateAssetMetadata( - this.signer, - asset, - this.oceanNodeUrl, - this.aquarius, - encryptDDO - ); - console.log("Asset updated. Tx: " + JSON.stringify(updateAssetTx, null, 2)); - } - - public async getDDO(args: string[]) { - console.log("Resolving Asset with DID: " + args[1]); - const resolvedDDO = await this.aquarius.waitForIndexer( - args[1], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!resolvedDDO) { - console.error( - "Error fetching Asset with DID: " + - args[1] + - ". Does this asset exists?" - ); - } else console.log(util.inspect(resolvedDDO, false, null, true)); - } - - public async download(args: string[]) { - const dataDdo = await this.aquarius.waitForIndexer( - args[1], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!dataDdo) { - console.error( - "Error fetching DDO " + args[1] + ". Does this asset exists?" - ); - return; - } - - const datatoken = new Datatoken( - this.signer, - this.config.chainId, - this.config - ); - - const tx = await orderAsset( - dataDdo, - this.signer, - this.config, - datatoken, - this.oceanNodeUrl - ); - - if (!tx) { - console.error( - "Error ordering access for " + args[1] + ". Do you have enough tokens?" - ); - return; - } - - const orderTx = await tx.wait(); - - const urlDownloadUrl = await ProviderInstance.getDownloadUrl( - dataDdo.id, - dataDdo.services[0].id, - 0, - orderTx.hash, - this.oceanNodeUrl, - this.signer - ); - try { - const path = args[2] ? args[2] : "."; - const { filename } = await downloadFile(urlDownloadUrl, path); - console.log("File downloaded successfully:", path + "/" + filename); - } catch (e) { - console.log(`Download url dataset failed: ${e}`); - } - } - - public async initializeCompute(args: string[]) { - const inputDatasetsString = args[1]; - let inputDatasets = []; - - if ( - inputDatasetsString.includes("[") && - inputDatasetsString.includes("]") - ) { - const processedInput = inputDatasetsString - .replaceAll("]", "") - .replaceAll("[", ""); - if (processedInput.indexOf(",") > -1) { - inputDatasets = processedInput.split(","); - } - } else { - inputDatasets.push(inputDatasetsString); - } - - const ddos = []; - - for (const dataset in inputDatasets) { - const dataDdo = await this.aquarius.waitForIndexer( - inputDatasets[dataset], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!dataDdo) { - console.error( - "Error fetching DDO " + dataset[1] + ". Does this asset exists?" - ); - return; - } else { - ddos.push(dataDdo); - } - } - if ( - inputDatasets.length > 0 && - (ddos.length <= 0 || ddos.length != inputDatasets.length) - ) { - console.error("Not all the data ddos are available."); - return; - } - let providerURI = this.oceanNodeUrl; - if (ddos.length > 0) { - providerURI = ddos[0].services[0].serviceEndpoint; - } - - const algoDdo = await this.aquarius.waitForIndexer( - args[2], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!algoDdo) { - console.error( - "Error fetching DDO " + args[1] + ". Does this asset exists?" - ); - return; - } - - const computeEnvs = await ProviderInstance.getComputeEnvironments( - this.oceanNodeUrl - ); - - if (!computeEnvs || computeEnvs.length < 1) { - console.error( - "Error fetching compute environments. No compute environments available." - ); - return; - } - - const computeEnvID = args[3]; - // NO chainId needed anymore (is not part of ComputeEnvironment spec anymore) - // const chainComputeEnvs = computeEnvs[computeEnvID]; // was algoDdo.chainId - let computeEnv = null; // chainComputeEnvs[0]; - - if (computeEnvID && computeEnvID.length > 1) { - for (const index in computeEnvs) { - if (computeEnvID == computeEnvs[index].id) { - computeEnv = computeEnvs[index]; - break; - } - } - } - if (!computeEnv || !computeEnvID) { - console.error( - "Error fetching compute environment. No compute environment matches id: ", - computeEnvID - ); - return; - } - - const algo: ComputeAlgorithm = { - documentId: algoDdo.id, - serviceId: algoDdo.services[0].id, - meta: algoDdo.metadata.algorithm, - }; - - const assets = []; - for (const dataDdo in ddos) { - const canStartCompute = isOrderable( - ddos[dataDdo], - ddos[dataDdo].services[0].id, - algo, - algoDdo - ); - if (!canStartCompute) { - console.error( - "Error Cannot start compute job using the datasets DIDs & algorithm DID provided" - ); - return; - } - assets.push({ - documentId: ddos[dataDdo].id, - serviceId: ddos[dataDdo].services[0].id, - }); - } - const maxJobDuration = Number(args[4]) - if (!maxJobDuration) { - console.error( - "Error initializing Provider for the compute job using dataset DID " + - args[1] + - " and algorithm DID " + - args[2] + - " because maxJobDuration was not provided." - ); - return; - } - if (maxJobDuration < 0) { - console.error( - "Error initializing Provider for the compute job using dataset DID " + - args[1] + - " and algorithm DID " + - args[2] + - " because maxJobDuration is less than 0. It should be in seconds." - ); - return; - } - let supportedMaxJobDuration: number = maxJobDuration; - if (maxJobDuration > computeEnv.maxJobDuration) { - supportedMaxJobDuration = computeEnv.maxJobDuration; - } - const paymentToken = args[5] - if (!paymentToken) { - console.error( - "Error initializing Provider for the compute job using dataset DID " + - args[1] + - " and algorithm DID " + - args[2] + - " because paymentToken was not provided." - ); - return; - } - const { chainId } = await this.signer.provider.getNetwork() - if (!Object.keys(computeEnv.fees).includes(chainId.toString())) { - console.error( - "Error starting paid compute using dataset DID " + - args[1] + - " and algorithm DID " + - args[2] + - " because chainId is not supported by compute environment. " + - args[3] + - ". Supported chain IDs: " + - computeEnv.fees.keys() - ); - return; - } - let found: boolean = false; - for (const fee of computeEnv.fees[chainId.toString()]) { - if (fee.feeToken.toLowerCase() === paymentToken.toLowerCase()) { - found = true; - break; - } - } - if (found === false) { - console.error( - "Error initializing Provider for the compute job using dataset DID " + - args[1] + - " and algorithm DID " + - args[2] + - " because paymentToken is not supported by this environment " + - args[3] - ); - return; - } - const resources = args[6] // resources object should be stringified in cli when calling initializeCompute - if (!resources) { - console.error( - "Error initializing Provider for the compute job using dataset DID " + - args[1] + - " and algorithm DID " + - args[2] + - " because resources for compute were not provided." - ); - return; - } - const parsedResources = JSON.parse(resources); - const providerInitializeComputeJob = - await ProviderInstance.initializeCompute( - assets, - algo, - computeEnv.id, - paymentToken, - supportedMaxJobDuration, - providerURI, - this.signer, // V1 was this.signer.getAddress() - parsedResources, - Number(chainId) - ); - if ( - !providerInitializeComputeJob || - "error" in providerInitializeComputeJob.algorithm - ) { - console.error( - "Error initializing Provider for the compute job using dataset DID " + - args[1] + - " and algorithm DID " + - args[2] - ); - return; - } - console.log(chalk.yellow('\n--- Payment Details ---')); - console.log(JSON.stringify(providerInitializeComputeJob, null, 2)); - return providerInitializeComputeJob; - - } - - public async computeStart(args: string[]) { - const inputDatasetsString = args[1]; - let inputDatasets = []; - - if ( - inputDatasetsString.includes("[") && - inputDatasetsString.includes("]") - ) { - const processedInput = inputDatasetsString - .replaceAll("]", "") - .replaceAll("[", ""); - if (processedInput.indexOf(",") > -1) { - inputDatasets = processedInput.split(","); - } - } else { - inputDatasets.push(inputDatasetsString); - } - - const ddos = []; - - for (const dataset in inputDatasets) { - const dataDdo = await this.aquarius.waitForIndexer( - inputDatasets[dataset], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!dataDdo) { - console.error( - "Error fetching DDO " + dataset[1] + ". Does this asset exists?" - ); - return; - } else { - ddos.push(dataDdo); - } - } - if ( - inputDatasets.length > 0 && - (ddos.length <= 0 || ddos.length != inputDatasets.length) - ) { - console.error("Not all the data ddos are available."); - return; - } - let providerURI = this.oceanNodeUrl; - if (ddos.length > 0) { - providerURI = ddos[0].services[0].serviceEndpoint; - } - const algoDdo = await this.aquarius.waitForIndexer( - args[2], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!algoDdo) { - console.error( - "Error fetching DDO " + args[1] + ". Does this asset exists?" - ); - return; - } - - const computeEnvs = await ProviderInstance.getComputeEnvironments( - this.oceanNodeUrl - ); - - if (!computeEnvs || computeEnvs.length < 1) { - console.error( - "Error fetching compute environments. No compute environments available." - ); - return; - } - const computeEnvID = args[3]; - // NO chainId needed anymore (is not part of ComputeEnvironment spec anymore) - // const chainComputeEnvs = computeEnvs[computeEnvID]; // was algoDdo.chainId - let computeEnv = null; // chainComputeEnvs[0]; - - if (computeEnvID && computeEnvID.length > 1) { - for (const index in computeEnvs) { - if (computeEnvID == computeEnvs[index].id) { - computeEnv = computeEnvs[index]; - break; - } - } - } - if (!computeEnv || !computeEnvID) { - console.error( - "Error fetching compute environment. No compute environment matches id: ", - computeEnvID - ); - return; - } - - const algo: ComputeAlgorithm = { - documentId: algoDdo.id, - serviceId: algoDdo.services[0].id, - meta: algoDdo.metadata.algorithm, - }; - - const assets = []; - for (const dataDdo in ddos) { - const canStartCompute = isOrderable( - ddos[dataDdo], - ddos[dataDdo].services[0].id, - algo, - algoDdo - ); - if (!canStartCompute) { - console.error( - "Error Cannot start compute job using the datasets DIDs & algorithm DID provided" - ); - return; - } - assets.push({ - documentId: ddos[dataDdo].id, - serviceId: ddos[dataDdo].services[0].id, - }); - } - const providerInitializeComputeJob = args[4]; // provider fees + payment - const parsedProviderInitializeComputeJob = fixAndParseProviderFees(providerInitializeComputeJob) - console.log("Ordering algorithm: ", args[2]); - const datatoken = new Datatoken( - this.signer, - (await this.signer.provider.getNetwork()).chainId.toString(), - this.config - ); - algo.transferTxId = await handleComputeOrder( - parsedProviderInitializeComputeJob?.algorithm, - algoDdo, - this.signer, - computeEnv.consumerAddress, - 0, - datatoken, - this.config, - parsedProviderInitializeComputeJob?.algorithm?.providerFee, - providerURI - ); - if (!algo.transferTxId) { - console.error( - "Error ordering compute for algorithm with DID: " + - args[2] + - ". Do you have enough tokens?" - ); - return; - } - console.log("Ordering assets: ", args[1]); - - for (let i = 0; i < ddos.length; i++) { - assets[i].transferTxId = await handleComputeOrder( - parsedProviderInitializeComputeJob?.datasets[i], - ddos[i], - this.signer, - computeEnv.consumerAddress, - 0, - datatoken, - this.config, - parsedProviderInitializeComputeJob?.datasets[i].providerFee, - providerURI - ); - if (!assets[i].transferTxId) { - console.error( - "Error ordering dataset with DID: " + - assets[i] + - ". Do you have enough tokens?" - ); - return; - } - } - // payment check - const maxJobDuration = Number(args[5]) - if (!maxJobDuration) { - console.error( - "Error initializing Provider for the compute job using dataset DID " + - args[1] + - " and algorithm DID " + - args[2] + - " because maxJobDuration was not provided." - ); - return; - } - if (maxJobDuration < 0) { - console.error( - "Error starting paid compute using dataset DID " + - args[1] + - " and algorithm DID " + - args[2] + - " because maxJobDuration is less than 0. It should be in seconds." - ); - return; - } - let supportedMaxJobDuration: number = maxJobDuration; - if (maxJobDuration > computeEnv.maxJobDuration) { - supportedMaxJobDuration = computeEnv.maxJobDuration; - } - const { chainId } = await this.signer.provider.getNetwork() - const paymentToken = args[6] - if (!paymentToken) { - console.error( - "Error starting paid compute using dataset DID " + - args[1] + - " and algorithm DID " + - args[2] + - " because paymentToken was not provided." - ); - return; - } - if (!Object.keys(computeEnv.fees).includes(chainId.toString())) { - console.error( - "Error starting paid compute using dataset DID " + - args[1] + - " and algorithm DID " + - args[2] + - " because chainId is not supported by compute environment. " + - args[3] + - ". Supported chain IDs: " + - computeEnv.fees.keys() - ); - return; - } - let found: boolean = false; - for (const fee of computeEnv.fees[chainId.toString()]) { - if (fee.feeToken.toLowerCase() === paymentToken.toLowerCase()) { - found = true; - break; - } - } - if (found === false) { - console.error( - "Error starting paid compute using dataset DID " + - args[1] + - " and algorithm DID " + - args[2] + - " because paymentToken is not supported by this environment " + - args[3] - ); - return; - } - const resources = args[7] // resources object should be stringified in cli when calling initializeCompute - if (!resources) { - console.error( - "Error starting paid compute using dataset DID " + - args[1] + - " and algorithm DID " + - args[2] + - " because resources for compute were not provided." - ); - return; - } - - const escrow = new EscrowContract( - getAddress(parsedProviderInitializeComputeJob.payment.escrowAddress), - this.signer - ) - console.log("Verifying payment..."); - await new Promise(resolve => setTimeout(resolve, 3000)) - - const validationEscrow = await escrow.verifyFundsForEscrowPayment( - paymentToken, - computeEnv.consumerAddress, - await unitsToAmount(this.signer, paymentToken, parsedProviderInitializeComputeJob.payment.amount), - parsedProviderInitializeComputeJob.payment.amount.toString(), - parsedProviderInitializeComputeJob.payment.minLockSeconds.toString(), - '10' - ) - if (validationEscrow.isValid === false) { - console.error( - "Error starting compute job dataset DID " + - args[1] + - " and algorithm DID " + - args[2] + - " because escrow funds check failed: " - + validationEscrow.message - ); - return; - } - - console.log("Starting compute job using provider: ", providerURI); - - const additionalDatasets = assets.length > 1 ? assets.slice(1) : null; - if (assets.length > 0) { - console.log( - "Starting compute job on " + - assets[0].documentId + - " with additional datasets:" + - (!additionalDatasets ? "none" : additionalDatasets[0].documentId) - ); - } else { - console.log( - "Starting compute job on " + - algo.documentId + - " with additional datasets:" + - (!additionalDatasets ? "none" : additionalDatasets[0].documentId) - ); - } - if (additionalDatasets !== null) { - console.log( - "Adding additional datasets to dataset, according to C2D V2 specs" - ); - assets.push(additionalDatasets); - } - - const output: ComputeOutput = { - metadataUri: await getMetadataURI(), - }; - - const computeJobs = await ProviderInstance.computeStart( - providerURI, - this.signer, - computeEnv.id, - assets, // assets[0] // only c2d v1, - algo, - supportedMaxJobDuration, - paymentToken, - JSON.parse(resources), - Number((await this.signer.provider.getNetwork()).chainId), - null, - null, - // additionalDatasets, only c2d v1 - output - ); - - console.log("computeJobs: ", computeJobs); - - if (computeJobs && computeJobs[0]) { - const { jobId, payment } = computeJobs[0]; - console.log("Compute started. JobID: " + jobId); - console.log("Agreement ID: " + payment.lockTx); - } else { - console.log("Error while starting the compute job: ", computeJobs); - } - } - - public async freeComputeStart(args: string[]) { - const inputDatasetsString = args[1]; - let inputDatasets = []; - - if ( - inputDatasetsString.includes("[") && - inputDatasetsString.includes("]") - ) { - const processedInput = inputDatasetsString - .replaceAll("]", "") - .replaceAll("[", ""); - if (processedInput.indexOf(",") > -1) { - inputDatasets = processedInput.split(","); - } - } else { - inputDatasets.push(inputDatasetsString); - } - - const ddos = []; - - for (const dataset in inputDatasets) { - const dataDdo = await this.aquarius.waitForIndexer( - inputDatasets[dataset], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!dataDdo) { - console.error( - "Error fetching DDO " + dataset[1] + ". Does this asset exists?" - ); - return; - } else { - ddos.push(dataDdo); - } - } - - if ( - inputDatasets.length > 0 && - (ddos.length <= 0 || ddos.length != inputDatasets.length) - ) { - console.error("Not all the data ddos are available."); - return; - } - let providerURI = this.oceanNodeUrl; - if (ddos.length > 0) { - providerURI = ddos[0].services[0].serviceEndpoint; - } - - const algoDdo = await this.aquarius.waitForIndexer( - args[2], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!algoDdo) { - console.error( - "Error fetching DDO " + args[1] + ". Does this asset exists?" - ); - return; - } - - const computeEnvs = await ProviderInstance.getComputeEnvironments( - this.oceanNodeUrl - ); - - if (!computeEnvs || computeEnvs.length < 1) { - console.error( - "Error fetching compute environments. No compute environments available." - ); - return; - } - - const mytime = new Date(); - const computeMinutes = 5; - mytime.setMinutes(mytime.getMinutes() + computeMinutes); - - const computeEnvID = args[3]; - // NO chainId needed anymore (is not part of ComputeEnvironment spec anymore) - // const chainComputeEnvs = computeEnvs[computeEnvID]; // was algoDdo.chainId - let computeEnv = null; // chainComputeEnvs[0]; - - if (computeEnvID && computeEnvID.length > 1) { - for (const env of computeEnvs) { - if (computeEnvID == env.id && env.free) { - computeEnv = env; - break; - } - } - } - - if (!computeEnv || !computeEnvID) { - console.error( - "Error fetching free compute environment. No free compute environment matches id: ", - computeEnvID - ); - return; - } - - const algo: ComputeAlgorithm = { - documentId: algoDdo.id, - serviceId: algoDdo.services[0].id, - meta: algoDdo.metadata.algorithm, - }; - - const assets = []; - for (const dataDdo in ddos) { - const canStartCompute = isOrderable( - ddos[dataDdo], - ddos[dataDdo].services[0].id, - algo, - algoDdo - ); - if (!canStartCompute) { - console.error( - "Error Cannot start compute job using the datasets DIDs & algorithm DID provided" - ); - return; - } - assets.push({ - documentId: ddos[dataDdo].id, - serviceId: ddos[dataDdo].services[0].id, - }); - } - - console.log("Starting compute job using provider: ", providerURI); - const additionalDatasets = assets.length > 1 ? assets.slice(1) : null; - if (assets.length > 0) { - console.log( - "Starting compute job on " + - assets[0].documentId + - " with additional datasets:" + - (!additionalDatasets ? "none" : additionalDatasets[0].documentId) - ); - } else { - console.log( - "Starting compute job on " + - algo.documentId + - " with additional datasets:" + - (!additionalDatasets ? "none" : additionalDatasets[0].documentId) - ); - } - - if (additionalDatasets !== null) { - console.log( - "Adding additional datasets to dataset, according to C2D V2 specs" - ); - assets.push(additionalDatasets); - } - - const output: ComputeOutput = { - metadataUri: await getMetadataURI(), - }; - - const computeJobs = await ProviderInstance.freeComputeStart( - providerURI, - this.signer, - computeEnv.id, - assets, // assets[0] // only c2d v1, - algo, - null, - null, - null, - output - ); - - console.log("compute jobs: ", computeJobs); - - if (computeJobs && computeJobs[0]) { - const { jobId } = computeJobs[0]; - console.log("Compute started. JobID: " + jobId); - } else { - console.log("Error while starting the compute job: ", computeJobs); - } - } - - public async computeStop(args: string[]) { - const dataDdo = await this.aquarius.waitForIndexer( - args[1], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!dataDdo) { - console.error( - "Error fetching DDO " + args[1] + ". Does this asset exists?" - ); - return; - } - - const jobId = args[2]; - const jobStatus = await ProviderInstance.computeStop( - jobId, - this.oceanNodeUrl, - this.signer, - ); - console.log(jobStatus); - } - - public async getComputeEnvironments() { - const computeEnvs = await ProviderInstance.getComputeEnvironments( - this.oceanNodeUrl - ); - - if (!computeEnvs || computeEnvs.length < 1) { - console.error( - "Error fetching compute environments. No compute environments available." - ); - return; - } - - console.log("Exiting compute environments: ", JSON.stringify(computeEnvs)); - } - - public async computeStreamableLogs(args: string[]) { - const jobId = args[0]; - const logsResponse = await ProviderInstance.computeStreamableLogs( - this.oceanNodeUrl, - this.signer, - jobId - ); - console.log("response: ", logsResponse); - - if (!logsResponse) { - console.error("Error fetching streamable logs. No logs available."); - return; - } else { - const stream = logsResponse as ReadableStream; - console.log("stream: ", stream); - const text = await new Response(stream).text(); - console.log("Streamable Logs: "); - console.log(text); - // for await (const value of stream) { - // // just print it to the console - // console.log(value); - // } - } - console.log("Exiting computeStreamableLogs: ", logsResponse); - } - - public async allowAlgo(args: string[]) { - const asset = await this.aquarius.waitForIndexer( - args[1], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!asset) { - console.error( - "Error fetching DDO " + args[1] + ". Does this asset exists?" - ); - return; - } - - if (asset.indexedMetadata.nft.owner !== (await this.signer.getAddress())) { - console.error( - "You are not the owner of this asset, and there for you cannot update it." - ); - return; - } - - if (asset.services[0].type !== "compute") { - console.error( - "Error getting computeService for " + - args[1] + - ". Does this asset has an computeService?" - ); - return; - } - const algoAsset = await this.aquarius.waitForIndexer( - args[2], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!algoAsset) { - console.error( - "Error fetching DDO " + args[2] + ". Does this asset exists?" - ); - return; - } - const encryptDDO = args[3] === "false" ? false : true; - let filesChecksum; - try { - filesChecksum = await ProviderInstance.checkDidFiles( - algoAsset.id, - algoAsset.services[0].id, - algoAsset.services[0].serviceEndpoint, - true - ); - } catch (e) { - console.error("Error checking algo files: ", e); - return; - } - - const containerChecksum = - algoAsset.metadata.algorithm.container.entrypoint + - algoAsset.metadata.algorithm.container.checksum; - const trustedAlgorithm = { - did: algoAsset.id, - containerSectionChecksum: getHash(containerChecksum), - filesChecksum: filesChecksum?.[0]?.checksum, - }; - asset.services[0].compute.publisherTrustedAlgorithms.push(trustedAlgorithm); - try { - const txid = await updateAssetMetadata( - this.signer, - asset, - this.oceanNodeUrl, - this.aquarius, - encryptDDO - ); - console.log("Successfully updated asset metadata: " + txid); - } catch (e) { - console.error("Error updating asset metadata: ", e); - return; - } - } - - public async disallowAlgo(args: string[]) { - const asset = await this.aquarius.waitForIndexer( - args[1], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!asset) { - console.error( - "Error fetching DDO " + args[1] + ". Does this asset exists?" - ); - return; - } - if (asset.indexedMetadata.nft.owner !== (await this.signer.getAddress())) { - console.error( - "You are not the owner of this asset, and there for you cannot update it." - ); - return; - } - if (asset.services[0].type !== "compute") { - console.error( - "Error getting computeService for " + - args[1] + - ". Does this asset has an computeService?" - ); - return; - } - if (asset.services[0].compute.publisherTrustedAlgorithms) { - console.error( - " " + args[1] + ". Does this asset has an computeService?" - ); - return; - } - const encryptDDO = args[3] === "false" ? false : true; - const indexToDelete = - asset.services[0].compute.publisherTrustedAlgorithms.findIndex( - (item) => item.did === args[2] - ); - - if (indexToDelete !== -1) { - asset.services[0].compute.publisherTrustedAlgorithms.splice( - indexToDelete, - 1 - ); - } else { - console.error( - " " + - args[2] + - ". is not allowed by the publisher to run on " + - args[1] - ); - return; - } - - const txid = await updateAssetMetadata( - this.signer, - asset, - this.oceanNodeUrl, - this.aquarius, - encryptDDO - ); - console.log("Asset updated " + txid); - } - - public async getJobStatus(args: string[]) { - // args[1] - did (for checking if data asset exists, legacy) - // args[2] - jobId - // args[3] - agreementId - const hasAgreementId = args.length === 4; - - const dataDdo = await this.aquarius.waitForIndexer( - args[1], - null, - null, - this.indexingParams.retryInterval, - this.indexingParams.maxRetries - ); - if (!dataDdo) { - console.error( - "Error fetching DDO " + args[1] + ". Does this asset exists?" - ); - return; - } - const jobId = args[2]; - let agreementId = null; - if (hasAgreementId) { - agreementId = args[3]; - } - - const jobStatus = (await ProviderInstance.computeStatus( - this.oceanNodeUrl, - await this.signer.getAddress(), - jobId, - agreementId - )) as ComputeJob; - console.log(util.inspect(jobStatus, false, null, true)); - } - - public async downloadJobResults(args: string[]) { - const jobResult = await ProviderInstance.getComputeResultUrl( - this.oceanNodeUrl, - this.signer, - args[1], - parseInt(args[2]) - ); - console.log("jobResult ", jobResult); - - try { - const path = args[3] ? args[3] : "."; - const { filename } = await downloadFile( - jobResult, - path, - parseInt(args[2]) - ); - console.log("File downloaded successfully:", path + "/" + filename); - } catch (e) { - console.log(`Download url dataset failed: ${e}`); - } - } - - public async mintOceanTokens() { - try { - const config = await getConfigByChainId(Number(this.config.chainId)); - const minAbi = [ - { - constant: false, - inputs: [ - { name: "to", type: "address" }, - { name: "value", type: "uint256" }, - ], - name: "mint", - outputs: [{ name: "", type: "bool" }], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - ]; - - const tokenContract = new ethers.Contract( - config?.Ocean, - minAbi, - this.signer - ); - const estGasPublisher = await tokenContract.mint.estimateGas( - await this.signer.getAddress(), - await amountToUnits(null, null, "1000", 18) - ); - const tx = await sendTx( - estGasPublisher, - this.signer, - 1, - tokenContract.mint, - await this.signer.getAddress(), - amountToUnits(null, null, "1000", 18) - ); - await tx.wait(); - } catch (error) { - console.error("Error minting Ocean tokens:", error); - } - } - - public async generateAuthToken() { - const authToken = await ProviderInstance.generateAuthToken( - this.signer, - this.oceanNodeUrl, - ); - console.log(`Auth token successfully generated: ${authToken}`); - } - - public async invalidateAuthToken(args: string[]) { - const authToken = args[0]; - const result = await ProviderInstance.invalidateAuthToken( - this.signer, - authToken, - this.oceanNodeUrl, - ); - if (!result.success) { - console.log('Auth token could not be invalidated'); - return; - } - - console.log(`Auth token successfully invalidated`); - } - - public async getEscrowBalance(token: string): Promise { - const config = await getConfigByChainId(Number(this.config.chainId)); - const escrow = new EscrowContract( - getAddress(config.Escrow), - this.signer, - Number(this.config.chainId) - ); - - try { - const balance = await escrow.getUserFunds(await this.signer.getAddress(), token); - const decimals = await getTokenDecimals(this.signer, token); - const available = balance.available; - const amount = await unitsToAmount(this.signer, token, available, decimals); - console.log(`Escrow user funds for token ${token}: ${amount}`); - return Number(amount); - } catch (error) { - console.error("Error getting escrow balance:", error); - } - } - - public async withdrawFromEscrow(token: string, amount: string): Promise { - const config = await getConfigByChainId(Number(this.config.chainId)); - const escrow = new EscrowContract( - getAddress(config.Escrow), - this.signer, - Number(this.config.chainId) - ); - - const balance = await this.getEscrowBalance(token); - if (balance < Number(amount)) { - console.error(`Insufficient balance in escrow for token ${token}`); - return; - } - - const withdrawTx = await escrow.withdraw([token], [amount]); - await withdrawTx.wait(); - console.log(`Successfully withdrawn ${amount} ${token} from escrow`); - } - - public async depositToEscrow(signer: Signer, token: string, amount: string, chainId: number) { - try { - const amountInUnits = await amountToUnits(signer, token, amount, 18); - const config = await getConfigByChainId(chainId); - const escrowAddress = config.Escrow; - - const tokenContract = new ethers.Contract( - token, - ['function approve(address spender, uint256 amount) returns (bool)'], - signer - ); - - const escrow = new EscrowContract( - getAddress(escrowAddress), - signer, - chainId - ); - - console.log('Approving token transfer...') - const approveTx = await tokenContract.approve(escrowAddress, amountInUnits); - await approveTx.wait(); - console.log(`Successfully approved ${amount} ${token} to escrow`); - - - console.log('Depositing to escrow...') - const depositTx = await escrow.deposit(token, amount); - await depositTx.wait(); - return true; - - } catch (error) { - console.error("Error depositing to escrow:", error); - return false; - } - } - - public async authorizeEscrowPayee( - token: string, - payee: string, - maxLockedAmount: string, - maxLockSeconds: string, - maxLockCounts: string - ) { - try { - const config = await getConfigByChainId(Number(this.config.chainId)); - const escrowAddress = config.Escrow; - - const escrow = new EscrowContract( - getAddress(escrowAddress), - this.signer - ); - - console.log("Authorizing payee..."); - const authorizeTx = await escrow.authorize( - getAddress(token), - getAddress(payee), - maxLockedAmount, - maxLockSeconds, - maxLockCounts - ); - await authorizeTx.wait(); - console.log(`Successfully authorized payee ${payee} for token ${token}`); - - return true; - } catch (error) { - console.error("Error authorizing payee:", error); - return false; - } - } - - public async getAuthorizationsEscrow(token: string, payee: string) { - const config = await getConfigByChainId(Number(this.config.chainId)); - const payer = await this.signer.getAddress(); - const tokenAddress = getAddress(token); - const payerAddress = getAddress(payer); - const payeeAddress = getAddress(payee); - const decimals = await getTokenDecimals(this.signer, token); - const escrow = new EscrowContract( - getAddress(config.Escrow), - this.signer, - Number(this.config.chainId) - ); - - const authorizations = await escrow.getAuthorizations(tokenAddress, payerAddress, payeeAddress); - const authorization = authorizations[0] - if (!authorization || authorization.length === 0) { - console.log('No authorizations found'); - return; - } - - const currentLockedAmount = await unitsToAmount(this.signer, token, authorization.currentLockedAmount.toString(), decimals); - const maxLockedAmount = await unitsToAmount(this.signer, token, authorization.maxLockedAmount.toString(), decimals); - - console.log('Authorizations found:') - console.log(`- Current Locked Amount: ${Number(currentLockedAmount)}`) - console.log(`- Current Locks: ${authorization.currentLocks}`) - console.log(`- Max locked amount: ${Number(maxLockedAmount)}`) - console.log(`- Max lock seconds: ${authorization.maxLockSeconds}`) - console.log(`- Max lock counts: ${authorization.maxLockCounts}`) - - return authorizations; - } - - public async createAccessList(args: string[]): Promise { - try { - const name = args[0]; - const symbol = args[1]; - const transferable = args[2] === 'true'; - const initialUsers = args[3] ? args[3].split(',').map(u => u.trim()) : []; - - if (!name || !symbol) { - console.error(chalk.red('Name and symbol are required')); - return; - } - - const config = await getConfigByChainId(Number(this.config.chainId)); - if (!config.AccessListFactory) { - console.error(chalk.red('Access list factory not found. Check local address.json file')); - return; - } - const accessListFactory = new AccesslistFactory( - config.AccessListFactory, - this.signer, - Number(this.config.chainId) - ); - - const owner = await this.signer.getAddress(); - const tokenURIs = initialUsers.map(() => 'https://oceanprotocol.com/nft/'); - - console.log(chalk.cyan('Creating new access list...')); - console.log(`Name: ${name}`); - console.log(`Symbol: ${symbol}`); - console.log(`Transferable: ${transferable}`); - console.log(`Owner: ${owner}`); - console.log(`Initial users: ${initialUsers.length > 0 ? initialUsers.join(', ') : 'none'}`); - - const accessListAddress = await accessListFactory.deployAccessListContract( - name, - symbol, - tokenURIs, - transferable, - owner, - initialUsers - ); - - console.log(chalk.green(`\nAccess list created successfully!`)); - console.log(chalk.green(`Contract address: ${accessListAddress}`)); - } catch (error) { - console.error(chalk.red('Error creating access list:'), error); - } - } - - public async addToAccessList(args: string[]): Promise { - try { - const accessListAddress = args[0]; - const users = args[1].split(',').map(u => u.trim()); - - if (!accessListAddress || users.length === 0) { - console.error(chalk.red('Access list address and at least one user are required')); - return; - } - - const accessList = new AccessListContract( - accessListAddress, - this.signer, - Number(this.config.chainId) - ); - - console.log(chalk.cyan(`Adding ${users.length} user(s) to access list...`)); - - if (users.length === 1) { - const tx = await accessList.mint(users[0], 'https://oceanprotocol.com/nft/'); - await tx.wait(); - console.log(chalk.green(`Successfully added user ${users[0]} to access list`)); - return; - } - - const tokenURIs = users.map(() => 'https://oceanprotocol.com/nft/'); - const tx = await accessList.batchMint(users, tokenURIs); - await tx.wait(); - console.log(chalk.green(`Successfully added ${users.length} users to access list:`)); - users.forEach(user => console.log(` - ${user}`)); - } catch (error) { - console.error(chalk.red('Error adding users to access list:'), error); - } - } - - - public async checkAccessList(args: string[]): Promise { - try { - const accessListAddress = args[0]; - const users = args[1].split(',').map(u => u.trim()); - - if (!accessListAddress || users.length === 0) { - console.error(chalk.red('Access list address and at least one user are required')); - return; - } - - const accessList = new AccessListContract( - accessListAddress, - this.signer, - Number(this.config.chainId) - ); - - console.log(chalk.cyan(`Checking access list for ${users.length} user(s)...\n`)); - - for (const user of users) { - const balance = await accessList.balance(user); - const hasAccess = Number(balance) > 0; - - if (hasAccess) { - console.log(chalk.green(`✓ ${user}: Has access (balance: ${balance})`)); - } else { - console.log(chalk.red(`✗ ${user}: No access`)); - } - } - } catch (error) { - console.error(chalk.red('Error checking access list:'), error); - } - } - - - public async removeFromAccessList(args: string[]): Promise { - try { - const accessListAddress = args[0]; - const users = args[1].split(',').map(u => u.trim()); - - if (!accessListAddress || users.length === 0) { - console.error(chalk.red('Access list address and at least one user address are required')); - return; - } - - const accessList = new AccessListContract( - accessListAddress, - this.signer, - Number(this.config.chainId) - ); - - console.log(chalk.cyan(`Removing ${users.length} user(s) from access list...`)); - for (const user of users) { - const balance = await accessList.balance(user); - - if (Number(balance) === 0) { - console.log(chalk.yellow(`⚠ User ${user} is not on the access list, skipping...`)); - continue; - } - - const balanceNum = Number(balance); - const contract = accessList.contract; - - let removedCount = 0; - for (let index = 0; index < balanceNum; index++) { - try { - const tokenId = await contract.tokenOfOwnerByIndex(user, index); - const tx = await accessList.burn(Number(tokenId)); - await tx.wait(); - - console.log(chalk.green(`✓ Successfully removed user ${user} (token ID: ${tokenId})`)); - removedCount++; - } catch (e: any) { - console.log(chalk.yellow(`⚠ Could not remove token at index ${index} for user ${user}: ${e.message}`)); - } - } - - if (removedCount === 0) { - console.log(chalk.yellow(`⚠ Could not remove any tokens for user ${user}`)); - } else if (removedCount < balanceNum) { - console.log(chalk.yellow(`⚠ Only removed ${removedCount} of ${balanceNum} tokens for user ${user}`)); - } - } - } catch (error) { - console.error(chalk.red('Error removing users from access list:'), error); - } - } + public signer: Signer; + public config: Config; + public aquarius: Aquarius; + public oceanNodeUrl: string; + // optional settings for indexing wait time + private indexingParams: IndexerWaitParams; + + constructor(signer: Signer, network: string | number, config?: Config) { + this.signer = signer; + this.config = config || new ConfigHelper().getConfig(network); + this.oceanNodeUrl = process.env.NODE_URL; + this.indexingParams = getIndexingWaitSettings(); + console.log("Using Ocean Node URL :", this.oceanNodeUrl); + this.config.nodeUri = this.oceanNodeUrl; + this.aquarius = new Aquarius(this.oceanNodeUrl); + } + + public async start() { + console.log("Starting the interactive CLI flow...\n\n"); + const data = await interactiveFlow(this.oceanNodeUrl); // Collect data via CLI + await publishAsset(this.aquarius, data, this.signer, this.config); // Publish asset with collected data + } + + // utils + public async sleep(ms: number) { + return new Promise((resolve) => { + setTimeout(resolve, ms); + }); + } + + // commands + public async publish(args: string[]) { + console.log("start publishing"); + let asset; + try { + asset = JSON.parse(fs.readFileSync(args[1], "utf8")); + } catch (e) { + console.error("Cannot read metadata from " + args[1]); + console.error(e); + return; + } + const encryptDDO = args[2] === "false" ? false : true; + try { + // add some more checks + const urlAssetId = await createAssetUtil( + asset.indexedMetadata.nft.name, + asset.indexedMetadata.nft.symbol, + this.signer, + asset.services[0].files, + asset, + this.oceanNodeUrl, + this.config, + this.aquarius, + encryptDDO + ); + console.log("Asset published. ID: " + urlAssetId); + } catch (e) { + console.error("Error when publishing dataset from file: " + args[1]); + console.error(e); + return; + } + } + + public async publishAlgo(args: string[]) { + let algoAsset: Asset; + try { + algoAsset = JSON.parse(fs.readFileSync(args[1], "utf8")); + } catch (e) { + console.error("Cannot read metadata from " + args[1]); + console.error(e); + return; + } + const encryptDDO = args[2] === "false" ? false : true; + // add some more checks + try { + const algoDid = await createAssetUtil( + algoAsset.indexedMetadata.nft.name, + algoAsset.indexedMetadata.nft.symbol, + this.signer, + algoAsset.services[0].files, + algoAsset, + this.oceanNodeUrl, + this.config, + this.aquarius, + encryptDDO + ); + // add some more checks + console.log("Algorithm published. DID: " + algoDid); + } catch (e) { + console.error("Error when publishing dataset from file: " + args[1]); + console.error(e); + return; + } + } + + public async editAsset(args: string[]) { + const asset = await this.aquarius.waitForIndexer( + args[1], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!asset) { + console.error( + "Error fetching DDO " + args[1] + ". Does this asset exists?" + ); + return; + } + const encryptDDO = args[3] === "false" ? false : true; + let updateJson; + try { + updateJson = JSON.parse(fs.readFileSync(args[2], "utf8")); + } catch (e) { + console.error("Cannot read metadata from " + args[2]); + console.error(e); + return; + } + // Get keys and values + const keys = Object.keys(updateJson); + + for (const key of keys) { + asset[key] = updateJson[key]; + } + + const updateAssetTx = await updateAssetMetadata( + this.signer, + asset, + this.oceanNodeUrl, + this.aquarius, + encryptDDO + ); + console.log("Asset updated. Tx: " + JSON.stringify(updateAssetTx, null, 2)); + } + + public async getDDO(args: string[]) { + console.log("Resolving Asset with DID: " + args[1]); + const resolvedDDO = await this.aquarius.waitForIndexer( + args[1], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!resolvedDDO) { + console.error( + "Error fetching Asset with DID: " + + args[1] + + ". Does this asset exists?" + ); + } else console.log(util.inspect(resolvedDDO, false, null, true)); + } + + public async download(args: string[]) { + const dataDdo = await this.aquarius.waitForIndexer( + args[1], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!dataDdo) { + console.error( + "Error fetching DDO " + args[1] + ". Does this asset exists?" + ); + return; + } + + const datatoken = new Datatoken( + this.signer, + this.config.chainId, + this.config + ); + + const tx = await orderAsset( + dataDdo, + this.signer, + this.config, + datatoken, + this.oceanNodeUrl + ); + + if (!tx) { + console.error( + "Error ordering access for " + args[1] + ". Do you have enough tokens?" + ); + return; + } + + const orderTx = await tx.wait(); + + const urlDownloadUrl = await ProviderInstance.getDownloadUrl( + dataDdo.id, + dataDdo.services[0].id, + 0, + orderTx.hash, + this.oceanNodeUrl, + this.signer + ); + try { + const path = args[2] ? args[2] : "."; + const { filename } = await downloadFile(urlDownloadUrl, path); + console.log("File downloaded successfully:", path + "/" + filename); + } catch (e) { + console.log(`Download url dataset failed: ${e}`); + } + } + + public async initializeCompute(args: string[]) { + const inputDatasetsString = args[1]; + let inputDatasets = []; + + if ( + inputDatasetsString.includes("[") && + inputDatasetsString.includes("]") + ) { + const processedInput = inputDatasetsString + .replaceAll("]", "") + .replaceAll("[", ""); + if (processedInput.indexOf(",") > -1) { + inputDatasets = processedInput.split(","); + } + } else { + inputDatasets.push(inputDatasetsString); + } + + const ddos = []; + + for (const dataset in inputDatasets) { + const dataDdo = await this.aquarius.waitForIndexer( + inputDatasets[dataset], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!dataDdo) { + console.error( + "Error fetching DDO " + dataset[1] + ". Does this asset exists?" + ); + return; + } else { + ddos.push(dataDdo); + } + } + if ( + inputDatasets.length > 0 && + (ddos.length <= 0 || ddos.length != inputDatasets.length) + ) { + console.error("Not all the data ddos are available."); + return; + } + let providerURI = this.oceanNodeUrl; + if (ddos.length > 0) { + providerURI = ddos[0].services[0].serviceEndpoint; + } + + const algoDdo = await this.aquarius.waitForIndexer( + args[2], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!algoDdo) { + console.error( + "Error fetching DDO " + args[1] + ". Does this asset exists?" + ); + return; + } + + const computeEnvs = await ProviderInstance.getComputeEnvironments( + this.oceanNodeUrl + ); + + if (!computeEnvs || computeEnvs.length < 1) { + console.error( + "Error fetching compute environments. No compute environments available." + ); + return; + } + + const computeEnvID = args[3]; + // NO chainId needed anymore (is not part of ComputeEnvironment spec anymore) + // const chainComputeEnvs = computeEnvs[computeEnvID]; // was algoDdo.chainId + let computeEnv = null; // chainComputeEnvs[0]; + + if (computeEnvID && computeEnvID.length > 1) { + for (const index in computeEnvs) { + if (computeEnvID == computeEnvs[index].id) { + computeEnv = computeEnvs[index]; + break; + } + } + } + if (!computeEnv || !computeEnvID) { + console.error( + "Error fetching compute environment. No compute environment matches id: ", + computeEnvID + ); + return; + } + + const algo: ComputeAlgorithm = { + documentId: algoDdo.id, + serviceId: algoDdo.services[0].id, + meta: algoDdo.metadata.algorithm, + }; + + const assets = []; + for (const dataDdo in ddos) { + const canStartCompute = isOrderable( + ddos[dataDdo], + ddos[dataDdo].services[0].id, + algo, + algoDdo + ); + if (!canStartCompute) { + console.error( + "Error Cannot start compute job using the datasets DIDs & algorithm DID provided" + ); + return; + } + assets.push({ + documentId: ddos[dataDdo].id, + serviceId: ddos[dataDdo].services[0].id, + }); + } + const maxJobDuration = Number(args[4]); + if (!maxJobDuration) { + console.error( + "Error initializing Provider for the compute job using dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + + " because maxJobDuration was not provided." + ); + return; + } + if (maxJobDuration < 0) { + console.error( + "Error initializing Provider for the compute job using dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + + " because maxJobDuration is less than 0. It should be in seconds." + ); + return; + } + let supportedMaxJobDuration: number = maxJobDuration; + if (maxJobDuration > computeEnv.maxJobDuration) { + supportedMaxJobDuration = computeEnv.maxJobDuration; + } + const paymentToken = args[5]; + if (!paymentToken) { + console.error( + "Error initializing Provider for the compute job using dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + + " because paymentToken was not provided." + ); + return; + } + const { chainId } = await this.signer.provider.getNetwork(); + if (!Object.keys(computeEnv.fees).includes(chainId.toString())) { + console.error( + "Error starting paid compute using dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + + " because chainId is not supported by compute environment. " + + args[3] + + ". Supported chain IDs: " + + computeEnv.fees.keys() + ); + return; + } + let found: boolean = false; + for (const fee of computeEnv.fees[chainId.toString()]) { + if (fee.feeToken.toLowerCase() === paymentToken.toLowerCase()) { + found = true; + break; + } + } + if (found === false) { + console.error( + "Error initializing Provider for the compute job using dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + + " because paymentToken is not supported by this environment " + + args[3] + ); + return; + } + const resources = args[6]; // resources object should be stringified in cli when calling initializeCompute + if (!resources) { + console.error( + "Error initializing Provider for the compute job using dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + + " because resources for compute were not provided." + ); + return; + } + const parsedResources = JSON.parse(resources); + const providerInitializeComputeJob = + await ProviderInstance.initializeCompute( + assets, + algo, + computeEnv.id, + paymentToken, + supportedMaxJobDuration, + providerURI, + this.signer, // V1 was this.signer.getAddress() + parsedResources, + Number(chainId) + ); + if ( + !providerInitializeComputeJob || + "error" in providerInitializeComputeJob.algorithm + ) { + console.error( + "Error initializing Provider for the compute job using dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + ); + return; + } + console.log(chalk.yellow("\n--- Payment Details ---")); + console.log(JSON.stringify(providerInitializeComputeJob, null, 2)); + return providerInitializeComputeJob; + } + + public async computeStart(args: string[]) { + const inputDatasetsString = args[1]; + let inputDatasets = []; + + if ( + inputDatasetsString.includes("[") && + inputDatasetsString.includes("]") + ) { + const processedInput = inputDatasetsString + .replaceAll("]", "") + .replaceAll("[", ""); + if (processedInput.indexOf(",") > -1) { + inputDatasets = processedInput.split(","); + } + } else { + inputDatasets.push(inputDatasetsString); + } + + const ddos = []; + + for (const dataset in inputDatasets) { + const dataDdo = await this.aquarius.waitForIndexer( + inputDatasets[dataset], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!dataDdo) { + console.error( + "Error fetching DDO " + dataset[1] + ". Does this asset exists?" + ); + return; + } else { + ddos.push(dataDdo); + } + } + if ( + inputDatasets.length > 0 && + (ddos.length <= 0 || ddos.length != inputDatasets.length) + ) { + console.error("Not all the data ddos are available."); + return; + } + let providerURI = this.oceanNodeUrl; + if (ddos.length > 0) { + providerURI = ddos[0].services[0].serviceEndpoint; + } + const algoDdo = await this.aquarius.waitForIndexer( + args[2], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!algoDdo) { + console.error( + "Error fetching DDO " + args[1] + ". Does this asset exists?" + ); + return; + } + + const computeEnvs = await ProviderInstance.getComputeEnvironments( + this.oceanNodeUrl + ); + + if (!computeEnvs || computeEnvs.length < 1) { + console.error( + "Error fetching compute environments. No compute environments available." + ); + return; + } + const computeEnvID = args[3]; + // NO chainId needed anymore (is not part of ComputeEnvironment spec anymore) + // const chainComputeEnvs = computeEnvs[computeEnvID]; // was algoDdo.chainId + let computeEnv = null; // chainComputeEnvs[0]; + + if (computeEnvID && computeEnvID.length > 1) { + for (const index in computeEnvs) { + if (computeEnvID == computeEnvs[index].id) { + computeEnv = computeEnvs[index]; + break; + } + } + } + if (!computeEnv || !computeEnvID) { + console.error( + "Error fetching compute environment. No compute environment matches id: ", + computeEnvID + ); + return; + } + + const algo: ComputeAlgorithm = { + documentId: algoDdo.id, + serviceId: algoDdo.services[0].id, + meta: algoDdo.metadata.algorithm, + }; + + const assets = []; + for (const dataDdo in ddos) { + const canStartCompute = isOrderable( + ddos[dataDdo], + ddos[dataDdo].services[0].id, + algo, + algoDdo + ); + if (!canStartCompute) { + console.error( + "Error Cannot start compute job using the datasets DIDs & algorithm DID provided" + ); + return; + } + assets.push({ + documentId: ddos[dataDdo].id, + serviceId: ddos[dataDdo].services[0].id, + }); + } + const providerInitializeComputeJob = args[4]; // provider fees + payment + const parsedProviderInitializeComputeJob = fixAndParseProviderFees( + providerInitializeComputeJob + ); + console.log("Ordering algorithm: ", args[2]); + const datatoken = new Datatoken( + this.signer, + (await this.signer.provider.getNetwork()).chainId.toString(), + this.config + ); + algo.transferTxId = await handleComputeOrder( + parsedProviderInitializeComputeJob?.algorithm, + algoDdo, + this.signer, + computeEnv.consumerAddress, + 0, + datatoken, + this.config, + parsedProviderInitializeComputeJob?.algorithm?.providerFee, + providerURI + ); + if (!algo.transferTxId) { + console.error( + "Error ordering compute for algorithm with DID: " + + args[2] + + ". Do you have enough tokens?" + ); + return; + } + console.log("Ordering assets: ", args[1]); + + for (let i = 0; i < ddos.length; i++) { + assets[i].transferTxId = await handleComputeOrder( + parsedProviderInitializeComputeJob?.datasets[i], + ddos[i], + this.signer, + computeEnv.consumerAddress, + 0, + datatoken, + this.config, + parsedProviderInitializeComputeJob?.datasets[i].providerFee, + providerURI + ); + if (!assets[i].transferTxId) { + console.error( + "Error ordering dataset with DID: " + + assets[i] + + ". Do you have enough tokens?" + ); + return; + } + } + // payment check + const maxJobDuration = Number(args[5]); + if (!maxJobDuration) { + console.error( + "Error initializing Provider for the compute job using dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + + " because maxJobDuration was not provided." + ); + return; + } + if (maxJobDuration < 0) { + console.error( + "Error starting paid compute using dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + + " because maxJobDuration is less than 0. It should be in seconds." + ); + return; + } + let supportedMaxJobDuration: number = maxJobDuration; + if (maxJobDuration > computeEnv.maxJobDuration) { + supportedMaxJobDuration = computeEnv.maxJobDuration; + } + const { chainId } = await this.signer.provider.getNetwork(); + const paymentToken = args[6]; + if (!paymentToken) { + console.error( + "Error starting paid compute using dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + + " because paymentToken was not provided." + ); + return; + } + if (!Object.keys(computeEnv.fees).includes(chainId.toString())) { + console.error( + "Error starting paid compute using dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + + " because chainId is not supported by compute environment. " + + args[3] + + ". Supported chain IDs: " + + computeEnv.fees.keys() + ); + return; + } + let found: boolean = false; + for (const fee of computeEnv.fees[chainId.toString()]) { + if (fee.feeToken.toLowerCase() === paymentToken.toLowerCase()) { + found = true; + break; + } + } + if (found === false) { + console.error( + "Error starting paid compute using dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + + " because paymentToken is not supported by this environment " + + args[3] + ); + return; + } + const resources = args[7]; // resources object should be stringified in cli when calling initializeCompute + if (!resources) { + console.error( + "Error starting paid compute using dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + + " because resources for compute were not provided." + ); + return; + } + + const escrow = new EscrowContract( + getAddress(parsedProviderInitializeComputeJob.payment.escrowAddress), + this.signer + ); + console.log("Verifying payment..."); + await new Promise((resolve) => setTimeout(resolve, 3000)); + + const validationEscrow = await escrow.verifyFundsForEscrowPayment( + paymentToken, + computeEnv.consumerAddress, + await unitsToAmount( + this.signer, + paymentToken, + parsedProviderInitializeComputeJob.payment.amount + ), + parsedProviderInitializeComputeJob.payment.amount.toString(), + parsedProviderInitializeComputeJob.payment.minLockSeconds.toString(), + "10" + ); + if (validationEscrow.isValid === false) { + console.error( + "Error starting compute job dataset DID " + + args[1] + + " and algorithm DID " + + args[2] + + " because escrow funds check failed: " + + validationEscrow.message + ); + return; + } + + console.log("Starting compute job using provider: ", providerURI); + + const additionalDatasets = assets.length > 1 ? assets.slice(1) : null; + if (assets.length > 0) { + console.log( + "Starting compute job on " + + assets[0].documentId + + " with additional datasets:" + + (!additionalDatasets ? "none" : additionalDatasets[0].documentId) + ); + } else { + console.log( + "Starting compute job on " + + algo.documentId + + " with additional datasets:" + + (!additionalDatasets ? "none" : additionalDatasets[0].documentId) + ); + } + if (additionalDatasets !== null) { + console.log( + "Adding additional datasets to dataset, according to C2D V2 specs" + ); + assets.push(additionalDatasets); + } + + const output: ComputeOutput = { + metadataUri: await getMetadataURI(), + }; + + const computeJobs = await ProviderInstance.computeStart( + providerURI, + this.signer, + computeEnv.id, + assets, // assets[0] // only c2d v1, + algo, + supportedMaxJobDuration, + paymentToken, + JSON.parse(resources), + Number((await this.signer.provider.getNetwork()).chainId), + null, + null, + // additionalDatasets, only c2d v1 + output + ); + + console.log("computeJobs: ", computeJobs); + + if (computeJobs && computeJobs[0]) { + const { jobId, payment } = computeJobs[0]; + console.log("Compute started. JobID: " + jobId); + console.log("Agreement ID: " + payment.lockTx); + } else { + console.log("Error while starting the compute job: ", computeJobs); + } + } + + public async freeComputeStart(args: string[]) { + const inputDatasetsString = args[1]; + let inputDatasets = []; + + if ( + inputDatasetsString.includes("[") && + inputDatasetsString.includes("]") + ) { + const processedInput = inputDatasetsString + .replaceAll("]", "") + .replaceAll("[", ""); + if (processedInput.indexOf(",") > -1) { + inputDatasets = processedInput.split(","); + } + } else { + inputDatasets.push(inputDatasetsString); + } + + const ddos = []; + + for (const dataset in inputDatasets) { + const dataDdo = await this.aquarius.waitForIndexer( + inputDatasets[dataset], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!dataDdo) { + console.error( + "Error fetching DDO " + dataset[1] + ". Does this asset exists?" + ); + return; + } else { + ddos.push(dataDdo); + } + } + + if ( + inputDatasets.length > 0 && + (ddos.length <= 0 || ddos.length != inputDatasets.length) + ) { + console.error("Not all the data ddos are available."); + return; + } + let providerURI = this.oceanNodeUrl; + if (ddos.length > 0) { + providerURI = ddos[0].services[0].serviceEndpoint; + } + + const algoDdo = await this.aquarius.waitForIndexer( + args[2], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!algoDdo) { + console.error( + "Error fetching DDO " + args[1] + ". Does this asset exists?" + ); + return; + } + + const computeEnvs = await ProviderInstance.getComputeEnvironments( + this.oceanNodeUrl + ); + + if (!computeEnvs || computeEnvs.length < 1) { + console.error( + "Error fetching compute environments. No compute environments available." + ); + return; + } + + const mytime = new Date(); + const computeMinutes = 5; + mytime.setMinutes(mytime.getMinutes() + computeMinutes); + + const computeEnvID = args[3]; + // NO chainId needed anymore (is not part of ComputeEnvironment spec anymore) + // const chainComputeEnvs = computeEnvs[computeEnvID]; // was algoDdo.chainId + let computeEnv = null; // chainComputeEnvs[0]; + + if (computeEnvID && computeEnvID.length > 1) { + for (const env of computeEnvs) { + if (computeEnvID == env.id && env.free) { + computeEnv = env; + break; + } + } + } + + if (!computeEnv || !computeEnvID) { + console.error( + "Error fetching free compute environment. No free compute environment matches id: ", + computeEnvID + ); + return; + } + + const algo: ComputeAlgorithm = { + documentId: algoDdo.id, + serviceId: algoDdo.services[0].id, + meta: algoDdo.metadata.algorithm, + }; + + const assets = []; + for (const dataDdo in ddos) { + const canStartCompute = isOrderable( + ddos[dataDdo], + ddos[dataDdo].services[0].id, + algo, + algoDdo + ); + if (!canStartCompute) { + console.error( + "Error Cannot start compute job using the datasets DIDs & algorithm DID provided" + ); + return; + } + assets.push({ + documentId: ddos[dataDdo].id, + serviceId: ddos[dataDdo].services[0].id, + }); + } + + console.log("Starting compute job using provider: ", providerURI); + const additionalDatasets = assets.length > 1 ? assets.slice(1) : null; + if (assets.length > 0) { + console.log( + "Starting compute job on " + + assets[0].documentId + + " with additional datasets:" + + (!additionalDatasets ? "none" : additionalDatasets[0].documentId) + ); + } else { + console.log( + "Starting compute job on " + + algo.documentId + + " with additional datasets:" + + (!additionalDatasets ? "none" : additionalDatasets[0].documentId) + ); + } + + if (additionalDatasets !== null) { + console.log( + "Adding additional datasets to dataset, according to C2D V2 specs" + ); + assets.push(additionalDatasets); + } + + const output: ComputeOutput = { + metadataUri: await getMetadataURI(), + }; + + const computeJobs = await ProviderInstance.freeComputeStart( + providerURI, + this.signer, + computeEnv.id, + assets, // assets[0] // only c2d v1, + algo, + null, + null, + null, + output + ); + + console.log("compute jobs: ", computeJobs); + + if (computeJobs && computeJobs[0]) { + const { jobId } = computeJobs[0]; + console.log("Compute started. JobID: " + jobId); + } else { + console.log("Error while starting the compute job: ", computeJobs); + } + } + + public async computeStop(args: string[]) { + const dataDdo = await this.aquarius.waitForIndexer( + args[1], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!dataDdo) { + console.error( + "Error fetching DDO " + args[1] + ". Does this asset exists?" + ); + return; + } + + const jobId = args[2]; + const jobStatus = await ProviderInstance.computeStop( + jobId, + this.oceanNodeUrl, + this.signer + ); + console.log(jobStatus); + } + + public async getComputeEnvironments() { + const computeEnvs = await ProviderInstance.getComputeEnvironments( + this.oceanNodeUrl + ); + + if (!computeEnvs || computeEnvs.length < 1) { + console.error( + "Error fetching compute environments. No compute environments available." + ); + return; + } + + console.log("Exiting compute environments: ", JSON.stringify(computeEnvs)); + } + + public async computeStreamableLogs(args: string[]) { + const jobId = args[0]; + const logsResponse = await ProviderInstance.computeStreamableLogs( + this.oceanNodeUrl, + this.signer, + jobId + ); + console.log("response: ", logsResponse); + + if (!logsResponse) { + console.error("Error fetching streamable logs. No logs available."); + return; + } else { + const stream = logsResponse as ReadableStream; + console.log("stream: ", stream); + const text = await new Response(stream).text(); + console.log("Streamable Logs: "); + console.log(text); + // for await (const value of stream) { + // // just print it to the console + // console.log(value); + // } + } + console.log("Exiting computeStreamableLogs: ", logsResponse); + } + + public async allowAlgo(args: string[]) { + const asset = await this.aquarius.waitForIndexer( + args[1], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!asset) { + console.error( + "Error fetching DDO " + args[1] + ". Does this asset exists?" + ); + return; + } + + if (asset.indexedMetadata.nft.owner !== (await this.signer.getAddress())) { + console.error( + "You are not the owner of this asset, and there for you cannot update it." + ); + return; + } + + if (asset.services[0].type !== "compute") { + console.error( + "Error getting computeService for " + + args[1] + + ". Does this asset has an computeService?" + ); + return; + } + const algoAsset = await this.aquarius.waitForIndexer( + args[2], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!algoAsset) { + console.error( + "Error fetching DDO " + args[2] + ". Does this asset exists?" + ); + return; + } + const encryptDDO = args[3] === "false" ? false : true; + let filesChecksum; + try { + filesChecksum = await ProviderInstance.checkDidFiles( + algoAsset.id, + algoAsset.services[0].id, + algoAsset.services[0].serviceEndpoint, + true + ); + } catch (e) { + console.error("Error checking algo files: ", e); + return; + } + + const containerChecksum = + algoAsset.metadata.algorithm.container.entrypoint + + algoAsset.metadata.algorithm.container.checksum; + const trustedAlgorithm = { + did: algoAsset.id, + containerSectionChecksum: getHash(containerChecksum), + filesChecksum: filesChecksum?.[0]?.checksum, + }; + asset.services[0].compute.publisherTrustedAlgorithms.push(trustedAlgorithm); + try { + const txid = await updateAssetMetadata( + this.signer, + asset, + this.oceanNodeUrl, + this.aquarius, + encryptDDO + ); + console.log("Successfully updated asset metadata: " + txid); + } catch (e) { + console.error("Error updating asset metadata: ", e); + return; + } + } + + public async disallowAlgo(args: string[]) { + const asset = await this.aquarius.waitForIndexer( + args[1], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!asset) { + console.error( + "Error fetching DDO " + args[1] + ". Does this asset exists?" + ); + return; + } + if (asset.indexedMetadata.nft.owner !== (await this.signer.getAddress())) { + console.error( + "You are not the owner of this asset, and there for you cannot update it." + ); + return; + } + if (asset.services[0].type !== "compute") { + console.error( + "Error getting computeService for " + + args[1] + + ". Does this asset has an computeService?" + ); + return; + } + if (asset.services[0].compute.publisherTrustedAlgorithms) { + console.error( + " " + args[1] + ". Does this asset has an computeService?" + ); + return; + } + const encryptDDO = args[3] === "false" ? false : true; + const indexToDelete = + asset.services[0].compute.publisherTrustedAlgorithms.findIndex( + (item) => item.did === args[2] + ); + + if (indexToDelete !== -1) { + asset.services[0].compute.publisherTrustedAlgorithms.splice( + indexToDelete, + 1 + ); + } else { + console.error( + " " + + args[2] + + ". is not allowed by the publisher to run on " + + args[1] + ); + return; + } + + const txid = await updateAssetMetadata( + this.signer, + asset, + this.oceanNodeUrl, + this.aquarius, + encryptDDO + ); + console.log("Asset updated " + txid); + } + + public async getJobStatus(args: string[]) { + // args[1] - did (for checking if data asset exists, legacy) + // args[2] - jobId + // args[3] - agreementId + const hasAgreementId = args.length === 4; + + const dataDdo = await this.aquarius.waitForIndexer( + args[1], + null, + null, + this.indexingParams.retryInterval, + this.indexingParams.maxRetries + ); + if (!dataDdo) { + console.error( + "Error fetching DDO " + args[1] + ". Does this asset exists?" + ); + return; + } + const jobId = args[2]; + let agreementId = null; + if (hasAgreementId) { + agreementId = args[3]; + } + + const jobStatus = (await ProviderInstance.computeStatus( + this.oceanNodeUrl, + await this.signer.getAddress(), + jobId, + agreementId + )) as ComputeJob; + console.log(util.inspect(jobStatus, false, null, true)); + } + + public async downloadJobResults(args: string[]) { + const jobResult = await ProviderInstance.getComputeResultUrl( + this.oceanNodeUrl, + this.signer, + args[1], + parseInt(args[2]) + ); + console.log("jobResult ", jobResult); + + try { + const path = args[3] ? args[3] : "."; + const { filename } = await downloadFile( + jobResult, + path, + parseInt(args[2]) + ); + console.log("File downloaded successfully:", path + "/" + filename); + } catch (e) { + console.log(`Download url dataset failed: ${e}`); + } + } + + public async mintOceanTokens() { + try { + const config = await getConfigByChainId(Number(this.config.chainId)); + const minAbi = [ + { + constant: false, + inputs: [ + { name: "to", type: "address" }, + { name: "value", type: "uint256" }, + ], + name: "mint", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + ]; + + const tokenContract = new ethers.Contract( + config?.Ocean, + minAbi, + this.signer + ); + const estGasPublisher = await tokenContract.mint.estimateGas( + await this.signer.getAddress(), + await amountToUnits(null, null, "1000", 18) + ); + const tx = await sendTx( + estGasPublisher, + this.signer, + 1, + tokenContract.mint, + await this.signer.getAddress(), + amountToUnits(null, null, "1000", 18) + ); + await tx.wait(); + } catch (error) { + console.error("Error minting Ocean tokens:", error); + } + } + + public async generateAuthToken() { + const authToken = await ProviderInstance.generateAuthToken( + this.signer, + this.oceanNodeUrl + ); + console.log(`Auth token successfully generated: ${authToken}`); + } + + public async invalidateAuthToken(args: string[]) { + const authToken = args[0]; + const result = await ProviderInstance.invalidateAuthToken( + this.signer, + authToken, + this.oceanNodeUrl + ); + if (!result.success) { + console.log("Auth token could not be invalidated"); + return; + } + + console.log(`Auth token successfully invalidated`); + } + + public async getEscrowBalance(token: string): Promise { + const config = await getConfigByChainId(Number(this.config.chainId)); + const escrow = new EscrowContract( + getAddress(config.Escrow), + this.signer, + Number(this.config.chainId) + ); + + try { + const balance = await escrow.getUserFunds( + await this.signer.getAddress(), + token + ); + const decimals = await getTokenDecimals(this.signer, token); + const available = balance.available; + const amount = await unitsToAmount( + this.signer, + token, + available, + decimals + ); + console.log(`Escrow user funds for token ${token}: ${amount}`); + return Number(amount); + } catch (error) { + console.error("Error getting escrow balance:", error); + } + } + + public async withdrawFromEscrow( + token: string, + amount: string + ): Promise { + const config = await getConfigByChainId(Number(this.config.chainId)); + const escrow = new EscrowContract( + getAddress(config.Escrow), + this.signer, + Number(this.config.chainId) + ); + + const balance = await this.getEscrowBalance(token); + if (balance < Number(amount)) { + console.error(`Insufficient balance in escrow for token ${token}`); + return; + } + + const withdrawTx = await escrow.withdraw([token], [amount]); + await withdrawTx.wait(); + console.log(`Successfully withdrawn ${amount} ${token} from escrow`); + } + + public async depositToEscrow( + signer: Signer, + token: string, + amount: string, + chainId: number + ) { + try { + const amountInUnits = await amountToUnits(signer, token, amount, 18); + const config = await getConfigByChainId(chainId); + const escrowAddress = config.Escrow; + + const tokenContract = new ethers.Contract( + token, + ["function approve(address spender, uint256 amount) returns (bool)"], + signer + ); + + const escrow = new EscrowContract( + getAddress(escrowAddress), + signer, + chainId + ); + + console.log("Approving token transfer..."); + const approveTx = await tokenContract.approve( + escrowAddress, + amountInUnits + ); + await approveTx.wait(); + console.log(`Successfully approved ${amount} ${token} to escrow`); + + console.log("Depositing to escrow..."); + const depositTx = await escrow.deposit(token, amount); + await depositTx.wait(); + return true; + } catch (error) { + console.error("Error depositing to escrow:", error); + return false; + } + } + + public async authorizeEscrowPayee( + token: string, + payee: string, + maxLockedAmount: string, + maxLockSeconds: string, + maxLockCounts: string + ) { + try { + const config = await getConfigByChainId(Number(this.config.chainId)); + const escrowAddress = config.Escrow; + + const escrow = new EscrowContract(getAddress(escrowAddress), this.signer); + + console.log("Authorizing payee..."); + const authorizeTx = await escrow.authorize( + getAddress(token), + getAddress(payee), + maxLockedAmount, + maxLockSeconds, + maxLockCounts + ); + await authorizeTx.wait(); + console.log(`Successfully authorized payee ${payee} for token ${token}`); + + return true; + } catch (error) { + console.error("Error authorizing payee:", error); + return false; + } + } + + public async getAuthorizationsEscrow(token: string, payee: string) { + const config = await getConfigByChainId(Number(this.config.chainId)); + const payer = await this.signer.getAddress(); + const tokenAddress = getAddress(token); + const payerAddress = getAddress(payer); + const payeeAddress = getAddress(payee); + const decimals = await getTokenDecimals(this.signer, token); + const escrow = new EscrowContract( + getAddress(config.Escrow), + this.signer, + Number(this.config.chainId) + ); + + const authorizations = await escrow.getAuthorizations( + tokenAddress, + payerAddress, + payeeAddress + ); + const authorization = authorizations[0]; + if (!authorization || authorization.length === 0) { + console.log("No authorizations found"); + return; + } + + const currentLockedAmount = await unitsToAmount( + this.signer, + token, + authorization.currentLockedAmount.toString(), + decimals + ); + const maxLockedAmount = await unitsToAmount( + this.signer, + token, + authorization.maxLockedAmount.toString(), + decimals + ); + + console.log("Authorizations found:"); + console.log(`- Current Locked Amount: ${Number(currentLockedAmount)}`); + console.log(`- Current Locks: ${authorization.currentLocks}`); + console.log(`- Max locked amount: ${Number(maxLockedAmount)}`); + console.log(`- Max lock seconds: ${authorization.maxLockSeconds}`); + console.log(`- Max lock counts: ${authorization.maxLockCounts}`); + + return authorizations; + } + + public async createAccessList(args: string[]): Promise { + try { + const name = args[0]; + const symbol = args[1]; + const transferable = args[2] === "true"; + const initialUsers = args[3] + ? args[3].split(",").map((u) => u.trim()) + : []; + + if (!name || !symbol) { + console.error(chalk.red("Name and symbol are required")); + return; + } + + const config = await getConfigByChainId(Number(this.config.chainId)); + if (!config.AccessListFactory) { + console.error( + chalk.red( + "Access list factory not found. Check local address.json file" + ) + ); + return; + } + const accessListFactory = new AccesslistFactory( + config.AccessListFactory, + this.signer, + Number(this.config.chainId) + ); + + const owner = await this.signer.getAddress(); + const tokenURIs = initialUsers.map( + () => "https://oceanprotocol.com/nft/" + ); + + console.log(chalk.cyan("Creating new access list...")); + console.log(`Name: ${name}`); + console.log(`Symbol: ${symbol}`); + console.log(`Transferable: ${transferable}`); + console.log(`Owner: ${owner}`); + console.log( + `Initial users: ${ + initialUsers.length > 0 ? initialUsers.join(", ") : "none" + }` + ); + + const accessListAddress = + await accessListFactory.deployAccessListContract( + name, + symbol, + tokenURIs, + transferable, + owner, + initialUsers + ); + + console.log(chalk.green(`\nAccess list created successfully!`)); + console.log(chalk.green(`Contract address: ${accessListAddress}`)); + } catch (error) { + console.error(chalk.red("Error creating access list:"), error); + } + } + + public async addToAccessList(args: string[]): Promise { + try { + const accessListAddress = args[0]; + const users = args[1].split(",").map((u) => u.trim()); + + if (!accessListAddress || users.length === 0) { + console.error( + chalk.red("Access list address and at least one user are required") + ); + return; + } + + const accessList = new AccessListContract( + accessListAddress, + this.signer, + Number(this.config.chainId) + ); + + console.log( + chalk.cyan(`Adding ${users.length} user(s) to access list...`) + ); + + if (users.length === 1) { + const tx = await accessList.mint( + users[0], + "https://oceanprotocol.com/nft/" + ); + await tx.wait(); + console.log( + chalk.green(`Successfully added user ${users[0]} to access list`) + ); + return; + } + + const tokenURIs = users.map(() => "https://oceanprotocol.com/nft/"); + const tx = await accessList.batchMint(users, tokenURIs); + await tx.wait(); + console.log( + chalk.green(`Successfully added ${users.length} users to access list:`) + ); + users.forEach((user) => console.log(` - ${user}`)); + } catch (error) { + console.error(chalk.red("Error adding users to access list:"), error); + } + } + + public async checkAccessList(args: string[]): Promise { + try { + const accessListAddress = args[0]; + const users = args[1].split(",").map((u) => u.trim()); + + if (!accessListAddress || users.length === 0) { + console.error( + chalk.red("Access list address and at least one user are required") + ); + return; + } + + const accessList = new AccessListContract( + accessListAddress, + this.signer, + Number(this.config.chainId) + ); + + console.log( + chalk.cyan(`Checking access list for ${users.length} user(s)...\n`) + ); + + for (const user of users) { + const balance = await accessList.balance(user); + const hasAccess = Number(balance) > 0; + + if (hasAccess) { + console.log( + chalk.green(`✓ ${user}: Has access (balance: ${balance})`) + ); + } else { + console.log(chalk.red(`✗ ${user}: No access`)); + } + } + } catch (error) { + console.error(chalk.red("Error checking access list:"), error); + } + } + + public async removeFromAccessList(args: string[]): Promise { + try { + const accessListAddress = args[0]; + const users = args[1].split(",").map((u) => u.trim()); + + if (!accessListAddress || users.length === 0) { + console.error( + chalk.red( + "Access list address and at least one user address are required" + ) + ); + return; + } + + const accessList = new AccessListContract( + accessListAddress, + this.signer, + Number(this.config.chainId) + ); + + console.log( + chalk.cyan(`Removing ${users.length} user(s) from access list...`) + ); + for (const user of users) { + const balance = await accessList.balance(user); + + if (Number(balance) === 0) { + console.log( + chalk.yellow( + `⚠ User ${user} is not on the access list, skipping...` + ) + ); + continue; + } + + const balanceNum = Number(balance); + const contract = accessList.contract; + + let removedCount = 0; + for (let index = 0; index < balanceNum; index++) { + try { + const tokenId = await contract.tokenOfOwnerByIndex(user, index); + const tx = await accessList.burn(Number(tokenId)); + await tx.wait(); + + console.log( + chalk.green( + `✓ Successfully removed user ${user} (token ID: ${tokenId})` + ) + ); + removedCount++; + } catch (e: any) { + console.log( + chalk.yellow( + `⚠ Could not remove token at index ${index} for user ${user}: ${e.message}` + ) + ); + } + } + + if (removedCount === 0) { + console.log( + chalk.yellow(`⚠ Could not remove any tokens for user ${user}`) + ); + } else if (removedCount < balanceNum) { + console.log( + chalk.yellow( + `⚠ Only removed ${removedCount} of ${balanceNum} tokens for user ${user}` + ) + ); + } + } + } catch (error) { + console.error(chalk.red("Error removing users from access list:"), error); + } + } + + public async downloadNodeLogs(args: string[]): Promise { + try { + const outputLocation = args[0]; + const last = args[1]; + let from = args[2]; + let to = args[3]; + const maxLogs = args[4] ? Math.min(parseInt(args[4], 10), 1000) : undefined; + + if (!outputLocation) { + console.error(chalk.red("Output location is required")); + return; + } + + if (!fs.existsSync(outputLocation)) { + console.error( + chalk.red(`Output directory does not exist: ${outputLocation}`) + ); + return; + } + + if (last && (from || to)) { + console.error( + chalk.red("Use either --last or --from/--to, not both") + ); + return; + } + + if ((from && !to) || (!from && to)) { + console.error( + chalk.red( + "Both --from and --to are required when specifying a time range" + ) + ); + return; + } + + if (!last && !from && !to) { + to = `${Date.now()}`; + from = `${Date.now() - 60 * 60 * 1000}`; // default: last 1 hour + } + + if (last) { + to = `${Date.now()}`; + from = `${Date.now() - parseInt(last, 10) * 60 * 60 * 1000}`; + } + + const response = await ProviderInstance.downloadNodeLogs( + this.oceanNodeUrl, + this.signer, + from, + to, + maxLogs + ); + + const text = await new Response(response).text(); + const outputPath = `${outputLocation}/logs.json`; + fs.writeFileSync(outputPath, text); + console.log(chalk.green(`Logs saved to ${outputPath}`)); + } catch (error) { + console.error(chalk.red("Error downloading node logs: "), error); + } + } }