diff --git a/package-lock.json b/package-lock.json index e5cae6ca..3b0e02b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,11 +9,11 @@ "version": "0.0.0-development", "license": "Apache-2.0", "dependencies": { - "@tradetrust-tt/dnsprove": "^2.12.4", + "@tradetrust-tt/dnsprove": "^2.13.2", "@tradetrust-tt/document-store": "^2.7.0", "@tradetrust-tt/token-registry": "^4.9.0", "@tradetrust-tt/tradetrust": "^6.9.0", - "axios": "^1.6.2", + "axios": "^1.7.2", "debug": "^4.3.1", "did-resolver": "^3.1.0", "ethers": "^5.4.0", @@ -26,7 +26,6 @@ "@commitlint/cli": "^16.1.0", "@commitlint/config-conventional": "^16.2.4", "@commitlint/prompt": "^16.1.0", - "@govtechsg/oa-did-sign": "^2.2.0", "@types/debug": "^4.1.5", "@types/jest": "^26.0.23", "@typescript-eslint/eslint-plugin": "^4.22.0", @@ -2977,233 +2976,6 @@ "node": ">=12" } }, - "node_modules/@govtechsg/oa-did-sign": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@govtechsg/oa-did-sign/-/oa-did-sign-2.2.0.tgz", - "integrity": "sha512-0a1T9slgFRctLRUA/lLi06gl5iEIvKGa91btMdmTckUjQwa6ShP6kaLSZuyo375yYmhbREoFTSsnhSOV47xwnw==", - "dev": true, - "dependencies": { - "@govtechsg/open-attestation": "^4.5.0", - "did-resolver": "^2.1.1", - "ethers": "^5.0.4", - "ethr-did-resolver": "^3.0.0", - "node-cache": "^5.1.2", - "snyk": "^1.406.0", - "web-did-resolver": "^1.3.3" - } - }, - "node_modules/@govtechsg/oa-did-sign/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/@govtechsg/oa-did-sign/node_modules/did-resolver": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-2.2.0.tgz", - "integrity": "sha512-/u7dSTZFGfKepEx7mi9JOMWJzUUxnJ+8M5OqB/JeVGvhWBp/PwriB7Z/2ke00biPNOUmS6oEpHxbm8b0/4uHjg==", - "dev": true - }, - "node_modules/@govtechsg/oa-did-sign/node_modules/ethr-did-resolver": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/ethr-did-resolver/-/ethr-did-resolver-3.0.3.tgz", - "integrity": "sha512-bqpA8Cs4701v0ag4w9cksdNTaCwDItNmNuHwfKgZkDhnPOEJfxvhQO75kr0RiCxM6cr9URiD9/6+FQ53+tSbvw==", - "dev": true, - "dependencies": { - "buffer": "^6.0.0", - "did-resolver": "2.1.2", - "elliptic": "^6.5.3", - "ethjs-abi": "^0.2.1", - "ethjs-contract": "^0.2.0", - "ethjs-provider-http": "^0.1.6", - "ethjs-query": "^0.3.5", - "ethr-did-registry": "^0.0.3", - "js-sha3": "^0.8.0" - } - }, - "node_modules/@govtechsg/oa-did-sign/node_modules/ethr-did-resolver/node_modules/did-resolver": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-2.1.2.tgz", - "integrity": "sha512-n4YGS1CzbX48U/ChLRY3SdgiV5N3B/+yh0ToS5t+Sx4QjhVZN6ZyijUSSYbFGvz+I4qImeSZOdo6RX8JaieN7A==", - "dev": true - }, - "node_modules/@govtechsg/oa-did-sign/node_modules/web-did-resolver": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web-did-resolver/-/web-did-resolver-1.3.5.tgz", - "integrity": "sha512-k+32CvrguvAwgvppYH0geMsmKJL1akuyWa3p5ArVON5swYvMb72e1yayM7XuPMwUW/6aZ2Z0HL14QkfvcIJRQw==", - "dev": true, - "dependencies": { - "cross-fetch": "^3.0.4", - "did-resolver": "2.1.1" - } - }, - "node_modules/@govtechsg/oa-did-sign/node_modules/web-did-resolver/node_modules/did-resolver": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-2.1.1.tgz", - "integrity": "sha512-FYLTkNWofjYNDGV1HTQlyVu1OqZiFxR4I8KM+oxGVOkbXva15NfWzbzciqdXUDqOhe6so5aroAdrVip6gSAYSA==", - "dev": true - }, - "node_modules/@govtechsg/open-attestation": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/@govtechsg/open-attestation/-/open-attestation-4.7.3.tgz", - "integrity": "sha512-201tpj/LVJyEiYS8yS3fXHRjj3r131UHykYpGDzBA+aNVlctBMhSy5FK7bbn9MtypUk7QnxjRH9XGCuX7UAF9g==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "ajv": "6.10.2", - "debug": "^4.1.1", - "did-resolver": "^2.1.2", - "ethers": "^5.0.31", - "ethr-did-resolver": "^3.0.3", - "flatley": "^5.2.0", - "js-base64": "^2.5.2", - "js-sha3": "^0.8.0", - "jsonld": "^3.1.0", - "lodash": "^4.17.15", - "node-fetch": "^2.6.0", - "runtypes": "^5.0.1", - "uuid": "^3.3.3", - "validator": "^12.0.0", - "verbal-expressions": "^1.0.2", - "web-did-resolver": "^1.3.5" - } - }, - "node_modules/@govtechsg/open-attestation/node_modules/ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "node_modules/@govtechsg/open-attestation/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/@govtechsg/open-attestation/node_modules/did-resolver": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-2.2.0.tgz", - "integrity": "sha512-/u7dSTZFGfKepEx7mi9JOMWJzUUxnJ+8M5OqB/JeVGvhWBp/PwriB7Z/2ke00biPNOUmS6oEpHxbm8b0/4uHjg==", - "dev": true - }, - "node_modules/@govtechsg/open-attestation/node_modules/ethr-did-resolver": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/ethr-did-resolver/-/ethr-did-resolver-3.0.3.tgz", - "integrity": "sha512-bqpA8Cs4701v0ag4w9cksdNTaCwDItNmNuHwfKgZkDhnPOEJfxvhQO75kr0RiCxM6cr9URiD9/6+FQ53+tSbvw==", - "dev": true, - "dependencies": { - "buffer": "^6.0.0", - "did-resolver": "2.1.2", - "elliptic": "^6.5.3", - "ethjs-abi": "^0.2.1", - "ethjs-contract": "^0.2.0", - "ethjs-provider-http": "^0.1.6", - "ethjs-query": "^0.3.5", - "ethr-did-registry": "^0.0.3", - "js-sha3": "^0.8.0" - } - }, - "node_modules/@govtechsg/open-attestation/node_modules/ethr-did-resolver/node_modules/did-resolver": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-2.1.2.tgz", - "integrity": "sha512-n4YGS1CzbX48U/ChLRY3SdgiV5N3B/+yh0ToS5t+Sx4QjhVZN6ZyijUSSYbFGvz+I4qImeSZOdo6RX8JaieN7A==", - "dev": true - }, - "node_modules/@govtechsg/open-attestation/node_modules/fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==", - "dev": true - }, - "node_modules/@govtechsg/open-attestation/node_modules/js-base64": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", - "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==", - "dev": true - }, - "node_modules/@govtechsg/open-attestation/node_modules/runtypes": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/runtypes/-/runtypes-5.1.0.tgz", - "integrity": "sha512-OMHkz6dxysXj4E8Fj/HCGjtdJUhapQUN7puvqzuzvjaX28pd52PZmEMqQlkIzCfKdhXdM0ghx8PpvELprEnOLQ==", - "dev": true - }, - "node_modules/@govtechsg/open-attestation/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "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.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/@govtechsg/open-attestation/node_modules/validator": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-12.2.0.tgz", - "integrity": "sha512-jJfE/DW6tIK1Ek8nCfNFqt8Wb3nzMoAbocBF6/Icgg1ZFSBpObdnwVY2jQj6qUqzhx5jc71fpvBWyLGO7Xl+nQ==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/@govtechsg/open-attestation/node_modules/web-did-resolver": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web-did-resolver/-/web-did-resolver-1.3.5.tgz", - "integrity": "sha512-k+32CvrguvAwgvppYH0geMsmKJL1akuyWa3p5ArVON5swYvMb72e1yayM7XuPMwUW/6aZ2Z0HL14QkfvcIJRQw==", - "dev": true, - "dependencies": { - "cross-fetch": "^3.0.4", - "did-resolver": "2.1.1" - } - }, - "node_modules/@govtechsg/open-attestation/node_modules/web-did-resolver/node_modules/did-resolver": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-2.1.1.tgz", - "integrity": "sha512-FYLTkNWofjYNDGV1HTQlyVu1OqZiFxR4I8KM+oxGVOkbXva15NfWzbzciqdXUDqOhe6so5aroAdrVip6gSAYSA==", - "dev": true - }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -5321,11 +5093,11 @@ } }, "node_modules/@tradetrust-tt/dnsprove": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tradetrust-tt/dnsprove/-/dnsprove-2.12.4.tgz", - "integrity": "sha512-tE/AbXe26bAK0xm+boxzUqmrKfV+Iy48a/dJbfroZXf3OmKYTAOeXU20zfnvSzK24Nzl6n/PAkkrg73mcdjuhw==", + "version": "2.13.2", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/dnsprove/-/dnsprove-2.13.2.tgz", + "integrity": "sha512-/OPqpqLAfRwxaalOtQHQN5iTfzFHYzToRX6kzYFhtiuUAiaWJIPZqwFDXCh8u5sUwBO03BdqS3S5VXNltm/h+g==", "dependencies": { - "axios": "0.21.1", + "axios": "1.7.2", "debug": "^4.3.1", "runtypes": "^6.3.0" }, @@ -5333,14 +5105,6 @@ "node": "18.x" } }, - "node_modules/@tradetrust-tt/dnsprove/node_modules/axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", - "dependencies": { - "follow-redirects": "^1.10.0" - } - }, "node_modules/@tradetrust-tt/document-store": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/@tradetrust-tt/document-store/-/document-store-2.7.0.tgz", @@ -6179,24 +5943,6 @@ "node": ">=0.10.0" } }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, "node_modules/assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", @@ -6253,27 +5999,12 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", - "dev": true - }, "node_modules/axios": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", - "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", + "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", "dependencies": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -6465,16 +6196,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", - "dev": true, - "dependencies": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -6570,15 +6291,6 @@ } ] }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, "node_modules/bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", @@ -6844,12 +6556,6 @@ "cdl": "bin/cdl.js" } }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "dev": true - }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -7696,14 +7402,6 @@ "node": ">=0.10.0" } }, - "node_modules/core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", - "dev": true, - "hasInstallScript": true - }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -7837,18 +7535,6 @@ "node": ">=8" } }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/data-urls": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", @@ -8266,16 +7952,6 @@ "safe-buffer": "~5.1.0" } }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dev": true, - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, "node_modules/elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", @@ -9398,173 +9074,6 @@ "@ethersproject/wordlists": "5.7.0" } }, - "node_modules/ethjs-abi": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", - "integrity": "sha512-g2AULSDYI6nEJyJaEVEXtTimRY2aPC2fi7ddSy0W+LXvEVL8Fe1y76o43ecbgdUKwZD+xsmEgX1yJr1Ia3r1IA==", - "dev": true, - "dependencies": { - "bn.js": "4.11.6", - "js-sha3": "0.5.5", - "number-to-bn": "1.7.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/ethjs-abi/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true - }, - "node_modules/ethjs-abi/node_modules/js-sha3": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", - "integrity": "sha512-yLLwn44IVeunwjpDVTDZmQeVbB0h+dZpY2eO68B/Zik8hu6dH+rKeLxwua79GGIvW6xr8NBAcrtiUbYrTjEFTA==", - "dev": true - }, - "node_modules/ethjs-contract": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/ethjs-contract/-/ethjs-contract-0.2.3.tgz", - "integrity": "sha512-fKsHm57wxwHrZhVlD8AHU2lC2G3c1fmvoEz15BpqIkuGWiTbjuvrQo2Avc+3EQpSsTFWNdyxC0h1WKRcn5kkyQ==", - "dev": true, - "dependencies": { - "babel-runtime": "^6.26.0", - "ethjs-abi": "0.2.0", - "ethjs-filter": "0.1.8", - "ethjs-util": "0.1.3", - "js-sha3": "0.5.5" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/ethjs-contract/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true - }, - "node_modules/ethjs-contract/node_modules/ethjs-abi": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.0.tgz", - "integrity": "sha512-ELExSTNV7rm9WA22pA3kxNmaQz1o/peM8X1pZdWypEhuNzFjOR+hIV09Mcfw69Q0kbdd7JNGAFb5dyoL/bnItA==", - "dev": true, - "dependencies": { - "bn.js": "4.11.6", - "js-sha3": "0.5.5", - "number-to-bn": "1.7.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/ethjs-contract/node_modules/js-sha3": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", - "integrity": "sha512-yLLwn44IVeunwjpDVTDZmQeVbB0h+dZpY2eO68B/Zik8hu6dH+rKeLxwua79GGIvW6xr8NBAcrtiUbYrTjEFTA==", - "dev": true - }, - "node_modules/ethjs-filter": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/ethjs-filter/-/ethjs-filter-0.1.8.tgz", - "integrity": "sha512-qTDPskDL2UadHwjvM8A+WG9HwM4/FoSY3p3rMJORkHltYcAuiQZd2otzOYKcL5w2Q3sbAkW/E3yt/FPFL/AVXA==", - "dev": true, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/ethjs-format": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/ethjs-format/-/ethjs-format-0.2.7.tgz", - "integrity": "sha512-uNYAi+r3/mvR3xYu2AfSXx5teP4ovy9z2FrRsblU+h2logsaIKZPi9V3bn3V7wuRcnG0HZ3QydgZuVaRo06C4Q==", - "dev": true, - "dependencies": { - "bn.js": "4.11.6", - "ethjs-schema": "0.2.1", - "ethjs-util": "0.1.3", - "is-hex-prefixed": "1.0.0", - "number-to-bn": "1.7.0", - "strip-hex-prefix": "1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/ethjs-format/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true - }, - "node_modules/ethjs-provider-http": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-provider-http/-/ethjs-provider-http-0.1.6.tgz", - "integrity": "sha512-y054N5xyyx43KTQjgdkAEj2uEa/flwpENU5ldx/rmA0Q2yy0vyB2lsOIn/7V0uADMc4iRSHZfnFc9b9YS5Qkdw==", - "dev": true, - "dependencies": { - "xhr2": "0.1.3" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/ethjs-query": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/ethjs-query/-/ethjs-query-0.3.8.tgz", - "integrity": "sha512-/J5JydqrOzU8O7VBOwZKUWXxHDGr46VqNjBCJgBVNNda+tv7Xc8Y2uJc6aMHHVbeN3YOQ7YRElgIc0q1CI02lQ==", - "dev": true, - "dependencies": { - "babel-runtime": "^6.26.0", - "ethjs-format": "0.2.7", - "ethjs-rpc": "0.2.0", - "promise-to-callback": "^1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/ethjs-rpc": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ethjs-rpc/-/ethjs-rpc-0.2.0.tgz", - "integrity": "sha512-RINulkNZTKnj4R/cjYYtYMnFFaBcVALzbtEJEONrrka8IeoarNB9Jbzn+2rT00Cv8y/CxAI+GgY1d0/i2iQeOg==", - "dev": true, - "dependencies": { - "promise-to-callback": "^1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/ethjs-schema": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ethjs-schema/-/ethjs-schema-0.2.1.tgz", - "integrity": "sha512-DXd8lwNrhT9sjsh/Vd2Z+4pfyGxhc0POVnLBUfwk5udtdoBzADyq+sK39dcb48+ZU+2VgtwHxtGWnLnCfmfW5g==", - "dev": true - }, - "node_modules/ethjs-util": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.3.tgz", - "integrity": "sha512-QqpX2dsEG2geSMG9dTMJVhfP1kGRdGMNjiHPiTjkju+X5cB0PQIwUzRr5k21pFkgF5zuLccqe83p7Gh5fFM5tQ==", - "dev": true, - "dependencies": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, "node_modules/ethr-did-registry": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/ethr-did-registry/-/ethr-did-registry-0.0.3.tgz", @@ -9820,12 +9329,6 @@ "node": ">=8" } }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, "node_modules/extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", @@ -9948,15 +9451,6 @@ "node": ">=0.10.0" } }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true, - "engines": [ - "node >=0.6.0" - ] - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -10308,9 +9802,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -10344,15 +9838,6 @@ "node": ">=0.10.0" } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -10600,15 +10085,6 @@ "node": ">=0.10.0" } }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - } - }, "node_modules/git-cz": { "version": "4.9.0", "resolved": "https://registry.npmjs.org/git-cz/-/git-cz-4.9.0.tgz", @@ -10934,29 +10410,6 @@ "node": ">=0.10.0" } }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dev": true, - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/hard-rejection": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", @@ -11167,21 +10620,6 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, "node_modules/human-signals": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", @@ -11683,15 +11121,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-fn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fn/-/is-fn-1.0.0.tgz", - "integrity": "sha512-XoFPJQmsAShb3jEQRfzf2rqXavq7fIqF/jOekp308JlThqrODnMpweVSGilKTCXELfLhltGP2AGgbQGVP8F1dg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -11722,16 +11151,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", - "dev": true, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, "node_modules/is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", @@ -12013,12 +11432,6 @@ "node": ">=0.10.0" } }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true - }, "node_modules/issue-parser": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/issue-parser/-/issue-parser-6.0.0.tgz", @@ -15639,12 +15052,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true - }, "node_modules/jsdom": { "version": "16.7.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", @@ -15812,12 +15219,6 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -15869,61 +15270,6 @@ "node": ">= 10.0.0" } }, - "node_modules/jsonld": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-3.3.2.tgz", - "integrity": "sha512-DXqG/fdiG7eJ8FzvSd58bW8DQsulQR/gjLYUz9PxBP/WTTpB2HzjjdxSAx5aBHewJ0RiFAV/QcqGCJjxHvuIzw==", - "dev": true, - "dependencies": { - "canonicalize": "^1.0.1", - "lru-cache": "^5.1.1", - "object.fromentries": "^2.0.2", - "rdf-canonize": "^2.0.1", - "request": "^2.88.0", - "semver": "^6.3.0", - "xmldom": "0.1.19" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonld/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/jsonld/node_modules/rdf-canonize": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/rdf-canonize/-/rdf-canonize-2.0.1.tgz", - "integrity": "sha512-/GVELjrfW8G/wS4QfDZ5Kq68cS1belVNJqZlcwiErerexeBUsgOINCROnP7UumWIBNdeCwTVLE9NVXMnRYK0lA==", - "dev": true, - "dependencies": { - "semver": "^6.3.0", - "setimmediate": "^1.0.5" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonld/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/jsonld/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, "node_modules/jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", @@ -15949,21 +15295,6 @@ "node": "*" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -19805,41 +19136,12 @@ "inBundle": true, "license": "ISC" }, - "node_modules/number-to-bn": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", - "dev": true, - "dependencies": { - "bn.js": "4.11.6", - "strip-hex-prefix": "1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/number-to-bn/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true - }, "node_modules/nwsapi": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", "dev": true }, - "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==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", @@ -19926,23 +19228,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.fromentries": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", - "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", @@ -20336,12 +19621,6 @@ "node": ">=8" } }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true - }, "node_modules/picomatch": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", @@ -20687,19 +19966,6 @@ "node": ">=0.4.0" } }, - "node_modules/promise-to-callback": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/promise-to-callback/-/promise-to-callback-1.0.0.tgz", - "integrity": "sha512-uhMIZmKM5ZteDMfLgJnoSq9GCwsNKrYau73Awf1jIy6/eUcuuZ3P+CD9zUv0kJsIUbU+x6uLNIhXhLHDs1pNPA==", - "dev": true, - "dependencies": { - "is-fn": "^1.0.0", - "set-immediate-shim": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/prompts": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.0.tgz", @@ -20758,15 +20024,6 @@ "teleport": ">=0.2.0" } }, - "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, "node_modules/querystring": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", @@ -20948,12 +20205,6 @@ "node": ">=6" } }, - "node_modules/regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, "node_modules/regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -21033,75 +20284,6 @@ "node": ">=0.10" } }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dev": true, - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request/node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/request/node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/request/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "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.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -21834,15 +21016,6 @@ "node": ">= 0.4" } }, - "node_modules/set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha512-Li5AOqrZWCVA2n5kryzEmqai6bKSIvpz5oUJHPVj6+dsbD3X1ixtsY5tEnsaNpH3pFAHmG8eIHUrtEtohrg+UQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -22293,31 +21466,6 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, - "node_modules/sshpk": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", - "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", - "dev": true, - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/stack-utils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", @@ -22583,19 +21731,6 @@ "node": ">=6" } }, - "node_modules/strip-hex-prefix": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", - "dev": true, - "dependencies": { - "is-hex-prefixed": "1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, "node_modules/strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", @@ -23278,24 +22413,6 @@ "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -23679,35 +22796,6 @@ "node": ">= 0.10" } }, - "node_modules/verbal-expressions": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/verbal-expressions/-/verbal-expressions-1.0.2.tgz", - "integrity": "sha512-LV8eG4ckcg1iIhGjOF+j1jb0b58m1DgGywce+2U8kbRrB5wZnGe4XCyUyOujZR9D/+rJGXTmxnL30o3zAgmC4w==", - "dev": true, - "engines": { - "node": ">=9.2.0" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/verror/node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - }, "node_modules/w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -23972,15 +23060,6 @@ } } }, - "node_modules/xhr2": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.3.tgz", - "integrity": "sha512-6RmGK22QwC7yXB1CRwyLWuS2opPcKOlAu0ViAnyZjDlzrEmCKL4kLHkfvB8oMRWeztMsNoDGAjsMZY15w/4tTw==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", @@ -23993,16 +23072,6 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, - "node_modules/xmldom": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.19.tgz", - "integrity": "sha512-pDyxjQSFQgNHkU+yjvoF+GXVGJU7e9EnOg/KcGMDihBIKjTsOeDYaECwC/O9bsUWKY+Sd9izfE43JXC46EOHKA==", - "deprecated": "Deprecated due to CVE-2021-21366 resolved in 0.5.0", - "dev": true, - "engines": { - "node": ">=0.1" - } - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index 55143f5f..836ffc9c 100644 --- a/package.json +++ b/package.json @@ -25,11 +25,11 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@tradetrust-tt/dnsprove": "^2.12.4", + "@tradetrust-tt/dnsprove": "^2.13.2", "@tradetrust-tt/document-store": "^2.7.0", "@tradetrust-tt/token-registry": "^4.9.0", "@tradetrust-tt/tradetrust": "^6.9.0", - "axios": "^1.6.2", + "axios": "^1.7.2", "debug": "^4.3.1", "did-resolver": "^3.1.0", "ethers": "^5.4.0", @@ -39,7 +39,6 @@ "web-did-resolver": "^2.0.4" }, "devDependencies": { - "@govtechsg/oa-did-sign": "^2.2.0", "@commitlint/cli": "^16.1.0", "@commitlint/config-conventional": "^16.2.4", "@commitlint/prompt": "^16.1.0", diff --git a/scripts/generate.v3.ts b/scripts/generate.v3.ts index db88ad9d..ad6ee9c4 100644 --- a/scripts/generate.v3.ts +++ b/scripts/generate.v3.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-empty-function,camelcase */ -import { sign } from "@govtechsg/oa-did-sign"; -import { v3, __unsafe__use__it__at__your__own__risks__wrapDocument } from "@tradetrust-tt/tradetrust"; +import { sign, SUPPORTED_SIGNING_ALGORITHM } from "@tradetrust-tt/tradetrust"; +import { v3, __unsafe__use__it__at__your__own__risks__wrapDocument as wrapDocument } from "@tradetrust-tt/tradetrust"; import { execSync } from "child_process"; import { writeFileSync } from "fs"; import { getLogger } from "../src/common/logger"; @@ -21,7 +21,8 @@ const key = { public: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", private: "0x497c85ed89f1874ba37532d1e33519aba15bd533cdcb90774cc497bfe3cde655", }; -const signMerkleRoot = async (merkleRoot: string) => sign("Secp256k1VerificationKey2018", merkleRoot, key); +const signMerkleRoot = async (merkleRoot: string) => + sign(SUPPORTED_SIGNING_ALGORITHM.Secp256k1VerificationKey2018, merkleRoot, key); const ethereumDocumentConfig = { network: "sepolia", @@ -57,7 +58,7 @@ const baseDnsDidDocumentRevocationStore = { }, }, }, -}; +} as v3.OpenAttestationDocument; const baseDidDocumentRevocationStore = { ...baseDidDocument, openAttestationMetadata: { @@ -70,17 +71,17 @@ const baseDidDocumentRevocationStore = { }, }, }, -}; +} as v3.OpenAttestationDocument; const generateRevocationStore = async ({ logMessage, document, outLocations }: GenerateRevocationStoreArgs) => { info(`${logMessage}`); const mainPath = "./test/fixtures/v3"; const rawAnother = { ...document, - type: ["VerifiableCredential", "DrivingLicenceCredential", "DivingLicenceCredential"], + type: ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], }; - const wrapped = await __unsafe__use__it__at__your__own__risks__wrapDocument(document); - const wrappedAnother = await __unsafe__use__it__at__your__own__risks__wrapDocument(rawAnother); + const wrapped = await wrapDocument(document); + const wrappedAnother = await wrapDocument(rawAnother); const { merkleRoot } = wrapped.proof; const { merkleRoot: merkleRootAnother } = wrappedAnother.proof; const signature = await signMerkleRoot(`0x${merkleRoot}`); @@ -105,14 +106,14 @@ const generateRevocationStore = async ({ logMessage, document, outLocations }: G writeFileSync(`${mainPath}/${outLocations.notRevoked}`, JSON.stringify(signedAnother, null, 2)); info("Revoking document..."); - const cmdRevoke = `oa document-store revoke -h 0x${signed.proof.merkleRoot} -a ${ethereumDocumentConfig.documentStore} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; + const cmdRevoke = `tradetrust document-store revoke -h 0x${signed.proof.merkleRoot} -a ${ethereumDocumentConfig.documentStore} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; execSync(cmdRevoke, { timeout: ethereumDocumentConfig.timeout }); }; const generateDnsDid = async () => { info("Generating DNS-DID files"); writeFileSync("./test/fixtures/v3/dnsdid.json", JSON.stringify(baseDnsDidDocument, null, 2)); - const wrappedBaseDnsDidDocument = await __unsafe__use__it__at__your__own__risks__wrapDocument(baseDnsDidDocument); + const wrappedBaseDnsDidDocument = await wrapDocument(baseDnsDidDocument); writeFileSync("./test/fixtures/v3/dnsdid-wrapped.json", JSON.stringify(wrappedBaseDnsDidDocument, null, 2)); const { merkleRoot } = wrappedBaseDnsDidDocument.proof; const signature = await signMerkleRoot(`0x${merkleRoot}`); @@ -135,9 +136,7 @@ const generateDnsDid = async () => { }, }, }; - const wrappedInvalidDnsDidDocument = await __unsafe__use__it__at__your__own__risks__wrapDocument( - validSignatureWithoutDnsTxt - ); + const wrappedInvalidDnsDidDocument = await wrapDocument(validSignatureWithoutDnsTxt); const signatureForInvalidDocument = await signMerkleRoot(`0x${wrappedInvalidDnsDidDocument.proof.merkleRoot}`); const signedInvalidDnsDidDocument: v3.SignedWrappedDocument = { ...wrappedInvalidDnsDidDocument, @@ -153,7 +152,7 @@ const generateDnsDid = async () => { const generateDid = async () => { info("Generating DID files"); writeFileSync("./test/fixtures/v3/did.json", JSON.stringify(baseDidDocument, null, 2)); - const wrappedBaseDidDocument = await __unsafe__use__it__at__your__own__risks__wrapDocument(baseDidDocument); + const wrappedBaseDidDocument = await wrapDocument(baseDidDocument); writeFileSync("./test/fixtures/v3/did-wrapped.json", JSON.stringify(wrappedBaseDidDocument, null, 2)); const { merkleRoot } = wrappedBaseDidDocument.proof; const signature = await signMerkleRoot(`0x${merkleRoot}`); @@ -176,9 +175,7 @@ const generateDid = async () => { }, }, }; - const wrappedInvalidDnsDidDocument = await __unsafe__use__it__at__your__own__risks__wrapDocument( - validSignatureWithoutDnsTxt - ); + const wrappedInvalidDnsDidDocument = await wrapDocument(validSignatureWithoutDnsTxt); const signatureForInvalidDocument = await signMerkleRoot(`0x${wrappedInvalidDnsDidDocument.proof.merkleRoot}`); const signedInvalidDnsDidDocument: v3.SignedWrappedDocument = { ...wrappedInvalidDnsDidDocument, @@ -194,28 +191,22 @@ const generateDid = async () => { const generateDocumentStore = async () => { info("Generating Document Store files"); writeFileSync("./test/fixtures/v3/documentStore.json", JSON.stringify(baseDocumentStoreDocument, null, 2)); - const wrappedBaseDocumentStoreDocument = await __unsafe__use__it__at__your__own__risks__wrapDocument( - baseDocumentStoreDocument - ); + const wrappedBaseDocumentStoreDocument = await wrapDocument(baseDocumentStoreDocument); writeFileSync( "./test/fixtures/v3/documentStore-wrapped.json", JSON.stringify(wrappedBaseDocumentStoreDocument, null, 2) ); - const issuedBaseDocumentStoreDocument = await __unsafe__use__it__at__your__own__risks__wrapDocument( - baseDocumentStoreDocument - ); + const issuedBaseDocumentStoreDocument = await wrapDocument(baseDocumentStoreDocument); writeFileSync( "./test/fixtures/v3/documentStore-issued.json", JSON.stringify(issuedBaseDocumentStoreDocument, null, 2) ); - const revokedBaseDocumentStoreDocument = await __unsafe__use__it__at__your__own__risks__wrapDocument( - baseDocumentStoreDocument - ); + const revokedBaseDocumentStoreDocument = await wrapDocument(baseDocumentStoreDocument); writeFileSync( "./test/fixtures/v3/documentStore-revoked.json", JSON.stringify(revokedBaseDocumentStoreDocument, null, 2) ); - const invalidDnsDocumentStoreDocument = await __unsafe__use__it__at__your__own__risks__wrapDocument({ + const invalidDnsDocumentStoreDocument = await wrapDocument({ ...baseDocumentStoreDocument, openAttestationMetadata: { ...baseDocumentStoreDocument.openAttestationMetadata, @@ -230,37 +221,33 @@ const generateDocumentStore = async () => { JSON.stringify(invalidDnsDocumentStoreDocument, null, 2) ); info("Issuing document(1/3)..."); - const cmdIssue1 = `oa document-store issue -h 0x${issuedBaseDocumentStoreDocument.proof.merkleRoot} -a ${ethereumDocumentConfig.documentStore} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; + const cmdIssue1 = `tradetrust document-store issue -h 0x${issuedBaseDocumentStoreDocument.proof.merkleRoot} -a ${ethereumDocumentConfig.documentStore} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; execSync(cmdIssue1, { timeout: ethereumDocumentConfig.timeout }); info("Issuing document(2/3)..."); - const cmdIssue2 = `oa document-store issue -h 0x${revokedBaseDocumentStoreDocument.proof.merkleRoot} -a ${ethereumDocumentConfig.documentStore} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; + const cmdIssue2 = `tradetrust document-store issue -h 0x${revokedBaseDocumentStoreDocument.proof.merkleRoot} -a ${ethereumDocumentConfig.documentStore} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; execSync(cmdIssue2, { timeout: ethereumDocumentConfig.timeout }); info("Issuing document(3/3)..."); - const cmdIssue3 = `oa document-store issue -h 0x${invalidDnsDocumentStoreDocument.proof.merkleRoot} -a ${ethereumDocumentConfig.documentStore} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; + const cmdIssue3 = `tradetrust document-store issue -h 0x${invalidDnsDocumentStoreDocument.proof.merkleRoot} -a ${ethereumDocumentConfig.documentStore} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; execSync(cmdIssue3, { timeout: ethereumDocumentConfig.timeout }); info("Revoking document..."); - const cmdRevoke = `oa document-store revoke -h 0x${revokedBaseDocumentStoreDocument.proof.merkleRoot} -a ${ethereumDocumentConfig.documentStore} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; + const cmdRevoke = `tradetrust document-store revoke -h 0x${revokedBaseDocumentStoreDocument.proof.merkleRoot} -a ${ethereumDocumentConfig.documentStore} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; execSync(cmdRevoke, { timeout: ethereumDocumentConfig.timeout }); }; const generateTokenRegistry = async () => { info("Generating Token Registry files"); writeFileSync("./test/fixtures/v3/tokenRegistry.json", JSON.stringify(baseTokenRegistryDocument, null, 2)); - const wrappedBaseTokenRegistryDocument = await __unsafe__use__it__at__your__own__risks__wrapDocument( - baseTokenRegistryDocument - ); + const wrappedBaseTokenRegistryDocument = await wrapDocument(baseTokenRegistryDocument); writeFileSync( "./test/fixtures/v3/tokenRegistry-wrapped.json", JSON.stringify(wrappedBaseTokenRegistryDocument, null, 2) ); - const issuedBaseTokenRegistryDocument = await __unsafe__use__it__at__your__own__risks__wrapDocument( - baseTokenRegistryDocument - ); + const issuedBaseTokenRegistryDocument = await wrapDocument(baseTokenRegistryDocument); writeFileSync( "./test/fixtures/v3/tokenRegistry-issued.json", JSON.stringify(issuedBaseTokenRegistryDocument, null, 2) ); - const invalidDnsTokenRegistryDocument = await __unsafe__use__it__at__your__own__risks__wrapDocument({ + const invalidDnsTokenRegistryDocument = await wrapDocument({ ...baseTokenRegistryDocument, openAttestationMetadata: { ...baseTokenRegistryDocument.openAttestationMetadata, @@ -274,11 +261,11 @@ const generateTokenRegistry = async () => { "./test/fixtures/v3/tokenRegistry-invalid-issued.json", JSON.stringify(invalidDnsTokenRegistryDocument, null, 2) ); - const cmdIssue1 = `oa token-registry mint -a ${ethereumDocumentConfig.tokenRegistry} --tokenId 0x${issuedBaseTokenRegistryDocument.proof.merkleRoot} --to ${ethereumDocumentConfig.wallet.address} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; + const cmdIssue1 = `tradetrust token-registry mint -a ${ethereumDocumentConfig.tokenRegistry} --tokenId 0x${issuedBaseTokenRegistryDocument.proof.merkleRoot} --to ${ethereumDocumentConfig.wallet.address} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; info("Issuing document(1/2)..."); execSync(cmdIssue1, { timeout: ethereumDocumentConfig.timeout }); info("Issuing document(2/2)..."); - const cmdIssue2 = `oa token-registry mint -a ${ethereumDocumentConfig.tokenRegistry} --tokenId 0x${invalidDnsTokenRegistryDocument.proof.merkleRoot} --to ${ethereumDocumentConfig.wallet.address} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; + const cmdIssue2 = `tradetrust token-registry mint -a ${ethereumDocumentConfig.tokenRegistry} --tokenId 0x${invalidDnsTokenRegistryDocument.proof.merkleRoot} --to ${ethereumDocumentConfig.wallet.address} -k ${ethereumDocumentConfig.wallet.key} -n ${ethereumDocumentConfig.network}`; execSync(cmdIssue2, { timeout: ethereumDocumentConfig.timeout }); }; diff --git a/test/fixtures/v3/documents.ts b/test/fixtures/v3/documents.ts index 32105030..964feaac 100644 --- a/test/fixtures/v3/documents.ts +++ b/test/fixtures/v3/documents.ts @@ -1,6 +1,6 @@ import { v3 } from "@tradetrust-tt/tradetrust"; -export const baseDnsDidDocument: v3.OpenAttestationDocument = { +export const baseDnsDidDocument = { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", @@ -15,7 +15,7 @@ export const baseDnsDidDocument: v3.OpenAttestationDocument = { id: "https://example.com", name: "DEMO STORE", }, - type: ["VerifiableCredential", "DrivingLicenceCredential"], + type: ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], credentialSubject: { id: "did:example:SERIAL_NUMBER_123", class: [ @@ -55,7 +55,7 @@ export const baseDnsDidDocument: v3.OpenAttestationDocument = { data: "BASE64_ENCODED_FILE", }, ], -}; +} as v3.OpenAttestationDocument; export const baseDidDocument: v3.OpenAttestationDocument = { ...baseDnsDidDocument,