From ed76d5c3b59f2118bcf8413380f1f6dbef355e7e Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 13:46:14 +0800 Subject: [PATCH 01/34] chore: test ci --- src/greet/greet.spec.ts | 2 +- src/greet/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/greet/greet.spec.ts b/src/greet/greet.spec.ts index b9b6d91..f738127 100644 --- a/src/greet/greet.spec.ts +++ b/src/greet/greet.spec.ts @@ -4,6 +4,6 @@ import { greet } from '.' describe('Greet', () => { const testPerson = { name: 'john' } it('should return the greet string for person', () => { - expect(greet(testPerson)).equal('hello john') + expect(greet(testPerson)).equal('hello john!') }) }) diff --git a/src/greet/index.ts b/src/greet/index.ts index 84ee213..ec39c3e 100644 --- a/src/greet/index.ts +++ b/src/greet/index.ts @@ -3,5 +3,5 @@ export type Person = { } export const greet = (person: Person) => { - return `hello ${person.name}` + return `hello ${person.name}!` } From 643378168496869b85efa76946266089f4db7731 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 14:03:29 +0800 Subject: [PATCH 02/34] chore: add public publish config to npm --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 2f8bd37..5e51553 100644 --- a/package.json +++ b/package.json @@ -31,5 +31,8 @@ }, "dependencies": { "@vitest/coverage-v8": "^1.2.2" + }, + "publishConfig": { + "access": "public" } } From 41b18dbac7004946e026b393d40676173d6eff48 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 14:10:24 +0800 Subject: [PATCH 03/34] 1.0.4 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2833726..0df6a94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tradetrust-tt/tradetrust-core", - "version": "1.0.3", + "version": "1.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@tradetrust-tt/tradetrust-core", - "version": "1.0.3", + "version": "1.0.4", "license": "ISC", "dependencies": { "@vitest/coverage-v8": "^1.2.2" diff --git a/package.json b/package.json index 5e51553..ca816e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tradetrust-tt/tradetrust-core", - "version": "1.0.3", + "version": "1.0.4", "description": "", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", From 60a4ffd0df534e5a7e4744173e099faaa2cfe879 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 14:25:51 +0800 Subject: [PATCH 04/34] chore: commitizen init --- package-lock.json | 1437 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 1 + 2 files changed, 1423 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0df6a94..1f20eb0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "devDependencies": { "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", + "commitizen": "^4.3.0", "eslint": "^8.56.0", "prettier": "^3.2.4", "typescript": "^5.3.3", @@ -41,6 +42,98 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/code-frame": { + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "dev": true, + "optional": true, + "dependencies": { + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "optional": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "optional": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "optional": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "optional": true + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "optional": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "optional": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/helper-string-parser": { "version": "7.23.4", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", @@ -57,6 +150,99 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/highlight": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "dev": true, + "optional": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "optional": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "optional": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "optional": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "optional": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "optional": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "optional": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/parser": { "version": "7.23.9", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", @@ -86,6 +272,128 @@ "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, + "node_modules/@commitlint/config-validator": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-18.6.0.tgz", + "integrity": "sha512-Ptfa865arNozlkjxrYG3qt6wT9AlhNUHeuDyKEZiTL/l0ftncFhK/KN0t/EAMV2tec+0Mwxo0FmhbESj/bI+1g==", + "dev": true, + "optional": true, + "dependencies": { + "@commitlint/types": "^18.6.0", + "ajv": "^8.11.0" + }, + "engines": { + "node": ">=v18" + } + }, + "node_modules/@commitlint/config-validator/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "optional": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@commitlint/config-validator/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "optional": true + }, + "node_modules/@commitlint/execute-rule": { + "version": "18.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-18.4.4.tgz", + "integrity": "sha512-a37Nd3bDQydtg9PCLLWM9ZC+GO7X5i4zJvrggJv5jBhaHsXeQ9ZWdO6ODYR+f0LxBXXNYK3geYXJrCWUCP8JEg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=v18" + } + }, + "node_modules/@commitlint/load": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-18.6.0.tgz", + "integrity": "sha512-RRssj7TmzT0bowoEKlgwg8uQ7ORXWkw7lYLsZZBMi9aInsJuGNLNWcMxJxRZbwxG3jkCidGUg85WmqJvRjsaDA==", + "dev": true, + "optional": true, + "dependencies": { + "@commitlint/config-validator": "^18.6.0", + "@commitlint/execute-rule": "^18.4.4", + "@commitlint/resolve-extends": "^18.6.0", + "@commitlint/types": "^18.6.0", + "chalk": "^4.1.0", + "cosmiconfig": "^8.3.6", + "cosmiconfig-typescript-loader": "^5.0.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "lodash.uniq": "^4.5.0", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=v18" + } + }, + "node_modules/@commitlint/load/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@commitlint/resolve-extends": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-18.6.0.tgz", + "integrity": "sha512-k2Xp+Fxeggki2i90vGrbiLDMefPius3zGSTFFlRAPKce/SWLbZtI+uqE9Mne23mHO5lmcSV8z5m6ziiJwGpOcg==", + "dev": true, + "optional": true, + "dependencies": { + "@commitlint/config-validator": "^18.6.0", + "@commitlint/types": "^18.6.0", + "import-fresh": "^3.0.0", + "lodash.mergewith": "^4.6.2", + "resolve-from": "^5.0.0", + "resolve-global": "^1.0.0" + }, + "engines": { + "node": ">=v18" + } + }, + "node_modules/@commitlint/resolve-extends/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@commitlint/types": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-18.6.0.tgz", + "integrity": "sha512-oavoKLML/eJa2rJeyYSbyGAYzTxQ6voG5oeX3OrxpfrkRWhJfm4ACnhoRf5tgiybx2MZ+EVFqC1Lw3W8/uwpZA==", + "dev": true, + "optional": true, + "dependencies": { + "chalk": "^4.1.0" + }, + "engines": { + "node": ">=v18" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.19.12", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", @@ -838,6 +1146,16 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, + "node_modules/@types/node": { + "version": "20.11.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", + "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", + "optional": true, + "peer": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, "node_modules/@types/semver": { "version": "7.5.6", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", @@ -1199,6 +1517,33 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -1246,11 +1591,51 @@ "node": "*" } }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "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" + } + ] + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -1272,6 +1657,30 @@ "node": ">=8" } }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "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.1.13" + } + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -1280,6 +1689,15 @@ "node": ">=8" } }, + "node_modules/cachedir": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", + "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1322,6 +1740,12 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "node_modules/check-error": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", @@ -1333,34 +1757,157 @@ "node": "*" } }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "restore-cursor": "^3.1.0" }, "engines": { - "node": ">=7.0.0" + "node": ">=8" } }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/commitizen": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/commitizen/-/commitizen-4.3.0.tgz", + "integrity": "sha512-H0iNtClNEhT0fotHvGV3E9tDejDeS04sN1veIebsKYGMuGscFaswRoYJKmT3eW85eIJAs0F28bG2+a/9wCOfPw==", + "dev": true, + "dependencies": { + "cachedir": "2.3.0", + "cz-conventional-changelog": "3.3.0", + "dedent": "0.7.0", + "detect-indent": "6.1.0", + "find-node-modules": "^2.1.2", + "find-root": "1.1.0", + "fs-extra": "9.1.0", + "glob": "7.2.3", + "inquirer": "8.2.5", + "is-utf8": "^0.2.1", + "lodash": "4.17.21", + "minimist": "1.2.7", + "strip-bom": "4.0.0", + "strip-json-comments": "3.1.1" + }, + "bin": { + "commitizen": "bin/commitizen", + "cz": "bin/git-cz", + "git-cz": "bin/git-cz" + }, + "engines": { + "node": ">= 12" + } }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, + "node_modules/conventional-commit-types": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-commit-types/-/conventional-commit-types-3.0.0.tgz", + "integrity": "sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg==", + "dev": true + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, + "node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "dev": true, + "optional": true, + "dependencies": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/cosmiconfig-typescript-loader": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-5.0.0.tgz", + "integrity": "sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==", + "dev": true, + "optional": true, + "dependencies": { + "jiti": "^1.19.1" + }, + "engines": { + "node": ">=v16" + }, + "peerDependencies": { + "@types/node": "*", + "cosmiconfig": ">=8.2", + "typescript": ">=4" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1374,6 +1921,97 @@ "node": ">= 8" } }, + "node_modules/cz-conventional-changelog": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz", + "integrity": "sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==", + "dev": true, + "dependencies": { + "chalk": "^2.4.1", + "commitizen": "^4.0.3", + "conventional-commit-types": "^3.0.0", + "lodash.map": "^4.5.1", + "longest": "^2.0.1", + "word-wrap": "^1.0.3" + }, + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@commitlint/load": ">6.1.1" + } + }, + "node_modules/cz-conventional-changelog/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cz-conventional-changelog/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cz-conventional-changelog/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/cz-conventional-changelog/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/cz-conventional-changelog/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/cz-conventional-changelog/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/cz-conventional-changelog/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -1390,6 +2028,12 @@ } } }, + "node_modules/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true + }, "node_modules/deep-eql": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", @@ -1407,6 +2051,36 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -1439,6 +2113,22 @@ "node": ">=6.0.0" } }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "optional": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, "node_modules/esbuild": { "version": "0.19.12", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", @@ -1694,6 +2384,32 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "dev": true, + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1737,6 +2453,30 @@ "reusify": "^1.0.4" } }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -1761,6 +2501,22 @@ "node": ">=8" } }, + "node_modules/find-node-modules": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/find-node-modules/-/find-node-modules-2.1.3.tgz", + "integrity": "sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg==", + "dev": true, + "dependencies": { + "findup-sync": "^4.0.0", + "merge": "^2.1.1" + } + }, + "node_modules/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "dev": true + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -1777,6 +2533,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/findup-sync": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", + "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", + "dev": true, + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^4.0.2", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/flat-cache": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", @@ -1797,6 +2568,21 @@ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1885,6 +2671,61 @@ "node": "*" } }, + "node_modules/global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", + "dev": true, + "optional": true, + "dependencies": { + "ini": "^1.3.4" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "dev": true, + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/globals": { "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", @@ -1920,6 +2761,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", @@ -1934,6 +2781,18 @@ "node": ">=8" } }, + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -1947,6 +2806,38 @@ "node": ">=16.17.0" } }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "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" + } + ] + }, "node_modules/ignore": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", @@ -1995,6 +2886,45 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/inquirer": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", + "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "optional": true + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2004,16 +2934,34 @@ "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", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/is-number": { @@ -2045,6 +2993,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", + "dev": true + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -2096,6 +3071,23 @@ "node": ">=8" } }, + "node_modules/jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "dev": true, + "optional": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "optional": true + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -2114,6 +3106,13 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "optional": 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", @@ -2131,6 +3130,18 @@ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==" }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -2153,6 +3164,13 @@ "node": ">= 0.8.0" } }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "optional": true + }, "node_modules/local-pkg": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", @@ -2183,12 +3201,70 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true, + "optional": true + }, + "node_modules/lodash.map": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "node_modules/lodash.mergewith": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", + "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", + "dev": true, + "optional": true + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", + "dev": true, + "optional": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/longest": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-2.0.1.tgz", + "integrity": "sha512-Ajzxb8CM6WAnFjgiloPsI3bF+WCxcvhdIG3KNA2KN962+tdBsHcuQ4k4qX/EcS/2CRkcc0iAkR956Nib6aXU/Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/loupe": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", @@ -2243,6 +3319,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/merge": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/merge/-/merge-2.1.1.tgz", + "integrity": "sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==", + "dev": true + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -2296,6 +3378,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/mlly": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.5.0.tgz", @@ -2312,6 +3403,12 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, "node_modules/nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", @@ -2399,6 +3496,38 @@ "node": ">= 0.8.0" } }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -2441,6 +3570,34 @@ "node": ">=6" } }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "optional": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -2624,6 +3781,43 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "dev": true, + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2633,6 +3827,62 @@ "node": ">=4" } }, + "node_modules/resolve-global": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-global/-/resolve-global-1.0.0.tgz", + "integrity": "sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==", + "dev": true, + "optional": true, + "dependencies": { + "global-dirs": "^0.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -2689,6 +3939,15 @@ "fsevents": "~2.3.2" } }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -2712,6 +3971,41 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "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" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -2796,6 +4090,29 @@ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==" }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2808,6 +4125,15 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -2892,6 +4218,12 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, "node_modules/tinybench": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.6.0.tgz", @@ -2913,6 +4245,18 @@ "node": ">=14.0.0" } }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -2945,6 +4289,12 @@ "typescript": ">=4.2.0" } }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -2995,6 +4345,22 @@ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz", "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==" }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "optional": true, + "peer": true + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -3004,6 +4370,12 @@ "punycode": "^2.1.0" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, "node_modules/v8-to-istanbul": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", @@ -3157,6 +4529,15 @@ } } }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -3186,6 +4567,32 @@ "node": ">=8" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index ca816e8..9fa2eb4 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "devDependencies": { "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", + "commitizen": "^4.3.0", "eslint": "^8.56.0", "prettier": "^3.2.4", "typescript": "^5.3.3", From 6676977b09d9a9e3e3e1776def6173a00b613a45 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 14:28:42 +0800 Subject: [PATCH 05/34] fix: remove ! from greet method response --- package-lock.json | 1 + package.json | 6 ++++++ src/greet/greet.spec.ts | 2 +- src/greet/index.ts | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1f20eb0..02e0fbf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", "commitizen": "^4.3.0", + "cz-conventional-changelog": "^3.3.0", "eslint": "^8.56.0", "prettier": "^3.2.4", "typescript": "^5.3.3", diff --git a/package.json b/package.json index 9fa2eb4..d1dc5d5 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", "commitizen": "^4.3.0", + "cz-conventional-changelog": "^3.3.0", "eslint": "^8.56.0", "prettier": "^3.2.4", "typescript": "^5.3.3", @@ -35,5 +36,10 @@ }, "publishConfig": { "access": "public" + }, + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } } } diff --git a/src/greet/greet.spec.ts b/src/greet/greet.spec.ts index f738127..b9b6d91 100644 --- a/src/greet/greet.spec.ts +++ b/src/greet/greet.spec.ts @@ -4,6 +4,6 @@ import { greet } from '.' describe('Greet', () => { const testPerson = { name: 'john' } it('should return the greet string for person', () => { - expect(greet(testPerson)).equal('hello john!') + expect(greet(testPerson)).equal('hello john') }) }) diff --git a/src/greet/index.ts b/src/greet/index.ts index ec39c3e..84ee213 100644 --- a/src/greet/index.ts +++ b/src/greet/index.ts @@ -3,5 +3,5 @@ export type Person = { } export const greet = (person: Person) => { - return `hello ${person.name}!` + return `hello ${person.name}` } From ab220f1f3027dbf0f18d96296d8f78a5ba29562a Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 14:29:43 +0800 Subject: [PATCH 06/34] debug: 1.0.5 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 02e0fbf..664ac83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tradetrust-tt/tradetrust-core", - "version": "1.0.4", + "version": "1.0.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@tradetrust-tt/tradetrust-core", - "version": "1.0.4", + "version": "1.0.5", "license": "ISC", "dependencies": { "@vitest/coverage-v8": "^1.2.2" diff --git a/package.json b/package.json index d1dc5d5..b4084f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tradetrust-tt/tradetrust-core", - "version": "1.0.4", + "version": "1.0.5", "description": "", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", From ee2634bc35520f3fea0e39d9dc8f2504b19de804 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 14:33:16 +0800 Subject: [PATCH 07/34] fix: 1.0.6 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 664ac83..b02bacb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tradetrust-tt/tradetrust-core", - "version": "1.0.5", + "version": "1.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@tradetrust-tt/tradetrust-core", - "version": "1.0.5", + "version": "1.0.6", "license": "ISC", "dependencies": { "@vitest/coverage-v8": "^1.2.2" diff --git a/package.json b/package.json index b4084f4..4f5bab5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tradetrust-tt/tradetrust-core", - "version": "1.0.5", + "version": "1.0.6", "description": "", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", From 4a4d13b01bb3cc94c481be6b98db961890a856af Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 14:55:32 +0800 Subject: [PATCH 08/34] fix: test --- src/greet/greet.spec.ts | 2 +- src/greet/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/greet/greet.spec.ts b/src/greet/greet.spec.ts index b9b6d91..f738127 100644 --- a/src/greet/greet.spec.ts +++ b/src/greet/greet.spec.ts @@ -4,6 +4,6 @@ import { greet } from '.' describe('Greet', () => { const testPerson = { name: 'john' } it('should return the greet string for person', () => { - expect(greet(testPerson)).equal('hello john') + expect(greet(testPerson)).equal('hello john!') }) }) diff --git a/src/greet/index.ts b/src/greet/index.ts index 84ee213..ec39c3e 100644 --- a/src/greet/index.ts +++ b/src/greet/index.ts @@ -3,5 +3,5 @@ export type Person = { } export const greet = (person: Person) => { - return `hello ${person.name}` + return `hello ${person.name}!` } From 93ceb7b5f73f215614ce913cdba018cbce61efc4 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 15:12:31 +0800 Subject: [PATCH 09/34] fix: test --- src/greet/greet.spec.ts | 2 +- src/greet/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/greet/greet.spec.ts b/src/greet/greet.spec.ts index f738127..b9b6d91 100644 --- a/src/greet/greet.spec.ts +++ b/src/greet/greet.spec.ts @@ -4,6 +4,6 @@ import { greet } from '.' describe('Greet', () => { const testPerson = { name: 'john' } it('should return the greet string for person', () => { - expect(greet(testPerson)).equal('hello john!') + expect(greet(testPerson)).equal('hello john') }) }) diff --git a/src/greet/index.ts b/src/greet/index.ts index ec39c3e..84ee213 100644 --- a/src/greet/index.ts +++ b/src/greet/index.ts @@ -3,5 +3,5 @@ export type Person = { } export const greet = (person: Person) => { - return `hello ${person.name}!` + return `hello ${person.name}` } From fa4787a60369b50736c78bb854525f7a60eaaf35 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 15:19:04 +0800 Subject: [PATCH 10/34] fix: remove ! --- src/greet/greet.spec.ts | 2 +- src/greet/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/greet/greet.spec.ts b/src/greet/greet.spec.ts index b9b6d91..f738127 100644 --- a/src/greet/greet.spec.ts +++ b/src/greet/greet.spec.ts @@ -4,6 +4,6 @@ import { greet } from '.' describe('Greet', () => { const testPerson = { name: 'john' } it('should return the greet string for person', () => { - expect(greet(testPerson)).equal('hello john') + expect(greet(testPerson)).equal('hello john!') }) }) diff --git a/src/greet/index.ts b/src/greet/index.ts index 84ee213..ec39c3e 100644 --- a/src/greet/index.ts +++ b/src/greet/index.ts @@ -3,5 +3,5 @@ export type Person = { } export const greet = (person: Person) => { - return `hello ${person.name}` + return `hello ${person.name}!` } From 48152f6414ee7d159d561d2c812d3ab35be1e6c8 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 15:26:58 +0800 Subject: [PATCH 11/34] fix: add commitlint config --- commitlint.config.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 commitlint.config.js diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..507e1c9 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,8 @@ +module.exports = { + extends: ['@commitlint/config-conventional'], + + // Add your own rules. See http://marionebl.github.io/commitlint + rules: { + 'body-max-line-length': [0], // disable + }, +} From 43ecf4144cdb28275b2aebfc4a7a2d2efca7f0e6 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 15:29:26 +0800 Subject: [PATCH 12/34] fix: add dependencies for conventional commitlint --- package-lock.json | 62 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 63 insertions(+) diff --git a/package-lock.json b/package-lock.json index b02bacb..53f43eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@vitest/coverage-v8": "^1.2.2" }, "devDependencies": { + "@commitlint/config-conventional": "^18.6.0", "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", "commitizen": "^4.3.0", @@ -273,6 +274,18 @@ "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, + "node_modules/@commitlint/config-conventional": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-18.6.0.tgz", + "integrity": "sha512-CDCOf2eJz9D/TL44IBks0stM9TmdLCNE2B48owIU3YCadwzts/bobXPScagIgPQF6hhKYMEdj5zpUDlmbwuqwQ==", + "dev": true, + "dependencies": { + "conventional-changelog-conventionalcommits": "^7.0.2" + }, + "engines": { + "node": ">=v18" + } + }, "node_modules/@commitlint/config-validator": { "version": "18.6.0", "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-18.6.0.tgz", @@ -1575,6 +1588,12 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-ify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==", + "dev": true + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -1848,11 +1867,33 @@ "node": ">= 12" } }, + "node_modules/compare-func": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", + "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", + "dev": true, + "dependencies": { + "array-ify": "^1.0.0", + "dot-prop": "^5.1.0" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, + "node_modules/conventional-changelog-conventionalcommits": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-7.0.2.tgz", + "integrity": "sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==", + "dev": true, + "dependencies": { + "compare-func": "^2.0.0" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/conventional-commit-types": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/conventional-commit-types/-/conventional-commit-types-3.0.0.tgz", @@ -2114,6 +2155,18 @@ "node": ">=6.0.0" } }, + "node_modules/dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -2974,6 +3027,15 @@ "node": ">=0.12.0" } }, + "node_modules/is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", diff --git a/package.json b/package.json index 4f5bab5..c425c0e 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "author": "tradetrust", "license": "ISC", "devDependencies": { + "@commitlint/config-conventional": "^18.6.0", "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", "commitizen": "^4.3.0", From 9d18d5878abdcfd7a5b0cc56cd7ced26ddd3d9af Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 15:33:35 +0800 Subject: [PATCH 13/34] ci: remove commit lint --- .github/workflows/linters.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 39b6225..5640635 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -18,11 +18,11 @@ jobs: - run: npm ci --ignore-scripts - run: npm run lint - commit-lint: - name: Commit Lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install Commit Lint Dependencies - run: npm install @commitlint/config-conventional - - uses: JulienKode/pull-request-name-linter-action@v0.5.0 + # commit-lint: + # name: Commit Lint + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # - name: Install Commit Lint Dependencies + # run: npm install @commitlint/config-conventional + # - uses: JulienKode/pull-request-name-linter-action@v0.5.0 From 7ea17d91a63b13c95bb175b2935b37a28b33eeb9 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 16:09:26 +0800 Subject: [PATCH 14/34] chore: add to ignore coverage folder --- .gitignore | 5 +- coverage/clover.xml | 24 +++++-- coverage/coverage-final.json | 5 +- coverage/index.html | 39 +++++++---- coverage/src/greet/index.html | 116 ------------------------------- coverage/src/greet/index.ts.html | 106 ---------------------------- coverage/src/index.html | 116 ------------------------------- coverage/src/index.ts.html | 88 ----------------------- package.json | 4 ++ 9 files changed, 57 insertions(+), 446 deletions(-) delete mode 100644 coverage/src/greet/index.html delete mode 100644 coverage/src/greet/index.ts.html delete mode 100644 coverage/src/index.html delete mode 100644 coverage/src/index.ts.html diff --git a/.gitignore b/.gitignore index b4e8a2c..19a34eb 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,7 @@ Thumbs.db .prettiercache # TypeScript type declaration files -*.d.ts \ No newline at end of file +*.d.ts + +# vitest +coverage/ \ No newline at end of file diff --git a/coverage/clover.xml b/coverage/clover.xml index 93a1aac..7732fa5 100644 --- a/coverage/clover.xml +++ b/coverage/clover.xml @@ -1,15 +1,29 @@ - - - - + + + + + + + + + + + + + + + + + + - + diff --git a/coverage/coverage-final.json b/coverage/coverage-final.json index d4098c6..e65fd20 100644 --- a/coverage/coverage-final.json +++ b/coverage/coverage-final.json @@ -1,3 +1,4 @@ -{"/Users/minhtetoo/tradetrust/tradetrust-core/src/index.ts": {"path":"/Users/minhtetoo/tradetrust/tradetrust-core/src/index.ts","all":true,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}}},"s":{"0":0},"branchMap":{"0":{"type":"branch","line":1,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},"locations":[{"start":{"line":1,"column":0},"end":{"line":1,"column":23}}]}},"b":{"0":[0]},"fnMap":{"0":{"name":"(empty-report)","decl":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},"line":1}},"f":{"0":0}} -,"/Users/minhtetoo/tradetrust/tradetrust-core/src/greet/index.ts": {"path":"/Users/minhtetoo/tradetrust/tradetrust-core/src/greet/index.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":22}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":16}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":1}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":0}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":42}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":33}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1},"branchMap":{"0":{"type":"branch","line":5,"loc":{"start":{"line":5,"column":21},"end":{"line":7,"column":1}},"locations":[{"start":{"line":5,"column":21},"end":{"line":7,"column":1}}]}},"b":{"0":[1]},"fnMap":{"0":{"name":"greet","decl":{"start":{"line":5,"column":21},"end":{"line":7,"column":1}},"loc":{"start":{"line":5,"column":21},"end":{"line":7,"column":1}},"line":5}},"f":{"0":1}} +{"/Users/minhtetoo/tradetrust/tradetrust-core/commitlint.config.js": {"path":"/Users/minhtetoo/tradetrust/tradetrust-core/commitlint.config.js","all":true,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":18}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":49}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":0}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":68}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":12}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":47}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":6}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":1}}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0},"branchMap":{"0":{"type":"branch","line":1,"loc":{"start":{"line":1,"column":0},"end":{"line":8,"column":1}},"locations":[{"start":{"line":1,"column":0},"end":{"line":8,"column":1}}]}},"b":{"0":[0]},"fnMap":{"0":{"name":"(empty-report)","decl":{"start":{"line":1,"column":0},"end":{"line":8,"column":1}},"loc":{"start":{"line":1,"column":0},"end":{"line":8,"column":1}},"line":1}},"f":{"0":0}} +,"/Users/minhtetoo/tradetrust/tradetrust-core/src/index.ts": {"path":"/Users/minhtetoo/tradetrust/tradetrust-core/src/index.ts","all":true,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}}},"s":{"0":0},"branchMap":{"0":{"type":"branch","line":1,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},"locations":[{"start":{"line":1,"column":0},"end":{"line":1,"column":23}}]}},"b":{"0":[0]},"fnMap":{"0":{"name":"(empty-report)","decl":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},"line":1}},"f":{"0":0}} +,"/Users/minhtetoo/tradetrust/tradetrust-core/src/greet/index.ts": {"path":"/Users/minhtetoo/tradetrust/tradetrust-core/src/greet/index.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":22}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":16}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":1}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":0}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":42}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":34}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1},"branchMap":{"0":{"type":"branch","line":5,"loc":{"start":{"line":5,"column":21},"end":{"line":7,"column":1}},"locations":[{"start":{"line":5,"column":21},"end":{"line":7,"column":1}}]}},"b":{"0":[1]},"fnMap":{"0":{"name":"greet","decl":{"start":{"line":5,"column":21},"end":{"line":7,"column":1}},"loc":{"start":{"line":5,"column":21},"end":{"line":7,"column":1}},"line":5}},"f":{"0":1}} } diff --git a/coverage/index.html b/coverage/index.html index f64f151..910f0f7 100644 --- a/coverage/index.html +++ b/coverage/index.html @@ -23,30 +23,30 @@

All files

- 87.5% + 43.75% Statements - 7/8 + 7/16
- 50% + 33.33% Branches - 1/2 + 1/3
- 50% + 33.33% Functions - 1/2 + 1/3
- 87.5% + 43.75% Lines - 7/8 + 7/16
@@ -61,7 +61,7 @@

All files

-
+
@@ -79,7 +79,22 @@

All files

- + + + + + + + + + + + + + + @@ -94,7 +109,7 @@

All files

- + @@ -116,7 +131,7 @@

All files

- - - - - - \ No newline at end of file diff --git a/coverage/src/greet/index.ts.html b/coverage/src/greet/index.ts.html deleted file mode 100644 index 43623df..0000000 --- a/coverage/src/greet/index.ts.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - Code coverage report for src/greet/index.ts - - - - - - - - - -
-
-

All files / src/greet index.ts

-
- -
- 100% - Statements - 7/7 -
- - -
- 100% - Branches - 1/1 -
- - -
- 100% - Functions - 1/1 -
- - -
- 100% - Lines - 7/7 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
srctradetrust-core +
+
0%0/80%0/10%0/10%0/8
tradetrust-core/src
src/greettradetrust-core/src/greet
-
1 -2 -3 -4 -5 -6 -7 -81x -1x -1x -1x -1x -1x -1x - 
export type Person = {
-    name: string
-}
- 
-export const greet = (person: Person) => {
-    return `hello ${person.name}`
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/src/index.html b/coverage/src/index.html deleted file mode 100644 index 1f93cfc..0000000 --- a/coverage/src/index.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Code coverage report for src - - - - - - - - - -
-
-

All files src

-
- -
- 0% - Statements - 0/1 -
- - -
- 0% - Branches - 0/1 -
- - -
- 0% - Functions - 0/1 -
- - -
- 0% - Lines - 0/1 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
index.ts -
-
0%0/10%0/10%0/10%0/1
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/src/index.ts.html b/coverage/src/index.ts.html deleted file mode 100644 index 0388d5b..0000000 --- a/coverage/src/index.ts.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - Code coverage report for src/index.ts - - - - - - - - - -
-
-

All files / src index.ts

-
- -
- 0% - Statements - 0/1 -
- - -
- 0% - Branches - 0/1 -
- - -
- 0% - Functions - 0/1 -
- - -
- 0% - Lines - 0/1 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2  - 
export * from './greet'
- -
-
- - - - - - - - \ No newline at end of file diff --git a/package.json b/package.json index c425c0e..810e432 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,10 @@ "typescript": "^5.3.3", "vitest": "^1.2.2" }, + "repository": { + "type": "git", + "url": "https://github.com/TradeTrust/tradetrust-core.git" + }, "dependencies": { "@vitest/coverage-v8": "^1.2.2" }, From f4af2894f83c4bd4aaebea0bfbc2b5f98238bb03 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 16:34:07 +0800 Subject: [PATCH 15/34] feat: delete coverage folder --- .gitignore | 2 +- coverage/base.css | 224 --------------------------------- coverage/block-navigation.js | 87 ------------- coverage/clover.xml | 40 ------ coverage/coverage-final.json | 4 - coverage/favicon.png | Bin 445 -> 0 bytes coverage/index.html | 146 --------------------- coverage/prettify.css | 1 - coverage/prettify.js | 2 - coverage/sort-arrow-sprite.png | Bin 138 -> 0 bytes coverage/sorter.js | 196 ----------------------------- 11 files changed, 1 insertion(+), 701 deletions(-) delete mode 100644 coverage/base.css delete mode 100644 coverage/block-navigation.js delete mode 100644 coverage/clover.xml delete mode 100644 coverage/coverage-final.json delete mode 100644 coverage/favicon.png delete mode 100644 coverage/index.html delete mode 100644 coverage/prettify.css delete mode 100644 coverage/prettify.js delete mode 100644 coverage/sort-arrow-sprite.png delete mode 100644 coverage/sorter.js diff --git a/.gitignore b/.gitignore index 19a34eb..30afb62 100644 --- a/.gitignore +++ b/.gitignore @@ -31,5 +31,5 @@ Thumbs.db # TypeScript type declaration files *.d.ts -# vitest +# vitest reports coverage/ \ No newline at end of file diff --git a/coverage/base.css b/coverage/base.css deleted file mode 100644 index f418035..0000000 --- a/coverage/base.css +++ /dev/null @@ -1,224 +0,0 @@ -body, html { - margin:0; padding: 0; - height: 100%; -} -body { - font-family: Helvetica Neue, Helvetica, Arial; - font-size: 14px; - color:#333; -} -.small { font-size: 12px; } -*, *:after, *:before { - -webkit-box-sizing:border-box; - -moz-box-sizing:border-box; - box-sizing:border-box; - } -h1 { font-size: 20px; margin: 0;} -h2 { font-size: 14px; } -pre { - font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; - margin: 0; - padding: 0; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; -} -a { color:#0074D9; text-decoration:none; } -a:hover { text-decoration:underline; } -.strong { font-weight: bold; } -.space-top1 { padding: 10px 0 0 0; } -.pad2y { padding: 20px 0; } -.pad1y { padding: 10px 0; } -.pad2x { padding: 0 20px; } -.pad2 { padding: 20px; } -.pad1 { padding: 10px; } -.space-left2 { padding-left:55px; } -.space-right2 { padding-right:20px; } -.center { text-align:center; } -.clearfix { display:block; } -.clearfix:after { - content:''; - display:block; - height:0; - clear:both; - visibility:hidden; - } -.fl { float: left; } -@media only screen and (max-width:640px) { - .col3 { width:100%; max-width:100%; } - .hide-mobile { display:none!important; } -} - -.quiet { - color: #7f7f7f; - color: rgba(0,0,0,0.5); -} -.quiet a { opacity: 0.7; } - -.fraction { - font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; - font-size: 10px; - color: #555; - background: #E8E8E8; - padding: 4px 5px; - border-radius: 3px; - vertical-align: middle; -} - -div.path a:link, div.path a:visited { color: #333; } -table.coverage { - border-collapse: collapse; - margin: 10px 0 0 0; - padding: 0; -} - -table.coverage td { - margin: 0; - padding: 0; - vertical-align: top; -} -table.coverage td.line-count { - text-align: right; - padding: 0 5px 0 20px; -} -table.coverage td.line-coverage { - text-align: right; - padding-right: 10px; - min-width:20px; -} - -table.coverage td span.cline-any { - display: inline-block; - padding: 0 5px; - width: 100%; -} -.missing-if-branch { - display: inline-block; - margin-right: 5px; - border-radius: 3px; - position: relative; - padding: 0 4px; - background: #333; - color: yellow; -} - -.skip-if-branch { - display: none; - margin-right: 10px; - position: relative; - padding: 0 4px; - background: #ccc; - color: white; -} -.missing-if-branch .typ, .skip-if-branch .typ { - color: inherit !important; -} -.coverage-summary { - border-collapse: collapse; - width: 100%; -} -.coverage-summary tr { border-bottom: 1px solid #bbb; } -.keyline-all { border: 1px solid #ddd; } -.coverage-summary td, .coverage-summary th { padding: 10px; } -.coverage-summary tbody { border: 1px solid #bbb; } -.coverage-summary td { border-right: 1px solid #bbb; } -.coverage-summary td:last-child { border-right: none; } -.coverage-summary th { - text-align: left; - font-weight: normal; - white-space: nowrap; -} -.coverage-summary th.file { border-right: none !important; } -.coverage-summary th.pct { } -.coverage-summary th.pic, -.coverage-summary th.abs, -.coverage-summary td.pct, -.coverage-summary td.abs { text-align: right; } -.coverage-summary td.file { white-space: nowrap; } -.coverage-summary td.pic { min-width: 120px !important; } -.coverage-summary tfoot td { } - -.coverage-summary .sorter { - height: 10px; - width: 7px; - display: inline-block; - margin-left: 0.5em; - background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; -} -.coverage-summary .sorted .sorter { - background-position: 0 -20px; -} -.coverage-summary .sorted-desc .sorter { - background-position: 0 -10px; -} -.status-line { height: 10px; } -/* yellow */ -.cbranch-no { background: yellow !important; color: #111; } -/* dark red */ -.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } -.low .chart { border:1px solid #C21F39 } -.highlighted, -.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{ - background: #C21F39 !important; -} -/* medium red */ -.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } -/* light red */ -.low, .cline-no { background:#FCE1E5 } -/* light green */ -.high, .cline-yes { background:rgb(230,245,208) } -/* medium green */ -.cstat-yes { background:rgb(161,215,106) } -/* dark green */ -.status-line.high, .high .cover-fill { background:rgb(77,146,33) } -.high .chart { border:1px solid rgb(77,146,33) } -/* dark yellow (gold) */ -.status-line.medium, .medium .cover-fill { background: #f9cd0b; } -.medium .chart { border:1px solid #f9cd0b; } -/* light yellow */ -.medium { background: #fff4c2; } - -.cstat-skip { background: #ddd; color: #111; } -.fstat-skip { background: #ddd; color: #111 !important; } -.cbranch-skip { background: #ddd !important; color: #111; } - -span.cline-neutral { background: #eaeaea; } - -.coverage-summary td.empty { - opacity: .5; - padding-top: 4px; - padding-bottom: 4px; - line-height: 1; - color: #888; -} - -.cover-fill, .cover-empty { - display:inline-block; - height: 12px; -} -.chart { - line-height: 0; -} -.cover-empty { - background: white; -} -.cover-full { - border-right: none !important; -} -pre.prettyprint { - border: none !important; - padding: 0 !important; - margin: 0 !important; -} -.com { color: #999 !important; } -.ignore-none { color: #999; font-weight: normal; } - -.wrapper { - min-height: 100%; - height: auto !important; - height: 100%; - margin: 0 auto -48px; -} -.footer, .push { - height: 48px; -} diff --git a/coverage/block-navigation.js b/coverage/block-navigation.js deleted file mode 100644 index cc12130..0000000 --- a/coverage/block-navigation.js +++ /dev/null @@ -1,87 +0,0 @@ -/* eslint-disable */ -var jumpToCode = (function init() { - // Classes of code we would like to highlight in the file view - var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; - - // Elements to highlight in the file listing view - var fileListingElements = ['td.pct.low']; - - // We don't want to select elements that are direct descendants of another match - var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` - - // Selecter that finds elements on the page to which we can jump - var selector = - fileListingElements.join(', ') + - ', ' + - notSelector + - missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` - - // The NodeList of matching elements - var missingCoverageElements = document.querySelectorAll(selector); - - var currentIndex; - - function toggleClass(index) { - missingCoverageElements - .item(currentIndex) - .classList.remove('highlighted'); - missingCoverageElements.item(index).classList.add('highlighted'); - } - - function makeCurrent(index) { - toggleClass(index); - currentIndex = index; - missingCoverageElements.item(index).scrollIntoView({ - behavior: 'smooth', - block: 'center', - inline: 'center' - }); - } - - function goToPrevious() { - var nextIndex = 0; - if (typeof currentIndex !== 'number' || currentIndex === 0) { - nextIndex = missingCoverageElements.length - 1; - } else if (missingCoverageElements.length > 1) { - nextIndex = currentIndex - 1; - } - - makeCurrent(nextIndex); - } - - function goToNext() { - var nextIndex = 0; - - if ( - typeof currentIndex === 'number' && - currentIndex < missingCoverageElements.length - 1 - ) { - nextIndex = currentIndex + 1; - } - - makeCurrent(nextIndex); - } - - return function jump(event) { - if ( - document.getElementById('fileSearch') === document.activeElement && - document.activeElement != null - ) { - // if we're currently focused on the search input, we don't want to navigate - return; - } - - switch (event.which) { - case 78: // n - case 74: // j - goToNext(); - break; - case 66: // b - case 75: // k - case 80: // p - goToPrevious(); - break; - } - }; -})(); -window.addEventListener('keydown', jumpToCode); diff --git a/coverage/clover.xml b/coverage/clover.xml deleted file mode 100644 index 7732fa5..0000000 --- a/coverage/clover.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/coverage/coverage-final.json b/coverage/coverage-final.json deleted file mode 100644 index e65fd20..0000000 --- a/coverage/coverage-final.json +++ /dev/null @@ -1,4 +0,0 @@ -{"/Users/minhtetoo/tradetrust/tradetrust-core/commitlint.config.js": {"path":"/Users/minhtetoo/tradetrust/tradetrust-core/commitlint.config.js","all":true,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":18}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":49}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":0}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":68}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":12}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":47}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":6}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":1}}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0},"branchMap":{"0":{"type":"branch","line":1,"loc":{"start":{"line":1,"column":0},"end":{"line":8,"column":1}},"locations":[{"start":{"line":1,"column":0},"end":{"line":8,"column":1}}]}},"b":{"0":[0]},"fnMap":{"0":{"name":"(empty-report)","decl":{"start":{"line":1,"column":0},"end":{"line":8,"column":1}},"loc":{"start":{"line":1,"column":0},"end":{"line":8,"column":1}},"line":1}},"f":{"0":0}} -,"/Users/minhtetoo/tradetrust/tradetrust-core/src/index.ts": {"path":"/Users/minhtetoo/tradetrust/tradetrust-core/src/index.ts","all":true,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}}},"s":{"0":0},"branchMap":{"0":{"type":"branch","line":1,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},"locations":[{"start":{"line":1,"column":0},"end":{"line":1,"column":23}}]}},"b":{"0":[0]},"fnMap":{"0":{"name":"(empty-report)","decl":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},"line":1}},"f":{"0":0}} -,"/Users/minhtetoo/tradetrust/tradetrust-core/src/greet/index.ts": {"path":"/Users/minhtetoo/tradetrust/tradetrust-core/src/greet/index.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":22}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":16}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":1}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":0}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":42}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":34}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1},"branchMap":{"0":{"type":"branch","line":5,"loc":{"start":{"line":5,"column":21},"end":{"line":7,"column":1}},"locations":[{"start":{"line":5,"column":21},"end":{"line":7,"column":1}}]}},"b":{"0":[1]},"fnMap":{"0":{"name":"greet","decl":{"start":{"line":5,"column":21},"end":{"line":7,"column":1}},"loc":{"start":{"line":5,"column":21},"end":{"line":7,"column":1}},"line":5}},"f":{"0":1}} -} diff --git a/coverage/favicon.png b/coverage/favicon.png deleted file mode 100644 index c1525b811a167671e9de1fa78aab9f5c0b61cef7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 445 zcmV;u0Yd(XP))rP{nL}Ln%S7`m{0DjX9TLF* zFCb$4Oi7vyLOydb!7n&^ItCzb-%BoB`=x@N2jll2Nj`kauio%aw_@fe&*}LqlFT43 z8doAAe))z_%=P%v^@JHp3Hjhj^6*Kr_h|g_Gr?ZAa&y>wxHE99Gk>A)2MplWz2xdG zy8VD2J|Uf#EAw*bo5O*PO_}X2Tob{%bUoO2G~T`@%S6qPyc}VkhV}UifBuRk>%5v( z)x7B{I~z*k<7dv#5tC+m{km(D087J4O%+<<;K|qwefb6@GSX45wCK}Sn*> - - - - Code coverage report for All files - - - - - - - - - -
-
-

All files

-
- -
- 43.75% - Statements - 7/16 -
- - -
- 33.33% - Branches - 1/3 -
- - -
- 33.33% - Functions - 1/3 -
- - -
- 43.75% - Lines - 7/16 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
tradetrust-core -
-
0%0/80%0/10%0/10%0/8
tradetrust-core/src -
-
0%0/10%0/10%0/10%0/1
tradetrust-core/src/greet -
-
100%7/7100%1/1100%1/1100%7/7
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/prettify.css b/coverage/prettify.css deleted file mode 100644 index b317a7c..0000000 --- a/coverage/prettify.css +++ /dev/null @@ -1 +0,0 @@ -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/coverage/prettify.js b/coverage/prettify.js deleted file mode 100644 index b322523..0000000 --- a/coverage/prettify.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/coverage/sort-arrow-sprite.png b/coverage/sort-arrow-sprite.png deleted file mode 100644 index 6ed68316eb3f65dec9063332d2f69bf3093bbfab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^>_9Bd!3HEZxJ@+%Qh}Z>jv*C{$p!i!8j}?a+@3A= zIAGwzjijN=FBi!|L1t?LM;Q;gkwn>2cAy-KV{dn nf0J1DIvEHQu*n~6U}x}qyky7vi4|9XhBJ7&`njxgN@xNA8m%nc diff --git a/coverage/sorter.js b/coverage/sorter.js deleted file mode 100644 index 2bb296a..0000000 --- a/coverage/sorter.js +++ /dev/null @@ -1,196 +0,0 @@ -/* eslint-disable */ -var addSorting = (function() { - 'use strict'; - var cols, - currentSort = { - index: 0, - desc: false - }; - - // returns the summary table element - function getTable() { - return document.querySelector('.coverage-summary'); - } - // returns the thead element of the summary table - function getTableHeader() { - return getTable().querySelector('thead tr'); - } - // returns the tbody element of the summary table - function getTableBody() { - return getTable().querySelector('tbody'); - } - // returns the th element for nth column - function getNthColumn(n) { - return getTableHeader().querySelectorAll('th')[n]; - } - - function onFilterInput() { - const searchValue = document.getElementById('fileSearch').value; - const rows = document.getElementsByTagName('tbody')[0].children; - for (let i = 0; i < rows.length; i++) { - const row = rows[i]; - if ( - row.textContent - .toLowerCase() - .includes(searchValue.toLowerCase()) - ) { - row.style.display = ''; - } else { - row.style.display = 'none'; - } - } - } - - // loads the search box - function addSearchBox() { - var template = document.getElementById('filterTemplate'); - var templateClone = template.content.cloneNode(true); - templateClone.getElementById('fileSearch').oninput = onFilterInput; - template.parentElement.appendChild(templateClone); - } - - // loads all columns - function loadColumns() { - var colNodes = getTableHeader().querySelectorAll('th'), - colNode, - cols = [], - col, - i; - - for (i = 0; i < colNodes.length; i += 1) { - colNode = colNodes[i]; - col = { - key: colNode.getAttribute('data-col'), - sortable: !colNode.getAttribute('data-nosort'), - type: colNode.getAttribute('data-type') || 'string' - }; - cols.push(col); - if (col.sortable) { - col.defaultDescSort = col.type === 'number'; - colNode.innerHTML = - colNode.innerHTML + ''; - } - } - return cols; - } - // attaches a data attribute to every tr element with an object - // of data values keyed by column name - function loadRowData(tableRow) { - var tableCols = tableRow.querySelectorAll('td'), - colNode, - col, - data = {}, - i, - val; - for (i = 0; i < tableCols.length; i += 1) { - colNode = tableCols[i]; - col = cols[i]; - val = colNode.getAttribute('data-value'); - if (col.type === 'number') { - val = Number(val); - } - data[col.key] = val; - } - return data; - } - // loads all row data - function loadData() { - var rows = getTableBody().querySelectorAll('tr'), - i; - - for (i = 0; i < rows.length; i += 1) { - rows[i].data = loadRowData(rows[i]); - } - } - // sorts the table using the data for the ith column - function sortByIndex(index, desc) { - var key = cols[index].key, - sorter = function(a, b) { - a = a.data[key]; - b = b.data[key]; - return a < b ? -1 : a > b ? 1 : 0; - }, - finalSorter = sorter, - tableBody = document.querySelector('.coverage-summary tbody'), - rowNodes = tableBody.querySelectorAll('tr'), - rows = [], - i; - - if (desc) { - finalSorter = function(a, b) { - return -1 * sorter(a, b); - }; - } - - for (i = 0; i < rowNodes.length; i += 1) { - rows.push(rowNodes[i]); - tableBody.removeChild(rowNodes[i]); - } - - rows.sort(finalSorter); - - for (i = 0; i < rows.length; i += 1) { - tableBody.appendChild(rows[i]); - } - } - // removes sort indicators for current column being sorted - function removeSortIndicators() { - var col = getNthColumn(currentSort.index), - cls = col.className; - - cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); - col.className = cls; - } - // adds sort indicators for current column being sorted - function addSortIndicators() { - getNthColumn(currentSort.index).className += currentSort.desc - ? ' sorted-desc' - : ' sorted'; - } - // adds event listeners for all sorter widgets - function enableUI() { - var i, - el, - ithSorter = function ithSorter(i) { - var col = cols[i]; - - return function() { - var desc = col.defaultDescSort; - - if (currentSort.index === i) { - desc = !currentSort.desc; - } - sortByIndex(i, desc); - removeSortIndicators(); - currentSort.index = i; - currentSort.desc = desc; - addSortIndicators(); - }; - }; - for (i = 0; i < cols.length; i += 1) { - if (cols[i].sortable) { - // add the click event handler on the th so users - // dont have to click on those tiny arrows - el = getNthColumn(i).querySelector('.sorter').parentElement; - if (el.addEventListener) { - el.addEventListener('click', ithSorter(i)); - } else { - el.attachEvent('onclick', ithSorter(i)); - } - } - } - } - // adds sorting functionality to the UI - return function() { - if (!getTable()) { - return; - } - cols = loadColumns(); - loadData(); - addSearchBox(); - addSortIndicators(); - enableUI(); - }; -})(); - -window.addEventListener('load', addSorting); From 43c22193d784b069bd5dbc8b5c686b6ebc1a66f0 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 16:48:28 +0800 Subject: [PATCH 16/34] fix: lint test --- .github/workflows/linters.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 5640635..39b6225 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -18,11 +18,11 @@ jobs: - run: npm ci --ignore-scripts - run: npm run lint - # commit-lint: - # name: Commit Lint - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: Install Commit Lint Dependencies - # run: npm install @commitlint/config-conventional - # - uses: JulienKode/pull-request-name-linter-action@v0.5.0 + commit-lint: + name: Commit Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Commit Lint Dependencies + run: npm install @commitlint/config-conventional + - uses: JulienKode/pull-request-name-linter-action@v0.5.0 From af4add4c153f37de0ba8cb59a1c49f3b0f2dc3f8 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 16:49:22 +0800 Subject: [PATCH 17/34] fix: lint test --- src/greet/greet.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/greet/greet.spec.ts b/src/greet/greet.spec.ts index f738127..cd46e57 100644 --- a/src/greet/greet.spec.ts +++ b/src/greet/greet.spec.ts @@ -3,7 +3,7 @@ import { greet } from '.' describe('Greet', () => { const testPerson = { name: 'john' } - it('should return the greet string for person', () => { + it('should return the greet string for person ', () => { expect(greet(testPerson)).equal('hello john!') }) }) From 2c830ae0b327bded26c5ff0c3240e0483940d7ce Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 17:21:27 +0800 Subject: [PATCH 18/34] fix: remove @commitlint/config-conventional --- commitlint.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commitlint.config.js b/commitlint.config.js index 507e1c9..0459d1b 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,5 +1,5 @@ module.exports = { - extends: ['@commitlint/config-conventional'], + // extends: ['@commitlint/config-conventional'], // Add your own rules. See http://marionebl.github.io/commitlint rules: { From 9fa556991a9f880c859a084ec84fb3b0e28e0c82 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Mon, 5 Feb 2024 17:29:15 +0800 Subject: [PATCH 19/34] chore: change github actions from v3 to v4 --- .github/workflows/linters.yml | 6 +++--- .github/workflows/pull_requests.yml | 2 +- .github/workflows/release.yml | 4 ++-- .github/workflows/tests.yml | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 39b6225..2abbd75 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -11,8 +11,8 @@ jobs: name: Code Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x - run: npm ci --ignore-scripts @@ -22,7 +22,7 @@ jobs: name: Commit Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Commit Lint Dependencies run: npm install @commitlint/config-conventional - uses: JulienKode/pull-request-name-linter-action@v0.5.0 diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml index 51e381b..4b281b0 100644 --- a/.github/workflows/pull_requests.yml +++ b/.github/workflows/pull_requests.yml @@ -23,7 +23,7 @@ jobs: contents: read pull-requests: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: reviewdog/action-eslint@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6847f8a..a66639b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,8 +25,8 @@ jobs: runs-on: ubuntu-latest needs: [tests, linters] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x - run: npm ci diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 83d7744..09b8370 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,8 +11,8 @@ jobs: name: Run Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x - run: npm ci @@ -22,8 +22,8 @@ jobs: name: Test Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x - run: npm ci From 6befbdde64c694ae270d9f8506c41c1690f85ae7 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Tue, 6 Feb 2024 09:42:56 +0800 Subject: [PATCH 20/34] chore: downgrade @commitlint/config-conventional --- commitlint.config.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commitlint.config.js b/commitlint.config.js index 0459d1b..507e1c9 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,5 +1,5 @@ module.exports = { - // extends: ['@commitlint/config-conventional'], + extends: ['@commitlint/config-conventional'], // Add your own rules. See http://marionebl.github.io/commitlint rules: { diff --git a/package.json b/package.json index 810e432..fab6db3 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "author": "tradetrust", "license": "ISC", "devDependencies": { - "@commitlint/config-conventional": "^18.6.0", + "@commitlint/config-conventional": "^16.0.0", "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", "commitizen": "^4.3.0", From 2b0458968b0e600618e00af7d3109ae280d0c73e Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Tue, 6 Feb 2024 09:46:41 +0800 Subject: [PATCH 21/34] chore: update dependencies --- package-lock.json | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 53f43eb..b920ab9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@vitest/coverage-v8": "^1.2.2" }, "devDependencies": { - "@commitlint/config-conventional": "^18.6.0", + "@commitlint/config-conventional": "^16.0.0", "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", "commitizen": "^4.3.0", @@ -275,15 +275,15 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, "node_modules/@commitlint/config-conventional": { - "version": "18.6.0", - "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-18.6.0.tgz", - "integrity": "sha512-CDCOf2eJz9D/TL44IBks0stM9TmdLCNE2B48owIU3YCadwzts/bobXPScagIgPQF6hhKYMEdj5zpUDlmbwuqwQ==", + "version": "16.2.4", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-16.2.4.tgz", + "integrity": "sha512-av2UQJa3CuE5P0dzxj/o/B9XVALqYzEViHrMXtDrW9iuflrqCStWBAioijppj9URyz6ONpohJKAtSdgAOE0gkA==", "dev": true, "dependencies": { - "conventional-changelog-conventionalcommits": "^7.0.2" + "conventional-changelog-conventionalcommits": "^4.3.1" }, "engines": { - "node": ">=v18" + "node": ">=v12" } }, "node_modules/@commitlint/config-validator": { @@ -1883,15 +1883,17 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/conventional-changelog-conventionalcommits": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-7.0.2.tgz", - "integrity": "sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz", + "integrity": "sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g==", "dev": true, "dependencies": { - "compare-func": "^2.0.0" + "compare-func": "^2.0.0", + "lodash": "^4.17.15", + "q": "^1.5.1" }, "engines": { - "node": ">=16" + "node": ">=10" } }, "node_modules/conventional-commit-types": { @@ -3819,6 +3821,16 @@ "node": ">=6" } }, + "node_modules/q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", + "dev": true, + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", From e3ed2af8d84072f4d3d37921170617d38a7713bf Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Wed, 7 Feb 2024 09:50:52 +0800 Subject: [PATCH 22/34] feat: wrap & export tt verificationBuilder,verify and interpret fragment methods --- .eslintrc.json | 3 +- package-lock.json | 1602 ++++++++++++++++++++++++++++++++++++++++++- package.json | 2 + src/index.ts | 1 + src/verify/index.ts | 26 + 5 files changed, 1615 insertions(+), 19 deletions(-) create mode 100644 src/verify/index.ts diff --git a/.eslintrc.json b/.eslintrc.json index 66536ca..7f4deac 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,6 +13,7 @@ "plugins": ["@typescript-eslint"], "rules": { "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/consistent-type-definitions": ["error", "type"] + "@typescript-eslint/consistent-type-definitions": ["error", "type"], + "no-duplicate-imports": "error" } } diff --git a/package-lock.json b/package-lock.json index b920ab9..943be3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,8 @@ "version": "1.0.6", "license": "ISC", "dependencies": { + "@tradetrust-tt/tradetrust-utils": "^1.9.1", + "@tradetrust-tt/tt-verify": "^8.4.0", "@vitest/coverage-v8": "^1.2.2" }, "devDependencies": { @@ -831,6 +833,707 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@ethersproject/abi": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", + "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-provider": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", + "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-signer": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz", + "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "node_modules/@ethersproject/address": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz", + "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/rlp": "^5.7.0" + } + }, + "node_modules/@ethersproject/base64": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz", + "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0" + } + }, + "node_modules/@ethersproject/basex": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", + "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", + "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", + "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", + "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0" + } + }, + "node_modules/@ethersproject/contracts": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz", + "integrity": "sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0" + } + }, + "node_modules/@ethersproject/hash": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", + "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/hdnode": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz", + "integrity": "sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "node_modules/@ethersproject/json-wallets": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz", + "integrity": "sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" + } + }, + "node_modules/@ethersproject/keccak256": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", + "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", + "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ] + }, + "node_modules/@ethersproject/networks": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz", + "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/pbkdf2": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz", + "integrity": "sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/sha2": "^5.7.0" + } + }, + "node_modules/@ethersproject/properties": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz", + "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/providers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.2.tgz", + "integrity": "sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0", + "bech32": "1.1.4", + "ws": "7.4.6" + } + }, + "node_modules/@ethersproject/random": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", + "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", + "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/sha2": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", + "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", + "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "bn.js": "^5.2.1", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/solidity": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz", + "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/strings": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", + "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/transactions": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", + "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0" + } + }, + "node_modules/@ethersproject/units": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz", + "integrity": "sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/wallet": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz", + "integrity": "sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/json-wallets": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "node_modules/@ethersproject/web": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz", + "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/wordlists": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz", + "integrity": "sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@govtechsg/document-store": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@govtechsg/document-store/-/document-store-2.6.1.tgz", + "integrity": "sha512-Jr8dGyr8wBXMOSbUURoYfmz9jKiK2ntbjEYyI06pze6jzyiYLZXcepKVyjNk9PC/mLIlDCZgQWmre7ixBZWWjQ==" + }, + "node_modules/@govtechsg/jsonld": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@govtechsg/jsonld/-/jsonld-0.1.1.tgz", + "integrity": "sha512-G3mz6/ryS4tIWTV7FonallTuj4Oy2JjLkBdCn7wjKShb3AG3/PY6XCpNupz8+rpvDF5BGtYvptpW9HRArnjyMQ==", + "dependencies": { + "canonicalize": "^1.0.1", + "cross-fetch": "^3.1.4", + "lru-cache": "^6.0.0", + "rdf-canonize": "^3.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@govtechsg/token-registry": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@govtechsg/token-registry/-/token-registry-4.3.0.tgz", + "integrity": "sha512-KW73mZAz2EoC0gjt9xnu1MJYBuE/ohP18HWXPv/ZRTweaJa7QHrq8PQ9u97UMjvdFz14k7sPAC9ZlNRNaSst3A==", + "dependencies": { + "@typechain/ethers-v5": "~10.0.0" + }, + "peerDependencies": { + "ethers": ">=5.0.8" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -1144,6 +1847,101 @@ "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" }, + "node_modules/@tradetrust-tt/dnsprove": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/dnsprove/-/dnsprove-2.9.0.tgz", + "integrity": "sha512-cFhspKvCdoeYS9UqOTEQgD+tS8YRscPnOZNAqodxQMtgjSJx9DvXF9uGS8lXt/ZpfTR0ublGGiDOPsezagt0IQ==", + "dependencies": { + "axios": "^0.21.1", + "debug": "^4.3.1", + "runtypes": "^6.3.0" + } + }, + "node_modules/@tradetrust-tt/tradetrust": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust/-/tradetrust-6.9.0.tgz", + "integrity": "sha512-Vb7Fs2yqVB9LLFoVz05n6VRKtM3yHravnEYLvIEAz5WztSN91HOrDJp5hLGvAw35D7foMtGztJz7dnpc5d8BRg==", + "hasInstallScript": true, + "dependencies": { + "@govtechsg/jsonld": "^0.1.0", + "ajv": "^8.6.2", + "ajv-formats": "^2.1.0", + "cross-fetch": "^3.1.5", + "debug": "^4.3.2", + "ethers": "^5.7.2", + "flatley": "^5.2.0", + "js-base64": "^3.6.1", + "js-sha3": "^0.8.0", + "lodash": "^4.17.21", + "runtypes": "^6.3.2", + "uuid": "^8.3.2", + "validator": "^13.7.0" + } + }, + "node_modules/@tradetrust-tt/tradetrust-utils": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust-utils/-/tradetrust-utils-1.9.1.tgz", + "integrity": "sha512-ZHOHV/REi/qgZ0eLfqy1kCjl1HhACQvfbk8dU1KyUSUusBb7WdLzoyi2HX6MPtM1EHNCDlPJvn+UrLEWBlKniw==", + "dependencies": { + "@tradetrust-tt/tt-verify": "^8.4.0" + } + }, + "node_modules/@tradetrust-tt/tradetrust/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@tradetrust-tt/tradetrust/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/@tradetrust-tt/tt-verify": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/tt-verify/-/tt-verify-8.4.0.tgz", + "integrity": "sha512-+Cg7kUJ+csnhsc9YWjSQQkmhIR7EpDTz4gy+AwyYSuQ2ie+2A4SL/AWkwVz8zHZxBXXgqySM65pI37fQJuEq4g==", + "dependencies": { + "@govtechsg/document-store": "^2.2.3", + "@govtechsg/token-registry": "^4.1.7", + "@tradetrust-tt/dnsprove": "^2.7.0", + "@tradetrust-tt/tradetrust": "^6.9.0", + "axios": "^0.21.4", + "debug": "^4.3.1", + "did-resolver": "^3.1.0", + "ethers": "^5.1.4", + "ethr-did-resolver": "^4.3.3", + "node-cache": "^5.1.2", + "runtypes": "^6.3.0", + "web-did-resolver": "^2.0.4" + } + }, + "node_modules/@typechain/ethers-v5": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-10.0.0.tgz", + "integrity": "sha512-Kot7fwAqnH96ZbI8xrRgj5Kpv9yCEdjo7mxRqrH7bYpEgijT5MmuOo8IVsdhOu7Uog4ONg7k/d5UdbAtTKUgsA==", + "dependencies": { + "lodash": "^4.17.15", + "ts-essentials": "^7.0.1" + }, + "peerDependencies": { + "@ethersproject/abi": "^5.0.0", + "@ethersproject/bytes": "^5.0.0", + "@ethersproject/providers": "^5.0.0", + "ethers": "^5.1.3", + "typechain": "^8.0.0", + "typescript": ">=4.3.0" + } + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -1170,6 +1968,12 @@ "undici-types": "~5.26.4" } }, + "node_modules/@types/prettier": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", + "peer": true + }, "node_modules/@types/semver": { "version": "7.5.6", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", @@ -1515,6 +2319,11 @@ "node": ">=0.4.0" } }, + "node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==" + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1531,6 +2340,42 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -1571,7 +2416,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -1588,6 +2432,15 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/array-ify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", @@ -1620,6 +2473,14 @@ "node": ">= 4.0.0" } }, + "node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1645,6 +2506,11 @@ } ] }, + "node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -1656,6 +2522,11 @@ "readable-stream": "^3.4.0" } }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -1677,6 +2548,11 @@ "node": ">=8" } }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -1727,6 +2603,11 @@ "node": ">=6" } }, + "node_modules/canonicalize": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/canonicalize/-/canonicalize-1.0.8.tgz", + "integrity": "sha512-0CNTVCLZggSh7bc5VkX5WWPWO+cyZbNd07IHIsSXLia/eAq+r836hgk+8BKoEh7949Mda87VUOitx5OddVj64A==" + }, "node_modules/chai": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", @@ -1748,7 +2629,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1823,7 +2703,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -1834,8 +2713,126 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "peer": true, + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", + "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", + "peer": true, + "dependencies": { + "array-back": "^4.0.2", + "chalk": "^2.4.2", + "table-layout": "^1.0.2", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/command-line-usage/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/command-line-usage/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/command-line-usage/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "peer": true + }, + "node_modules/command-line-usage/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "peer": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/command-line-usage/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "peer": true, + "engines": { + "node": ">=8" + } }, "node_modules/commitizen": { "version": "4.3.0", @@ -1952,6 +2949,14 @@ "typescript": ">=4" } }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2089,6 +3094,15 @@ "node": ">=6" } }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "peer": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -2125,6 +3139,11 @@ "node": ">=8" } }, + "node_modules/did-resolver": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-3.2.2.tgz", + "integrity": "sha512-Eeo2F524VM5N3W4GwglZrnul2y6TLTwMQP3In62JdG34NZoqihYyOZLk+5wUW8sSgvIYIcJM8Dlt3xsdKZZ3tg==" + }, "node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -2169,6 +3188,25 @@ "node": ">=8" } }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -2418,6 +3456,76 @@ "node": ">=0.10.0" } }, + "node_modules/ethers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" + } + }, + "node_modules/ethr-did-registry": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/ethr-did-registry/-/ethr-did-registry-0.0.3.tgz", + "integrity": "sha512-4BPvMGkxAK9vTduCq6D5b8ZqjteD2cvDIPPriXP6nnmPhWKFSxypo+AFvyQ0omJGa0cGTR+dkdI/8jiF7U/qaw==" + }, + "node_modules/ethr-did-resolver": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/ethr-did-resolver/-/ethr-did-resolver-4.3.5.tgz", + "integrity": "sha512-BQO7PQwuqqczK+4AWQhys/sgegDVIFr6+lSoSYXlIbG0oRH0l7PkSuf7VEFKclEJ3JlJ1t9kjDIdj7Ba7euTJg==", + "dependencies": { + "@ethersproject/abi": "^5.1.0", + "@ethersproject/abstract-signer": "^5.1.0", + "@ethersproject/address": "^5.1.0", + "@ethersproject/basex": "^5.1.0", + "@ethersproject/bignumber": "^5.1.0", + "@ethersproject/contracts": "^5.1.0", + "@ethersproject/providers": "^5.1.0", + "@ethersproject/transactions": "^5.1.0", + "did-resolver": "^3.1.0", + "ethr-did-registry": "^0.0.3", + "querystring": "^0.2.1" + } + }, "node_modules/execa": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", @@ -2469,8 +3577,7 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { "version": "3.3.2", @@ -2563,8 +3670,20 @@ "integrity": "sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg==", "dev": true, "dependencies": { - "findup-sync": "^4.0.0", - "merge": "^2.1.1" + "findup-sync": "^4.0.0", + "merge": "^2.1.1" + } + }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "peer": true, + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" } }, "node_modules/find-root": { @@ -2618,12 +3737,39 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/flatley": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/flatley/-/flatley-5.2.0.tgz", + "integrity": "sha512-vsb0/03uIHu7/3jRqABweblFUJMLokz1uMrcgFlvx6OAr6V3FiSic2iXeiJCj+cciTiQeumSDsIFAAnN1yvu4w==", + "dependencies": { + "is-buffer": "^1.1.6" + } + }, "node_modules/flatted": { "version": "3.2.9", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "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==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -2820,8 +3966,7 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/graphemer": { "version": "1.4.0", @@ -2837,6 +3982,25 @@ "node": ">=8" } }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", @@ -2981,6 +4145,11 @@ "dev": true, "optional": true }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3146,6 +4315,16 @@ "jiti": "bin/jiti.js" } }, + "node_modules/js-base64": { + "version": "3.7.6", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.6.tgz", + "integrity": "sha512-NPrWuHFxFUknr1KqJRDgUQPexQF0uIJWjeT+2KjEePhitQxQEx5EJBG1lVn5/hc8aLycTpXrDOgPQ6Zq+EDiTA==" + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3269,8 +4448,13 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "peer": true }, "node_modules/lodash.isplainobject": { "version": "4.0.6", @@ -3428,6 +4612,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "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==" + }, "node_modules/minimatch": { "version": "9.0.3", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", @@ -3452,6 +4646,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "peer": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/mlly": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.5.0.tgz", @@ -3497,6 +4703,44 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/node-cache": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/node-cache/-/node-cache-5.1.2.tgz", + "integrity": "sha512-t1QzWwnk4sjLWaQAS8CHgOJ+RAfmHpxFWmc36IWTiWHQfs0w5JDMBS1b1ZxQteo0vVVuWJvIUKHDkkeK7vIGCg==", + "dependencies": { + "clone": "2.x" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/node-cache/node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/npm-run-path": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", @@ -3816,7 +5060,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, "engines": { "node": ">=6" } @@ -3831,6 +5074,15 @@ "teleport": ">=0.2.0" } }, + "node_modules/querystring": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", + "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -3851,6 +5103,17 @@ } ] }, + "node_modules/rdf-canonize": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/rdf-canonize/-/rdf-canonize-3.4.0.tgz", + "integrity": "sha512-fUeWjrkOO0t1rg7B2fdyDTvngj+9RlUyL92vOdiB7c0FPguWVsniIMjEtHH+meLBO9rzkUlUzBVXgWrjI8P9LA==", + "dependencies": { + "setimmediate": "^1.0.5" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", @@ -3870,12 +5133,19 @@ "node": ">= 6" } }, + "node_modules/reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "optional": true, "engines": { "node": ">=0.10.0" } @@ -4046,6 +5316,11 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/runtypes": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/runtypes/-/runtypes-6.7.0.tgz", + "integrity": "sha512-3TLdfFX8YHNFOhwHrSJza6uxVBmBrEjnNQlNXvXCdItS0Pdskfg5vVXUTWIN+Y23QR09jWpSl99UHkA83m4uWA==" + }, "node_modules/rxjs": { "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", @@ -4081,6 +5356,11 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, "node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -4095,6 +5375,11 @@ "node": ">=10" } }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4174,6 +5459,12 @@ "safe-buffer": "~5.2.0" } }, + "node_modules/string-format": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-format/-/string-format-2.0.0.tgz", + "integrity": "sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==", + "peer": true + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -4254,6 +5545,39 @@ "node": ">=8" } }, + "node_modules/table-layout": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", + "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", + "peer": true, + "dependencies": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/table-layout/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table-layout/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -4352,6 +5676,11 @@ "node": ">=8.0" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "node_modules/ts-api-utils": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", @@ -4364,6 +5693,29 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-command-line-args": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz", + "integrity": "sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==", + "peer": true, + "dependencies": { + "chalk": "^4.1.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.0", + "string-format": "^2.0.0" + }, + "bin": { + "write-markdown": "dist/write-markdown.js" + } + }, + "node_modules/ts-essentials": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", + "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", + "peerDependencies": { + "typescript": ">=3.7.0" + } + }, "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", @@ -4402,11 +5754,123 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typechain": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.3.2.tgz", + "integrity": "sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==", + "peer": true, + "dependencies": { + "@types/prettier": "^2.1.1", + "debug": "^4.3.1", + "fs-extra": "^7.0.0", + "glob": "7.1.7", + "js-sha3": "^0.8.0", + "lodash": "^4.17.15", + "mkdirp": "^1.0.4", + "prettier": "^2.3.1", + "ts-command-line-args": "^2.2.0", + "ts-essentials": "^7.0.1" + }, + "bin": { + "typechain": "dist/cli/cli.js" + }, + "peerDependencies": { + "typescript": ">=4.3.0" + } + }, + "node_modules/typechain/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/typechain/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/typechain/node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typechain/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/typechain/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/typechain/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "peer": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/typechain/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/typescript": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", - "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4415,6 +5879,15 @@ "node": ">=14.17" } }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/ufo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz", @@ -4440,7 +5913,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -4451,6 +5923,14 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-to-istanbul": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", @@ -4464,6 +5944,14 @@ "node": ">=10.12.0" } }, + "node_modules/validator": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/vite": { "version": "5.0.12", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz", @@ -4613,6 +6101,42 @@ "defaults": "^1.0.3" } }, + "node_modules/web-did-resolver": { + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/web-did-resolver/-/web-did-resolver-2.0.27.tgz", + "integrity": "sha512-YxQlNdeYBXLhVpMW62+TPlc6sSOiWyBYq7DNvY6FXmXOD9g0zLeShpq2uCKFFQV/WlSrBi/yebK/W5lMTDxMUQ==", + "dependencies": { + "cross-fetch": "^4.0.0", + "did-resolver": "^4.0.0" + } + }, + "node_modules/web-did-resolver/node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/web-did-resolver/node_modules/did-resolver": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-4.1.0.tgz", + "integrity": "sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA==" + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -4651,6 +6175,28 @@ "node": ">=0.10.0" } }, + "node_modules/wordwrapjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", + "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", + "peer": true, + "dependencies": { + "reduce-flatten": "^2.0.0", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/wordwrapjs/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -4673,6 +6219,26 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, + "node_modules/ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", diff --git a/package.json b/package.json index fab6db3..4890b46 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,8 @@ "url": "https://github.com/TradeTrust/tradetrust-core.git" }, "dependencies": { + "@tradetrust-tt/tradetrust-utils": "^1.9.1", + "@tradetrust-tt/tt-verify": "^8.4.0", "@vitest/coverage-v8": "^1.2.2" }, "publishConfig": { diff --git a/src/index.ts b/src/index.ts index c1b0e28..7e062e6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1 +1,2 @@ export * from './greet' +export * from './verify' diff --git a/src/verify/index.ts b/src/verify/index.ts new file mode 100644 index 0000000..153d33b --- /dev/null +++ b/src/verify/index.ts @@ -0,0 +1,26 @@ +import { + verificationBuilder as originalVerificationBuilder, + openAttestationVerifiers, + openAttestationDidIdentityProof, +} from '@tradetrust-tt/tt-verify' +import { + DocumentsToVerify, + VerificationBuilderOptions, +} from '@tradetrust-tt/tt-verify/dist/types/src/types/core' +import { interpretFragments } from '@tradetrust-tt/tradetrust-utils' + +const verificationBuilder = (builderOptions: VerificationBuilderOptions) => { + return originalVerificationBuilder( + [...openAttestationVerifiers, openAttestationDidIdentityProof], + builderOptions + ) +} + +const verify = ( + document: DocumentsToVerify, + builderOptions: VerificationBuilderOptions +) => { + return verificationBuilder(builderOptions)(document) +} + +export { verificationBuilder, verify, interpretFragments } From 6fa4140f24fb8dd505026b2d1edebc5457be363c Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Wed, 7 Feb 2024 14:05:37 +0800 Subject: [PATCH 23/34] chore: add v2 & v3 test data documents --- .../v2/did-ocsp-revocation-signed.json | 66 ++++++++ ...d-revocation-store-signed-no-location.json | 64 ++++++++ ...d-revocation-store-signed-not-revoked.json | 65 ++++++++ .../did-revocation-store-signed-revoked.json | 68 ++++++++ ...d-revocation-store-signed-not-revoked.json | 69 +++++++++ ...nsdid-revocation-store-signed-revoked.json | 69 +++++++++ test/fixtures/v2/document.ts | 59 +++++++ .../v2/documentDidCustomRevocation.ts | 66 ++++++++ test/fixtures/v2/documentDidMissingProof.ts | 54 +++++++ .../v2/documentDidMixedTokenRegistry.ts | 72 +++++++++ .../v2/documentDidObfuscatedRevocation.ts | 65 ++++++++ test/fixtures/v2/documentDidSigned.ts | 70 +++++++++ test/fixtures/v2/documentDidWrongSignature.ts | 64 ++++++++ .../v2/documentDnsDidMixedTokenRegistry.ts | 146 ++++++++++++++++++ test/fixtures/v2/documentDnsDidNoDnsTxt.ts | 65 ++++++++ test/fixtures/v2/documentDnsDidSigned.ts | 71 +++++++++ .../documentGoerliNotIssuedTokenRegistry.ts | 82 ++++++++++ test/fixtures/v2/documentGoerliObfuscated.ts | 94 +++++++++++ .../documentGoerliRevokedWithDocumentStore.ts | 92 +++++++++++ .../documentGoerliValidWithDocumentStore.ts | 65 ++++++++ .../v2/documentGoerliValidWithToken.ts | 67 ++++++++ ...ntMainnetInvalidWithIncorrectMerkleRoot.ts | 79 ++++++++++ ...ntMainnetInvalidWithOddLengthMerkleRoot.ts | 79 ++++++++++ test/fixtures/v2/documentMainnetValid.ts | 47 ++++++ test/fixtures/v2/documentMixedIssuance.ts | 94 +++++++++++ .../v2/documentNotIssuedWithDocumentStore.ts | 65 ++++++++ .../v2/documentNotIssuedWithTokenRegistry.ts | 65 ++++++++ test/fixtures/v2/tamperedDocument.ts | 106 +++++++++++++ test/fixtures/v3/did-invalid-signed.json | 75 +++++++++ .../v3/did-ocsp-revocation-signed.json | 44 ++++++ ...d-revocation-store-signed-no-location.json | 75 +++++++++ ...d-revocation-store-signed-not-revoked.json | 76 +++++++++ .../did-revocation-store-signed-revoked.json | 76 +++++++++ test/fixtures/v3/did-signed.json | 75 +++++++++ test/fixtures/v3/did-wrapped.json | 69 +++++++++ test/fixtures/v3/did.json | 61 ++++++++ test/fixtures/v3/dnsdid-invalid-signed.json | 75 +++++++++ ...d-revocation-store-signed-not-revoked.json | 76 +++++++++ ...nsdid-revocation-store-signed-revoked.json | 76 +++++++++ test/fixtures/v3/dnsdid-signed.json | 74 +++++++++ test/fixtures/v3/dnsdid-wrapped.json | 72 +++++++++ test/fixtures/v3/dnsdid.json | 61 ++++++++ .../v3/documentStore-invalid-issued.json | 66 ++++++++ test/fixtures/v3/documentStore-issued.json | 66 ++++++++ test/fixtures/v3/documentStore-revoked.json | 66 ++++++++ test/fixtures/v3/documentStore-wrapped.json | 66 ++++++++ test/fixtures/v3/documentStore.json | 58 +++++++ test/fixtures/v3/documents.ts | 101 ++++++++++++ .../v3/tokenRegistry-invalid-issued.json | 66 ++++++++ test/fixtures/v3/tokenRegistry-issued.json | 66 ++++++++ test/fixtures/v3/tokenRegistry-wrapped.json | 66 ++++++++ test/fixtures/v3/tokenRegistry.json | 54 +++++++ 52 files changed, 3728 insertions(+) create mode 100644 test/fixtures/v2/did-ocsp-revocation-signed.json create mode 100644 test/fixtures/v2/did-revocation-store-signed-no-location.json create mode 100644 test/fixtures/v2/did-revocation-store-signed-not-revoked.json create mode 100644 test/fixtures/v2/did-revocation-store-signed-revoked.json create mode 100644 test/fixtures/v2/dnsdid-revocation-store-signed-not-revoked.json create mode 100644 test/fixtures/v2/dnsdid-revocation-store-signed-revoked.json create mode 100644 test/fixtures/v2/document.ts create mode 100644 test/fixtures/v2/documentDidCustomRevocation.ts create mode 100644 test/fixtures/v2/documentDidMissingProof.ts create mode 100644 test/fixtures/v2/documentDidMixedTokenRegistry.ts create mode 100644 test/fixtures/v2/documentDidObfuscatedRevocation.ts create mode 100644 test/fixtures/v2/documentDidSigned.ts create mode 100644 test/fixtures/v2/documentDidWrongSignature.ts create mode 100644 test/fixtures/v2/documentDnsDidMixedTokenRegistry.ts create mode 100644 test/fixtures/v2/documentDnsDidNoDnsTxt.ts create mode 100644 test/fixtures/v2/documentDnsDidSigned.ts create mode 100644 test/fixtures/v2/documentGoerliNotIssuedTokenRegistry.ts create mode 100644 test/fixtures/v2/documentGoerliObfuscated.ts create mode 100644 test/fixtures/v2/documentGoerliRevokedWithDocumentStore.ts create mode 100644 test/fixtures/v2/documentGoerliValidWithDocumentStore.ts create mode 100644 test/fixtures/v2/documentGoerliValidWithToken.ts create mode 100644 test/fixtures/v2/documentMainnetInvalidWithIncorrectMerkleRoot.ts create mode 100644 test/fixtures/v2/documentMainnetInvalidWithOddLengthMerkleRoot.ts create mode 100644 test/fixtures/v2/documentMainnetValid.ts create mode 100644 test/fixtures/v2/documentMixedIssuance.ts create mode 100644 test/fixtures/v2/documentNotIssuedWithDocumentStore.ts create mode 100644 test/fixtures/v2/documentNotIssuedWithTokenRegistry.ts create mode 100644 test/fixtures/v2/tamperedDocument.ts create mode 100644 test/fixtures/v3/did-invalid-signed.json create mode 100644 test/fixtures/v3/did-ocsp-revocation-signed.json create mode 100644 test/fixtures/v3/did-revocation-store-signed-no-location.json create mode 100644 test/fixtures/v3/did-revocation-store-signed-not-revoked.json create mode 100644 test/fixtures/v3/did-revocation-store-signed-revoked.json create mode 100644 test/fixtures/v3/did-signed.json create mode 100644 test/fixtures/v3/did-wrapped.json create mode 100644 test/fixtures/v3/did.json create mode 100644 test/fixtures/v3/dnsdid-invalid-signed.json create mode 100644 test/fixtures/v3/dnsdid-revocation-store-signed-not-revoked.json create mode 100644 test/fixtures/v3/dnsdid-revocation-store-signed-revoked.json create mode 100644 test/fixtures/v3/dnsdid-signed.json create mode 100644 test/fixtures/v3/dnsdid-wrapped.json create mode 100644 test/fixtures/v3/dnsdid.json create mode 100644 test/fixtures/v3/documentStore-invalid-issued.json create mode 100644 test/fixtures/v3/documentStore-issued.json create mode 100644 test/fixtures/v3/documentStore-revoked.json create mode 100644 test/fixtures/v3/documentStore-wrapped.json create mode 100644 test/fixtures/v3/documentStore.json create mode 100644 test/fixtures/v3/documents.ts create mode 100644 test/fixtures/v3/tokenRegistry-invalid-issued.json create mode 100644 test/fixtures/v3/tokenRegistry-issued.json create mode 100644 test/fixtures/v3/tokenRegistry-wrapped.json create mode 100644 test/fixtures/v3/tokenRegistry.json diff --git a/test/fixtures/v2/did-ocsp-revocation-signed.json b/test/fixtures/v2/did-ocsp-revocation-signed.json new file mode 100644 index 0000000..3aafb62 --- /dev/null +++ b/test/fixtures/v2/did-ocsp-revocation-signed.json @@ -0,0 +1,66 @@ +{ + "version": "https://schema.openattestation.com/2.0/schema.json", + "data": { + "id": "34d75f11-a68e-4377-9def-5a378ac931de:string:SGCNM21566327", + "recipient": { + "name": "610ab6a5-34e9-4b30-b2dd-3364beb36a62:string:AUS FREIGHT", + "address": { + "street": "05167e77-04ee-4515-b725-7a0504b3ecf1:string:101 APPLE ROAD", + "country": "d66f1e51-30e2-4f3b-ae65-7c3097e3be31:string:AUSTRALIA" + } + }, + "consignment": { + "description": "6b54955f-f521-4d8e-8c1c-caa3492331ac:string:16667 CARTONS OF RED WINE", + "quantity": { + "value": "3f0f6603-f239-4272-b7e4-ca9adfa311da:string:5000", + "unit": "e118af6d-cc85-4473-b995-780b7a7768a4:string:LITRES" + }, + "countryOfOrigin": "a63f3624-3751-40b1-b37c-32cbc451b6e7:string:AUSTRALIA", + "outwardBillNo": "9387719e-7a8b-4d81-8d92-d2bab87e3617:string:AQSIQ170923150", + "dateOfDischarge": "3aeae321-1f6e-4fba-bc66-10fba2b44308:string:2018-01-26", + "dateOfDeparture": "282ab552-81a2-4423-a860-38b8b22f2aec:string:2018-01-30", + "countryOfFinalDestination": "c59ce94d-7ca4-496f-a6b5-95fc3e113c14:string:CHINA", + "outgoingVehicleNo": "e03b4762-b5a7-4830-ada2-885a513f44fd:string:COSCO JAPAN 074E/30-JAN" + }, + "declaration": { + "name": "f7cb21aa-38a1-43f1-8e8e-56a01e271ed4:string:PETER LEE", + "designation": "b993c20a-d347-47df-b125-944812b28ae8:string:SHIPPING MANAGER", + "date": "3d83f95a-adf1-4f0e-9929-5a05b3d0eb39:string:2018-01-28" + }, + "$template": { + "name": "579a0440-6365-4635-ba37-93588c62a0b1:string:CERTIFICATE_OF_NON_MANIPULATION", + "type": "65356aaf-2c83-45e9-8553-2f3f86f4cb4b:string:EMBEDDED_RENDERER", + "url": "d16fa0f1-a34f-4e6d-8dbb-1f1604bb8c95:string:https://demo-cnm.openattestation.com" + }, + "issuers": [ + { + "id": "11152e6e-3095-4854-9528-6b287d764e4d:string:did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", + "name": "83caf389-6532-4e7a-8cc0-9c2d1c967178:string:Demo Issuer", + "revocation": { + "type": "e248e987-f202-45b7-96db-0c2f875c780f:string:OCSP_RESPONDER", + "location": "ff751117-df1b-400d-a631-f4e9772cc348:string:https://ocsp.example.com" + }, + "identityProof": { + "type": "584d86d0-441b-4f05-848a-d912dc96a1e8:string:DNS-DID", + "location": "fc729041-e639-4bd2-988b-7f8727e5ad48:string:example.openattestation.com", + "key": "a40f13ba-81dd-43a3-b084-77fd83c908ba:string:did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90#controller" + } + } + ] + }, + "signature": { + "type": "SHA3MerkleProof", + "targetHash": "28b221f6287d8e4f8da09a835bcb750537cc8385e2535ff63591fdf0162be824", + "proof": ["75cb35254e73f3cbb2b63ff2d07a051d2c9e5f81f7e1fd77631df8b8ed93c1bc"], + "merkleRoot": "56961854a82feafe9a56eb57acfe3b97f17eda5d497b622c9acc9f03c412618c" + }, + "proof": [ + { + "type": "OpenAttestationSignature2018", + "created": "2022-06-10T04:05:01.095Z", + "proofPurpose": "assertionMethod", + "verificationMethod": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90#controller", + "signature": "0x486ff94db8e88f434c260792d92ef0f528f5834b6c42460fb255e2876002c14460bd8311bdb987514e5e2e0581b580d5b1ef114054b0b397295eb5421e1038111c" + } + ] +} diff --git a/test/fixtures/v2/did-revocation-store-signed-no-location.json b/test/fixtures/v2/did-revocation-store-signed-no-location.json new file mode 100644 index 0000000..c9fbd20 --- /dev/null +++ b/test/fixtures/v2/did-revocation-store-signed-no-location.json @@ -0,0 +1,64 @@ +{ + "version": "https://schema.openattestation.com/2.0/schema.json", + "data": { + "id": "0d68bfdc-be22-4f3b-b93a-9be49b005eec:string:SGCNM21566325", + "$template": { + "name": "821ffc56-91b6-47c7-9137-a6e928eda8f3:string:CERTIFICATE_OF_NON_MANIPULATION", + "type": "8b70d29e-f3b7-4e8b-85cd-cbb50a31a530:string:EMBEDDED_RENDERER", + "url": "672d733e-8d15-400c-acd2-055da7f47ea0:string:https://demo-cnm.openattestation.com" + }, + "issuers": [ + { + "id": "678c27ca-0555-4333-b3c6-9c598bfe98a6:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + "name": "5b8fe517-4f4f-48d1-a007-b3007e130220:string:DEMO STORE", + "revocation": { + "type": "20b3bb4d-e9fe-4479-8f22-165dd228d4c7:string:REVOCATION_STORE" + }, + "identityProof": { + "type": "1f01cb81-e107-430c-805c-88a0687f26d7:string:DID", + "key": "d9785ba2-08b9-4a15-8ad1-ba2746ea1814:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller" + } + } + ], + "recipient": { + "name": "eab9094a-f4ab-499b-9a1e-0c480784f0f1:string:SG FREIGHT", + "address": { + "street": "e56867b5-e1b9-4a0d-91a2-7c23896eda06:string:101 ORCHARD ROAD", + "country": "e74b558b-d937-4478-88fb-5f1d8fb718e4:string:SINGAPORE" + } + }, + "consignment": { + "description": "9bc9cf4d-8bd9-4d67-8519-ae92f8463b29:string:16667 CARTONS OF RED WINE", + "quantity": { + "value": "a0811fd0-9fd0-485e-a91b-f3290aa16777:number:5000", + "unit": "381c64e1-670b-49dc-b238-800df31a8238:string:LITRES" + }, + "countryOfOrigin": "e6f1c08e-bc12-4caf-88d0-c6e8d5693f8f:string:AUSTRALIA", + "outwardBillNo": "a6ffd1c7-c42d-40df-9c39-c6b2044c574c:string:AQSIQ170923150", + "dateOfDischarge": "89e1172f-0a39-4887-855a-51f9dfe08e1f:string:2018-01-26", + "dateOfDeparture": "8df514b9-c48f-4a96-a1ac-d3e0ae7c50ee:string:2018-01-30", + "countryOfFinalDestination": "3d6c734e-d7c8-433a-a4a3-8213d3140f4b:string:CHINA", + "outgoingVehicleNo": "42a2fd22-977f-48ad-ad86-9a0d28541389:string:COSCO JAPAN 074E/30-JAN" + }, + "declaration": { + "name": "d8f1f66b-88f0-42c5-8b66-8429f2bc78a2:string:PETER LEE", + "designation": "30d17b4e-274c-49b2-80d5-5c1cfd1af15d:string:SHIPPING MANAGER", + "date": "6462d1dd-9d6d-423f-b43d-63c1c3c12866:string:2018-01-28" + } + }, + "signature": { + "type": "SHA3MerkleProof", + "targetHash": "b6db3e59d4354116451b603abc194f146df23946f637e9b25c3899a7697ed121", + "proof": [], + "merkleRoot": "b6db3e59d4354116451b603abc194f146df23946f637e9b25c3899a7697ed121" + }, + "proof": [ + { + "type": "OpenAttestationSignature2018", + "created": "2021-02-17T02:06:22.110Z", + "proofPurpose": "assertionMethod", + "verificationMethod": "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + "signature": "0x4cced3e9865ab16f6a32464e73f32fca6ed42e377bdc36fe2e049716cd2bdc812db49a3540f93ecc615c98518afcb7602c133d261d6bdb8f6bded799964241d21b" + } + ] +} \ No newline at end of file diff --git a/test/fixtures/v2/did-revocation-store-signed-not-revoked.json b/test/fixtures/v2/did-revocation-store-signed-not-revoked.json new file mode 100644 index 0000000..fa10f51 --- /dev/null +++ b/test/fixtures/v2/did-revocation-store-signed-not-revoked.json @@ -0,0 +1,65 @@ +{ + "version": "https://schema.openattestation.com/2.0/schema.json", + "data": { + "id": "3bc31040-b886-47c3-a6c0-a395d891d454:string:SGCNM21566325", + "$template": { + "name": "6eee90b2-57cd-4eba-a4a5-65d256c8be2f:string:CERTIFICATE_OF_NON_MANIPULATION", + "type": "16cddbe8-4688-4a63-8602-e6ca07d260be:string:EMBEDDED_RENDERER", + "url": "f3311983-7356-4e6d-8221-652217d5bc4c:string:https://demo-cnm.openattestation.com" + }, + "issuers": [ + { + "id": "ca04eb24-4389-4de9-b956-abab1318305f:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "name": "7a03686c-81e0-4635-bc54-66c82034346c:string:DEMO STORE", + "revocation": { + "type": "100d7b3c-e5cb-48fa-af83-6b4f46c17417:string:REVOCATION_STORE", + "location": "519124d9-c6bd-48cc-a3b2-4d6ced92d377:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" + }, + "identityProof": { + "type": "db36447a-c71d-4542-8c3a-8d3b94fd1590:string:DID", + "key": "4711fb5e-f8c9-4b8d-970f-a88428b2a3a8:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller" + } + } + ], + "recipient": { + "name": "4861069e-d81b-46ef-aeeb-c7d1c2150f49:string:AUS FREIGHT", + "address": { + "street": "2e4717be-99fe-411d-9f6e-ca2cb5fe5117:string:101 APPLE ROAD", + "country": "e47544b6-c282-4820-a6ab-2e906ce9a4ca:string:AUSTRALIA" + } + }, + "consignment": { + "description": "af1a024c-2222-4252-847e-e461fe0166b8:string:16667 CARTONS OF RED WINE", + "quantity": { + "value": "c628afb0-5f50-41ce-853e-390a92c43ae8:string:5000", + "unit": "189b46a4-43de-44c0-ac83-326551c35e72:string:LITRES" + }, + "countryOfOrigin": "7eb30f60-759e-4e02-99cc-ce8fae2595cc:string:AUSTRALIA", + "outwardBillNo": "850cf108-3e45-492e-b5a4-d50890f91b67:string:AQSIQ170923150", + "dateOfDischarge": "c4b94c07-d0ad-437a-be64-1311ccd317e6:string:2018-01-26", + "dateOfDeparture": "4fbab36b-2f13-4ea6-b121-caa57649424a:string:2018-01-30", + "countryOfFinalDestination": "d6eed6f6-635e-4b00-94fd-b475f13437b3:string:CHINA", + "outgoingVehicleNo": "21dad20a-8d71-46bb-b5fe-139984088963:string:COSCO JAPAN 074E/30-JAN" + }, + "declaration": { + "name": "a93a12e7-81b5-4b34-a77e-1d78ab0161c8:string:PETER LEE", + "designation": "fa92377c-e619-4b01-bd21-91f375b37158:string:SHIPPING MANAGER", + "date": "16899578-2c2b-418b-9b48-2e0d71bae3dd:string:2018-01-28" + } + }, + "signature": { + "type": "SHA3MerkleProof", + "targetHash": "a79c619aa426022c31d55ce8fe0699f99477d07b5d9564b73b094834dd5de5ec", + "proof": [], + "merkleRoot": "a79c619aa426022c31d55ce8fe0699f99477d07b5d9564b73b094834dd5de5ec" + }, + "proof": [ + { + "type": "OpenAttestationSignature2018", + "created": "2022-10-27T07:44:00.116Z", + "proofPurpose": "assertionMethod", + "verificationMethod": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x14272f7a1a83090efdeefe1d785a58f49272585b1136914bacee6ea167c5cf84760b395d72784c82af2e1e5952f243e5a07cea972fe243657bdd2ccfff1c1c2d1c" + } + ] +} diff --git a/test/fixtures/v2/did-revocation-store-signed-revoked.json b/test/fixtures/v2/did-revocation-store-signed-revoked.json new file mode 100644 index 0000000..7c212a5 --- /dev/null +++ b/test/fixtures/v2/did-revocation-store-signed-revoked.json @@ -0,0 +1,68 @@ +{ + "version": "https://schema.openattestation.com/2.0/schema.json", + "data": { + "id": "f9a88a07-4576-42ec-bbf5-5bafc35fbf75:string:SGCNM21566325", + "$template": { + "name": "0e9219cf-870f-44b6-a4e4-67d10c0769c2:string:CERTIFICATE_OF_NON_MANIPULATION", + "type": "fad3a151-3c2a-4138-9ec4-5f8fe0fe9c3b:string:EMBEDDED_RENDERER", + "url": "bd5822c3-3842-4bb9-b99f-cc508245fc83:string:https://demo-cnm.openattestation.com" + }, + "issuers": [ + { + "id": "7f742627-9f59-4d10-bd51-3e2887641e0c:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "name": "f39ed1fa-36f0-40b5-a42d-9719e5df19a1:string:DEMO STORE", + "revocation": { + "type": "1e2f2f88-6406-44d6-9457-e4ac56313212:string:REVOCATION_STORE", + "location": "c4dcac52-da5e-42cc-8b05-349d459a7ad5:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" + }, + "identityProof": { + "type": "7a1519ab-eac7-4fa9-8059-e243d9e6674c:string:DID", + "key": "d8814e37-8976-4003-872f-2cca11726cf6:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller" + } + } + ], + "recipient": { + "name": "67a8b009-cb8a-4bbc-8852-ee6b2bf5e158:string:AUS FREIGHT", + "address": { + "street": "ea27af39-9463-43c8-8801-10accdfeef43:string:101 APPLE ROAD", + "country": "676e60fb-1801-49de-b6b7-12431c7df4c9:string:AUSTRALIA" + } + }, + "consignment": { + "description": "0e342f00-dc82-4574-968f-30260156de3f:string:16667 CARTONS OF RED WINE", + "quantity": { + "value": "62287e86-038b-436b-9084-4fa6ad0fb784:string:5000", + "unit": "657bfd5f-7cfd-40e5-9e73-79525918c125:string:LITRES" + }, + "countryOfOrigin": "718ac80c-4ab3-4bb1-833e-6e7b9b1d3870:string:AUSTRALIA", + "outwardBillNo": "e1efd1dc-ec8e-4128-8f1b-339abeaec03c:string:AQSIQ170923150", + "dateOfDischarge": "e664ecb4-067a-416f-8b26-e7130f3a6205:string:2018-01-26", + "dateOfDeparture": "c4e6f710-6378-40f1-91ca-7f431fc5b9d6:string:2018-01-30", + "countryOfFinalDestination": "d88ffaca-0a4a-4907-8b49-e6d72799ed53:string:CHINA", + "outgoingVehicleNo": "23777fb5-ff20-4567-8cb3-a0c9ae548604:string:COSCO JAPAN 074E/30-JAN" + }, + "declaration": { + "name": "63c12150-6d12-463a-9a9b-f438ecfec511:string:PETER LEE", + "designation": "34d089c3-15f5-48e8-8d2b-72e5c0066421:string:SHIPPING MANAGER", + "date": "50bd4ccb-6bb4-483b-890d-609dd02d038f:string:2018-01-28" + } + }, + "signature": { + "type": "SHA3MerkleProof", + "targetHash": "abe59845be21c1607b0cbdab0f622e0d82019fe316072de312bab6b700d9ad13", + "proof": [ + "ff892056d1397e1146b625ac40d77bb4c5c3b47e22858729a65197fd5e89e683", + "ee52e200f490b1331ae6877d7b0992572fdcaf6168bcfc1ff879d1fc5f1e06d9" + ], + "merkleRoot": "3752f29527952e7ccc6bf4da614d80f2fec9e5bd8b71adf10beb4e6763e6c233" + }, + "proof": [ + { + "type": "OpenAttestationSignature2018", + "created": "2022-10-27T07:52:38.199Z", + "proofPurpose": "assertionMethod", + "verificationMethod": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x0cc602d746237f445af62a32aeb8e93701a96600b450d8b02005ec230d88351e40f89b31f8e0b13df35175cfd1321862098ce4aa34ed0686738f5322e9fea97e1c" + } + ] +} diff --git a/test/fixtures/v2/dnsdid-revocation-store-signed-not-revoked.json b/test/fixtures/v2/dnsdid-revocation-store-signed-not-revoked.json new file mode 100644 index 0000000..6a94ca7 --- /dev/null +++ b/test/fixtures/v2/dnsdid-revocation-store-signed-not-revoked.json @@ -0,0 +1,69 @@ +{ + "version": "https://schema.openattestation.com/2.0/schema.json", + "data": { + "id": "9e311b70-979d-4728-af5a-e37c777cbbfd:string:SGCNM21566325", + "$template": { + "name": "1ecc233b-d3e4-431d-9cfb-14f080b5576e:string:CERTIFICATE_OF_NON_MANIPULATION", + "type": "9f27a50f-158a-4286-b4d9-92a7ae13be30:string:EMBEDDED_RENDERER", + "url": "09263ccd-e804-4d07-9582-0646600c69e2:string:https://demo-cnm.openattestation.com" + }, + "issuers": [ + { + "id": "140c686a-4017-421c-a5e9-fdb07c1accd0:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "name": "6c0c26dc-f744-4af6-9ccc-ab2f67248e1b:string:DEMO STORE", + "revocation": { + "type": "7432f2cc-00d8-4c58-a5d0-f922f21c8614:string:REVOCATION_STORE", + "location": "dbe5fb41-b2a5-47bd-85d1-fea9d1b4caef:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" + }, + "identityProof": { + "type": "0c12407d-31a4-4a4e-839e-f5f8bb77c317:string:DNS-DID", + "key": "1949b9e6-7dc2-49c8-bf07-e88931ceef59:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "location": "0259c7c5-b373-467c-95f9-a63b8be53b13:string:demo-tradetrust.openattestation.com" + } + } + ], + "recipient": { + "name": "779ac49c-fa53-4c8c-abdf-95996303ceca:string:AUS FREIGHT", + "address": { + "street": "daf7f3c9-cd36-4346-bd8b-136e6947042a:string:101 APPLE ROAD", + "country": "0092049b-7f24-41da-be58-98c12a8e54b6:string:AUSTRALIA" + } + }, + "consignment": { + "description": "e8d63dc8-336b-47ed-8c32-f885a13bb3f9:string:16667 CARTONS OF RED WINE", + "quantity": { + "value": "ffe30ea1-0926-4689-9808-5a5d1e95bd26:string:5000", + "unit": "e33096b6-a55d-42f3-82fd-afd79c5a21a6:string:LITRES" + }, + "countryOfOrigin": "3b9ee621-df41-440c-82d9-b7aed1e06db1:string:AUSTRALIA", + "outwardBillNo": "a7af0df6-b3bd-477d-887a-05bcd0e53e04:string:AQSIQ170923150", + "dateOfDischarge": "85e1e2be-1f7d-43de-987d-810a8371eb04:string:2018-01-26", + "dateOfDeparture": "96afa038-4f13-4dd4-b4e8-12adf1a261c2:string:2018-01-30", + "countryOfFinalDestination": "80e2c732-c59f-4f94-88a7-5f6c575eda3b:string:CHINA", + "outgoingVehicleNo": "b3f98636-2c62-40ab-bfa4-8b3f414068f6:string:COSCO JAPAN 074E/30-JAN" + }, + "declaration": { + "name": "ed764112-16fa-4627-9541-7cd99ddc2ca3:string:PETER LEE", + "designation": "cf9221f7-4861-446a-a554-3efb54edeff3:string:SHIPPING MANAGER", + "date": "e7c1b037-56f4-45ec-9903-3c2dd330d39f:string:2018-01-28" + } + }, + "signature": { + "type": "SHA3MerkleProof", + "targetHash": "a428e123d99b68a76228f8d5255e27e9d158147767ad3e54e9ef2fe117a2b446", + "proof": [ + "2328c806fcc07f91df394965e0050130089882f7e1059747859387a38e5a6542", + "4ddcee582f5ea9e24c1c4983fb365714dc444ba15e89d76eb05cd87886a92732" + ], + "merkleRoot": "3752f29527952e7ccc6bf4da614d80f2fec9e5bd8b71adf10beb4e6763e6c233" + }, + "proof": [ + { + "type": "OpenAttestationSignature2018", + "created": "2022-10-27T07:52:38.199Z", + "proofPurpose": "assertionMethod", + "verificationMethod": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x0cc602d746237f445af62a32aeb8e93701a96600b450d8b02005ec230d88351e40f89b31f8e0b13df35175cfd1321862098ce4aa34ed0686738f5322e9fea97e1c" + } + ] +} diff --git a/test/fixtures/v2/dnsdid-revocation-store-signed-revoked.json b/test/fixtures/v2/dnsdid-revocation-store-signed-revoked.json new file mode 100644 index 0000000..d55246a --- /dev/null +++ b/test/fixtures/v2/dnsdid-revocation-store-signed-revoked.json @@ -0,0 +1,69 @@ +{ + "version": "https://schema.openattestation.com/2.0/schema.json", + "data": { + "id": "a17c05cb-e8aa-4f4f-b49e-75774807a096:string:SGCNM21566325", + "$template": { + "name": "8a436418-3c4f-4995-8f3e-f11bef42c664:string:CERTIFICATE_OF_NON_MANIPULATION", + "type": "81f85891-d163-4096-ac06-5b802a2c1de4:string:EMBEDDED_RENDERER", + "url": "893be80a-0bc7-4e6d-93c1-9010c159bed3:string:https://demo-cnm.openattestation.com" + }, + "issuers": [ + { + "id": "20a0a806-8975-4df7-8084-59f5b52136f1:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "name": "ad28c221-4816-4057-9f45-5cab17cf1ba0:string:DEMO STORE", + "revocation": { + "type": "bde8af07-4788-4c38-a214-aa176d54e8da:string:REVOCATION_STORE", + "location": "56089f8b-daae-48c4-95fb-6e67663d3e30:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" + }, + "identityProof": { + "type": "64da16e2-6aa9-4cbb-ab72-912a553fff44:string:DNS-DID", + "key": "283ab372-8e53-46c1-8197-6f8cc82f4d3b:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "location": "294eb849-6484-41a9-b37b-2912e6b0ff3a:string:demo-tradetrust.openattestation.com" + } + } + ], + "recipient": { + "name": "30bbcd3e-8214-4d81-bf28-1128a6959fe6:string:AUS FREIGHT", + "address": { + "street": "f58322c7-981b-4e2c-b34d-65731c0cc427:string:101 APPLE ROAD", + "country": "901081c2-76cb-41ca-b5e0-e45a24c88af9:string:AUSTRALIA" + } + }, + "consignment": { + "description": "771bef92-2ae7-4527-9ff1-8679d349c581:string:16667 CARTONS OF RED WINE", + "quantity": { + "value": "f26200de-5bc7-48e2-ac78-4fd05e7709fc:string:5000", + "unit": "5bf3045b-e983-405a-937a-5e64d2df9dbc:string:LITRES" + }, + "countryOfOrigin": "eef83b28-25ff-47df-aed3-29f76e62bf41:string:AUSTRALIA", + "outwardBillNo": "4e34b9c4-504c-44f8-9367-64ff0f55e140:string:AQSIQ170923150", + "dateOfDischarge": "d57fa170-0c16-4c1e-8375-fc5c35ba7f31:string:2018-01-26", + "dateOfDeparture": "841cb84a-22bc-45c9-a742-4eee535eba3b:string:2018-01-30", + "countryOfFinalDestination": "81f60c90-0554-4a19-9b2b-48c6ba029c54:string:CHINA", + "outgoingVehicleNo": "a949e936-bdba-41a9-9d46-8df724d54ee0:string:COSCO JAPAN 074E/30-JAN" + }, + "declaration": { + "name": "e898019d-982b-40fe-92db-861302d69659:string:PETER LEE", + "designation": "ad90c66e-e5af-430f-81ca-05d9ad26076c:string:SHIPPING MANAGER", + "date": "7dfdf511-a519-4632-baa6-615f6f621c14:string:2018-01-28" + } + }, + "signature": { + "type": "SHA3MerkleProof", + "targetHash": "2328c806fcc07f91df394965e0050130089882f7e1059747859387a38e5a6542", + "proof": [ + "a428e123d99b68a76228f8d5255e27e9d158147767ad3e54e9ef2fe117a2b446", + "4ddcee582f5ea9e24c1c4983fb365714dc444ba15e89d76eb05cd87886a92732" + ], + "merkleRoot": "3752f29527952e7ccc6bf4da614d80f2fec9e5bd8b71adf10beb4e6763e6c233" + }, + "proof": [ + { + "type": "OpenAttestationSignature2018", + "created": "2022-10-27T07:52:38.200Z", + "proofPurpose": "assertionMethod", + "verificationMethod": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x0cc602d746237f445af62a32aeb8e93701a96600b450d8b02005ec230d88351e40f89b31f8e0b13df35175cfd1321862098ce4aa34ed0686738f5322e9fea97e1c" + } + ] +} diff --git a/test/fixtures/v2/document.ts b/test/fixtures/v2/document.ts new file mode 100644 index 0000000..4e0877c --- /dev/null +++ b/test/fixtures/v2/document.ts @@ -0,0 +1,59 @@ +import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; + +interface CustomDocument extends v2.OpenAttestationDocument { + name: string; + issuedOn: string; + transcript: any; + issuers: { url: string; name: string; certificateStore: string }[]; + recipient: { + name: string; + email: string; + phone: string; + }; +} +export const document: WrappedDocument = { + version: SchemaId.v2, + schema: "opencerts/1.4", + data: { + id: "046bebd9-1c59-4d82-b70b-b6c8aa5c502d:string:2018091259", + name: "e91c1c2e-534b-43d1-b73b-e2de2c799242:string:SEAB Certificate for SEAB", + issuedOn: "8332eaaa-cb87-46ae-a5d0-1f9cae661fba:string:2018-08-31T23:59:32+08:00", + issuers: [ + { + name: "1f525e1b-50c3-49b7-bfbf-0f110453ff3b:string:Singapore Examination and Assessment Board", + url: "de6fcb26-c53a-49fc-a872-432213d135f3:string:https://www.seab.gov.sg/", + certificateStore: "4b467479-77ed-47c7-bfdf-7be8e6618dcd:string:0x20bc9C354A18C8178A713B9BcCFFaC2152b53990", + }, + ], + recipient: { + name: "9dcfe063-b692-4ff6-901c-134c29e4e1df:string:John Snow", + email: "03a578d3-ab41-4572-bf7b-fc8763832918:string:johnsnow@gmail.com", + phone: "a2be0e32-4a9e-45fa-9690-a300fadaa5f7:string:+6588888888", + }, + transcript: [ + { + name: "97fb29de-56db-4cde-9032-5ef91423bcf4:string:Introduction to SEAB", + grade: "df28e06b-d06f-4283-ae72-b5b3e30aee28:string:B+", + courseCredit: "50dc8869-ef3c-4276-a72e-c247d6e64b72:number:3", + courseCode: "519f79a3-4f8c-4345-9474-d173e6c9a7fe:string:SEAB-HIST", + url: "c3954ba1-023c-45ad-bbd4-eb4a8df82dc2:string:https://www.seab.gov.sg/pages/about/introduction", + description: "8d6e4172-51e2-49ba-b98b-d1c5906a0339:string:Understanding the vision, mission, and values", + }, + { + name: "4da6b8d8-21d3-4228-937b-acc65a648bf7:string:SEAB - About Us", + grade: "1cf384cd-8951-4a56-9e42-e3d9954d0c85:string:A", + courseCredit: "f000cbd2-cf8d-4bf6-94b7-6e73f8037c3f:number:3", + courseCode: "d52233d5-a137-4e94-ad75-daac38536c87:string:SEAB-ABT", + url: "148a3906-8cfe-4971-9f17-6f2751a54b8e:string:https://www.seab.gov.sg/pages/about/aboutus", + description: "69179ec5-78fc-427e-8680-ba91f86d761f:string:About the history of SEAB", + }, + ], + }, + privacy: {}, + signature: { + type: "SHA3MerkleProof", + targetHash: "85df2b4e905a82cf10c317df8f4b659b5cf38cc12bd5fbaffba5fc901ef0011b", + proof: [], + merkleRoot: "85df2b4e905a82cf10c317df8f4b659b5cf38cc12bd5fbaffba5fc901ef0011b", + }, +}; diff --git a/test/fixtures/v2/documentDidCustomRevocation.ts b/test/fixtures/v2/documentDidCustomRevocation.ts new file mode 100644 index 0000000..bbc83f2 --- /dev/null +++ b/test/fixtures/v2/documentDidCustomRevocation.ts @@ -0,0 +1,66 @@ +export const documentDidCustomRevocation: any = { + version: "https://schema.openattestation.com/2.0/schema.json", + data: { + id: "875d57ec-2768-408a-b8d3-bb5ebda17b80:string:SGCNM21566325", + $template: { + name: "1449b124-9bc4-4722-bed1-47272c69f802:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "ba303026-4130-4801-a6a0-1d17db61a6c5:string:EMBEDDED_RENDERER", + url: "87c3c915-4d6e-4f27-b7d1-614181d2f620:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + id: "21d8b192-f449-4413-a311-5c9e211082d6:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + name: "f1ca0af7-5e9a-45f3-8635-720babd76387:string:DEMO STORE", + revocation: { + type: "edcb13e4-1e1a-4317-a194-ec372345c14f:string:CUSTOM", + foo: "4f18c9c0-e872-44b0-961e-23c3e6b7be50:string:bar", + }, + identityProof: { + type: "877d7405-ee94-434a-a258-ec6add2877d5:string:DID", + key: + "37fec355-da53-4c2f-b8d7-b064b305e879:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + }, + }, + ], + recipient: { + name: "8a5bffe7-ceb1-41b9-b240-84025eebdc0c:string:SG FREIGHT", + address: { + street: "83265d64-7fc8-4201-b21e-0b87d5bc8007:string:101 ORCHARD ROAD", + country: "beb02ccd-02cf-48c2-adb2-9ea1b55442b0:string:SINGAPORE", + }, + }, + consignment: { + description: "bfd4a9ae-47fb-4b72-a131-1827d45f8b72:string:16667 CARTONS OF RED WINE", + quantity: { + value: "003d32f5-e663-48f1-ac7d-db4ae1f79cce:number:5000", + unit: "2dac8afd-3a2b-43f5-9853-b92ad5727fd2:string:LITRES", + }, + countryOfOrigin: "20e4cadc-41e8-49b0-bad9-534f4cdae00f:string:AUSTRALIA", + outwardBillNo: "3cb5790f-379d-4360-884b-d45345437394:string:AQSIQ170923130", + dateOfDischarge: "1d774eb3-759d-4d3e-a38f-1aaa5579a3fe:string:2018-01-26", + dateOfDeparture: "0538a21c-acdd-4de3-aa33-9000b818dc9a:string:2018-01-30", + countryOfFinalDestination: "2a55a98e-0043-4f26-b23b-7b08d2c30505:string:CHINA", + outgoingVehicleNo: "154ae7f3-74dc-4972-b001-275a929cb72a:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "397bd565-7902-4201-92fd-2a7b3686d740:string:PETER LEE", + designation: "53feef96-c973-4f03-bdee-3bae76b139e3:string:SHIPPING MANAGER", + date: "52c7a56b-23ab-41b5-b7f6-a86e9fbeae44:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "eea9ad6c2998a3d00fe70f91b3c6cefcd7a5c2068e6b13c9d93c00e5d4fcec1a", + proof: [], + merkleRoot: "eea9ad6c2998a3d00fe70f91b3c6cefcd7a5c2068e6b13c9d93c00e5d4fcec1a", + }, + proof: [ + { + type: "OpenAttestationSignature2018", + proofPurpose: "assertionMethod", + verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + signature: + "0x5fff5ed3d62fbe92b7a358260f924ea31ba57c53d01fe849d4fc3843beec4b7345a1c00035cf96f11cab9d908ad10aac8d077d5feca2c393240c9cc9e0b9c7e81b", + }, + ], +}; diff --git a/test/fixtures/v2/documentDidMissingProof.ts b/test/fixtures/v2/documentDidMissingProof.ts new file mode 100644 index 0000000..5862a00 --- /dev/null +++ b/test/fixtures/v2/documentDidMissingProof.ts @@ -0,0 +1,54 @@ +export const documentDidMissingProof: any = { + version: "https://schema.openattestation.com/2.0/schema.json", + data: { + id: "e1917cfe-70fa-4187-ac6d-ccc57c0d4645:string:SGCNM21566325", + $template: { + name: "95b39779-f300-43b7-9010-1eb96eafc6b5:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "43e9f19d-1ebd-485d-8cbf-2726c1f7c755:string:EMBEDDED_RENDERER", + url: "7b0602b0-5e55-42de-813a-27c4f2b54d20:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + id: "6002d4ab-d1a6-447e-9f86-945ee220fedb:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + name: "f46a0b69-983b-4b5e-83f6-aebe14625810:string:DEMO STORE", + revocation: { type: "bcd9fe64-1b8a-41d3-a176-5d750b4a6cef:string:NONE" }, + identityProof: { + type: "c2990f33-814c-4c7f-a14c-8cef4b1aa8ad:string:DID", + key: + "4ef2653f-7fb5-409b-acc1-a76344ff2de0:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + }, + }, + ], + recipient: { + name: "a5bcf044-94e4-421e-a0d6-960546dc3b41:string:SG FREIGHT", + address: { + street: "1b8dc011-05e0-405e-a687-4b2292a9455a:string:101 ORCHARD ROAD", + country: "39f0508c-637c-407f-9087-c0d1239c9407:string:SINGAPORE", + }, + }, + consignment: { + description: "6819ad4b-ffb2-427c-ac5a-6b812cbefff9:string:16667 CARTONS OF RED WINE", + quantity: { + value: "fb57e16f-d2f4-4caa-8c37-86514695a3ac:number:5000", + unit: "b4259694-628d-4dc0-bce1-f7d34bab8a75:string:LITRES", + }, + countryOfOrigin: "68c4b3bf-6ecf-4b55-894b-3def8c287c6f:string:AUSTRALIA", + outwardBillNo: "2f5b4abf-47d8-4530-8e13-0f78688637e5:string:AQSIQ170923130", + dateOfDischarge: "5dde46da-25cb-4721-96c8-a8f7fee4789a:string:2018-01-26", + dateOfDeparture: "6cc4d4bd-52a4-4998-9cf7-c32a86e78fb0:string:2018-01-30", + countryOfFinalDestination: "054ea1a5-37ae-4625-b8bf-d2ac43ddfcf2:string:CHINA", + outgoingVehicleNo: "11ac7f5b-2839-4d27-b4fb-7ac77acb36c7:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "1954f051-1fde-4288-8468-5020dcc883a6:string:PETER LEE", + designation: "07ff6d5c-40e5-496d-86fd-704866dc8e06:string:SHIPPING MANAGER", + date: "3873ff50-223f-41d0-b37c-6572328594ae:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "cce7bd33bd80b746b71e943e23ddc88fcb99c9011becdd1b4d8b7ab9567d2adb", + proof: [], + merkleRoot: "cce7bd33bd80b746b71e943e23ddc88fcb99c9011becdd1b4d8b7ab9567d2adb", + }, +}; diff --git a/test/fixtures/v2/documentDidMixedTokenRegistry.ts b/test/fixtures/v2/documentDidMixedTokenRegistry.ts new file mode 100644 index 0000000..127ad13 --- /dev/null +++ b/test/fixtures/v2/documentDidMixedTokenRegistry.ts @@ -0,0 +1,72 @@ +export const documentDidMixedTokenRegistry: any = { + version: "https://schema.openattestation.com/2.0/schema.json", + data: { + id: "d1ac6885-4874-4a58-b8be-e7a77394cab3:string:SGCNM21566325", + $template: { + name: "03d57283-6708-4b41-a353-77c51482a66c:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "6376de63-a270-4c32-b5ed-5f07c74690ca:string:EMBEDDED_RENDERER", + url: "cb970225-54fc-4af5-a8a6-b8dd2f03a561:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + id: "76f6aed2-3df9-4e26-94df-2087a1cbef96:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + name: "74370115-61fe-4525-83ad-c18fbf76ac89:string:DEMO STORE", + revocation: { type: "6ebb23bb-d83d-4ca9-8523-d8618b6c34d5:string:NONE" }, + identityProof: { + type: "1fd92bf6-0b01-4705-8b04-805747b7eec1:string:DID", + key: + "3e1d0a2e-6b33-45ee-addd-c7fc4a39276a:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + }, + }, + { + name: "b11c04a0-5cda-4066-9b97-9faa40a56d8e:string:DEMO STORE", + tokenRegistry: "5f86b163-9546-446e-8cd0-d82cca92bd0c:string:0x9178F546D3FF57D7A6352bD61B80cCCD46199C2d", + identityProof: { + type: "79fc0ddf-5880-4e67-8fa0-1c0f937e5cf4:string:DNS-TXT", + location: "e6dcdbfc-9c29-4852-82cf-9d25c086eac6:string:tradetrust.io", + }, + }, + ], + recipient: { + name: "cb8877ab-cdca-4150-8a57-54a471016b3b:string:SG FREIGHT", + address: { + street: "ff30ea3d-24f5-4037-b164-42ced9144975:string:101 ORCHARD ROAD", + country: "0d38260b-b6b5-49ae-bc6d-873fcc924bf7:string:SINGAPORE", + }, + }, + consignment: { + description: "e3b6f085-f2fc-495c-8a85-006ab6a947c8:string:16667 CARTONS OF RED WINE", + quantity: { + value: "ce772105-828f-4af0-af06-c6fd22cdd62a:number:5000", + unit: "ebcb0261-d6a3-46a0-9d57-d19fbda7eaf9:string:LITRES", + }, + countryOfOrigin: "c6c7a77d-cada-494e-bd16-d4b87a1bcc67:string:AUSTRALIA", + outwardBillNo: "7c3e4832-56dd-4b07-a59f-aba34fdcc7ee:string:AQSIQ170923130", + dateOfDischarge: "5132b797-033e-4a4a-b154-7a2bf4ab75cd:string:2018-01-26", + dateOfDeparture: "1079d65f-767d-4866-8174-7bd424e8c65e:string:2018-01-30", + countryOfFinalDestination: "df7bba94-4dbc-41bb-a4ec-40bf4804d951:string:CHINA", + outgoingVehicleNo: "3c7eb8a9-ca34-46a9-bc52-ecfe087a9d9a:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "9ffde9a1-8d3c-4839-a64f-9474d4b1c5e0:string:PETER LEE", + designation: "445c12d0-0e9d-4d7b-a436-8a1310066220:string:SHIPPING MANAGER", + date: "791192b2-dd1a-40c9-8158-2188338162a9:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "1938abeb1de47174949bb01fccefdda17f19a932bc79cb121119855f4aa89471", + proof: [], + merkleRoot: "1938abeb1de47174949bb01fccefdda17f19a932bc79cb121119855f4aa89471", + }, + proof: [ + { + created: "2021-03-25T07:52:31.291Z", + type: "OpenAttestationSignature2018", + proofPurpose: "assertionMethod", + verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + signature: + "0xc0d9a94cb981d2f70432032f711b363e191a885a2802e02209d0e5db1983fba618a82c769ba0edc866f9f9166c006dd018455138ff29124b825d531ab2be70db1c", + }, + ], +}; diff --git a/test/fixtures/v2/documentDidObfuscatedRevocation.ts b/test/fixtures/v2/documentDidObfuscatedRevocation.ts new file mode 100644 index 0000000..c67b0fe --- /dev/null +++ b/test/fixtures/v2/documentDidObfuscatedRevocation.ts @@ -0,0 +1,65 @@ +export const documentDidObfuscatedRevocation: any = { + version: "https://schema.openattestation.com/2.0/schema.json", + data: { + id: "e1917cfe-70fa-4187-ac6d-ccc57c0d4645:string:SGCNM21566325", + $template: { + name: "95b39779-f300-43b7-9010-1eb96eafc6b5:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "43e9f19d-1ebd-485d-8cbf-2726c1f7c755:string:EMBEDDED_RENDERER", + url: "7b0602b0-5e55-42de-813a-27c4f2b54d20:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + id: "6002d4ab-d1a6-447e-9f86-945ee220fedb:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + name: "f46a0b69-983b-4b5e-83f6-aebe14625810:string:DEMO STORE", + identityProof: { + type: "c2990f33-814c-4c7f-a14c-8cef4b1aa8ad:string:DID", + key: + "4ef2653f-7fb5-409b-acc1-a76344ff2de0:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + }, + }, + ], + recipient: { + name: "a5bcf044-94e4-421e-a0d6-960546dc3b41:string:SG FREIGHT", + address: { + street: "1b8dc011-05e0-405e-a687-4b2292a9455a:string:101 ORCHARD ROAD", + country: "39f0508c-637c-407f-9087-c0d1239c9407:string:SINGAPORE", + }, + }, + consignment: { + description: "6819ad4b-ffb2-427c-ac5a-6b812cbefff9:string:16667 CARTONS OF RED WINE", + quantity: { + value: "fb57e16f-d2f4-4caa-8c37-86514695a3ac:number:5000", + unit: "b4259694-628d-4dc0-bce1-f7d34bab8a75:string:LITRES", + }, + countryOfOrigin: "68c4b3bf-6ecf-4b55-894b-3def8c287c6f:string:AUSTRALIA", + outwardBillNo: "2f5b4abf-47d8-4530-8e13-0f78688637e5:string:AQSIQ170923130", + dateOfDischarge: "5dde46da-25cb-4721-96c8-a8f7fee4789a:string:2018-01-26", + dateOfDeparture: "6cc4d4bd-52a4-4998-9cf7-c32a86e78fb0:string:2018-01-30", + countryOfFinalDestination: "054ea1a5-37ae-4625-b8bf-d2ac43ddfcf2:string:CHINA", + outgoingVehicleNo: "11ac7f5b-2839-4d27-b4fb-7ac77acb36c7:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "1954f051-1fde-4288-8468-5020dcc883a6:string:PETER LEE", + designation: "07ff6d5c-40e5-496d-86fd-704866dc8e06:string:SHIPPING MANAGER", + date: "3873ff50-223f-41d0-b37c-6572328594ae:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "cce7bd33bd80b746b71e943e23ddc88fcb99c9011becdd1b4d8b7ab9567d2adb", + proof: [], + merkleRoot: "cce7bd33bd80b746b71e943e23ddc88fcb99c9011becdd1b4d8b7ab9567d2adb", + }, + privacy: { + obfuscatedData: ["3dcde1cfa4a6716392514fd5ea8c451c82081a5f2d95f0fc7b045c4f461389ee"], + }, + proof: [ + { + type: "OpenAttestationSignature2018", + proofPurpose: "assertionMethod", + verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + signature: + "0xff0227ce8400a17a2d80073a95fd895f4fed0011954c90eef389bc618087a4b36ed958775420d122e9a6764c6ffe9d3302d4f45fb065d5e962c3572d3872f31a1b", + }, + ], +}; diff --git a/test/fixtures/v2/documentDidSigned.ts b/test/fixtures/v2/documentDidSigned.ts new file mode 100644 index 0000000..3a94b6c --- /dev/null +++ b/test/fixtures/v2/documentDidSigned.ts @@ -0,0 +1,70 @@ +export const documentDidSigned: any = { + version: "https://schema.openattestation.com/2.0/schema.json", + data: { + id: "c3b43b01-75dd-45d7-bdaf-74a492c0fb4a:string:SGCNM21566325", + $template: { + name: "5f8a8324-fa3b-4e3b-81e8-940fca2fe169:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "8e554aa1-56ba-45a5-b078-f7e061b13b0b:string:EMBEDDED_RENDERER", + url: "fa1fc35f-49ac-4e09-9b9e-46d4c007f6d3:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + id: "67fa28bf-483d-4aaa-bc8a-89006e6f03b9:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + name: "0324b7c4-c806-4e0a-b9e1-e24e6ca4139d:string:DEMO STORE", + revocation: { + type: "a067bbe3-dff5-40c6-9422-584235c57a7e:string:REVOCATION_STORE", + location: "0fde8a61-9b87-4881-bdaf-335484771848:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", + }, + identityProof: { + type: "aa9eb261-43b8-4121-867b-be805c526da0:string:DID", + key: + "43771c2e-b8c7-49b2-a274-17f4d4982bec:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + }, + }, + ], + recipient: { + name: "db253694-2cc3-4911-845e-272dc8671663:string:AUS FREIGHT", + address: { + street: "82679ca5-4ea0-4bcb-b917-fc49e386ac5c:string:101 APPLE ROAD", + country: "20491ded-2895-4ee3-b2ad-4e16a4515c22:string:AUSTRALIA", + }, + }, + consignment: { + description: "e6ade4ce-5a11-488e-9507-a95fa5229679:string:16667 CARTONS OF RED WINE", + quantity: { + value: "af96fb9f-f244-4361-aaa3-adac581fd57a:string:5000", + unit: "eea4921b-e24e-4946-9cae-46e80fe84d5d:string:LITRES", + }, + countryOfOrigin: "585f7416-6a20-4230-8cfc-5ed89719e55b:string:AUSTRALIA", + outwardBillNo: "0d746b5d-a30e-4db8-8806-529755234c18:string:AQSIQ170923150", + dateOfDischarge: "547b717b-8b83-4d26-bb6f-16044d7a9275:string:2018-01-26", + dateOfDeparture: "22aa8673-fc46-4eeb-baa6-ad69f258adaa:string:2018-01-30", + countryOfFinalDestination: "9e11e058-1030-4454-bbdc-11b9fafd7796:string:CHINA", + outgoingVehicleNo: "2af1326e-3149-4ddd-8014-7314cda8c3cb:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "0b4092fa-2a80-4304-a5c3-bde34f4931be:string:PETER LEE", + designation: "5dca9da0-a7d3-4078-8411-852be410fd8b:string:SHIPPING MANAGER", + date: "eca81dc4-54f8-435f-9b96-2104ff79355a:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "ff892056d1397e1146b625ac40d77bb4c5c3b47e22858729a65197fd5e89e683", + proof: [ + "abe59845be21c1607b0cbdab0f622e0d82019fe316072de312bab6b700d9ad13", + "ee52e200f490b1331ae6877d7b0992572fdcaf6168bcfc1ff879d1fc5f1e06d9", + ], + merkleRoot: "3752f29527952e7ccc6bf4da614d80f2fec9e5bd8b71adf10beb4e6763e6c233", + }, + proof: [ + { + type: "OpenAttestationSignature2018", + created: "2022-10-27T07:52:38.199Z", + proofPurpose: "assertionMethod", + verificationMethod: "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + signature: + "0x0cc602d746237f445af62a32aeb8e93701a96600b450d8b02005ec230d88351e40f89b31f8e0b13df35175cfd1321862098ce4aa34ed0686738f5322e9fea97e1c", + }, + ], +}; diff --git a/test/fixtures/v2/documentDidWrongSignature.ts b/test/fixtures/v2/documentDidWrongSignature.ts new file mode 100644 index 0000000..d58df74 --- /dev/null +++ b/test/fixtures/v2/documentDidWrongSignature.ts @@ -0,0 +1,64 @@ +export const documentDidWrongSignature: any = { + version: "https://schema.openattestation.com/2.0/schema.json", + data: { + id: "e1917cfe-70fa-4187-ac6d-ccc57c0d4645:string:SGCNM21566325", + $template: { + name: "95b39779-f300-43b7-9010-1eb96eafc6b5:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "43e9f19d-1ebd-485d-8cbf-2726c1f7c755:string:EMBEDDED_RENDERER", + url: "7b0602b0-5e55-42de-813a-27c4f2b54d20:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + id: "6002d4ab-d1a6-447e-9f86-945ee220fedb:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + name: "f46a0b69-983b-4b5e-83f6-aebe14625810:string:DEMO STORE", + revocation: { type: "bcd9fe64-1b8a-41d3-a176-5d750b4a6cef:string:NONE" }, + identityProof: { + type: "c2990f33-814c-4c7f-a14c-8cef4b1aa8ad:string:DID", + key: + "4ef2653f-7fb5-409b-acc1-a76344ff2de0:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + }, + }, + ], + recipient: { + name: "a5bcf044-94e4-421e-a0d6-960546dc3b41:string:SG FREIGHT", + address: { + street: "1b8dc011-05e0-405e-a687-4b2292a9455a:string:101 ORCHARD ROAD", + country: "39f0508c-637c-407f-9087-c0d1239c9407:string:SINGAPORE", + }, + }, + consignment: { + description: "6819ad4b-ffb2-427c-ac5a-6b812cbefff9:string:16667 CARTONS OF RED WINE", + quantity: { + value: "fb57e16f-d2f4-4caa-8c37-86514695a3ac:number:5000", + unit: "b4259694-628d-4dc0-bce1-f7d34bab8a75:string:LITRES", + }, + countryOfOrigin: "68c4b3bf-6ecf-4b55-894b-3def8c287c6f:string:AUSTRALIA", + outwardBillNo: "2f5b4abf-47d8-4530-8e13-0f78688637e5:string:AQSIQ170923130", + dateOfDischarge: "5dde46da-25cb-4721-96c8-a8f7fee4789a:string:2018-01-26", + dateOfDeparture: "6cc4d4bd-52a4-4998-9cf7-c32a86e78fb0:string:2018-01-30", + countryOfFinalDestination: "054ea1a5-37ae-4625-b8bf-d2ac43ddfcf2:string:CHINA", + outgoingVehicleNo: "11ac7f5b-2839-4d27-b4fb-7ac77acb36c7:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "1954f051-1fde-4288-8468-5020dcc883a6:string:PETER LEE", + designation: "07ff6d5c-40e5-496d-86fd-704866dc8e06:string:SHIPPING MANAGER", + date: "3873ff50-223f-41d0-b37c-6572328594ae:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "cce7bd33bd80b746b71e943e23ddc88fcb99c9011becdd1b4d8b7ab9567d2adb", + proof: [], + merkleRoot: "cce7bd33bd80b746b71e943e23ddc88fcb99c9011becdd1b4d8b7ab9567d2adb", + }, + proof: [ + { + created: "2021-03-25T07:52:31.291Z", + type: "OpenAttestationSignature2018", + proofPurpose: "assertionMethod", + verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + signature: + "0xff0227ce8400a17a2d80073a95fd895f4fed0011954c90eef389bc618087a4b36ed958775420d122e9a6764c6ffe9d3302d4f45fb065d5e962c3572d3872f31a1c", + }, + ], +}; diff --git a/test/fixtures/v2/documentDnsDidMixedTokenRegistry.ts b/test/fixtures/v2/documentDnsDidMixedTokenRegistry.ts new file mode 100644 index 0000000..611ed4b --- /dev/null +++ b/test/fixtures/v2/documentDnsDidMixedTokenRegistry.ts @@ -0,0 +1,146 @@ +export const documentDnsDidMixedTokenRegistryInvalid: any = { + version: "https://schema.openattestation.com/2.0/schema.json", + data: { + id: "9786e905-b7b4-4350-bd03-c24d3cd126f7:string:SGCNM21566325", + $template: { + name: "a0414285-7a0a-4ee0-abc9-f5a747956cac:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "1b4c544b-38fb-4198-8a47-0cbedc8912e4:string:EMBEDDED_RENDERER", + url: "2931df4d-275b-4306-b1c2-2dfe63a07b8b:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + id: "4b5696c5-1a16-4d5a-8b3b-34a3c9e77d48:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + name: "12d16f53-cabc-4a05-b754-a7b6e19541bb:string:DEMO STORE", + revocation: { type: "f616b59c-10d4-4321-b3c5-8a68b6cde69e:string:NONE" }, + identityProof: { + type: "30260b01-59ea-4f98-9ac8-f01e7a2fdb3b:string:DNS-DID", + key: + "fde9b540-0e21-4a22-a055-d0238c226911:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + location: "600bf394-130b-4440-a294-3c838e6b4dd4:string:example.com", + }, + }, + { + name: "eded8bed-d5d2-4d4a-993f-f347d1d27523:string:DEMO STORE", + tokenRegistry: "5768a07f-5dd0-4432-9a06-17f0e6e24c89:string:0x9178F546D3FF57D7A6352bD61B80cCCD46199C2d", + identityProof: { + type: "827202b9-fe95-420b-a7fe-e8c9eb02a673:string:DNS-TXT", + location: "68a2c24c-14e6-4bf4-8f59-8cac38067bfe:string:tradetrust.io", + }, + }, + ], + recipient: { + name: "38aa1bad-4b94-4ac0-84c2-dab180cde903:string:SG FREIGHT", + address: { + street: "56f34fcb-db0b-4110-b118-55612a68b6c2:string:101 ORCHARD ROAD", + country: "08ea59a8-af0a-4d8f-a61b-b10801c560af:string:SINGAPORE", + }, + }, + consignment: { + description: "589cc4bb-1c64-4f17-8874-45455e0a7c6e:string:16667 CARTONS OF RED WINE", + quantity: { + value: "a76dcc2b-ed0e-4a7e-bc58-5009eecbbc64:number:5000", + unit: "fd4b29b2-2c6c-4f1a-8357-cec57d66df6c:string:LITRES", + }, + countryOfOrigin: "fed2ff09-944b-422f-b596-ec76aaee7316:string:AUSTRALIA", + outwardBillNo: "8679db7b-1830-4319-b0ba-14ca508ffa4c:string:AQSIQ170923130", + dateOfDischarge: "c7076463-9dbe-4294-ae34-3f97e372ee93:string:2018-01-26", + dateOfDeparture: "19e1e5f1-af19-4d48-a21d-63b678e4478c:string:2018-01-30", + countryOfFinalDestination: "9c09a0cc-35b1-4a6d-91d1-7a3454b6c1c1:string:CHINA", + outgoingVehicleNo: "48189627-95be-4409-8d2d-cebb8f2ec2fb:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "36a654a2-d668-46b5-9ed5-5a7de35c3d9a:string:PETER LEE", + designation: "64559706-cc9e-464d-8d2e-9a46ecf7ad40:string:SHIPPING MANAGER", + date: "ebd98e6b-3541-46a2-9237-245dae5b74d7:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "ee1548c091767b09be53a54e576341d8fd07d1ba3fb17873ad334e22f4a28dcc", + proof: [], + merkleRoot: "ee1548c091767b09be53a54e576341d8fd07d1ba3fb17873ad334e22f4a28dcc", + }, + proof: [ + { + type: "OpenAttestationSignature2018", + proofPurpose: "assertionMethod", + verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + signature: + "0xd05bb71bdb6f78451e2d12851825421666c6c5e355f516325ce5002a0586f89f6ebbd465227bec59c745dd26918dd8dab9122dcd398256d8e487e0ecf82a53421b", + }, + ], +}; + +export const documentDnsDidMixedTokenRegistryValid: any = { + version: "https://schema.openattestation.com/2.0/schema.json", + data: { + id: "7746e414-5b1e-4497-b3f2-ae30a1d766ca:string:SGCNM21566325", + $template: { + name: "10a917b1-b8da-4daa-b115-19571c233102:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "31524d9c-f406-4a93-affe-617b7ccbabb9:string:EMBEDDED_RENDERER", + url: "a503fb11-4cdd-4ef6-8381-7092857a321b:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + id: "c6b0f1f7-1e1d-47b4-9eb6-8db9d072b144:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + name: "df597fac-5886-42e5-9859-822bfc897fea:string:DEMO STORE", + revocation: { type: "a13d5e6d-b566-446e-aab9-ce18901199bb:string:NONE" }, + identityProof: { + type: "f06b7de2-b0a0-4f8a-ae9f-5d3b57996222:string:DNS-DID", + key: + "6848a56a-927b-4b78-a028-1f749950b431:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + location: "5aed1f89-5dec-4296-aa5f-41902c344312:string:example.tradetrust.io", + }, + }, + { + name: "61c8f21a-1d24-4ed6-b12f-8cce0f85a1a7:string:DEMO STORE", + tokenRegistry: "c256d47c-efd5-4b84-8b55-9f6f97dd8c88:string:0x9178F546D3FF57D7A6352bD61B80cCCD46199C2d", + identityProof: { + type: "2d0551a9-ffa1-44ec-8ef2-6e2cb3baf276:string:DNS-TXT", + location: "fa306803-4a9d-4959-9bc6-8379d27760a0:string:tradetrust.io", + }, + }, + ], + recipient: { + name: "441e25a8-adc0-4d9f-a57d-43a7acf44c63:string:SG FREIGHT", + address: { + street: "f3c69786-b96f-4806-ac3d-748d039bfb80:string:101 ORCHARD ROAD", + country: "22370452-6a31-4189-bc6d-1b1b7ac5bc45:string:SINGAPORE", + }, + }, + consignment: { + description: "5018b9f8-a92b-48e1-85e7-11fbdde783cc:string:16667 CARTONS OF RED WINE", + quantity: { + value: "583b8fd8-fca5-4575-b957-9e21b8b32b5b:number:5000", + unit: "51a5552c-4ea0-4b47-bbba-c633e9a27c51:string:LITRES", + }, + countryOfOrigin: "e11325d6-d527-4887-a81e-eba9526829e0:string:AUSTRALIA", + outwardBillNo: "26c55eb5-11d4-487f-b96a-5f0dd460fb09:string:AQSIQ170923130", + dateOfDischarge: "0ee92f67-d538-4ec3-9794-2f3b37e964fa:string:2018-01-26", + dateOfDeparture: "6063d2b6-fda2-42d8-9780-e7d73ef97109:string:2018-01-30", + countryOfFinalDestination: "ab979384-cd78-4f4e-b0ec-9235993515d8:string:CHINA", + outgoingVehicleNo: "d4e7d1da-3adb-456c-a203-3df9f78ae23e:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "a07d1811-57ce-48fb-a2b8-ca33c63610f2:string:PETER LEE", + designation: "a6153112-5299-43ae-9752-e34e37c63d13:string:SHIPPING MANAGER", + date: "505b1345-1413-4fff-ad33-4f5c1f26688e:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "3795511eabef18fa494b20e4634f8a138bf69376eaf42dedd29766bf3d47d703", + proof: [], + merkleRoot: "3795511eabef18fa494b20e4634f8a138bf69376eaf42dedd29766bf3d47d703", + }, + proof: [ + { + created: "2021-03-25T07:52:31.291Z", + type: "OpenAttestationSignature2018", + proofPurpose: "assertionMethod", + verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + signature: + "0xd05bb71bdb6f78451e2d12851825421666c6c5e355f516325ce5002a0586f89f6ebbd465227bec59c745dd26918dd8dab9122dcd398256d8e487e0ecf82a53421b", + }, + ], +}; diff --git a/test/fixtures/v2/documentDnsDidNoDnsTxt.ts b/test/fixtures/v2/documentDnsDidNoDnsTxt.ts new file mode 100644 index 0000000..ecb6139 --- /dev/null +++ b/test/fixtures/v2/documentDnsDidNoDnsTxt.ts @@ -0,0 +1,65 @@ +export const documentDnsDidNoDnsTxt: any = { + version: "https://schema.openattestation.com/2.0/schema.json", + data: { + id: "e3c28bb6-2d76-4fb4-9ee1-05a41afe9c42:string:SGCNM21566325", + $template: { + name: "80c3721b-9a53-45d6-a640-c880208dd479:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "87940099-cea2-4ce6-a4cf-6afe995b82cb:string:EMBEDDED_RENDERER", + url: "bd983975-4c48-4a24-bb45-d4eaf933b010:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + id: "13657cb7-f8c2-4742-8d75-2c6c728d5cfd:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + name: "b735c8da-dfe5-4e8b-8fca-d668ca7109c8:string:DEMO STORE", + revocation: { type: "adec602e-b8a1-49c6-b0d6-1c10022e0ee3:string:NONE" }, + identityProof: { + type: "35a65289-4ca0-4e73-ab7e-c4d50949c186:string:DNS-DID", + key: + "37f0906b-0c43-4ce4-80d3-e239b79ef087:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + location: "cf6df0b9-daca-4998-bb77-86b251d23f36:string:example.com", + }, + }, + ], + recipient: { + name: "bea2a061-fdfd-46dc-aeae-dbd860d9d995:string:SG FREIGHT", + address: { + street: "f71591ee-e700-482b-b4ff-048c1810ebdf:string:101 ORCHARD ROAD", + country: "c59b4c56-48fe-49e0-810b-1fa7981d58f9:string:SINGAPORE", + }, + }, + consignment: { + description: "dcc4063e-ad49-422b-980f-ccf52d3c98a6:string:16667 CARTONS OF RED WINE", + quantity: { + value: "5e1accca-a1a7-44a0-8604-e54acf2442b7:number:5000", + unit: "ec669ca1-d892-432b-8251-a27137a4b5ec:string:LITRES", + }, + countryOfOrigin: "a2f88c34-aaec-416b-868d-de3488f34d63:string:AUSTRALIA", + outwardBillNo: "0c774978-b299-4c1f-836c-ac6aaa7caeba:string:AQSIQ170923130", + dateOfDischarge: "602a8488-1466-4c2b-b2f9-1357d90b09a5:string:2018-01-26", + dateOfDeparture: "417cbf7e-da31-4ee5-8592-f3ae06217e04:string:2018-01-30", + countryOfFinalDestination: "183de2df-8df8-4e51-8ef9-36908da7f1ce:string:CHINA", + outgoingVehicleNo: "7925a245-79a3-47bb-b09e-050796f4abdf:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "e7220c86-0ca5-4a90-8536-311952ac82df:string:PETER LEE", + designation: "ddfb2c03-2657-4543-bcc5-a95f95189074:string:SHIPPING MANAGER", + date: "261243b3-2124-49b3-8601-5a66fe448be7:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "4fafb6ff912d651c32cf30ebd8163b3fb95c789120800458b8214e16efabe517", + proof: [], + merkleRoot: "4fafb6ff912d651c32cf30ebd8163b3fb95c789120800458b8214e16efabe517", + }, + proof: [ + { + created: "2021-03-25T07:52:31.291Z", + type: "OpenAttestationSignature2018", + proofPurpose: "assertionMethod", + verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + signature: + "0xd05bb71bdb6f78451e2d12851825421666c6c5e355f516325ce5002a0586f89f6ebbd465227bec59c745dd26918dd8dab9122dcd398256d8e487e0ecf82a53421b", + }, + ], +}; diff --git a/test/fixtures/v2/documentDnsDidSigned.ts b/test/fixtures/v2/documentDnsDidSigned.ts new file mode 100644 index 0000000..5024a90 --- /dev/null +++ b/test/fixtures/v2/documentDnsDidSigned.ts @@ -0,0 +1,71 @@ +export const documentDnsDidSigned: any = { + version: "https://schema.openattestation.com/2.0/schema.json", + data: { + id: "9e311b70-979d-4728-af5a-e37c777cbbfd:string:SGCNM21566325", + $template: { + name: "1ecc233b-d3e4-431d-9cfb-14f080b5576e:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "9f27a50f-158a-4286-b4d9-92a7ae13be30:string:EMBEDDED_RENDERER", + url: "09263ccd-e804-4d07-9582-0646600c69e2:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + id: "140c686a-4017-421c-a5e9-fdb07c1accd0:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + name: "6c0c26dc-f744-4af6-9ccc-ab2f67248e1b:string:DEMO STORE", + revocation: { + type: "7432f2cc-00d8-4c58-a5d0-f922f21c8614:string:REVOCATION_STORE", + location: "dbe5fb41-b2a5-47bd-85d1-fea9d1b4caef:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", + }, + identityProof: { + type: "0c12407d-31a4-4a4e-839e-f5f8bb77c317:string:DNS-DID", + key: + "1949b9e6-7dc2-49c8-bf07-e88931ceef59:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + location: "0259c7c5-b373-467c-95f9-a63b8be53b13:string:demo-tradetrust.openattestation.com", + }, + }, + ], + recipient: { + name: "779ac49c-fa53-4c8c-abdf-95996303ceca:string:AUS FREIGHT", + address: { + street: "daf7f3c9-cd36-4346-bd8b-136e6947042a:string:101 APPLE ROAD", + country: "0092049b-7f24-41da-be58-98c12a8e54b6:string:AUSTRALIA", + }, + }, + consignment: { + description: "e8d63dc8-336b-47ed-8c32-f885a13bb3f9:string:16667 CARTONS OF RED WINE", + quantity: { + value: "ffe30ea1-0926-4689-9808-5a5d1e95bd26:string:5000", + unit: "e33096b6-a55d-42f3-82fd-afd79c5a21a6:string:LITRES", + }, + countryOfOrigin: "3b9ee621-df41-440c-82d9-b7aed1e06db1:string:AUSTRALIA", + outwardBillNo: "a7af0df6-b3bd-477d-887a-05bcd0e53e04:string:AQSIQ170923150", + dateOfDischarge: "85e1e2be-1f7d-43de-987d-810a8371eb04:string:2018-01-26", + dateOfDeparture: "96afa038-4f13-4dd4-b4e8-12adf1a261c2:string:2018-01-30", + countryOfFinalDestination: "80e2c732-c59f-4f94-88a7-5f6c575eda3b:string:CHINA", + outgoingVehicleNo: "b3f98636-2c62-40ab-bfa4-8b3f414068f6:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "ed764112-16fa-4627-9541-7cd99ddc2ca3:string:PETER LEE", + designation: "cf9221f7-4861-446a-a554-3efb54edeff3:string:SHIPPING MANAGER", + date: "e7c1b037-56f4-45ec-9903-3c2dd330d39f:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "a428e123d99b68a76228f8d5255e27e9d158147767ad3e54e9ef2fe117a2b446", + proof: [ + "2328c806fcc07f91df394965e0050130089882f7e1059747859387a38e5a6542", + "4ddcee582f5ea9e24c1c4983fb365714dc444ba15e89d76eb05cd87886a92732", + ], + merkleRoot: "3752f29527952e7ccc6bf4da614d80f2fec9e5bd8b71adf10beb4e6763e6c233", + }, + proof: [ + { + type: "OpenAttestationSignature2018", + created: "2022-10-27T07:52:38.199Z", + proofPurpose: "assertionMethod", + verificationMethod: "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + signature: + "0x0cc602d746237f445af62a32aeb8e93701a96600b450d8b02005ec230d88351e40f89b31f8e0b13df35175cfd1321862098ce4aa34ed0686738f5322e9fea97e1c", + }, + ], +}; diff --git a/test/fixtures/v2/documentGoerliNotIssuedTokenRegistry.ts b/test/fixtures/v2/documentGoerliNotIssuedTokenRegistry.ts new file mode 100644 index 0000000..a56a3ca --- /dev/null +++ b/test/fixtures/v2/documentGoerliNotIssuedTokenRegistry.ts @@ -0,0 +1,82 @@ +import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; + +interface CustomDocument extends v2.OpenAttestationDocument { + recipient: { + name: string; + address: { + street: string; + country: string; + }; + }; + consignment: { + description: string; + quantity: { + value: string; + unit: string; + }; + countryOfOrigin: string; + outwardBillNo: string; + dateOfDischarge: string; + dateOfDeparture: string; + countryOfFinalDestination: string; + outgoingVehicleNo: "string"; + }; + declaration: { + name: string; + designation: string; + date: string; + }; +} + +export const documentGoerliNotIssuedTokenRegistry: WrappedDocument = { + version: SchemaId.v2, + data: { + id: "9b6c8095-0050-4624-a899-05562cf87849:string:SGCNM21566325", + $template: { + name: "8297569b-f29a-41d6-8d09-69d28ed564a8:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "0b383315-4945-42d3-96a9-b610073ad940:string:EMBEDDED_RENDERER", + url: "048f1a2d-ac9b-4ceb-b6fa-15cbbe58f246:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + name: "697c685c-076e-4e15-841c-547b22801289:string:DEMO STORE", + tokenRegistry: "73773f41-579c-4ad6-8fa1-91c53915c684:string:0x921dC7cEF00155ac3A33f04DA7395324d7809757", + identityProof: { + type: "57cb7721-e760-433b-ad9c-89ecba31b150:string:DNS-TXT", + location: "b5b7ed81-4892-4c44-babe-7f1e22e2359c:string:demo-tradetrust.openattestation.com", + }, + }, + ], + recipient: { + name: "7e6868ec-5478-4566-bfa8-8044574df289:string:SG FREIGHT", + address: { + street: "c1fd89ae-25a3-4092-bb60-97f1d25f41a6:string:101 ORCHARD ROAD", + country: "f3595865-c6f2-48b9-abfb-ec43ae8cb971:string:SINGAPORE", + }, + }, + consignment: { + description: "8a17256a-465c-4db6-a6bb-da6f6be053d1:string:16667 CARTONS OF RED WINE", + quantity: { + value: "5e5458f0-e906-48b7-a530-92cf5adddd64:string:5000", + unit: "28334a58-3a6f-4c16-a454-ca3521283c38:string:LITRES", + }, + countryOfOrigin: "0c73c19b-3b96-49db-9dd5-5c1ec976ba70:string:AUSTRALIA", + outwardBillNo: "00298c54-14c6-4fe3-b9c1-4ee394708826:string:AQSIQ170923130", + dateOfDischarge: "dff609a1-dcad-4e4c-8172-b564a783aa18:string:2018-01-26", + dateOfDeparture: "b5d4cebe-e86c-44bf-88ae-08934e89df6c:string:2018-01-30", + countryOfFinalDestination: "ac044b08-3b96-49bc-979d-e43d178e46ce:string:CHINA", + outgoingVehicleNo: "f2835d1a-60bd-4616-bffd-26478185a7a1:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "8f9e1c71-1650-41f9-b6e7-88c18cde1813:string:PETER LEE", + designation: "6540be75-acb8-4549-be18-4edefa8b000d:string:SHIPPING MANAGER", + date: "cf301a47-fff7-48b0-893d-d00ca6be04e0:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "d87b75bed186f8320a344130a89f91092e91115c5095f49dbc8e1aa3c5ad64f9", + proof: [], + merkleRoot: "d87b75bed186f8320a344130a89f91092e91115c5095f49dbc8e1aa3c5ad64f9", + }, +}; diff --git a/test/fixtures/v2/documentGoerliObfuscated.ts b/test/fixtures/v2/documentGoerliObfuscated.ts new file mode 100644 index 0000000..7126ae8 --- /dev/null +++ b/test/fixtures/v2/documentGoerliObfuscated.ts @@ -0,0 +1,94 @@ +import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; + +interface CustomDocument extends v2.OpenAttestationDocument { + billFrom: any; + billTo: { + company: any; + email: string; + }; + links: { + self: { + href: string; + }; + }; + network: { + chain: string; + chainId: string; + }; + date: string; + customerId: string; + terms: string; + subtotal: string; + tax: string; + taxTotal: string; + total: string; +} +export const documentGoerliObfuscated: WrappedDocument = { + version: SchemaId.v2, + data: { + billFrom: { + name: "0482dac7-db36-45b2-ad59-8c2853bcbd33:string:acdc", + streetAddress: "a692611b-111d-45b2-a0b9-d2d33a9009f6:string:abxc", + city: "d2fce47b-bd92-4cdf-9024-7c76fe114c37:string:asdf", + postalCode: "0d987517-4044-43b1-8178-ec80e72e6c33:string:asdf", + }, + billTo: { + company: { + name: "09dceb13-bcc5-4269-9812-44fcd274216b:string:avcx", + city: "701f6beb-80ec-48f1-a518-af1aab7e1964:string:eee", + }, + email: "46a48838-2a6a-4741-a4a2-b64189b6616e:string:b@gmail.com", + }, + $template: { + type: "14a8a819-72dd-46b7-bfae-1b25ea43e4c7:string:EMBEDDED_RENDERER", + name: "c77f3848-4eea-45a6-97af-4a3b2e7b8c71:string:INVOICE", + url: "153fa998-12da-4f76-999d-b550b75277be:string:https://generic-templates.tradetrust.io", + }, + issuers: [ + { + name: "0e64dcbe-986e-47fc-a334-ebd844572a29:string:Demo Issuer", + documentStore: "04e43d7e-7ffa-4bdd-af78-be0a7ff9e9b7:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", + identityProof: { + type: "c43706cf-b681-4593-9076-8e0aeb156e48:string:DNS-TXT", + location: "24696096-730e-41b0-a3ff-40df8e5b0f11:string:demo-tradetrust.openattestation.com", + }, + revocation: { + type: "9b0b3348-cb8e-4f05-bd0b-5ec603e48422:string:NONE" as v2.RevocationType, + }, + }, + ], + id: "53568df3-3254-4950-ad52-3b3bf858f3aa:string:1234567", + date: "f40b8540-1da3-477a-aaa8-234dd283bee4:string:2022-10-05", + customerId: "9bb1cec7-9892-42da-a40b-d89d6617faf0:string:43123", + terms: "dbad7460-9b8c-4572-ac22-2eb403ead732:string:Best Customer", + subtotal: "bc2a28fa-71f8-4f08-83de-8f2c6b01de62:string:werew", + tax: "8f5246f3-e6c9-4d22-aaed-c440bb3ef64d:string:were", + taxTotal: "a24178d2-6390-4f20-baa7-c7a0817510ca:string:ewerd", + total: "b3f99049-89ba-41fc-8087-0d1003da4c32:string:sdf", + links: { + self: { + href: + "8252ae56-0bb0-4937-ba16-b03170553f07:string:https://action.openattestation.com?q=%7B%22type%22%3A%22DOCUMENT%22%2C%22payload%22%3A%7B%22uri%22%3A%22https%3A%2F%2Ftradetrust-functions.netlify.app%2F.netlify%2Ffunctions%2Fstorage%2F65e44a7c-264f-4b6d-8719-bb9401de1f9c%22%2C%22key%22%3A%225d18dc966ca159297b036b1ac6757d74aaf9fa6c4973b99fd164bfec9490d75b%22%2C%22permittedActions%22%3A%5B%22STORE%22%5D%2C%22redirect%22%3A%22https%3A%2F%2Fdev.tradetrust.io%2F%22%2C%22chainId%22%3A%225%22%7D%7D", + }, + }, + network: { + chain: "55276dc8-ac7f-49db-beb7-dacdb0ecad41:string:ETH", + chainId: "0ebd6e85-2228-4294-945a-83ede1a537ff:string:5", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "d87a560204a69bb9c0f495b66f6481ce566e2a639935ae07af131d0c7dcbac90", + proof: [], + merkleRoot: "d87a560204a69bb9c0f495b66f6481ce566e2a639935ae07af131d0c7dcbac90", + }, + privacy: { + obfuscatedData: [ + "edad95328cb21cc7d4de6f7b4733e1102bd481ff43ddc095e9fe2541db2cd203", + "bfec4cb3960209b066ba9a3f3bde05762916e100dd9abf89a37a0a6113fdf760", + "b6ba37889b18f66810a5db577d73d3ca16112a43bfb76a7865175dd85fdeff7b", + "8753e0563b0f3f12a97a61c5c1f0bc404c4238552726c120938ce40065706628", + "e21d49f3c53eb9100c6534a08ddb6fbd19e694e3e3c8b0a3adcecfd41eb43cf8", + ], + }, +}; diff --git a/test/fixtures/v2/documentGoerliRevokedWithDocumentStore.ts b/test/fixtures/v2/documentGoerliRevokedWithDocumentStore.ts new file mode 100644 index 0000000..21b15c3 --- /dev/null +++ b/test/fixtures/v2/documentGoerliRevokedWithDocumentStore.ts @@ -0,0 +1,92 @@ +import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; + +interface CustomDocument extends v2.OpenAttestationDocument { + billFrom: any; + billTo: { + company: any; + name: string; + email: string; + }; + links: { + self: { + href: string; + }; + }; + network: { + chain: string; + chainId: string; + }; + date: string; + customerId: string; + terms: string; + subtotal: string; + tax: string; + taxTotal: string; + total: string; +} + +export const documentGoerliRevokedWithDocumentStore: WrappedDocument = { + version: SchemaId.v2, + data: { + billFrom: { + name: "d8a6ba1a-70b0-4bd0-94f7-1e60e6a97793:string:acdc", + streetAddress: "17655fc2-6d53-427f-8319-7ad8e76f9e5e:string:abxc", + city: "474ae8f6-c2a4-40e2-957a-44445b62aee6:string:asdf", + postalCode: "858506ab-1cb6-4ea6-b15f-cdf46e9d4359:string:asdf", + phoneNumber: "2301a5bc-ad7e-4b75-b9ab-3d4e91af3a62:string:89482323", + }, + billTo: { + company: { + name: "b8478913-1096-42ba-96f9-2e827e5a1b3d:undefined:undefined", + streetAddress: "61e3ec46-f9ab-4001-a3df-bb5d070ea877:undefined:undefined", + city: "3f7243a2-47ad-42a8-9d95-3f5bb572e9b8:undefined:undefined", + postalCode: "0cd42903-7a8d-413d-a297-e78893b525a6:undefined:undefined", + phoneNumber: "f5aa5a8f-1619-4193-9985-ff610e4cfcef:undefined:undefined", + }, + name: "f0c16fca-a59a-4760-a25f-387635af3192:string:butter", + email: "0d0d2442-d520-4c54-aec6-e7263aa184f7:string:b@gmail.com", + }, + $template: { + type: "d8bbf449-8a40-420a-a675-1e91add264e9:string:EMBEDDED_RENDERER", + name: "6e66e30d-ef29-41e3-b3f1-517db214901d:string:INVOICE", + url: "5142eaf5-0a27-4d92-a925-1bb0307fc8b3:string:https://generic-templates.tradetrust.io", + }, + issuers: [ + { + name: "8c9ccf0d-107b-4568-87d9-868c2fcf24b9:string:Demo Issuer", + documentStore: "cdbcfda6-2eb9-4e19-9bb9-b86161914ca7:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", + identityProof: { + type: "9487502b-0be7-4be9-be3f-ee7cb6582584:string:DNS-TXT", + location: "71555492-8db6-4068-a8c8-2cca4bd7d6e7:string:demo-tradetrust.openattestation.com", + }, + revocation: { + type: "073b40d8-bfbe-4b57-b483-bcb4e212c472:string:NONE" as v2.RevocationType, + }, + }, + ], + id: "ab719e3a-24d1-46cc-bdff-f5284ebcb42f:string:1234567", + date: "7071426a-bb95-4352-8025-cba2c60e4e76:string:2022-10-05", + customerId: "0b8c36fd-9156-47b0-b329-928de93d2e08:string:43123", + terms: "99a2dbd9-a90c-4571-823b-7475bc38585a:string:Best Customer", + subtotal: "8c18b95f-73ae-426e-9a6a-cc428b9563de:undefined:undefined", + tax: "e6bdd02e-ffb7-46cb-9cfc-bdc607bfd64d:undefined:undefined", + taxTotal: "2d49b39d-c490-4ff4-a723-1e1b68d42661:undefined:undefined", + total: "d65c69f7-7a5a-4e4d-b8b3-2ec3cf5a3b03:undefined:undefined", + links: { + self: { + href: + "313a2de3-43b8-41be-afc3-59011421f76c:string:https://action.openattestation.com?q=%7B%22type%22%3A%22DOCUMENT%22%2C%22payload%22%3A%7B%22uri%22%3A%22https%3A%2F%2Ftradetrust-functions.netlify.app%2F.netlify%2Ffunctions%2Fstorage%2F23a6f749-fdc3-4a7c-9733-87b023c27c7b%22%2C%22key%22%3A%22703f5f5d796c5a39bfcea5682fbca440df21c341462233008e3be5bab475ee49%22%2C%22permittedActions%22%3A%5B%22STORE%22%5D%2C%22redirect%22%3A%22https%3A%2F%2Fdev.tradetrust.io%2F%22%2C%22chainId%22%3A%225%22%7D%7D", + }, + }, + network: { + chain: "dd0e5db4-27a3-4e64-8678-82b47d408f69:string:ETH", + chainId: "52289b91-ffa0-46bf-85c7-7ab8d483b24d:string:5", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "6a6c94352e6327437970a41126c041a83cec0fe684b13045991942ea67fca554", + proof: [], + merkleRoot: "6a6c94352e6327437970a41126c041a83cec0fe684b13045991942ea67fca554", + }, +}; diff --git a/test/fixtures/v2/documentGoerliValidWithDocumentStore.ts b/test/fixtures/v2/documentGoerliValidWithDocumentStore.ts new file mode 100644 index 0000000..8caf1df --- /dev/null +++ b/test/fixtures/v2/documentGoerliValidWithDocumentStore.ts @@ -0,0 +1,65 @@ +import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; + +interface CustomDocument extends v2.OpenAttestationDocument { + recipient: { + name: string; + address: { + street: string; + country: string; + }; + }; + consignment: any; + declaration: any; +} +export const documentGoerliValidWithDocumentStore: WrappedDocument = { + version: SchemaId.v2, + data: { + id: "64158d51-eafe-4729-9906-9d6c30d316e3:string:SGCNM21566325", + $template: { + name: "a86bd538-8e50-4ce8-a399-ac7ae1e55279:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "7d1d7b85-3d49-4516-9fb7-d58f6840017a:string:EMBEDDED_RENDERER", + url: "b52c809d-bbc2-426c-94d2-a1a0b1a26982:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + name: "907a1495-7c10-43cb-8aab-54e3ad8fefea:string:DEMO STORE", + documentStore: "38229e0e-9ae6-401f-a80e-8a6c2166a42a:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", + identityProof: { + type: "7efb0791-788b-425c-b16d-4b6de3da428c:string:DNS-TXT", + location: "73b5c847-99f8-44f2-ba8d-1a0f36cc9c6f:string:demo-tradetrust.openattestation.com", + }, + }, + ], + recipient: { + name: "2d74acae-9ede-4b1a-83ed-3b3347a89475:string:SG FREIGHT", + address: { + street: "81ac9def-b249-4b0e-ac41-4905a364dee0:string:101 ORCHARD ROAD", + country: "dd94c51b-1567-4f33-81dd-a4266558a46b:string:SINGAPORE", + }, + }, + consignment: { + description: "ec926c9f-7ba5-4ee2-8bb1-c5e8a503f14c:string:16667 CARTONS OF RED WINE", + quantity: { + value: "d5f4854f-6aa2-4d5d-bca3-625f04f7e782:string:5000", + unit: "bb2432e2-3487-4fbd-8c7e-ee9ba01c87e5:string:LITRES", + }, + countryOfOrigin: "2bfbb0c3-8da0-4aee-9859-030399ed8d1d:string:AUSTRALIA", + outwardBillNo: "a1c730a9-a9c8-46e0-b50a-b3af5ebce1bc:string:AQSIQ170923130", + dateOfDischarge: "8a53a611-ab41-426a-94cf-895211ea81f2:string:2018-01-26", + dateOfDeparture: "905f5dfd-00ae-498f-8622-1c11118b52d9:string:2018-01-30", + countryOfFinalDestination: "a90adff1-7156-406c-81b5-2820bd32813d:string:CHINA", + outgoingVehicleNo: "8a5a76bb-0879-4775-9436-ad41c5e4114d:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "2ed2103d-a0b0-4eac-b22f-e69b37b4b669:string:PETER LEE", + designation: "1e3008e3-bbed-486c-a0dd-1b5630c0964c:string:SHIPPING MANAGER", + date: "e6c1ec4a-e8ad-49b9-a1dc-98c60953fbc9:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "9ece474bfd087cf3fc2e7fcf62f82af22cd8ae6a68ff40d7992b6335399309b4", + proof: [], + merkleRoot: "9ece474bfd087cf3fc2e7fcf62f82af22cd8ae6a68ff40d7992b6335399309b4", + }, +}; diff --git a/test/fixtures/v2/documentGoerliValidWithToken.ts b/test/fixtures/v2/documentGoerliValidWithToken.ts new file mode 100644 index 0000000..08d8805 --- /dev/null +++ b/test/fixtures/v2/documentGoerliValidWithToken.ts @@ -0,0 +1,67 @@ +import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; + +interface CustomDocument extends v2.OpenAttestationDocument { + recipient: { + name: string; + address: { + street: string; + country: string; + }; + }; + consignment: any; + declaration: any; +} + +export const documentGoerliValidWithToken: WrappedDocument = { + version: SchemaId.v2, + schema: "tradetrust/1.0", + data: { + id: "b4b7735f-d839-4b61-8562-682c118620ca:string:SGCNM21566325", + $template: { + name: "cdbd9bf8-db70-40ef-a660-04d1446192e0:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "d02fda95-451d-4b49-a438-bb4174d26d1b:string:EMBEDDED_RENDERER", + url: "cbf5c211-a5df-4d69-a6e4-062d3062fbae:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + name: "60db3167-d701-4580-b4e6-7ec278c1a4e4:string:DEMO STORE", + tokenRegistry: "241d39b4-fcfb-4ee4-9b61-6cc9ef58a862:string:0x921dC7cEF00155ac3A33f04DA7395324d7809757", + identityProof: { + type: "d3417093-acc8-4077-a087-c2d1368e9e0b:string:DNS-TXT", + location: "53b7dd38-15a4-4430-bed2-f0b39f85dbf1:string:demo-tradetrust.openattestation.com", + }, + }, + ], + recipient: { + name: "2647df56-1645-4790-8117-c0a7ac4fbb17:string:SG FREIGHT", + address: { + street: "484606d0-7d3a-4b50-8afc-dbf11e62bdb3:string:101 ORCHARD ROAD", + country: "d34931c4-c9f7-4c02-b0a0-a64d138e9fa1:string:SINGAPORE", + }, + }, + consignment: { + description: "66a5360a-e6d4-4a57-8852-094c32d3cfe0:string:16667 CARTONS OF RED WINE", + quantity: { + value: "680a3958-3ca6-4e7d-9bc2-18739cc97a89:string:5000", + unit: "3ffedb5f-79b0-4630-b512-4a74713f4518:string:LITRES", + }, + countryOfOrigin: "da7eacec-70c7-4f78-afd9-28bdfc33b29e:string:AUSTRALIA", + outwardBillNo: "4fdf53a9-03e1-4bf4-8cd6-e79561c78252:string:AQSIQ170923130", + dateOfDischarge: "a1c27be0-2558-45bc-9083-68522489364e:string:2018-01-26", + dateOfDeparture: "062a1194-66ff-4006-a21d-6afcea605c32:string:2018-01-30", + countryOfFinalDestination: "90492aeb-f6f9-4ffc-8421-49976256f60b:string:CHINA", + outgoingVehicleNo: "f4b92304-6202-4c59-83e4-9f3d3ca9119b:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "4b62946c-2fe5-49ed-b5cb-bf6e7f58e7a2:string:PETER LEE", + designation: "1f877dba-9e25-4eac-84af-5bfabbeb890a:string:SHIPPING MANAGER", + date: "43cf2bbc-e022-4c7d-b973-6e7057c94c8d:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "01c8d28b49c21a664befab9d63981f029e28468b49b73ec04b35748b08911544", + proof: [], + merkleRoot: "01c8d28b49c21a664befab9d63981f029e28468b49b73ec04b35748b08911544", + }, +}; diff --git a/test/fixtures/v2/documentMainnetInvalidWithIncorrectMerkleRoot.ts b/test/fixtures/v2/documentMainnetInvalidWithIncorrectMerkleRoot.ts new file mode 100644 index 0000000..f02baf4 --- /dev/null +++ b/test/fixtures/v2/documentMainnetInvalidWithIncorrectMerkleRoot.ts @@ -0,0 +1,79 @@ +import { v2, WrappedDocument, SchemaId } from "@tradetrust-tt/tradetrust"; + +interface CustomDocument extends v2.OpenAttestationDocument { + recipient: { + name: string; + address: { + street: string; + country: string; + }; + }; + certification: any; + consignment: any; + declaration: any; +} +export const documentMainnetInvalidWithIncorrectMerkleRoot: WrappedDocument = { + version: SchemaId.v2, + schema: "tradetrust/v1.0", + data: { + id: "26e3bba1-7649-420e-a27e-f38fdbec3469:string:SGCNM21566325", + $template: { + name: "8fb7df2e-3ba1-479e-a355-5467d38bd52c:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "3ce0413d-9047-4a18-8789-7483632a512e:string:EMBEDDED_RENDERER", + url: "983fff6e-5385-4bd0-a635-c20a50c27691:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + name: "c1414e34-a87b-467c-946b-361edb0d426d:string:TradeTrust Demo", + documentStore: "7762001c-bf13-4ec3-b5a5-adcc149d039f:string:0x6d71da10Ae0e5B73d0565E2De46741231Eb247C7", + identityProof: { + type: "1416fc74-d941-4370-8cfb-88997097e309:string:DNS-TXT", + location: "f542bcfc-00fb-4926-9145-bc22adff4edb:string:demo.tradetrust.io", + }, + }, + ], + recipient: { + name: "9727b3c8-2d64-43ca-9fc4-9ce4ee7fa203:string:SG FREIGHT", + address: { + street: "ecf485df-8ff4-416e-bde2-63e1b6072e0a:string:101 ORCHARD ROAD", + country: "47929d19-ec95-4869-b6a4-c706ec50530a:string:SINGAPORE", + }, + }, + consignment: { + description: "eb8ef708-0335-4ece-8bbb-139b06f264e8:string:16667 CARTONS OF RED WINE", + quantity: { + value: "556317b3-1fb1-4334-a7d7-f88a7477d268:number:5000", + unit: "10c54e5a-4f7d-45d5-801b-c17787b2d770:string:LITRES", + }, + countryOfOrigin: "4b3d95fd-6aaf-4694-a994-8b4cc9f2eaa0:string:AUSTRALIA", + outwardBillNo: "cee74dbd-6117-490c-9bff-9665ea0cbabe:string:AQSIQ170923130", + dateOfDischarge: "b2b91700-a71f-44e0-ac7c-16ddbe1b5577:string:2018-01-26", + dateOfDeparture: "f3bb7427-86b4-4a75-adf6-a41c675a9f0f:string:2018-01-30", + countryOfFinalDestination: "4fdd92ba-2ec9-4eb3-9bde-2c167e957e12:string:CHINA", + outgoingVehicleNo: "4d9c9e3e-e844-4660-96c3-4a8bf07e22f2:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "882d9945-b2c1-4b22-ba82-3d9e049af588:string:PETER LEE", + designation: "370d8b2f-78ea-4235-ab91-e1a426deef91:string:SHIPPING MANAGER", + date: "92c1285c-71e8-4494-b082-ed29ff3668b9:string:2018-01-28", + }, + certification: { + name: "1a60ca05-c279-466e-8905-7e6ef4e6054e:string:DEMO JOHN TAN", + designation: "d75ff67f-b931-4161-84d8-6fd514d646a3:string:DEMO", + date: "ea2b71b1-e347-4074-8bdd-e95fee8297f0:string:2018-01-28", + }, + }, + privacy: { + obfuscatedData: [ + "323cf61a32c24a193aea9609caeeb5b5cf5d47a8fa1dbc8f67921f330dd406e5", + "f03cbac0ac3876ccb82e489140fc8a6cd93126f1d60161ae319558a25df985b7", + ], + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "61dc9186345e05cc2ae53dc72af880a3b66e2fa7983feaa6254d1518540de50a", + proof: [], + // merkleRoot's last 2 characters have been removed to make it even-length (62 char), but not 64 char + merkleRoot: "61dc9186345e05cc2ae53dc72af880a3b66e2fa7983feaa6254d1518540de5", + }, +}; diff --git a/test/fixtures/v2/documentMainnetInvalidWithOddLengthMerkleRoot.ts b/test/fixtures/v2/documentMainnetInvalidWithOddLengthMerkleRoot.ts new file mode 100644 index 0000000..679a819 --- /dev/null +++ b/test/fixtures/v2/documentMainnetInvalidWithOddLengthMerkleRoot.ts @@ -0,0 +1,79 @@ +import { v2, WrappedDocument, SchemaId } from "@tradetrust-tt/tradetrust"; + +interface CustomDocument extends v2.OpenAttestationDocument { + recipient: { + name: string; + address: { + street: string; + country: string; + }; + }; + certification: any; + consignment: any; + declaration: any; +} +export const documentMainnetInvalidWithOddLengthMerkleRoot: WrappedDocument = { + version: SchemaId.v2, + schema: "tradetrust/v1.0", + data: { + id: "26e3bba1-7649-420e-a27e-f38fdbec3469:string:SGCNM21566325", + $template: { + name: "8fb7df2e-3ba1-479e-a355-5467d38bd52c:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "3ce0413d-9047-4a18-8789-7483632a512e:string:EMBEDDED_RENDERER", + url: "983fff6e-5385-4bd0-a635-c20a50c27691:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + name: "c1414e34-a87b-467c-946b-361edb0d426d:string:TradeTrust Demo", + documentStore: "7762001c-bf13-4ec3-b5a5-adcc149d039f:string:0x6d71da10Ae0e5B73d0565E2De46741231Eb247C7", + identityProof: { + type: "1416fc74-d941-4370-8cfb-88997097e309:string:DNS-TXT", + location: "f542bcfc-00fb-4926-9145-bc22adff4edb:string:demo.tradetrust.io", + }, + }, + ], + recipient: { + name: "9727b3c8-2d64-43ca-9fc4-9ce4ee7fa203:string:SG FREIGHT", + address: { + street: "ecf485df-8ff4-416e-bde2-63e1b6072e0a:string:101 ORCHARD ROAD", + country: "47929d19-ec95-4869-b6a4-c706ec50530a:string:SINGAPORE", + }, + }, + consignment: { + description: "eb8ef708-0335-4ece-8bbb-139b06f264e8:string:16667 CARTONS OF RED WINE", + quantity: { + value: "556317b3-1fb1-4334-a7d7-f88a7477d268:number:5000", + unit: "10c54e5a-4f7d-45d5-801b-c17787b2d770:string:LITRES", + }, + countryOfOrigin: "4b3d95fd-6aaf-4694-a994-8b4cc9f2eaa0:string:AUSTRALIA", + outwardBillNo: "cee74dbd-6117-490c-9bff-9665ea0cbabe:string:AQSIQ170923130", + dateOfDischarge: "b2b91700-a71f-44e0-ac7c-16ddbe1b5577:string:2018-01-26", + dateOfDeparture: "f3bb7427-86b4-4a75-adf6-a41c675a9f0f:string:2018-01-30", + countryOfFinalDestination: "4fdd92ba-2ec9-4eb3-9bde-2c167e957e12:string:CHINA", + outgoingVehicleNo: "4d9c9e3e-e844-4660-96c3-4a8bf07e22f2:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "882d9945-b2c1-4b22-ba82-3d9e049af588:string:PETER LEE", + designation: "370d8b2f-78ea-4235-ab91-e1a426deef91:string:SHIPPING MANAGER", + date: "92c1285c-71e8-4494-b082-ed29ff3668b9:string:2018-01-28", + }, + certification: { + name: "1a60ca05-c279-466e-8905-7e6ef4e6054e:string:DEMO JOHN TAN", + designation: "d75ff67f-b931-4161-84d8-6fd514d646a3:string:DEMO", + date: "ea2b71b1-e347-4074-8bdd-e95fee8297f0:string:2018-01-28", + }, + }, + privacy: { + obfuscatedData: [ + "323cf61a32c24a193aea9609caeeb5b5cf5d47a8fa1dbc8f67921f330dd406e5", + "f03cbac0ac3876ccb82e489140fc8a6cd93126f1d60161ae319558a25df985b7", + ], + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "61dc9186345e05cc2ae53dc72af880a3b66e2fa7983feaa6254d1518540de50a", + proof: [], + // merkleRoot's last character has been removed to make it odd-length (63 char) + merkleRoot: "61dc9186345e05cc2ae53dc72af880a3b66e2fa7983feaa6254d1518540de50", + }, +}; diff --git a/test/fixtures/v2/documentMainnetValid.ts b/test/fixtures/v2/documentMainnetValid.ts new file mode 100644 index 0000000..10b13be --- /dev/null +++ b/test/fixtures/v2/documentMainnetValid.ts @@ -0,0 +1,47 @@ +import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; + +interface CustomDocument extends v2.OpenAttestationDocument { + name: string; + issuedOn: string; + $template: string; + recipient: { + name: string; + }; +} + +export const documentMainnetValid: WrappedDocument = { + version: SchemaId.v2, + schema: "opencerts/1.4", + data: { + id: "ab89a9ae-954f-4d28-8b48-2a534d3a3d60:string:2018-SAF-01", + $template: "2d00853b-43ae-4bc9-82a2-c614ec0fca49:string:SG-GOVTECH-OPENCERTS", + name: "9a4499fa-8f68-43d8-b42b-57dc365ab249:string:Certified OpenCerts Associate", + issuedOn: "60bf1feb-e373-4757-8a5d-cf485199bf7a:string:2018-11-30T15:00:00+08:00", + issuers: [ + { + name: "a8d46c32-2e35-4f4e-99b1-f8a5acb04180:string:GovTech", + certificateStore: "9f3ffc2c-2e06-4a9d-a762-8449aec4ca9e:string:0x007d40224f6562461633ccfbaffd359ebb2fc9ba", + }, + ], + recipient: { + name: "d93f6840-0219-4f16-991e-d02fae161c6b:string:Jonathan Tay", + }, + }, + privacy: { + obfuscatedData: [ + "38c3bb23e0e0bb29d1e6efecc25ff6f95cf4bc05e6310e767f2ebd3eac766fa9", + "825aff8c9c91518b75aaa583ee72f182fa3b40a2c09d9a2e1092b6b5d8ed0b7d", + "54ea1052e0a5dd98a1a674b14af0f21aa8a3d7a23d6c90adcebc1215622fb0d2", + ], + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "5b5ed60a40d445c58ffa21e73d11a98acc04be538ab9729da5066f75f0eaddb4", + proof: [ + "86874cd45a74f39759c21028ddacb6b45c56cd1b36203a874d91d3ef276eab7b", + "cd6d9d9a5969a6c5f428b7b4d8e854a798143072371f477bf09145a66951a9d8", + "6e78b6b1bfc66f4f34fe70f97d3e91bcc318f17916394eab95cf15e2e20ac63e", + ], + merkleRoot: "1a040999254caaf7a33cba67ec6a9b862da1dacf8a0d1e3bb76347060fc615d6", + }, +}; diff --git a/test/fixtures/v2/documentMixedIssuance.ts b/test/fixtures/v2/documentMixedIssuance.ts new file mode 100644 index 0000000..09afef9 --- /dev/null +++ b/test/fixtures/v2/documentMixedIssuance.ts @@ -0,0 +1,94 @@ +export const documentMixedIssuance: any = { + version: "https://schema.openattestation.com/2.0/schema.json", + data: { + id: "adb44816-1e3e-43c3-8f49-835ee0ef79a7:string:SGCNM21566325", + $template: { + name: "4fb89978-800b-4dae-84d9-b899287fa7b2:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "1e0b6830-7907-4c4f-b6eb-26ddbcf4dd89:string:EMBEDDED_RENDERER", + url: "d1ef0610-b737-4255-b688-d0f191ecea4c:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + name: "3911b21e-a787-41d2-8cfa-e074fac4e96f:string:DEMO STORE", + tokenRegistry: "52235eed-ef39-47b0-8f3d-46d20f0ddfb9:string:0x257DFD21f991DA9BD420882365020991eec0494E", + identityProof: { + type: "b5a46073-1c7c-4dc4-a209-7bb66d767cc9:string:DNS-TXT", + location: "0170ca49-42ad-4520-a347-46182b2235df:string:example.tradetrust.io", + }, + }, + { + name: "c9a9702a-c392-495f-bdef-7d3379f004ca:string:DEMO STORE", + documentStore: "dea6ee74-bbfb-47e1-ace0-f6de4b8b446a:string:0xEE1772da1Fe18a4506de2AA0567637E9b7aD27Bf", + identityProof: { + type: "4e24bbc4-52ef-48ad-819f-c81ad06d4382:string:DNS-TXT", + location: "33c4da0d-2330-4a1a-8932-8865aca269fb:string:example.tradetrust.io", + }, + }, + { + id: "b91ec331-37f0-4011-93cf-bf9624391488:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + name: "016c596d-afaa-4254-a8f5-51f71692a670:string:DEMO STORE", + revocation: { + type: "3e9799cb-6187-4a53-b29d-657f8d9fa0cb:string:NONE", + }, + identityProof: { + type: "5bb93c34-0252-4d8b-8c77-afbc878ed7f2:string:DNS-DID", + key: + "672297df-72a8-417a-ac6c-ed7b154e70c8:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + location: "55dc441f-61ca-4d6f-9f56-0c751f11f210:string:eexample.tradetrust.io", + }, + }, + { + id: "8590313c-8755-4e81-a812-8b02ceccc58f:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + name: "b34ac64b-cf5a-4025-a6db-0b33949be981:string:DEMO STORE", + revocation: { + type: "36f5c212-5863-4434-a870-7343018c0307:string:NONE", + }, + identityProof: { + type: "382e37a8-b296-4acb-ad33-315d4d7ddadb:string:DID", + key: + "159a2583-e1e1-4b33-a5ca-397ef537bf53:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + }, + }, + ], + recipient: { + name: "5c326805-3ff7-4dbc-84de-46973fef0cca:string:SG FREIGHT", + address: { + street: "f79e01b7-e360-484f-8b13-e1da62041621:string:101 ORCHARD ROAD", + country: "c6a6c96c-fc82-4c91-8911-1cbd449a05c4:string:SINGAPORE", + }, + consignment: { + description: "dae0efef-faa6-44d2-90fe-93835d3523a0:string:16667 CARTONS OF RED WINE", + quantity: { + value: "32a553f5-28f9-429b-893e-5fb024605958:number:5000", + unit: "75060d15-8d4a-4f41-bc11-2f210f04fa99:string:LITRES", + }, + countryOfOrigin: "e44f847f-1c2d-49e6-8266-94439365d548:string:AUSTRALIA", + outwardBillNo: "74db08f9-61fd-4d3c-b86c-db972f7d9b9e:string:AQSIQ170923130", + dateOfDischarge: "8d1a62b8-adc2-49a5-9b40-aa1ed9d1fe30:string:2018-01-26", + dateOfDeparture: "22b0861c-2ef2-4b0a-9cb4-e52b7f45c037:string:2018-01-30", + countryOfFinalDestination: "dbc538a3-fe51-43ab-9722-09e0ca32ab72:string:CHINA", + outgoingVehicleNo: "441b8340-1966-44af-8170-75c93ed5bc02:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "7bd3ce94-d062-4296-aa2f-b554bc9d05bc:string:PETER LEE", + designation: "24cdf60c-8765-4b4d-aa33-84111068a143:string:SHIPPING MANAGER", + date: "73bd3d1b-c4b1-4005-8e07-22e0bd56fdd8:string:2018-01-28", + }, + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "259ba081c4fd06a56f200273d628fb4e72a01a8348afc9e4334b0bfd74fcb386", + proof: [], + merkleRoot: "259ba081c4fd06a56f200273d628fb4e72a01a8348afc9e4334b0bfd74fcb386", + }, + proof: [ + { + type: "OpenAttestationSignature2018", + proofPurpose: "assertionMethod", + verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", + signature: + "0x51acb43022928e988127d040d9a9de5e3d1b487bf65324d3ed1d284ec6994ff10e9a9985cc2ffded3723afcddf9702b38c854c13be11e326daebaee6778aec4c1c", + }, + ], +}; diff --git a/test/fixtures/v2/documentNotIssuedWithDocumentStore.ts b/test/fixtures/v2/documentNotIssuedWithDocumentStore.ts new file mode 100644 index 0000000..4c39446 --- /dev/null +++ b/test/fixtures/v2/documentNotIssuedWithDocumentStore.ts @@ -0,0 +1,65 @@ +import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; + +interface CustomDocument extends v2.OpenAttestationDocument { + recipient: { + name: string; + address: { + street: string; + country: string; + }; + }; + consignment: any; + declaration: any; +} +export const documentNotIssuedWithDocumentStore: WrappedDocument = { + version: SchemaId.v2, + data: { + id: "2d67702d-039a-4911-b88c-c28e744ded1c:string:SGCNM21566325", + $template: { + name: "8b74a7f5-f162-4f3a-9a89-b91cd363f53a:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "d0352270-90df-414c-85c0-99ce0d2c7997:string:EMBEDDED_RENDERER", + url: "4158c318-83cc-4ebf-b84c-2984b5c97322:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + name: "f31f87fd-9140-434c-92cc-51f3dad46255:string:DEMO STORE", + documentStore: "9ae80379-ee30-44ea-8ed6-b2e7c0971b19:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", + identityProof: { + type: "a0a15cab-b612-4374-90e5-649f82237509:string:DNS-TXT", + location: "3cf0e135-5018-479f-8482-32fea82e9715:string:demo-tradetrust.openattestation.com", + }, + }, + ], + recipient: { + name: "c266b92b-5216-454f-a853-1da726ea3bf5:string:SG FREIGHT", + address: { + street: "9a5e5fb2-daec-4f35-9f00-915366857568:string:101 ORCHARD ROAD", + country: "e9cb2f52-4504-4c22-8f1c-3ef5361e44ce:string:SINGAPORE", + }, + }, + consignment: { + description: "77c016a7-bd4e-4814-a161-aa2092caa441:string:16667 CARTONS OF RED WINE", + quantity: { + value: "f862b235-e797-42cf-985b-e5cb5d5a3b02:string:5000", + unit: "b310de39-0a16-439e-a2c0-2220d57ddf87:string:LITRES", + }, + countryOfOrigin: "b6817140-a5bf-4e68-afb8-4f9e15e13ab3:string:AUSTRALIA", + outwardBillNo: "8ad8ac57-5693-435c-947f-d002458c7d93:string:AQSIQ170923130", + dateOfDischarge: "024670de-9e20-4356-a3af-0465a3d7337b:string:2018-01-26", + dateOfDeparture: "436e251b-5018-4827-a45b-f7a7f226c539:string:2018-01-30", + countryOfFinalDestination: "823b70bd-1aa5-49e6-8374-278ebec07013:string:CHINA", + outgoingVehicleNo: "2893dd44-1e77-444f-b3de-2061f5e65481:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "63557bd5-8d82-49e3-9d60-78c962cccb26:string:PETER LEE", + designation: "2083ddc4-e2ad-4f92-9162-a48556024ba9:string:SHIPPING MANAGER", + date: "79b715af-95f6-432f-b0ab-8476cf2f14d3:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "c23ebdac0fd3a5e5c37a7b29bc3a82bdd1dd85ea8fbe648576ea2c9fb52ef925", + proof: [], + merkleRoot: "c23ebdac0fd3a5e5c37a7b29bc3a82bdd1dd85ea8fbe648576ea2c9fb52ef925", + }, +}; diff --git a/test/fixtures/v2/documentNotIssuedWithTokenRegistry.ts b/test/fixtures/v2/documentNotIssuedWithTokenRegistry.ts new file mode 100644 index 0000000..fdb83ba --- /dev/null +++ b/test/fixtures/v2/documentNotIssuedWithTokenRegistry.ts @@ -0,0 +1,65 @@ +import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; + +interface CustomDocument extends v2.OpenAttestationDocument { + recipient: { + name: string; + address: { + street: string; + country: string; + }; + }; + consignment: any; + declaration: any; +} +export const documentNotIssuedWithTokenRegistry: WrappedDocument = { + version: SchemaId.v2, + data: { + id: "a6d1bed7-4819-47a6-8643-cf1655546fed:string:SGCNM21566325", + $template: { + name: "fcc0fc9c-325d-4ab6-a2cb-658edac82118:string:CERTIFICATE_OF_NON_MANIPULATION", + type: "636e41a5-ba82-4841-ba31-a63a6aa842a4:string:EMBEDDED_RENDERER", + url: "294b25d5-68a2-4681-9486-87df3c783da9:string:https://demo-cnm.openattestation.com", + }, + issuers: [ + { + name: "71c5b4f1-58c6-4d27-9670-388c7cf4b05e:string:DEMO STORE", + tokenRegistry: "d3e0ca72-96b4-41b0-b7a6-2ef587363aa6:string:0x921dC7cEF00155ac3A33f04DA7395324d7809757", + identityProof: { + type: "97bb92fa-b016-42cd-82f3-184e8c24792e:string:DNS-TXT", + location: "9034d15c-135d-493b-9e2b-817061c9c3bd:string:demo-tradetrust.openattestation.com", + }, + }, + ], + recipient: { + name: "32b3d684-42a7-4e26-807b-f7e4c3a5bb3e:string:SG FREIGHT", + address: { + street: "dfd2aefd-b4ed-434e-bfff-bee42e845f62:string:101 ORCHARD ROAD", + country: "b6f1e943-abfc-4d41-ac77-47a937412e87:string:SINGAPORE", + }, + }, + consignment: { + description: "f530de49-07fc-49ec-a071-f0b8d011d247:string:16667 CARTONS OF RED WINE", + quantity: { + value: "5fe2abab-0305-4f81-95a4-ca244267cc80:string:5000", + unit: "a12b43e9-2c23-4bf1-b90f-5108feeef294:string:LITRES", + }, + countryOfOrigin: "fe821cf7-4e42-4153-8c31-b480eb374667:string:AUSTRALIA", + outwardBillNo: "4c171bc7-ef6a-43c5-8886-ec35de4b34d2:string:AQSIQ170923130", + dateOfDischarge: "51e76949-e328-4645-8bfd-6d797d5e50a8:string:2018-01-26", + dateOfDeparture: "1269315c-9cf3-436d-9ea4-82672726c932:string:2018-01-30", + countryOfFinalDestination: "3c4ca82a-5f3c-4ae9-89cb-0e6100b392cc:string:CHINA", + outgoingVehicleNo: "e72830b1-2ce7-4334-8ee2-657e2345414d:string:COSCO JAPAN 074E/30-JAN", + }, + declaration: { + name: "0116fd8a-8ce7-4841-9a91-ad1a1e86830a:string:PETER LEE", + designation: "3bfdb115-60d5-4e9f-9e3e-5b2c29220b36:string:SHIPPING MANAGER", + date: "5cc2bef4-b4d1-46c4-979b-8436e4d8d3df:string:2018-01-28", + }, + }, + signature: { + type: "SHA3MerkleProof", + targetHash: "40f9728e5abcd23b220fa62dcd9075eba77229a1cf5330ecc6e0a8d0fe9f9259", + proof: [], + merkleRoot: "40f9728e5abcd23b220fa62dcd9075eba77229a1cf5330ecc6e0a8d0fe9f9259", + }, +}; diff --git a/test/fixtures/v2/tamperedDocument.ts b/test/fixtures/v2/tamperedDocument.ts new file mode 100644 index 0000000..43dd155 --- /dev/null +++ b/test/fixtures/v2/tamperedDocument.ts @@ -0,0 +1,106 @@ +import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; + +interface CustomDocument extends v2.OpenAttestationDocument { + name: string; + issuedOn: string; + transcript: any; + issuers: { url: string; name: string; certificateStore: string }[]; + recipient: { + name: string; + email: string; + phone: string; + }; +} +export const tamperedDocument: WrappedDocument = { + version: SchemaId.v2, + schema: "tradetrust/1.0", + data: { + id: "046bebd9-1c59-4d82-b70b-b6c8aa5c502d:string:2018091259", + name: "e91c1c2e-534b-43d1-b73b-e2de2c799242:string:SEAB Certificate for SEAB", + issuedOn: "8332eaaa-cb87-46ae-a5d0-1f9cae661fba:string:2018-08-31T23:59:32+08:00", + issuers: [ + { + name: "1f525e1b-50c3-49b7-bfbf-0f110453ff3b:string:Singapore Examination and Assessment Board", + url: "de6fcb26-c53a-49fc-a872-432213d135f3:string:https://www.seab.gov.sg/", + certificateStore: "4b467479-77ed-47c7-bfdf-7be8e6618dcd:string:0x20bc9C354A18C8178A713B9BcCFFaC2152b53990", + }, + ], + recipient: { + name: "9dcfe063-b692-4ff6-901c-134c29e4e1df:string:John Snow", + email: "03a578d3-ab41-4572-bf7b-fc8763832918:string:johnsnow@gmail.com", + phone: "a2be0e32-4a9e-45fa-9690-a300fadaa5f7:string:+6588888888", + }, + transcript: [ + { + name: "97fb29de-56db-4cde-9032-5ef91423bcf4:string:Introduction to SEAB", + grade: "df28e06b-d06f-4283-ae72-b5b3e30aee28:string:A+", + courseCredit: "50dc8869-ef3c-4276-a72e-c247d6e64b72:number:3", + courseCode: "519f79a3-4f8c-4345-9474-d173e6c9a7fe:string:SEAB-HIST", + url: "c3954ba1-023c-45ad-bbd4-eb4a8df82dc2:string:https://www.seab.gov.sg/pages/about/introduction", + description: "8d6e4172-51e2-49ba-b98b-d1c5906a0339:string:Understanding the vision, mission, and values", + }, + { + name: "4da6b8d8-21d3-4228-937b-acc65a648bf7:string:SEAB - About Us", + grade: "1cf384cd-8951-4a56-9e42-e3d9954d0c85:string:A", + courseCredit: "f000cbd2-cf8d-4bf6-94b7-6e73f8037c3f:number:3", + courseCode: "d52233d5-a137-4e94-ad75-daac38536c87:string:SEAB-ABT", + url: "148a3906-8cfe-4971-9f17-6f2751a54b8e:string:https://www.seab.gov.sg/pages/about/aboutus", + description: "69179ec5-78fc-427e-8680-ba91f86d761f:string:About the history of SEAB", + }, + ], + }, + privacy: {}, + signature: { + type: "SHA3MerkleProof", + targetHash: "85df2b4e905a82cf10c317df8f4b659b5cf38cc12bd5fbaffba5fc901ef0011b", + proof: [], + merkleRoot: "85df2b4e905a82cf10c317df8f4b659b5cf38cc12bd5fbaffba5fc901ef0011b", + }, +}; + +export const tamperedDocumentInvalid: WrappedDocument = { + version: SchemaId.v2, + schema: "tradetrust/1.0", + data: { + id: "046bebd9-1c59-4d82-b70b-b6c8aa5c502d:string:2018091259", + name: "e91c1c2e-534b-43d1-b73b-e2de2c799242:string:SEAB Certificate for SEAB", + issuedOn: "8332eaaa-cb87-46ae-a5d0-1f9cae661fba:string:2018-08-31T23:59:32+08:00", + issuers: [ + { + name: "1f525e1b-50c3-49b7-bfbf-0f110453ff3b:string:Singapore Examination and Assessment Board", + url: "de6fcb26-c53a-49fc-a872-432213d135f3:string:https://www.seab.gov.sg/", + certificateStore: "4b467479-77ed-47c7-bfdf-7be8e6618dcd:string:0x20bc9C354A18C8178A713B9BcCFFaC2152b53991", + }, + ], + recipient: { + name: "9dcfe063-b692-4ff6-901c-134c29e4e1df:string:John Snow", + email: "03a578d3-ab41-4572-bf7b-fc8763832918:string:johnsnow@gmail.com", + phone: "a2be0e32-4a9e-45fa-9690-a300fadaa5f7:string:+6588888888", + }, + transcript: [ + { + name: "97fb29de-56db-4cde-9032-5ef91423bcf4:string:Introduction to SEAB", + grade: "df28e06b-d06f-4283-ae72-b5b3e30aee28:string:A+", + courseCredit: "50dc8869-ef3c-4276-a72e-c247d6e64b72:number:3", + courseCode: "519f79a3-4f8c-4345-9474-d173e6c9a7fe:string:SEAB-HIST", + url: "c3954ba1-023c-45ad-bbd4-eb4a8df82dc2:string:https://www.seab.gov.sg/pages/about/introduction", + description: "8d6e4172-51e2-49ba-b98b-d1c5906a0339:string:Understanding the vision, mission, and values", + }, + { + name: "4da6b8d8-21d3-4228-937b-acc65a648bf7:string:SEAB - About Us", + grade: "1cf384cd-8951-4a56-9e42-e3d9954d0c85:string:A", + courseCredit: "f000cbd2-cf8d-4bf6-94b7-6e73f8037c3f:number:3", + courseCode: "d52233d5-a137-4e94-ad75-daac38536c87:string:SEAB-ABT", + url: "148a3906-8cfe-4971-9f17-6f2751a54b8e:string:https://www.seab.gov.sg/pages/about/aboutus", + description: "69179ec5-78fc-427e-8680-ba91f86d761f:string:About the history of SEAB", + }, + ], + }, + privacy: {}, + signature: { + type: "SHA3MerkleProof", + targetHash: "85df2b4e905a82cf10c317df8f4b659b5cf38cc12bd5fbaffba5fc901ef0011b", + proof: [], + merkleRoot: "85df2b4e905a82cf10c317df8f4b659b5cf38cc12bd5fbaffba5fc901ef0011b", + }, +}; diff --git a/test/fixtures/v3/did-invalid-signed.json b/test/fixtures/v3/did-invalid-signed.json new file mode 100644 index 0000000..a3613a7 --- /dev/null +++ b/test/fixtures/v3/did-invalid-signed.json @@ -0,0 +1,75 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "revocation": { + "type": "NONE" + } + }, + "identityProof": { + "type": "DNS-DID", + "identifier": "notinuse.tradetrust.io" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "282c368288295711fd79f8515a92a96f6990fe28d7fd9b2449c5b2e2db040cc9", + "proofs": [ + "e45073a232f936935a8448c8fe1bce848fbeba790b0a432222a9262756371dbd", + "2874fccb397ef995dc3b954150cee3c04b55df32cb4ceaefcc2dfcf635274b51", + "090e3bdeeee7fd456a893139b40438a4d931402843085b58a0dca03b3ae78e1d" + ], + "merkleRoot": "dc34b7bc4e707c77327db76536625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mODFlNmVmMGMwMjI2YzE2NTlhM2I0ZDA1MzQwMzY2MmE3MjE3OWE0ZDVjMDBkYSIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiNjY0MjA0ZThjMGZhMDBmOTg3MjdmZmQ0MzVhZjRiYTdhZTgxNDJlZmUwYmQ0MTRhODcwZWRmNDRjY2FiMjUxZCIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJiMzZiYjEwM2IxNzczZmQxODVmYjg4NTEzOTMyYTQxYWEyNjgxN2Q3MDQ1OGYyYzdkYmMwN2M5NjllZDMzNmNjIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6ImU3OTBkYWI1YzQ1ZTcyYTg1MmNkYWZjZDA5ODE3YmNmYTcyYjdkYWE4MzgyMjRjZDFiNDUzMzMxZDIxODVhNTIiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", + "privacy": { + "obfuscated": [] + }, + "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x9fc61bfdf30553d7e2ecd77fbd190c44bb2f3192760ebc08eb32fa3d2c15626b3af3577c0abcfa0877e656380be9eceb4e2a665e5ad9324eaeddb7d90ae3b5311c" + } +} diff --git a/test/fixtures/v3/did-ocsp-revocation-signed.json b/test/fixtures/v3/did-ocsp-revocation-signed.json new file mode 100644 index 0000000..785914b --- /dev/null +++ b/test/fixtures/v3/did-ocsp-revocation-signed.json @@ -0,0 +1,44 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { "id": "https://example.com", "type": "OpenAttestationIssuer", "name": "DEMO STORE" }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { "type": "3", "effectiveDate": "2010-01-01T19:23:24Z" }, + { "type": "3A", "effectiveDate": "2010-01-01T19:23:24Z" } + ] + }, + "openAttestationMetadata": { + "template": { "name": "CUSTOM_TEMPLATE", "type": "EMBEDDED_RENDERER", "url": "https://localhost:3000/renderer" }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "revocation": { "type": "OCSP_RESPONDER", "location": "https://ocsp.example.com" } + }, + "identityProof": { "type": "DNS-DID", "identifier": "demo-tradetrust.openattestation.com" } + }, + "attachments": [{ "fileName": "sample.pdf", "mimeType": "application/pdf", "data": "BASE64_ENCODED_FILE" }], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "69e1a174ea67e1c3119639f713f8a7348bbda54fdce60903621398cc2fea4d40", + "proofs": [], + "merkleRoot": "69e1a174ea67e1c3119639f713f8a7348bbda54fdce60903621398cc2fea4d40", + "salts": "W3sidmFsdWUiOiI5YzA2ZjZkZTg5M2YzYmE2ZWFmZmRlNjYzYmI5N2U4MTI3YWQyYWJkMDg4NDFjZTY2YWUxZTE0OThhZjhkNDhmIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiOTRhZTBiMzc5ZGMyN2NiOWI3ZDE0ZGQ2N2ZmMzgzMDFmYzI0ZDQ5OGM2OWRmZTU5ODZiMGRlNmJlZjEyNzlkMyIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI5N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WRhdGEuaWRlbnRpdHlQcm9vZi5pZGVudGlmaWVyIn0seyJ2YWx1ZSI6IjkxZTg3ZWRkNjQzMTA3MzlhMDFkYmE0ZmMwMDVkYmIwNWQyZGNhMDY1NDlmZDJiMDg2YTUyYzAyZDM0N2QzYWUiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZmlsZU5hbWUifSx7InZhbHVlIjoiOWU2MWRlNWQwMzg5YTI3YjAyMTQ4MTM3ZjA0MWYxMzZjMDU5N2VkNTQ0NzczNDM1NDA3ZmVmMTk2OWU5MTllMiIsInBhdGgiOiJhdHRhY2htZW50c1swXS5taW1lVHlwZSJ9LHsidmFsdWUiOiI5MzJjZDQ5Njg0MmUyZGQxOTI0YmYxZWJkNzdlMTRhMTI5ZDcwOGVlODFiMTk4YmVkOTc4OGQ2M2E4ODUxNzEzIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLmRhdGEifV0=", + "privacy": { "obfuscated": [] }, + "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x3390dff497f8524a089c97449c82a30956c18ec7a8d88d18d75bd2204797838818bf6d4feb8d729642df5933715c5ffaf09f59a150cadc82ab6fd051b8b066ae1b" + } +} diff --git a/test/fixtures/v3/did-revocation-store-signed-no-location.json b/test/fixtures/v3/did-revocation-store-signed-no-location.json new file mode 100644 index 0000000..6f63bd7 --- /dev/null +++ b/test/fixtures/v3/did-revocation-store-signed-no-location.json @@ -0,0 +1,75 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "revocation": { + "type": "REVOCATION_STORE" + } + }, + "identityProof": { + "type": "DID", + "identifier": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "7cf1daad349d5d0b7a9c0e1dbc2d1480ef6230f0d3ea1d8b59d7d5c6d78f5d6b", + "proofs": [ + "a019a62edd807c4907f859cef02b49a373a25515bcefbcc0668d90e148b6f476", + "2ed4c88f935d280c3c3e7883a9db0e8080990f690f4bb281eff25c66f2147d0e", + "94c07ddcc4a2ade59e3120dce9f19f0f4ad80a58943555f4b51af4668b1c1d62" + ], + "merkleRoot": "f43045b0c57072a044e810b798e32b8c1de1d0d0c5774d55c8eed1f3fdec6438", + "salts": "W3sidmFsdWUiOiJlNGE5ZjM3YTYzYTlmNTMzYzM1ZDhjMTU5MmM0Y2QxMDgxOTFmOGU1ODk0ZTUwMjBlOTVmZDkyYTM5OWJiOTdlIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiNGJmYmU0ZjFlNWM4NTU0YWMwY2VlZGFmZjI5OWRlNDk3YWVmOTE1YmQ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zZDA0MGQ0NDhlMyIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiI1ZTk2NzNiNWE0ZmJkNzg2N2I5OWRmMDBlZTcyNDZmOTQ0NjVhYjViNjliZmFhMmIwMmZmOWI0ODdkYmJhYmExIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6Ijk2ODRmNmNmMTZkMDUyZTgyMDIzNmRhZDQ1MmNkYWU5NjAwNGZhYzk5YWFlMDQ2MjVjNWJkNjhkOWMxZGEzNzQiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", + "privacy": { + "obfuscated": [] + }, + "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x4a054aaf881da5130a3b19160a7f0ce1afef1fe093c83be438c8c40b0a04ace5142f3d48a23c8ce7c32fabe04fc69e6fd4c94cf3ceb4adb4f3da5fa937208d4e1c" + } +} diff --git a/test/fixtures/v3/did-revocation-store-signed-not-revoked.json b/test/fixtures/v3/did-revocation-store-signed-not-revoked.json new file mode 100644 index 0000000..b260925 --- /dev/null +++ b/test/fixtures/v3/did-revocation-store-signed-not-revoked.json @@ -0,0 +1,76 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "revocation": { + "type": "REVOCATION_STORE", + "location": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" + } + }, + "identityProof": { + "type": "DID", + "identifier": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "a019a62edd807c4907f859cef02b49a373a25515bcefbcc0668d90e148b6f476", + "proofs": [ + "7cf1daad349d5d0b7a9c0e1dbc2d1480ef6230f0d3ea1d8b59d7d5c6d78f5d6b", + "2ed4c88f935d280c3c3e7883a9db0e8080990f690f4bb281eff25c66f2147d0e", + "94c07ddcc4a2ade59e3120dce9f19f0f4ad80a58943555f4b51af4668b1c1d62" + ], + "merkleRoot": "f43045b0c57072a044e810b798e32b8c1de1d0d0c5774d55c8eed1f3fdec6438", + "salts": "W3sidmFsdWUiOiJjZDcyMTAwYzhjZDU3MzZlMmRiNGIwODgxOGU5NWYyMDhiYzZmOTg3OTRiZjdkY2U4MmE2YTY3ZTMwNzA3Y2M4IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiYzMyZjVjYzhhZGI4MDliZjRlYTRkNGFiNWI1YmFkNjEzOWM3NTMyOTMxZGNmZDAyZTFjZjIwNDk0MDFlZmU1NCIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiIzZTJ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aWRlbnRpdHlQcm9vZi5pZGVudGlmaWVyIn0seyJ2YWx1ZSI6IjhhNGViNWVmYzcyZjA1MTJjYTNhYzVjODlhMTVmNTU2ZDBhOTg3ZGUzYTg3YzA1YWM1MDc5ODIwNGU5MGM3MGYiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZmlsZU5hbWUifSx7InZhbHVlIjoiNWQ0ZTAwZmMwNWQzOGYxZTI0OTM5NDM3Y2MxOGFiODZkZjRjYzZkZDM3YTUyMjVkN2NkYTFhYzgyOWU1NmE1MCIsInBhdGgiOiJhdHRhY2htZW50c1swXS5taW1lVHlwZSJ9LHsidmFsdWUiOiJiMDgzNDFhNmU2ZmE3ZmJlMjRmYzJlOGE0ZjZhZTg4ZGU4MTc2NzA1NDMxYTcyZGY5MjA2OWQ1YzZhYmYyNGI3IiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLmRhdGEifV0=", + "privacy": { + "obfuscated": [] + }, + "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x4a054aaf881da5130a3b19160a7f0ce1afef1fe093c83be438c8c40b0a04ace5142f3d48a23c8ce7c32fabe04fc69e6fd4c94cf3ceb4adb4f3da5fa937208d4e1c" + } +} diff --git a/test/fixtures/v3/did-revocation-store-signed-revoked.json b/test/fixtures/v3/did-revocation-store-signed-revoked.json new file mode 100644 index 0000000..19da77e --- /dev/null +++ b/test/fixtures/v3/did-revocation-store-signed-revoked.json @@ -0,0 +1,76 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "revocation": { + "type": "REVOCATION_STORE", + "location": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" + } + }, + "identityProof": { + "type": "DID", + "identifier": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "a1c633145bc0f37105fe510d335376c1919a6cf51030628877288bdee5541c22", + "proofs": [ + "82f51d6eb620e4264dff0ac2b9d99a965a88ff51e46192bb4808ea969ee67402", + "c3d7c5908f25eba67baf7f607932f1924acdb7a6cf04ad5408dba251bf0a47bc", + "94c07ddcc4a2ade59e3120dce9f19f0f4ad80a58943555f4b51af4668b1c1d62" + ], + "merkleRoot": "f43045b0c57072a044e810b798e32b8c1de1d0d0c5774d55c8eed1f3fdec6438", + "salts": "W3sidmFsdWUiOiJjZDUyNmFjNjA2MTZkOTAwMTE1MjM0OTU3NWRjMzNhNzVjODY4ZjFmYmFlYTVmNzFiZTA3ZDMwM2JjYmRiODJhIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiNzg0N2E4YTFlYTljZGRkZGU1ODgzMjI2Z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zhjZjEwZmZjNjdlZGY4YTQ2ZGMzZGJiZDcyZTQ2MjJjZTAwMmQ2OTMiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEuaWRlbnRpdHlQcm9vZi5pZGVudGlmaWVyIn0seyJ2YWx1ZSI6ImZjOTAzYzUzNzBjNmY4Y2UzNjIyMTU0ODM5NGU5NjcwYjk3NDYyNjQyMTk2OTIzYzk3OWRiMjhhNTBjZWEzNDAiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZmlsZU5hbWUifSx7InZhbHVlIjoiMzAyNzcyMjM5N2U4NzVhZWRkZDZlYjA1MTk5YmM0OTk2OTk0ODE2OGMzMTE3OTMzMGQzZDUyOWFkNTAzOWIwOSIsInBhdGgiOiJhdHRhY2htZW50c1swXS5taW1lVHlwZSJ9LHsidmFsdWUiOiJjNjVhM2VhNTlkZDVlNWVkM2U0MjI1MTgxNTZmNWRkMTRlNjYzZDVmYzBhZmIxOTExYTgwMjRkN2VjMGZmNDBlIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLmRhdGEifV0=", + "privacy": { + "obfuscated": [] + }, + "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x4a054aaf881da5130a3b19160a7f0ce1afef1fe093c83be438c8c40b0a04ace5142f3d48a23c8ce7c32fabe04fc69e6fd4c94cf3ceb4adb4f3da5fa937208d4e1c" + } +} diff --git a/test/fixtures/v3/did-signed.json b/test/fixtures/v3/did-signed.json new file mode 100644 index 0000000..b05d155 --- /dev/null +++ b/test/fixtures/v3/did-signed.json @@ -0,0 +1,75 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "revocation": { + "type": "NONE" + } + }, + "identityProof": { + "type": "DID", + "identifier": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "82f51d6eb620e4264dff0ac2b9d99a965a88ff51e46192bb4808ea969ee67402", + "proofs": [ + "a1c633145bc0f37105fe510d335376c1919a6cf51030628877288bdee5541c22", + "c3d7c5908f25eba67baf7f607932f1924acdb7a6cf04ad5408dba251bf0a47bc", + "94c07ddcc4a2ade59e3120dce9f19f0f4ad80a58943555f4b51af4668b1c1d62" + ], + "merkleRoot": "f43045b0c57072a044e810b798e32b8c1de1d0d0c5774d55c8eed1f3fdec6438", + "salts": "W3sidmFsdWUiOiIyMTJjMDNmYmIzNmMyMjY2NTU0OGM5OGM5ZjE2ZTYwYTc2MjBjZGM0ZjczMjY3NDMxYzA0ZjYzY2U0MTYxMmVkIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMDRjZTA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NDRmNDI5ZDgyOTlkZGFmOTkzMTNjZGE1MGE2ZTAyMTE0ZTc2Yjg0NGY4ZSIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiIxNDU0MGY2ZGViMDBjOGI2OTc3MmE4ZTljNzU1OGU0MTgxMGI1Y2FmYTQzNGQ1NWFjMTIxZTk3MmE1NDY0MDMzIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6IjNiZTUyODM3ZjMwNzcyNDYzZjY1NmM4ZDQ3ZGM1ZWRiZjcyMmY4ZDQ5ZWFiZTI0NWVjZGM2ZWJhODIxNzFjYTAiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", + "privacy": { + "obfuscated": [] + }, + "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x4a054aaf881da5130a3b19160a7f0ce1afef1fe093c83be438c8c40b0a04ace5142f3d48a23c8ce7c32fabe04fc69e6fd4c94cf3ceb4adb4f3da5fa937208d4e1c" + } +} diff --git a/test/fixtures/v3/did-wrapped.json b/test/fixtures/v3/did-wrapped.json new file mode 100644 index 0000000..36c227b --- /dev/null +++ b/test/fixtures/v3/did-wrapped.json @@ -0,0 +1,69 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "revocation": { + "type": "NONE" + } + }, + "identityProof": { + "type": "DID", + "identifier": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "94c07ddcc4a2ade59e3120dce9f19f0f4ad80a58943555f4b51af4668b1c1d62", + "proofs": ["20f010efd1c689ce87ba19bb0eeb641c3c5d6281d2ee427139bad0e1e5e7f239"], + "merkleRoot": "f43045b0c57072a044e810b798e32b8c1de1d0d0c5774d55c8eed1f3fdec6438", + "salts": "W3sidmFsdWUiOiJmNGY2YTEyZjZmZjRlZjZmYTgxNTQ1MGM5OGI3NDk2NGI4NzI3ZGRiZDQ0MDIzZDk1MTcyMTlkNzFjYzdkYzg1IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiYTVmOGYwOTFkNzE5MTE4NGFkYmExMjRhNjAzY2I3ZTU0NWJmZDkxMmExNjBkNWI1ZDU2NjYxNzcxODcxYjg1MyIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI0ZDJhYjI5NGQwMWFjOTI1ZmRmNTAxZWQ2YWU4MzllMzkwYTM0YzRlNjQ2MjgxNGE5M2Y4YzRlZjExYTU5MWNhIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2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J2YWx1ZSI6IjQxYzFmOWNiYWEzMmEzMDk3MzZlZTQzOWZkMmNiYmZlN2Y1OGU5YjZjMDk5NDBlZGFjNDhlZjYzMDAyNzkzZWQiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", + "privacy": { + "obfuscated": [] + } + } +} diff --git a/test/fixtures/v3/did.json b/test/fixtures/v3/did.json new file mode 100644 index 0000000..16ad263 --- /dev/null +++ b/test/fixtures/v3/did.json @@ -0,0 +1,61 @@ +{ + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": [ + "VerifiableCredential", + "DrivingLicenceCredential", + "OpenAttestationCredential" + ], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + "revocation": { + "type": "NONE" + } + }, + "identityProof": { + "type": "DID", + "identifier": "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ] +} diff --git a/test/fixtures/v3/dnsdid-invalid-signed.json b/test/fixtures/v3/dnsdid-invalid-signed.json new file mode 100644 index 0000000..84b06f3 --- /dev/null +++ b/test/fixtures/v3/dnsdid-invalid-signed.json @@ -0,0 +1,75 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "revocation": { + "type": "NONE" + } + }, + "identityProof": { + "type": "DNS-DID", + "identifier": "notinuse.tradetrust.io" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "e45073a232f936935a8448c8fe1bce848fbeba790b0a432222a9262756371dbd", + "proofs": [ + "282c368288295711fd79f8515a92a96f6990fe28d7fd9b2449c5b2e2db040cc9", + "2874fccb397ef995dc3b954150cee3c04b55df32cb4ceaefcc2dfcf635274b51", + "090e3bdeeee7fd456a893139b40438a4d931402843085b58a0dca03b3ae78e1d" + ], + "merkleRoot": "dc34b7bc4e707c77327db76536625c81c2a6777934df566b261bd8ec3f24f8c4", + "salts": "W3sidmFsdWUiOiIyZGE3NDAwMTk4MDRmYjlkZDJlODExZTdlYTFkNGZmNGVhNzA5YzI0YTU5MmRjYjljMzM5OGE1YTJhZGM5MDBkIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMjkwNTY0OTlhM2Q4YjU4YzJhMDFkY2MyYjQyNmRkOTg0YjY4M2E5YjhjNjgzNDgxNTIzMzY2NWMzMWIyOWE4OCIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI3ZTI2NjA2MjFlMTU4OWQ5MTE4ZTU3NmRjZjI3MDRkNDRjMDk5OTlhMWQzNjY3NWJmNjk0YzJjYjg0MDJkYzFlIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6ImVmODdlNjZhODRlYjc4YTNkOTgwYmIwMGYyYTQwYzNhM2ZiZjJkYTE3Mzk2ZmM2ZTMxNmI0MzI2NzgzOGNmZjgiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiMTJiMzI2OTZlYTViNjdjNzQ3NGZhZDBjN2M1MTNkZTQyZjliMmJmNjMxZjA4OWE0ZTQzMWNiNjhhMGIxZDg1OCIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidmFsdWUiOiJhZDU3NzIxYWZkNWZiZThjNDU3NWMyM2NkM2YxODI1NmI4MjhmNTZmOWMxZjE2N2JhZTk5YjEzNzRkNjBlMDU1IiwicGF0aCI6InJlZmVyZW5jZSJ9LHsidmFsdWUiOiI2MjQ4NGNjMjMzMjA2ZThjOGYwMjQ5MDk5YTE0MDJkYmNjMzlkNzc3ZjYwNGM2NDY2NWU2MTY0NGQzOTVmMDgzIiwicGF0aCI6Im5hbWUifS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2E3OGZhYyIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiMmUzNzZhMzFkOTVkNGNkNzUxMGEyZDNhNDgxZTIyYWY2MWQ0M2I3NjFkOTJmYTkzYmRjM2Q4MmY5NDZhMmYwYiIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiMzhjZDQxM2I4ODdhNTg1MTg4ODJkYjU5M2M1YzRhMzZlODAwNmFjNGRiYmMxMjAxZmVlZjgyMDU1M2IxMDVhNyIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiIwMmUwOTZhMGFjNjVlNmNjMjYwMDc4NjIzN2JmOGE4ZWQ1Y2ZlYmZmOWExMmUxYmI0NTgwNzdiNGUxZDRiMTliIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6IjY4YzdhZDcyNWM0M2ViOTJjNjkzODVkYjM4YTA4YTFhYzI2ZjIzOTE4M2Y3ODcwNWZjNGUxZmQ3YWFlNTRmMzEiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", + "privacy": { + "obfuscated": [] + }, + "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x9fc61bfdf30553d7e2ecd77fbd190c44bb2f3192760ebc08eb32fa3d2c15626b3af3577c0abcfa0877e656380be9eceb4e2a665e5ad9324eaeddb7d90ae3b5311c" + } +} diff --git a/test/fixtures/v3/dnsdid-revocation-store-signed-not-revoked.json b/test/fixtures/v3/dnsdid-revocation-store-signed-not-revoked.json new file mode 100644 index 0000000..1b7442c --- /dev/null +++ b/test/fixtures/v3/dnsdid-revocation-store-signed-not-revoked.json @@ -0,0 +1,76 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "revocation": { + "type": "REVOCATION_STORE", + "location": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" + } + }, + "identityProof": { + "type": "DNS-DID", + "identifier": "demo-tradetrust.openattestation.com" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "8a7d064dfb2a4c5b4a5ecc2d3348c4d5987bda83bd31af68e43addc806a50465", + "proofs": [ + "9deebec8d85c16a3a12daa021a842552d9fd2303e09e5984381c5f66d023ff06", + "d5f2aeef5316066073d69433ab24e45d780feb5694ab392a3b94e2f0ff7bdf86", + "090e3bdeeee7fd456a893139b40438a4d931402843085b58a0dca03b3ae78e1d" + ], + "merkle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2YWx1ZSI6IjdjYTg3Njk5Mjc0MjgyZDIzZjNhODAzMmVhYjBmNzI3ZjFmZjU3ZTQzYWQ3YjJlYWFjNDRkZjljMGQyZGU5YTYiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEuaWRlbnRpdHlQcm9vZi50eXBlIn0seyJ2YWx1ZSI6ImJmNGNhNjE3YjMwMjkxY2QyYTc0YjM1NmNlNzdjZjY4MGQ4Nzg3NzA3NmNmMmZkYTNlNTdlMTVhOWRiMDY0YmMiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEuaWRlbnRpdHlQcm9vZi5pZGVudGlmaWVyIn0seyJ2YWx1ZSI6ImE3NzBlOGIwODVhM2RiZWU0MTdlMmYyNDExMTEwODcwM2Y4NmYxNGFkODExZmRhZGIyZjdiZTdjYjk0NjVkZWQiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZmlsZU5hbWUifSx7InZhbHVlIjoiNTc1NmM5MjEyYzRmZWJlNTk2NjdlMWY1MGVkZGM5YjhkYWI1ZmNkNTg2MWFmODgyNzU1N2VhN2Y5Y2JhNzA5NiIsInBhdGgiOiJhdHRhY2htZW50c1swXS5taW1lVHlwZSJ9LHsidmFsdWUiOiIyOTNhNTc0Nzc3MWRmMGIxZjE3NzFmMjBkNTliZDNkYjQzOWU3YmQyYjkyYTdiMTYzYWU2MzNmOTYzYTU5MzUxIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLmRhdGEifV0=", + "privacy": { + "obfuscated": [] + }, + "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x9fc61bfdf30553d7e2ecd77fbd190c44bb2f3192760ebc08eb32fa3d2c15626b3af3577c0abcfa0877e656380be9eceb4e2a665e5ad9324eaeddb7d90ae3b5311c" + } +} diff --git a/test/fixtures/v3/dnsdid-revocation-store-signed-revoked.json b/test/fixtures/v3/dnsdid-revocation-store-signed-revoked.json new file mode 100644 index 0000000..44c74bc --- /dev/null +++ b/test/fixtures/v3/dnsdid-revocation-store-signed-revoked.json @@ -0,0 +1,76 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "revocation": { + "type": "REVOCATION_STORE", + "location": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" + } + }, + "identityProof": { + "type": "DNS-DID", + "identifier": "demo-tradetrust.openattestation.com" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "9deebec8d85c16a3a12daa021a842552d9fd2303e09e5984381c5f66d023ff06", + "proofs": [ + "8a7d064dfb2a4c5b4a5ecc2d3348c4d5987bda83bd31af68e43addc806a50465", + "d5f2aeef5316066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uQXR0ZXN0YXRpb25NZXRhZGF0YS5wcm9vZi5yZXZvY2F0aW9uLmxvY2F0aW9uIn0seyJ2YWx1ZSI6IjJlNGViZDcyZjhmMTQ0YTYxNzZhZjhmNzI5ODZmNDIzZmU1NzhlNGU3NGJhZTUyOTUwYWRiYjJlYTkyODcwZjEiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEuaWRlbnRpdHlQcm9vZi50eXBlIn0seyJ2YWx1ZSI6ImU4N2YwYzhjMWJmYTgwMGI5OGZhMjU0MzJmY2ExYTZmYjkwOTk1M2FmODE0ZjViNGJlMjBiZmViMzkxYTlkZTQiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEuaWRlbnRpdHlQcm9vZi5pZGVudGlmaWVyIn0seyJ2YWx1ZSI6IjhhMzcwZWRhNzk4MzI1YmU1MTViMGMyOGNiZTdhMTcyYmY5ZGY2NjZjNzJkMjllMTUyYmFmMTM0MzI4YzE1YzkiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZmlsZU5hbWUifSx7InZhbHVlIjoiM2QwZTU0N2MzOTE1M2U1NjNjNDM2Y2FiMDRjMjY4ODgyMDhkZTc1ODI2NWZkNDVkYmY2YjVlY2I0YjRlYTJlMCIsInBhdGgiOiJhdHRhY2htZW50c1swXS5taW1lVHlwZSJ9LHsidmFsdWUiOiI2NWUzNTJjZjQzZTUxNzRmNTBmMWMyMTliNzI2ZDRjNDJkY2E5NTkwYWEwNWY5YTBhZDcxOTUxYThmZGMyYzUyIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLmRhdGEifV0=", + "privacy": { + "obfuscated": [] + }, + "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x9fc61bfdf30553d7e2ecd77fbd190c44bb2f3192760ebc08eb32fa3d2c15626b3af3577c0abcfa0877e656380be9eceb4e2a665e5ad9324eaeddb7d90ae3b5311c" + } +} diff --git a/test/fixtures/v3/dnsdid-signed.json b/test/fixtures/v3/dnsdid-signed.json new file mode 100644 index 0000000..0337a1f --- /dev/null +++ b/test/fixtures/v3/dnsdid-signed.json @@ -0,0 +1,74 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "revocation": { + "type": "NONE" + } + }, + "identityProof": { + "type": "DNS-DID", + "identifier": "demo-tradetrust.openattestation.com" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "d876067507c616c42a5c32a42bc37754403533246c04445678f024d73f18b745", + "proofs": [ + "239cf91faee989c730299cc1683b9211a36547107625d26a06f8ad5323d5e406", + "bed332534ffb2cfcc40a5c2c71141dbda5c21f114085f783a437cc0f2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l0eVByb29mLnR5cGUifSx7InZhbHVlIjoiYmNmMmU0NDM5MDU1OTQxYzU5Yzc0NjY3ODYxMmE1Nzk5OWU2YjM3ZTVjYWI1YjI4MzRhZmQwZmVkMTc5YjVhNSIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiM2NkNzI0YWQ1MmMwNGI0NDAyYzA5NzFlNTQ4ODJkMDQzYTU0MzhhMDczMjZiOTRkMDA3MGY0ODE5NmM5ZGYxOSIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJiOTFkNjRjM2FlOTY2M2MyOTIzZGY5OTU4NjQ3N2RiNDJjZGQxMjVhODIwYmNlODViNjZlMDg2MzdlN2I1MmIwIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6IjVkZmMxMGJiZjU2NmZiYzM3ZTk2NTQ4MDFjODA0NTQ4ZjFmNTAzM2FlN2YzYTc3YTA2YTVhMmEzNGNiMzgxM2YiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", + "privacy": { + "obfuscated": [] + }, + "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + "signature": "0x9fc61bfdf30553d7e2ecd77fbd190c44bb2f3192760ebc08eb32fa3d2c15626b3af3577c0abcfa0877e656380be9eceb4e2a665e5ad9324eaeddb7d90ae3b5311c" + } +} diff --git a/test/fixtures/v3/dnsdid-wrapped.json b/test/fixtures/v3/dnsdid-wrapped.json new file mode 100644 index 0000000..f67a457 --- /dev/null +++ b/test/fixtures/v3/dnsdid-wrapped.json @@ -0,0 +1,72 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + "revocation": { + "type": "NONE" + } + }, + "identityProof": { + "type": "DNS-DID", + "identifier": "demo-tradetrust.openattestation.com" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "239cf91faee989c730299cc1683b9211a36547107625d26a06f8ad5323d5e406", + "proofs": [ + "d876067507c616c42a5c32a42bc37754403533246c04445678f024d73f18b745", + "bed332534ffb2cfcc40a5c2c71141dbda5c21f114085f783a437cc0f2d5a86c3" + ], + "merkleRoot": "dc34b7bc4e707c77327db76536625c81c2a6777934df566b261bd8ec3f24f8c4", + "salts": "W3sidmFsdWUiOiI2NzEyZjg0YmU1ODljOWI0MGE4OTBmMTlkZGZkYjc2MmM4NTI5MTY3ZDRhYTg4ZDEzYTgwNDNjNjM4ODAwOWI1IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoi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FiNGU5ZWE5YWYxMmVjMWY0ZmZiYmM3NDc2NGRmMzVlMTIwYTY3MmQyNDViYTJhZjViYjk0NCIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiI1YTRiN2ZhZGZlYWRhMmFjZmU4ZTYwZTMzZmRiNjFiNjVhNDNkNzA3MjU0MjliZjZiY2FmZDlhNGZkYWNjNjA3IiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6ImYzNjBhNGMxMzM4ZTg1OGE2NDllNzIyNmZkMGUxOWY2MTM0NjU4ODU5MGM0ZmUwNDMxMGVkNmJmY2E2ODY1MzAiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", + "privacy": { + "obfuscated": [] + } + } +} diff --git a/test/fixtures/v3/dnsdid.json b/test/fixtures/v3/dnsdid.json new file mode 100644 index 0000000..985928e --- /dev/null +++ b/test/fixtures/v3/dnsdid.json @@ -0,0 +1,61 @@ +{ + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": [ + "VerifiableCredential", + "DrivingLicenceCredential", + "OpenAttestationCredential" + ], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DID", + "value": "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + "revocation": { + "type": "NONE" + } + }, + "identityProof": { + "type": "DNS-DID", + "identifier": "example.tradetrust.io" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ] +} diff --git a/test/fixtures/v3/documentStore-invalid-issued.json b/test/fixtures/v3/documentStore-invalid-issued.json new file mode 100644 index 0000000..6328c42 --- /dev/null +++ b/test/fixtures/v3/documentStore-invalid-issued.json @@ -0,0 +1,66 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DOCUMENT_STORE", + "value": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" + }, + "identityProof": { + "type": "DNS-TXT", + "identifier": "notinuse.tradetrust.io" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "62d647b87b9be3653b644709d33536e1e31f2ff5bf25a33dc3ced1e5e313079f", + "proofs": [], + "merkleRoot": "62d647b87b9be3653b644709d33536e1e31f2ff5bf25a33dc3ced1e5e313079f", + "salts": "W3sidmFsdWUiOiJjZjg1ZjBkNTVhNTU3MjUwOWVhNDA2ZjcxN2RhYTk0M2JlM2ExN2YyZDljYjg3N2ZlM2RhOGVmN2VmNzc4NzdhIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiZGQ0ZmM0ZTljYTliMjFkMDdjMTE4MDQxOWQwNDZmODA1MDM2N2Q5NzMyMzMzZTRmZTIxMjBmMjhmYzMzZDcyYyIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiJkZWI5MzQ0NWU2OGNjNzk3NGZjMGM5OGUwNTJmODVjOThlYTJjN2IxNWIxMzA3ZTYwMjFmYmZlZGVlNjNkZDczIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6IjMxMzI1N2U1MTNmODBjMjA1YzZlZDY5MDA4NDMzZDNiMWEyZTRjZTkxNWM4MjQ5NmY2OGFiM2E0NjY2MzQwZDgiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiMTQzMjIxN2U0Yjc0N2Y3MGUyZWJiOGFmNDI1NjY3Y2ZlNmU0NDNjNDcyMTAxZDJjYzdjNGM1MGIxYWJjOTQ2MCIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidmFsdWUiOiIzZjgwYWI5YTFjZDhkMzc4MWRiNTI2YjBkNmY0Zjc3ZWVlY2UzNjEzYTc1YzgzNjliNmEyZjNmYjRjMjdkZTc3IiwicGF0aCI6InJlZmVyZW5jZSJ9LHsidmFsdWU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0eVByb29mLnR5cGUifSx7InZhbHVlIjoiZmYxNDljNjM3YWY5NGQzMTA2MjQxZjhlYjQ1ZDExYzYyNjM0N2MxYTNlYTgyZmYwNGQxYTQ3YTBiZmJiMTNkNyIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiMGNmY2EyY2YzN2VlYzA1MDRmODQxNWIxOGVlY2Q5NTYyYjgxYmMxYWUwYzVlMjFmYWU4MjEyNjViYmYwYjhkYiIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJhMjQ4MDg3MTQxMGM3NWU4MWQ3ZmZmMWYyYmIyYzRiODBkZTc2OTU0NjUzNGNjMTVkOWE1MmZiYzM2N2UyN2EzIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6Ijg2YjBlNzA2YjJjMTA5YTQ3YWU4OTdhNzQyNmNmMTUyODMzMWZhYzYwY2MxYTdlYzMwNzhlMTlkMGU2N2YyNWYiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", + "privacy": { + "obfuscated": [] + } + } +} diff --git a/test/fixtures/v3/documentStore-issued.json b/test/fixtures/v3/documentStore-issued.json new file mode 100644 index 0000000..6475bbc --- /dev/null +++ b/test/fixtures/v3/documentStore-issued.json @@ -0,0 +1,66 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DOCUMENT_STORE", + "value": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" + }, + "identityProof": { + "type": "DNS-TXT", + "identifier": "demo-tradetrust.openattestation.com" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "5ed3579c3fe686973ca50100b4be6751e012ea079ad7d01cde5faff9a59cc68e", + "proofs": [], + "merkleRoot": "5ed3579c3fe686973ca50100b4be6751e012ea079ad7d01cde5faff9a59cc68e", + "salts": "W3sidmFsdWUiOiJlZDA5Y2Q4NDYxNTgzNzRmZWExMjJlYmJjMjI5YTRiN2YzMjNiMTE4MDNlNmU2MzE3Y2U0MWQwY2YxYTJjYTgxIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiOThlMWJjN2I0ODVkNzMyZDUxYzI3NmZmZWNmZmRiYmY4OTYzZmM2NjkxYTBjNjAwNDU2ZjllMzRmYTNlNmU4OSIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiIyNGQ0NTFiM2MwOTM5MjFlNjFiOWE4OTcwNzJiMzQ3YjEwN2NhMWRmZDc5NDU4ZmY4YWY4N2NmODdkOTNkNDc2IiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ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obfuscated": [] + } + } +} diff --git a/test/fixtures/v3/documentStore-revoked.json b/test/fixtures/v3/documentStore-revoked.json new file mode 100644 index 0000000..c395f31 --- /dev/null +++ b/test/fixtures/v3/documentStore-revoked.json @@ -0,0 +1,66 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DOCUMENT_STORE", + "value": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" + }, + "identityProof": { + "type": "DNS-TXT", + "identifier": "demo-tradetrust.openattestation.com" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "c04f10d1ce474c1495f018f6507b776b4876f37b292d50af859e8ac6f568fcb9", + "proofs": [], + "merkleRoot": "c04f10d1ce474c1495f018f6507b776b4876f37b292d50af859e8ac6f568f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jY4NTVlYmY1NmJkMGE1YjI3MDgyYjBjNiIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJjNWFjMTI2ZGM4ZmJkNzZlOGYyNzM0ZGIwMjQxMDE3MjNhOGNjNjAyYWQ3YTFiZGYxYTM4MDYwMWU4YzI2NTZlIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6ImZlY2NmYjgyMDRhMWE3MzY5YzA0OGYwYmQ2ZTY3MTNlZDJjNjgyMzJhNGRjNzA0Y2RiMWFhZGFmY2Y1YWViNjAiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", + "privacy": { + "obfuscated": [] + } + } +} diff --git a/test/fixtures/v3/documentStore-wrapped.json b/test/fixtures/v3/documentStore-wrapped.json new file mode 100644 index 0000000..91bf810 --- /dev/null +++ b/test/fixtures/v3/documentStore-wrapped.json @@ -0,0 +1,66 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DOCUMENT_STORE", + "value": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" + }, + "identityProof": { + "type": "DNS-TXT", + "identifier": "demo-tradetrust.openattestation.com" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "1547783535718aeb881131fe12df6983232a8091ab221b13115a16445120f52a", + "proofs": [], + "merkleRoot": "1547783535718aeb881131fe12df6983232a8091ab221b13115a16445120f52a", + "salts": "W3sidmFsdWUiOiI2MTIxNTlhYWIzZWVmODFlZWE2NmM1OWUxZjkyYzVhMTNhZGYxNzUzNDJkYjMxNjk5ZTcwYjIwY2JiMWVmZTljIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMTZhOTMzNzVkMzk1ZDA0YmI1ZDQ5MTE4MGJhZjVjNTYwMzFhMGQ4M2QyMWM3ZDAzNzNmY2ZiNWQxZWUyOGU2OCIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI2MTBjMjE2YjI2NDkzMDRjZjAwMTlhYzU1NTYzYjYzZjNjMWVjM2M0OGI2ODhiNTgzNWEzYTY2YzAzZTM3YmUwIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6ImE1YmJkZWM0YWExNDNkZTU2MDVkMmMwNDc5NzA1MzVjM2IwYWJlMDAyYjkyYTFlNTBlNWVkZjliYjRmMjM3MDEiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiNmQwZmI4YzBkYjA5N2VlMWVlZDllNzIxMmRkMWFlNjI1NTZiYjA4NzNiYTQ5MGYyZmM5M2I5Y2Q2Yzk2YjU0OCIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidmF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GZjYjQ0MmUzMTU4MjBiNjljOTJmY2Q4MzE5Y2NmOWY3YTQ4NWU0YyIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiZjBlZGRhZjQyNjhmZDMzZTUwZGY1ZmEzMzI1NjE3Nzc0MTIxYzY2NDc3YjU4MjA5NmVlMGI2YTM4MWJhYjE2ZSIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiYTc5YWUxZDk0YTRlMzZlODc4ZTU3ZWJiY2ZkNjdmMTlhNWUxNmZkMjQ0MDNkMzJkNDYwMzZjNmRhYWM0MTg0ZCIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJmMDdmYjczMzNmMmMzZjEwMDRlYWQxZDcyZTA1MzAyMmI5NmNmM2M3MTM0ZGI2ZDIxMWMxY2IxMWM2MjViMTUzIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6ImMzZGJjMTU1ZmRjNmYyYjRiMTM5ZmNmYWZlODM5MzljNTlhNzFhNDJhODcyOTc5ZWJmYTQzNjVlNDQ5OGYyZjUiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", + "privacy": { + "obfuscated": [] + } + } +} diff --git a/test/fixtures/v3/documentStore.json b/test/fixtures/v3/documentStore.json new file mode 100644 index 0000000..3451c48 --- /dev/null +++ b/test/fixtures/v3/documentStore.json @@ -0,0 +1,58 @@ +{ + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": [ + "VerifiableCredential", + "DrivingLicenceCredential", + "OpenAttestationCredential" + ], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "DOCUMENT_STORE", + "value": "0x8bA63EAB43342AAc3AdBB4B827b68Cf4aAE5Caca" + }, + "identityProof": { + "type": "DNS-TXT", + "identifier": "example.tradetrust.io" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ] +} diff --git a/test/fixtures/v3/documents.ts b/test/fixtures/v3/documents.ts new file mode 100644 index 0000000..3210503 --- /dev/null +++ b/test/fixtures/v3/documents.ts @@ -0,0 +1,101 @@ +import { v3 } from "@tradetrust-tt/tradetrust"; + +export const baseDnsDidDocument: v3.OpenAttestationDocument = { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json", + ], + reference: "SERIAL_NUMBER_123", + name: "Republic of Singapore Driving Licence", + issuanceDate: "2010-01-01T19:23:24Z", + validFrom: "2010-01-01T19:23:24Z", + issuer: { + id: "https://example.com", + name: "DEMO STORE", + }, + type: ["VerifiableCredential", "DrivingLicenceCredential"], + credentialSubject: { + id: "did:example:SERIAL_NUMBER_123", + class: [ + { + type: "3", + effectiveDate: "2010-01-01T19:23:24Z", + }, + { + type: "3A", + effectiveDate: "2010-01-01T19:23:24Z", + }, + ], + }, + openAttestationMetadata: { + template: { + name: "CUSTOM_TEMPLATE", + type: v3.TemplateType.EmbeddedRenderer, + url: "https://localhost:3000/renderer", + }, + proof: { + type: v3.ProofType.OpenAttestationProofMethod, + method: v3.Method.Did, + value: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + revocation: { + type: v3.RevocationType.None, + }, + }, + identityProof: { + type: v3.IdentityProofType.DNSDid, + identifier: "example.tradetrust.io", + }, + }, + attachments: [ + { + fileName: "sample.pdf", + mimeType: "application/pdf", + data: "BASE64_ENCODED_FILE", + }, + ], +}; + +export const baseDidDocument: v3.OpenAttestationDocument = { + ...baseDnsDidDocument, + openAttestationMetadata: { + ...baseDnsDidDocument.openAttestationMetadata, + identityProof: { + type: v3.IdentityProofType.Did, + identifier: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + }, + }, +}; + +export const baseDocumentStoreDocument: v3.OpenAttestationDocument = { + ...baseDnsDidDocument, + openAttestationMetadata: { + ...baseDnsDidDocument.openAttestationMetadata, + proof: { + type: v3.ProofType.OpenAttestationProofMethod, + method: v3.Method.DocumentStore, + value: "0x8bA63EAB43342AAc3AdBB4B827b68Cf4aAE5Caca", + }, + identityProof: { + type: v3.IdentityProofType.DNSTxt, + identifier: "example.tradetrust.io", + }, + }, +}; + +export const baseTokenRegistryDocument: v3.OpenAttestationDocument = { + ...baseDnsDidDocument, + openAttestationMetadata: { + ...baseDnsDidDocument.openAttestationMetadata, + proof: { + type: v3.ProofType.OpenAttestationProofMethod, + method: v3.Method.TokenRegistry, + value: "0x13249BA1Ec6B957Eb35D34D7b9fE5D91dF225B5B", + }, + identityProof: { + type: v3.IdentityProofType.DNSTxt, + identifier: "example.tradetrust.io", + }, + }, +}; diff --git a/test/fixtures/v3/tokenRegistry-invalid-issued.json b/test/fixtures/v3/tokenRegistry-invalid-issued.json new file mode 100644 index 0000000..01c7480 --- /dev/null +++ b/test/fixtures/v3/tokenRegistry-invalid-issued.json @@ -0,0 +1,66 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "TOKEN_REGISTRY", + "value": "0x921dC7cEF00155ac3A33f04DA7395324d7809757" + }, + "identityProof": { + "type": "DNS-TXT", + "identifier": "notinuse.tradetrust.io" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "edfc79a4234884b58f3e4fcceedce6ad080da3b819562cce05564dfe5c830d93", + "proofs": [], + "merkleRoot": "edfc79a4234884b58f3e4fcceedce6ad080da3b819562cce05564dfe5c830d93", + "salts": "W3sidmFsdWUiOiI2N2ZjYjY0Mj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VjMTBlODUyM2NlNyIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJkY2MzMTEwZDhhNTcwMGEzYTUyYjk0NzlkOTI4YjQyNjNmZWNjYjc5ZDVjNDIwZGQ0NjRiY2I0YmI3YjcxMTY2IiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6ImJhYzY1MmZiYWFiZWNiMmMxYzhkYjE4MDAzMGQ0YjY2OGM2ZmRiNDZkZGE0OTQ1Mjg3YzkyNzdmNjExYjc5MTYiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", + "privacy": { + "obfuscated": [] + } + } +} diff --git a/test/fixtures/v3/tokenRegistry-issued.json b/test/fixtures/v3/tokenRegistry-issued.json new file mode 100644 index 0000000..9257a6d --- /dev/null +++ b/test/fixtures/v3/tokenRegistry-issued.json @@ -0,0 +1,66 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "TOKEN_REGISTRY", + "value": "0x921dC7cEF00155ac3A33f04DA7395324d7809757" + }, + "identityProof": { + "type": "DNS-TXT", + "identifier": "demo-tradetrust.openattestation.com" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "a00f351a0df1be8693b2faa23e5e89087fc2fab535d3e3f6e8a46655dea7d055", + "proofs": [], + "merkleRoot": "a00f351a0df1be8693b2faa23e5e89087fc2fab535d3e3f6e8a46655dea7d055", + "salts": "W3sidmFsdWUiOiI2OTcxZmM3YzFmNTBjY2U3MTU2OTJiNjVkNTg3OWMwODRiNDFjYzcyMzZmMjEwNTU1YTgyYmRkM2M0OTc2NjQ2IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiZjBhYTc3MjU0MGY4ZDUxMDA2MDFjZWY5YjkxM2I4MjM1OTI0OTk5ZWE1MzhiZTQ1MGRhNGRjMjI1MjIyYTkzNiIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiJmYWE3YmFiOWZhMjYwMjQwYzBiNmYzOTVjZTBjZDA2MzE3MmJkOTE4Mjk3YzBiNzY5MDAyYTlhZDc0ODFjNWY3IiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6IjRjM2ExNGVlMTI1NTAxZTk4NjZiYmUwMGYzOGEwYWZlMGZhNGI3NmMxMzE4ZmY2MDUyOTgzZDRjNTQyMmFkZGUiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiODY5YWFlNDFiM2RlZTNiODdhNGM0ZmU0MzBkOGNjNDQwZjNjMzU1ZDdlNDI3N2Y1OGMxYmY2MmM2YmRmZTJiNyIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidm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YxNTY4NDg2Yjk1ZGRmNThkMDczOWMyMzNmYzU1MmE0ZDJjM2I3ZTFlN2ZkMmQ2ZDQzYzk5ZWZhMGRiOSIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiNTk5MzI1NmE0NmJlOGZkYjA5ZDZjYmQ0YjQzY2Y0MGUxODI5Y2VkYWU1YzgyODQ0MzQxYTY3NTBjNGJiYzkwMyIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiMjkwOWM5MGNkMzJhZDBmNmRiMDAzNTEwMWNjYTY1MDgxYTVlYzJmMTQyODY3Y2Q2YWQyMzQwODliOTA5NzlmZCIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJlZWEyNDMxODliM2YyZDYxNjIyYWM2ZDQ4NjcyNDg0ODg5YzcwYWI0MjMxMDFkZjFjYWNmZTk2ZmRhZDAzMjA0IiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6IjliZTZmZTY4ZTQ0MzUwNDMwZWIxMDhmZTM3NTE4NGQzMmQzM2I4OWM5YjM4YmUxMzhmYmQwMmMyM2RhMTVmNjAiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", + "privacy": { + "obfuscated": [] + } + } +} diff --git a/test/fixtures/v3/tokenRegistry-wrapped.json b/test/fixtures/v3/tokenRegistry-wrapped.json new file mode 100644 index 0000000..ad787cf --- /dev/null +++ b/test/fixtures/v3/tokenRegistry-wrapped.json @@ -0,0 +1,66 @@ +{ + "version": "https://schema.openattestation.com/3.0/schema.json", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "TOKEN_REGISTRY", + "value": "0x921dC7cEF00155ac3A33f04DA7395324d7809757" + }, + "identityProof": { + "type": "DNS-TXT", + "identifier": "demo-tradetrust.openattestation.com" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "89286ff7f7526fc46a2b7e4302e6e0953501685ab7a5db07224625ba46b74bcd", + "proofs": [], + "merkleRoot": "89286ff7f7526fc46a2b7e4302e6e0953501685ab7a5db07224625ba46b74bcd", + "salts": "W3sidmFsdWUiOiI2MDZlYzQ4ZDk1ODdlMzVkMDI3MjQ4YmI4YjU5M2YyZTQyODI0NzZiODNhNzgxMzA3OTFmOGVmZDYzYWM2Zjg1IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiZDUwMWYzMjM0NDhlMjA4ZTc3N2QzMDFhODIyYzQ1MWQzNTkzNDViN2RhNTkyMjhhM2VhYWM0N2JjZDk4YjUwMSIsInBhdGg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YWx1ZSI6ImRhYTVlM2JjZDFmYTUyMzBkOTIxYzViNjYxYzUxODk4MGNhOTM1OTk5ZmE0ZGYzNmI3OTg2ZGVmY2RhMjhlOWIiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", + "privacy": { + "obfuscated": [] + } + } +} diff --git a/test/fixtures/v3/tokenRegistry.json b/test/fixtures/v3/tokenRegistry.json new file mode 100644 index 0000000..793196a --- /dev/null +++ b/test/fixtures/v3/tokenRegistry.json @@ -0,0 +1,54 @@ +{ + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", + "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", + "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" + ], + "reference": "SERIAL_NUMBER_123", + "name": "Republic of Singapore Driving Licence", + "issuanceDate": "2010-01-01T19:23:24Z", + "validFrom": "2010-01-01T19:23:24Z", + "issuer": { + "id": "https://example.com", + "type": "OpenAttestationIssuer", + "name": "DEMO STORE" + }, + "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], + "credentialSubject": { + "id": "did:example:SERIAL_NUMBER_123", + "class": [ + { + "type": "3", + "effectiveDate": "2010-01-01T19:23:24Z" + }, + { + "type": "3A", + "effectiveDate": "2010-01-01T19:23:24Z" + } + ] + }, + "openAttestationMetadata": { + "template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://localhost:3000/renderer" + }, + "proof": { + "type": "OpenAttestationProofMethod", + "method": "TOKEN_REGISTRY", + "value": "0x13249BA1Ec6B957Eb35D34D7b9fE5D91dF225B5B" + }, + "identityProof": { + "type": "DNS-TXT", + "identifier": "example.tradetrust.io" + } + }, + "attachments": [ + { + "fileName": "sample.pdf", + "mimeType": "application/pdf", + "data": "BASE64_ENCODED_FILE" + } + ] +} From 946f1513259b537e000fb43328bc033018d7ed1d Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Tue, 20 Feb 2024 10:25:02 +0800 Subject: [PATCH 24/34] test: verify dns-txt with document store --- .eslintrc.json | 4 +- index.ts | 27 + package-lock.json | 6502 ++++++++++++++++- package.json | 10 +- ...verfiy.dns-txt.v2.integration.test.ts.snap | 555 ++ src/verify/index.ts | 4 +- .../verfiy.dns-txt.v2.integration.test.ts | 83 + test/fixtures/v2/wrapped/dns-txt-doc-store.ts | 217 + test/prep/setup-contracts.mjs | 46 + tsconfig.json | 2 +- vite.config.ts | 8 + 11 files changed, 7182 insertions(+), 276 deletions(-) create mode 100644 index.ts create mode 100644 src/verify/__snapshots__/verfiy.dns-txt.v2.integration.test.ts.snap create mode 100644 src/verify/verfiy.dns-txt.v2.integration.test.ts create mode 100644 test/fixtures/v2/wrapped/dns-txt-doc-store.ts create mode 100644 test/prep/setup-contracts.mjs create mode 100644 vite.config.ts diff --git a/.eslintrc.json b/.eslintrc.json index 7f4deac..1df2b56 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,7 +13,7 @@ "plugins": ["@typescript-eslint"], "rules": { "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/consistent-type-definitions": ["error", "type"], - "no-duplicate-imports": "error" + "no-duplicate-imports": "error", + "typescript-eslint/no-explicit-any": "warn" } } diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..23c1317 --- /dev/null +++ b/index.ts @@ -0,0 +1,27 @@ +import { ethers } from 'ethers' +import { verify } from './src/verify' +import { dnsTxtDocStore } from './test/fixtures/v2/wrapped/dns-txt-doc-store' +import util from 'util' +// verify(documentGoerliValidWithToken, { network: 'goerli' }).then((err) => +// console.log(err) +// ) + +// const goerliVerifier = verificationBuilder({ network: 'goerli' }) +// goerliVerifier(documentGoerliValidWithToken).then((val) => { +// console.log({ val }) +// }) + +const localProvider = new ethers.providers.JsonRpcProvider( + 'http://127.0.0.1:8545' +) + +verify(dnsTxtDocStore, { provider: localProvider }).then((val) => { + console.log( + util.inspect(val, { + showHidden: false, + depth: null, + colors: true, + }) + ) + // console.log(val) +}) diff --git a/package-lock.json b/package-lock.json index 943be3f..340297d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,14 @@ "version": "1.0.6", "license": "ISC", "dependencies": { + "@tradetrust-tt/tradetrust": "^6.9.0", + "@tradetrust-tt/tradetrust-cli": "^2.17.1", "@tradetrust-tt/tradetrust-utils": "^1.9.1", "@tradetrust-tt/tt-verify": "^8.4.0", - "@vitest/coverage-v8": "^1.2.2" + "@vitest/coverage-v8": "^1.2.2", + "ethers": "^5.7.2", + "ganache": "^7.5.0", + "shelljs": "^0.8.5" }, "devDependencies": { "@commitlint/config-conventional": "^16.0.0", @@ -20,6 +25,7 @@ "commitizen": "^4.3.0", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.56.0", + "npm-run-all": "^4.1.5", "prettier": "^3.2.4", "typescript": "^5.3.3", "vitest": "^1.2.2" @@ -833,6 +839,30 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@ethereumjs/rlp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", + "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", + "bin": { + "rlp": "bin/rlp" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@ethereumjs/util": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", + "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", + "dependencies": { + "@ethereumjs/rlp": "^4.0.1", + "ethereum-cryptography": "^2.0.0", + "micro-ftch": "^0.3.1" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/@ethersproject/abi": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", @@ -1523,6 +1553,15 @@ "node": ">=12" } }, + "node_modules/@govtechsg/oa-encryption": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@govtechsg/oa-encryption/-/oa-encryption-1.3.5.tgz", + "integrity": "sha512-wBraQPBBpvfwrJ2ujhrihHndIixjgFGK/AyNG6KjHaWMwN9TrOh0MD+JroL23+z8ku4uM2gZgszG18ui6Ikx3A==", + "dependencies": { + "debug": "4.3.4", + "node-forge": "1.3.1" + } + }, "node_modules/@govtechsg/token-registry": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/@govtechsg/token-registry/-/token-registry-4.3.0.tgz", @@ -1651,6 +1690,28 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@noble/curves": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", + "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", + "dependencies": { + "@noble/hashes": "1.3.3" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1842,11 +1903,55 @@ "win32" ] }, + "node_modules/@scure/base": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.5.tgz", + "integrity": "sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", + "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", + "dependencies": { + "@noble/curves": "~1.3.0", + "@noble/hashes": "~1.3.2", + "@scure/base": "~1.1.4" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", + "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", + "dependencies": { + "@noble/hashes": "~1.3.2", + "@scure/base": "~1.1.4" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" }, + "node_modules/@snyk/protect": { + "version": "1.1280.0", + "resolved": "https://registry.npmjs.org/@snyk/protect/-/protect-1.1280.0.tgz", + "integrity": "sha512-huyztYdA2UzgEG4JGlJBDs8mnQyHisXbH6Onv58nrIjFa2mPhsZx2l0/Ey6HKOKva+ZlpMYM3hz4+iboIlXfNw==", + "bin": { + "snyk-protect": "bin/snyk-protect" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@tradetrust-tt/dnsprove": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/@tradetrust-tt/dnsprove/-/dnsprove-2.9.0.tgz", @@ -1857,6 +1962,22 @@ "runtypes": "^6.3.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", + "integrity": "sha512-wMTQkZ4FNzYvlWwaeKCHuV8fYxw+kefI38dTMHY5fpV3B5oaapePFGKHDs+4IrV1ZVFHQbqR/r/MP7dNwwjJDA==" + }, + "node_modules/@tradetrust-tt/token-registry": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/token-registry/-/token-registry-4.6.0.tgz", + "integrity": "sha512-1123HA/q+2ej5/YjQ4ZCekE6FQLxI0eVi9gVACIPV5yOADme1sGyxXPMhP7EDE5qB1taLjTbz2hoqD6COfzP1w==", + "dependencies": { + "@typechain/ethers-v5": "~10.0.0" + }, + "peerDependencies": { + "ethers": ">=5.0.8" + } + }, "node_modules/@tradetrust-tt/tradetrust": { "version": "6.9.0", "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust/-/tradetrust-6.9.0.tgz", @@ -1878,6 +1999,88 @@ "validator": "^13.7.0" } }, + "node_modules/@tradetrust-tt/tradetrust-cli": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust-cli/-/tradetrust-cli-2.17.1.tgz", + "integrity": "sha512-sv5+N7JLgmsSDzbzcRXvt8dyEdB9p2+NEpgbHnmusWTDGFj6oKjko82ZlCG/DCH0QFGcNNBq0AdOmyqxECqX1g==", + "dependencies": { + "@govtechsg/oa-encryption": "^1.3.3", + "@snyk/protect": "^1.1196.0", + "@tradetrust-tt/dnsprove": "^2.8.1", + "@tradetrust-tt/document-store": "^2.6.1", + "@tradetrust-tt/token-registry": "^4.5.0", + "@tradetrust-tt/tradetrust": "^6.9.0", + "@tradetrust-tt/tradetrust-config": "^1.5.1", + "@tradetrust-tt/tt-verify": "^8.4.0", + "ajv": "^8.4.0", + "ajv-formats": "^2.1.0", + "chalk": "^4.1.2", + "debug": "^4.3.2", + "ethers": "^5.4.7", + "ethers-aws-kms-signer": "^1.3.2", + "inquirer": "^8.0.0", + "mkdirp": "^1.0.4", + "node-fetch": "^2.6.1", + "signale": "^1.4.0", + "web3-utils": "^1.3.6", + "yargs": "^17.0.1" + }, + "bin": { + "tradetrust": "dist/cjs/index.js", + "tt": "dist/cjs/index.js" + } + }, + "node_modules/@tradetrust-tt/tradetrust-cli/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@tradetrust-tt/tradetrust-cli/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/@tradetrust-tt/tradetrust-config": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust-config/-/tradetrust-config-1.10.0.tgz", + "integrity": "sha512-20X62HTF9+EUNbuv73wiObNGaPwPRdhiOLTUyDgliKSMTLOmrU4MRiyp1tyyNulDvWqJ9rh380mzgWrb8zmN+Q==", + "dependencies": { + "ajv": "^8.12.0", + "ajv-formats": "^2.1.1", + "junk": "3.1.0", + "typedoc": "^0.25.4" + } + }, + "node_modules/@tradetrust-tt/tradetrust-config/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@tradetrust-tt/tradetrust-config/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, "node_modules/@tradetrust-tt/tradetrust-utils": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust-utils/-/tradetrust-utils-1.9.1.tgz", @@ -2380,7 +2583,6 @@ "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, "dependencies": { "type-fest": "^0.21.3" }, @@ -2395,7 +2597,6 @@ "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, "engines": { "node": ">=10" }, @@ -2407,11 +2608,15 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==" + }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -2441,6 +2646,22 @@ "node": ">=6" } }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-ify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", @@ -2456,6 +2677,44 @@ "node": ">=8" } }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -2473,6 +2732,69 @@ "node": ">= 4.0.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.6.tgz", + "integrity": "sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/aws-sdk": { + "version": "2.1560.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1560.0.tgz", + "integrity": "sha512-nakTZHytnhKWZpwu9d1crqjoegBRG+j1/rflsVnckXxoIwlKM0D/v/NIe+BJmRnCA2aCdwuMx3dtkgLz/AB6VA==", + "dependencies": { + "buffer": "4.9.2", + "events": "1.1.1", + "ieee754": "1.1.13", + "jmespath": "0.16.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "util": "^0.12.4", + "uuid": "8.0.0", + "xml2js": "0.6.2" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/aws-sdk/node_modules/buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/aws-sdk/node_modules/ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, + "node_modules/aws-sdk/node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/aws-sdk/node_modules/uuid": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", + "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/axios": { "version": "0.21.4", "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", @@ -2490,7 +2812,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, "funding": [ { "type": "github", @@ -2515,7 +2836,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -2531,7 +2851,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -2557,7 +2876,6 @@ "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, "funding": [ { "type": "github", @@ -2594,6 +2912,24 @@ "node": ">=6" } }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2643,8 +2979,7 @@ "node_modules/chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" }, "node_modules/check-error": { "version": "1.0.3", @@ -2661,7 +2996,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, "dependencies": { "restore-cursor": "^3.1.0" }, @@ -2673,7 +3007,6 @@ "version": "2.9.2", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "dev": true, "engines": { "node": ">=6" }, @@ -2685,16 +3018,27 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "dev": true, "engines": { "node": ">= 10" } }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "dev": true, "engines": { "node": ">=0.8" } @@ -3113,7 +3457,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dev": true, "dependencies": { "clone": "^1.0.2" }, @@ -3121,6 +3464,39 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", @@ -3210,19 +3586,121 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "optional": true, "dependencies": { "is-arrayish": "^0.2.1" } }, + "node_modules/es-abstract": { + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.4.tgz", + "integrity": "sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.7", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.2", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.1", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.0", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.1", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/esbuild": { "version": "0.19.12", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", @@ -3260,10 +3738,18 @@ "@esbuild/win32-x64": "0.19.12" } }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "engines": { "node": ">=10" @@ -3456,6 +3942,25 @@ "node": ">=0.10.0" } }, + "node_modules/ethereum-bloom-filters": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", + "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", + "dependencies": { + "js-sha3": "^0.8.0" + } + }, + "node_modules/ethereum-cryptography": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", + "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", + "dependencies": { + "@noble/curves": "1.3.0", + "@noble/hashes": "1.3.3", + "@scure/bip32": "1.3.3", + "@scure/bip39": "1.2.2" + } + }, "node_modules/ethers": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", @@ -3503,6 +4008,39 @@ "@ethersproject/wordlists": "5.7.0" } }, + "node_modules/ethers-aws-kms-signer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/ethers-aws-kms-signer/-/ethers-aws-kms-signer-1.3.2.tgz", + "integrity": "sha512-A/xsjCtUGXybpo7imThn4wWcOazHKQi9wnfs9ArPrgp4TmD7dH0bw0FsX71rr9QWsP6RCj0FAGsAxCKNWgEP/g==", + "dependencies": { + "asn1.js": "^5.4.1", + "aws-sdk": "^2.922.0", + "bn.js": "^5.2.0", + "debug": "^4.3.1", + "ethers": "^5.4.1" + }, + "engines": { + "node": ">= 10.18" + } + }, + "node_modules/ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", + "dependencies": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/ethjs-unit/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==" + }, "node_modules/ethr-did-registry": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/ethr-did-registry/-/ethr-did-registry-0.0.3.tgz", @@ -3526,6 +4064,14 @@ "querystring": "^0.2.1" } }, + "node_modules/events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==", + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/execa": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", @@ -3564,7 +4110,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, "dependencies": { "chardet": "^0.7.0", "iconv-lite": "^0.4.24", @@ -3620,7 +4165,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, "dependencies": { "escape-string-regexp": "^1.0.5" }, @@ -3635,7 +4179,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, "engines": { "node": ">=0.8.0" } @@ -3770,6 +4313,14 @@ } } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -3803,246 +4354,4283 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "engines": { - "node": "*" - } - }, - "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "engines": { - "node": ">=16" - }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" }, "engines": { - "node": "*" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ganache": { + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/ganache/-/ganache-7.9.2.tgz", + "integrity": "sha512-7gsVVDpO9AhrFyDMWWl7SpMsPpqGcnAzjxz3k32LheIPNd64p2XsY9GYRdhWmKuryb60W1iaWPZWDkFKlbRWHA==", + "bundleDependencies": [ + "@trufflesuite/bigint-buffer", + "keccak", + "leveldown", + "secp256k1" + ], + "hasShrinkwrap": true, + "dependencies": { + "@trufflesuite/bigint-buffer": "1.1.10", + "@trufflesuite/uws-js-unofficial": "20.30.0-unofficial.0", + "@types/bn.js": "^5.1.0", + "@types/lru-cache": "5.1.1", + "@types/seedrandom": "3.0.1", + "abstract-level": "1.0.3", + "abstract-leveldown": "7.2.0", + "async-eventemitter": "0.2.4", + "emittery": "0.10.0", + "keccak": "3.0.2", + "leveldown": "6.1.0", + "secp256k1": "4.0.3" + }, + "bin": { + "ganache": "dist/node/cli.js", + "ganache-cli": "dist/node/cli.js" + }, + "optionalDependencies": { + "bufferutil": "4.0.5", + "utf-8-validate": "5.0.7" + } + }, + "node_modules/ganache/node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "extraneous": true, "dependencies": { - "is-glob": "^4.0.1" + "@jridgewell/trace-mapping": "0.3.9" }, "engines": { - "node": ">= 6" + "node": ">=12" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/ganache/node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "extraneous": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "node_modules/ganache/node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "extraneous": true, "engines": { - "node": "*" + "node": ">=10.0.0" } }, - "node_modules/global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", - "dev": true, - "optional": true, + "node_modules/ganache/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "extraneous": true, "dependencies": { - "ini": "^1.3.4" + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { - "node": ">=4" + "node": ">=6.0.0" } }, - "node_modules/global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "dependencies": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - }, + "node_modules/ganache/node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "extraneous": true, "engines": { - "node": ">=0.10.0" + "node": ">=6.0.0" } }, - "node_modules/global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", - "dev": true, - "dependencies": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, + "node_modules/ganache/node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "extraneous": true, "engines": { - "node": ">=0.10.0" + "node": ">=6.0.0" } }, - "node_modules/global-prefix/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, + "node_modules/ganache/node_modules/@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "extraneous": true, "dependencies": { - "isexe": "^2.0.0" + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "node_modules/ganache/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "extraneous": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/ganache/node_modules/@microsoft/api-extractor": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.20.1.tgz", + "integrity": "sha512-T7cqcK+JpvHGOj7cD2ZCCWS7Xgru1uOqZwrV/FSUdyKVs5fopZcbBSuetwD/akst3O7Ypryg3UOLP54S/vnVmA==", + "extraneous": true, + "dependencies": { + "@microsoft/api-extractor-model": "7.16.0", + "@microsoft/tsdoc": "0.13.2", + "@microsoft/tsdoc-config": "~0.15.2", + "@rushstack/node-core-library": "3.45.1", + "@rushstack/rig-package": "0.3.8", + "@rushstack/ts-command-line": "4.10.7", + "colors": "~1.2.1", + "lodash": "~4.17.15", + "resolve": "~1.17.0", + "semver": "~7.3.0", + "source-map": "~0.6.1", + "typescript": "~4.5.2" }, "bin": { - "which": "bin/which" + "api-extractor": "bin/api-extractor" } }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, + "node_modules/ganache/node_modules/@microsoft/api-extractor-model": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.16.0.tgz", + "integrity": "sha512-0FOrbNIny8mzBrzQnSIkEjAXk0JMSnPmWYxt3ZDTPVg9S8xIPzB6lfgTg9+Mimu0RKCpGKBpd+v2WcR5vGzyUQ==", + "extraneous": true, "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "@microsoft/tsdoc": "0.13.2", + "@microsoft/tsdoc-config": "~0.15.2", + "@rushstack/node-core-library": "3.45.1" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" + "node_modules/ganache/node_modules/@microsoft/api-extractor/node_modules/typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "extraneous": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4.2.0" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + "node_modules/ganache/node_modules/@microsoft/tsdoc": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz", + "integrity": "sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg==", + "extraneous": true }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "node_modules/ganache/node_modules/@microsoft/tsdoc-config": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz", + "integrity": "sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA==", + "extraneous": true, + "dependencies": { + "@microsoft/tsdoc": "0.13.2", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" + } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" + "node_modules/ganache/node_modules/@microsoft/tsdoc-config/node_modules/resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "extraneous": true, + "dependencies": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" } }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "node_modules/ganache/node_modules/@rushstack/node-core-library": { + "version": "3.45.1", + "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.45.1.tgz", + "integrity": "sha512-BwdssTNe007DNjDBxJgInHg8ePytIPyT0La7ZZSQZF9+rSkT42AygXPGvbGsyFfEntjr4X37zZSJI7yGzL16cQ==", + "extraneous": true, "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "@types/node": "12.20.24", + "colors": "~1.2.1", + "fs-extra": "~7.0.1", + "import-lazy": "~4.0.0", + "jju": "~1.4.0", + "resolve": "~1.17.0", + "semver": "~7.3.0", + "timsort": "~0.3.0", + "z-schema": "~5.0.2" } }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "node_modules/ganache/node_modules/@rushstack/node-core-library/node_modules/@types/node": { + "version": "12.20.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.24.tgz", + "integrity": "sha512-yxDeaQIAJlMav7fH5AQqPH1u8YIuhYJXYBzxaQ4PifsU0GDO38MSdmEDeRlIxrKbC6NbEaaEHDanWb+y30U8SQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@rushstack/rig-package": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.3.8.tgz", + "integrity": "sha512-MDWg1xovea99PWloSiYMjFcCLsrdjFtYt6aOyHNs5ojn5mxrzR6U9F83hvbQjTWnKPMvZtr0vcek+4n+OQOp3Q==", + "extraneous": true, "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "resolve": "~1.17.0", + "strip-json-comments": "~3.1.1" } }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, + "node_modules/ganache/node_modules/@rushstack/ts-command-line": { + "version": "4.10.7", + "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.10.7.tgz", + "integrity": "sha512-CjS+DfNXUSO5Ab2wD1GBGtUTnB02OglRWGqfaTcac9Jn45V5MeUOsq/wA8wEeS5Y/3TZ2P1k+IWdVDiuOFP9Og==", + "extraneous": true, "dependencies": { - "parse-passwd": "^1.0.0" + "@types/argparse": "1.0.38", + "argparse": "~1.0.9", + "colors": "~1.2.1", + "string-argv": "~0.3.1" + } + }, + "node_modules/ganache/node_modules/@trufflesuite/bigint-buffer": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/@trufflesuite/bigint-buffer/-/bigint-buffer-1.1.10.tgz", + "integrity": "sha512-pYIQC5EcMmID74t26GCC67946mgTJFiLXOT/BYozgrd4UEY2JHEGLhWi9cMiQCt5BSqFEvKkCHNnoj82SRjiEw==", + "hasInstallScript": true, + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "node-gyp-build": "4.4.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 14.0.0" } }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==" - }, - "node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "engines": { - "node": ">=16.17.0" + "node_modules/ganache/node_modules/@trufflesuite/bigint-buffer/node_modules/node-gyp-build": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.4.0.tgz", + "integrity": "sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ==", + "inBundle": true, + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" } }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, + "node_modules/ganache/node_modules/@trufflesuite/uws-js-unofficial": { + "version": "20.30.0-unofficial.0", + "resolved": "https://registry.npmjs.org/@trufflesuite/uws-js-unofficial/-/uws-js-unofficial-20.30.0-unofficial.0.tgz", + "integrity": "sha512-r5X0aOQcuT6pLwTRLD+mPnAM/nlKtvIK4Z+My++A8tTOR0qTjNRx8UB8jzRj3D+p9PMAp5LnpCUUGmz7/TppwA==", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "ws": "8.13.0" }, - "engines": { - "node": ">=0.10.0" + "optionalDependencies": { + "bufferutil": "4.0.7", + "utf-8-validate": "6.0.3" + } + }, + "node_modules/ganache/node_modules/@trufflesuite/uws-js-unofficial/node_modules/bufferutil": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", + "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/ganache/node_modules/@trufflesuite/uws-js-unofficial/node_modules/utf-8-validate": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-6.0.3.tgz", + "integrity": "sha512-uIuGf9TWQ/y+0Lp+KGZCMuJWc3N9BHA+l/UmHd/oUHwJJDeysyTRxNQVkbzsIWfGFbRe3OcgML/i0mvVRPOyDA==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/ganache/node_modules/@trufflesuite/uws-js-unofficial/node_modules/ws": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/ganache/node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@types/abstract-leveldown": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz", + "integrity": "sha512-q5veSX6zjUy/DlDhR4Y4cU0k2Ar+DT2LUraP00T19WLmTO6Se1djepCCaqU6nQrwcJ5Hyo/CWqxTzrrFg8eqbQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@types/argparse": { + "version": "1.0.38", + "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz", + "integrity": "sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/ganache/node_modules/@types/eslint": { + "version": "8.4.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.10.tgz", + "integrity": "sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw==", + "extraneous": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/ganache/node_modules/@types/eslint-scope": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "extraneous": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/ganache/node_modules/@types/estree": { + "version": "0.0.50", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", + "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@types/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==" + }, + "node_modules/ganache/node_modules/@types/mocha": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.0.0.tgz", + "integrity": "sha512-scN0hAWyLVAvLR9AyW7HoFF5sJZglyBsbPuHO4fv7JRvfmPBMfp1ozWqOf/e4wwPNxezBZXRfWzMb6iFLgEVRA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@types/node": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.0.tgz", + "integrity": "sha512-eMhwJXc931Ihh4tkU+Y7GiLzT/y/DBNpNtr4yU9O2w3SYBsr9NaOPhQlLKRmoWtI54uNwuo0IOUFQjVOTZYRvw==" + }, + "node_modules/ganache/node_modules/@types/seedrandom": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-3.0.1.tgz", + "integrity": "sha512-giB9gzDeiCeloIXDgzFBCgjj1k4WxcDrZtGl6h1IqmUPlxF+Nx8Ve+96QCyDZ/HseB/uvDsKbpib9hU5cU53pw==" + }, + "node_modules/ganache/node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "extraneous": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "node_modules/ganache/node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "extraneous": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/ganache/node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "extraneous": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "node_modules/ganache/node_modules/@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "extraneous": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/ganache/node_modules/@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "extraneous": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/ganache/node_modules/@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "extraneous": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "node_modules/ganache/node_modules/@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "extraneous": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/ganache/node_modules/@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "extraneous": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "node_modules/ganache/node_modules/@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "extraneous": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/ganache/node_modules/@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "extraneous": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/ganache/node_modules/@webpack-cli/configtest": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", + "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@webpack-cli/info": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", + "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", + "extraneous": true, + "dependencies": { + "envinfo": "^7.7.3" + } + }, + "node_modules/ganache/node_modules/@webpack-cli/serve": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", + "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/abstract-level": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", + "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==", + "dependencies": { + "buffer": "^6.0.3", + "catering": "^2.1.0", + "is-buffer": "^2.0.5", + "level-supports": "^4.0.0", + "level-transcoder": "^1.0.1", + "module-error": "^1.0.1", + "queue-microtask": "^1.2.3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/ganache/node_modules/abstract-level/node_modules/level-supports": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz", + "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/ganache/node_modules/abstract-leveldown": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz", + "integrity": "sha512-DnhQwcFEaYsvYDnACLZhMmCWd3rkOeEvglpa4q5i/5Jlm3UIsWaxVzuXvDLFCSCWRO3yy2/+V/G7FusFgejnfQ==", + "inBundle": true, + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3", + "catering": "^2.0.0", + "is-buffer": "^2.0.5", + "level-concat-iterator": "^3.0.0", + "level-supports": "^2.0.1", + "queue-microtask": "^1.2.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/acorn": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", + "extraneous": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ganache/node_modules/acorn-import-assertions": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "extraneous": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ganache/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "extraneous": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "node_modules/ganache/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "extraneous": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "extraneous": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "extraneous": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "extraneous": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/ganache/node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "extraneous": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/ganache/node_modules/asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "extraneous": true, + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/ganache/node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/assert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", + "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", + "extraneous": true, + "dependencies": { + "es6-object-assign": "^1.1.0", + "is-nan": "^1.2.1", + "object-is": "^1.0.1", + "util": "^0.12.0" + } + }, + "node_modules/ganache/node_modules/async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/ganache/node_modules/async-eventemitter": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", + "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", + "dependencies": { + "async": "^2.4.0" + } + }, + "node_modules/ganache/node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "extraneous": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ganache/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache/node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "extraneous": true, + "engines": { + "node": "*" + } + }, + "node_modules/ganache/node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "extraneous": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "extraneous": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/ganache/node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "extraneous": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache/node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "extraneous": true, + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ganache/node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "extraneous": true, + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/ganache/node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "extraneous": true, + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/ganache/node_modules/browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "extraneous": true, + "dependencies": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "node_modules/ganache/node_modules/browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "extraneous": true, + "dependencies": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "node_modules/ganache/node_modules/browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "extraneous": true, + "dependencies": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/ganache/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/ganache/node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "extraneous": true + }, + "node_modules/ganache/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==", + "extraneous": true + }, + "node_modules/ganache/node_modules/bufferutil": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.5.tgz", + "integrity": "sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/ganache/node_modules/builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "extraneous": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "node_modules/ganache/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "extraneous": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/caniuse-lite": { + "version": "1.0.30001435", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001435.tgz", + "integrity": "sha512-kdCkUTjR+v4YAJelyiDTqiu82BDr4W4CP5sgTA0ZBmqn30XfS2ZghPLMowik9TPhS+psWJiUNxsqLyurDbmutA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/catering": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz", + "integrity": "sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "extraneous": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "extraneous": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/chokidar": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "extraneous": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/ganache/node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "extraneous": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/ganache/node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "extraneous": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ganache/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "extraneous": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/ganache/node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "extraneous": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "extraneous": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ganache/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/colorette": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/colors": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz", + "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==", + "extraneous": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/ganache/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "extraneous": true + }, + "node_modules/ganache/node_modules/create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "extraneous": true, + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/ganache/node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "extraneous": true, + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/ganache/node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "extraneous": true, + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/ganache/node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "extraneous": true, + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/ganache/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "extraneous": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/ganache/node_modules/crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "extraneous": true, + "dependencies": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ganache/node_modules/debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "extraneous": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/ganache/node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "extraneous": true + }, + "node_modules/ganache/node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "extraneous": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "extraneous": true, + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ganache/node_modules/des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "extraneous": true, + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/ganache/node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "extraneous": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/ganache/node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "extraneous": true, + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/ganache/node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/electron-to-chromium": { + "version": "1.4.284", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", + "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "inBundle": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/ganache/node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache/node_modules/emittery": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.0.tgz", + "integrity": "sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==", + "engines": { + "node": ">=12" + } + }, + "node_modules/ganache/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "extraneous": true + }, + "node_modules/ganache/node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "extraneous": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/ganache/node_modules/enhanced-resolve": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", + "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", + "extraneous": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ganache/node_modules/envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "extraneous": true, + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ganache/node_modules/es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "extraneous": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "extraneous": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "extraneous": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/ganache/node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "extraneous": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/ganache/node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "extraneous": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/ganache/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "extraneous": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/ganache/node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "extraneous": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/ganache/node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "extraneous": true, + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/ganache/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "extraneous": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "extraneous": true + }, + "node_modules/ganache/node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "extraneous": true, + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/ganache/node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "extraneous": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "extraneous": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "extraneous": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/ganache/node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "extraneous": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/ganache/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "extraneous": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/ganache/node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "extraneous": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/ganache/node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "extraneous": true + }, + "node_modules/ganache/node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "extraneous": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/ganache/node_modules/get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "extraneous": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "node_modules/ganache/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "extraneous": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "extraneous": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ganache/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "extraneous": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ganache/node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "extraneous": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + } + }, + "node_modules/ganache/node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "extraneous": true, + "engines": { + "node": ">=4.x" + } + }, + "node_modules/ganache/node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "extraneous": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/ganache/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "extraneous": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "extraneous": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + } + }, + "node_modules/ganache/node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "extraneous": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ganache/node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "extraneous": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ganache/node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "extraneous": true, + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ganache/node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/ganache/node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "extraneous": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/ganache/node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "inBundle": true, + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/ganache/node_modules/https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", + "extraneous": true + }, + "node_modules/ganache/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "extraneous": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/ganache/node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "BSD-3-Clause" + }, + "node_modules/ganache/node_modules/import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", + "extraneous": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "extraneous": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "extraneous": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/ganache/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "inBundle": true, + "license": "ISC" + }, + "node_modules/ganache/node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "extraneous": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/ganache/node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "extraneous": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ganache/node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "extraneous": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/ganache/node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "extraneous": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ganache/node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "extraneous": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/ganache/node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "extraneous": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ganache/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", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "extraneous": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "extraneous": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ganache/node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "extraneous": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ganache/node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "extraneous": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ganache/node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "extraneous": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/ganache/node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "extraneous": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "extraneous": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ganache/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "extraneous": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "extraneous": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ganache/node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "extraneous": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "extraneous": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ganache/node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "extraneous": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/ganache/node_modules/jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "extraneous": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/ganache/node_modules/js-yaml/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "extraneous": true + }, + "node_modules/ganache/node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "extraneous": true + }, + "node_modules/ganache/node_modules/json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "extraneous": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "extraneous": true, + "dependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/ganache/node_modules/keccak": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.2.tgz", + "integrity": "sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ==", + "hasInstallScript": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/ganache/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "extraneous": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ganache/node_modules/level-concat-iterator": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-3.1.0.tgz", + "integrity": "sha512-BWRCMHBxbIqPxJ8vHOvKUsaO0v1sLYZtjN3K2iZJsRBYtp+ONsY6Jfi6hy9K3+zolgQRryhIn2NRZjZnWJ9NmQ==", + "inBundle": true, + "license": "MIT", + "dependencies": { + "catering": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/level-js": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/level-js/-/level-js-6.1.0.tgz", + "integrity": "sha512-i7mPtkZm68aewfv0FnIUWvFUFfoyzIvVKnUmuQGrelEkP72vSPTaA1SGneWWoCV5KZJG4wlzbJLp1WxVNGuc6A==", + "extraneous": true, + "dependencies": { + "abstract-leveldown": "^7.2.0", + "buffer": "^6.0.3", + "inherits": "^2.0.3", + "ltgt": "^2.1.2", + "run-parallel-limit": "^1.1.0" + } + }, + "node_modules/ganache/node_modules/level-supports": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-2.1.0.tgz", + "integrity": "sha512-E486g1NCjW5cF78KGPrMDRBYzPuueMZ6VBXHT6gC7A8UYWGiM14fGgp+s/L1oFfDWSPV/+SFkYCmZ0SiESkRKA==", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/level-transcoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", + "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", + "dependencies": { + "buffer": "^6.0.3", + "module-error": "^1.0.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/ganache/node_modules/leveldown": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz", + "integrity": "sha512-8C7oJDT44JXxh04aSSsfcMI8YiaGRhOFI9/pMEL7nWJLVsWajDPTRxsSHTM2WcTVY5nXM+SuRHzPPi0GbnDX+w==", + "hasInstallScript": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "abstract-leveldown": "^7.2.0", + "napi-macros": "~2.0.0", + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/ganache/node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "extraneous": true, + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/ganache/node_modules/loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "extraneous": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/ganache/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "extraneous": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/ganache/node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "extraneous": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "extraneous": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/ltgt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", + "integrity": "sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/mcl-wasm": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.9.0.tgz", + "integrity": "sha512-rvU7L/68ZrDk4dpPZteiEqvK9nB/1XbbHmuLK6qIvc4xuuJb/iv1p5X3KEyq6AYatLnc+zbdSlLXTlKgTnCRZQ==", + "extraneous": true, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/ganache/node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "extraneous": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/ganache/node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "extraneous": true + }, + "node_modules/ganache/node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "extraneous": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/ganache/node_modules/miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "extraneous": true, + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/ganache/node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "extraneous": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ganache/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "extraneous": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ganache/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "extraneous": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "inBundle": true, + "license": "ISC" + }, + "node_modules/ganache/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": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "extraneous": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ganache/node_modules/minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "extraneous": true + }, + "node_modules/ganache/node_modules/mocha": { + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.3.tgz", + "integrity": "sha512-Xcpl9FqXOAYqI3j79pEtHBBnQgVXIhpULjGQa7DVb0Po+VzmSIK9kanAiWLHoRR/dbZ2qpdPshuXr8l1VaHCzw==", + "extraneous": true, + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.2", + "debug": "4.3.2", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.7", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "3.0.4", + "ms": "2.1.3", + "nanoid": "3.1.25", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "workerpool": "6.1.5", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/ganache/node_modules/module-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", + "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/nanoid": { + "version": "3.1.25", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", + "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==", + "extraneous": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/ganache/node_modules/napi-macros": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", + "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache/node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "extraneous": true + }, + "node_modules/ganache/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==", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache/node_modules/node-gyp-build": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", + "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", + "inBundle": true, + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/ganache/node_modules/node-loader": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/node-loader/-/node-loader-1.0.2.tgz", + "integrity": "sha512-myxAxpyMR7knjA4Uzwf3gjxaMtxSWj2vpm9o6AYWWxQ1S3XMBNeG2vzYcp/5eW03cBGfgSxyP+wntP8qhBJNhQ==", + "extraneous": true, + "dependencies": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/ganache/node_modules/node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "extraneous": true + }, + "node_modules/ganache/node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "extraneous": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ganache/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "extraneous": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "extraneous": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ganache/node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "extraneous": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ganache/node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "extraneous": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/ganache/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "extraneous": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", + "extraneous": true + }, + "node_modules/ganache/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "extraneous": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "extraneous": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "extraneous": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "extraneous": true, + "dependencies": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/ganache/node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "extraneous": true + }, + "node_modules/ganache/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "extraneous": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "extraneous": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ganache/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "extraneous": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "extraneous": true, + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/ganache/node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "extraneous": true, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/ganache/node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "extraneous": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "extraneous": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "extraneous": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "extraneous": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "extraneous": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "extraneous": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/ganache/node_modules/public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "extraneous": true, + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/ganache/node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "extraneous": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache/node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "extraneous": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/ganache/node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "extraneous": true, + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "node_modules/ganache/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ganache/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "extraneous": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/ganache/node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "extraneous": true, + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/ganache/node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "extraneous": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ganache/node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "extraneous": true, + "dependencies": { + "path-parse": "^1.0.6" + } + }, + "node_modules/ganache/node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "extraneous": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "extraneous": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "extraneous": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/ganache/node_modules/run-parallel-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz", + "integrity": "sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==", + "extraneous": true, + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/ganache/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache/node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "extraneous": true + }, + "node_modules/ganache/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "extraneous": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/ganache/node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", + "hasInstallScript": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "elliptic": "^6.5.4", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/ganache/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "extraneous": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "extraneous": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/ganache/node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "extraneous": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/ganache/node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "extraneous": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "extraneous": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/shebang-loader": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/shebang-loader/-/shebang-loader-0.0.1.tgz", + "integrity": "sha512-nQvhUHvKyzGK5aqPxHfHB5nlAN2EZ2U61S2G0YrxAuCRU5iGhFcxxRiaAdb18UoRS1zVMhRz4gdQ1xFEg3AOyA==", + "extraneous": true + }, + "node_modules/ganache/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "extraneous": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "extraneous": true, + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ganache/node_modules/shx": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.3.tgz", + "integrity": "sha512-nZJ3HFWVoTSyyB+evEKjJ1STiixGztlqwKLTUNV5KqMWtGey9fTd4KU1gdZ1X9BV6215pswQ/Jew9NsuS/fNDA==", + "extraneous": true, + "dependencies": { + "minimist": "^1.2.3", + "shelljs": "^0.8.4" + }, + "bin": { + "shx": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "extraneous": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ganache/node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "extraneous": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/ganache/node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "extraneous": true + }, + "node_modules/ganache/node_modules/stream-browserify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", + "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", + "extraneous": true, + "dependencies": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, + "node_modules/ganache/node_modules/stream-http": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", + "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", + "extraneous": true, + "dependencies": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + } + }, + "node_modules/ganache/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "inBundle": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/ganache/node_modules/string-argv": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "extraneous": true, + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/ganache/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "extraneous": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "extraneous": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "extraneous": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "extraneous": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ganache/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "extraneous": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "extraneous": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/terser": { + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.1.tgz", + "integrity": "sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==", + "extraneous": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/terser-webpack-plugin": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.2.5.tgz", + "integrity": "sha512-3luOVHku5l0QBeYS8r4CdHYWEGMmIj3H1U64jgkdZzECcSOJAyJ9TjuqcQZvw1Y+4AOBN9SeYJPJmFn2cM4/2g==", + "extraneous": true, + "dependencies": { + "jest-worker": "^27.0.6", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "source-map": "^0.6.1", + "terser": "^5.7.2" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/ganache/node_modules/timsort": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", + "integrity": "sha512-qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A==", + "extraneous": true + }, + "node_modules/ganache/node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "extraneous": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ganache/node_modules/ts-loader": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.3.1.tgz", + "integrity": "sha512-OkyShkcZTsTwyS3Kt7a4rsT/t2qvEVQuKCTg4LJmpj9fhFR7ukGdZwV6Qq3tRUkqcXtfGpPR7+hFKHCG/0d3Lw==", + "extraneous": true, + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/ganache/node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "extraneous": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + } + }, + "node_modules/ganache/node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "extraneous": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/ganache/node_modules/typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "extraneous": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ganache/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "extraneous": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/ganache/node_modules/update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "extraneous": true, + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + } + }, + "node_modules/ganache/node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "extraneous": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/ganache/node_modules/utf-8-validate": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.7.tgz", + "integrity": "sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/ganache/node_modules/util": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", + "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", + "extraneous": true, + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/ganache/node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache/node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "extraneous": true + }, + "node_modules/ganache/node_modules/validator": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", + "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", + "extraneous": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/ganache/node_modules/watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "extraneous": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ganache/node_modules/webpack": { + "version": "5.65.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.65.0.tgz", + "integrity": "sha512-Q5or2o6EKs7+oKmJo7LaqZaMOlDWQse9Tm5l1WAfU/ujLGN5Pb0SqGeVkN/4bpPmEqEP5RnVhiqsOtWtUVwGRw==", + "extraneous": true, + "dependencies": { + "@types/eslint-scope": "^3.7.0", + "@types/estree": "^0.0.50", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.4.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.8.3", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.4", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.3.1", + "webpack-sources": "^3.2.2" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ganache/node_modules/webpack-cli": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.9.1.tgz", + "integrity": "sha512-JYRFVuyFpzDxMDB+v/nanUdQYcZtqFPGzmlW4s+UkPMFhSpfRNmf1z4AwYcHJVdvEFAM7FFCQdNTpsBYhDLusQ==", + "extraneous": true, + "dependencies": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.1.0", + "@webpack-cli/info": "^1.4.0", + "@webpack-cli/serve": "^1.6.0", + "colorette": "^2.0.14", + "commander": "^7.0.0", + "execa": "^5.0.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ganache/node_modules/webpack-cli/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "extraneous": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/ganache/node_modules/webpack-cli/node_modules/interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "extraneous": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/ganache/node_modules/webpack-cli/node_modules/rechoir": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "extraneous": true, + "dependencies": { + "resolve": "^1.9.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/ganache/node_modules/webpack-merge": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "extraneous": true, + "dependencies": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/ganache/node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "extraneous": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ganache/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "extraneous": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/ganache/node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "extraneous": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ganache/node_modules/wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/workerpool": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz", + "integrity": "sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw==", + "extraneous": true + }, + "node_modules/ganache/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "extraneous": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "extraneous": true + }, + "node_modules/ganache/node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "extraneous": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/ganache/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "extraneous": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "extraneous": true + }, + "node_modules/ganache/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "extraneous": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "extraneous": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "extraneous": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "extraneous": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "extraneous": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ganache/node_modules/z-schema": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-5.0.4.tgz", + "integrity": "sha512-gm/lx3hDzJNcLwseIeQVm1UcwhWIKpSB4NqH89pTBtFns4k/HDHudsICtvG05Bvw/Mv3jMyk700y5dadueLHdA==", + "extraneous": true, + "dependencies": { + "commander": "^2.20.3", + "lodash.get": "^4.4.2", + "lodash.isequal": "^4.5.0", + "validator": "^13.7.0" + }, + "bin": { + "z-schema": "bin/z-schema" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", + "dev": true, + "optional": true, + "dependencies": { + "ini": "^1.3.4" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "dev": true, + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hasown": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==" + }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" } }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, "funding": [ { "type": "github", @@ -4116,7 +8704,6 @@ "version": "8.2.5", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", - "dev": true, "dependencies": { "ansi-escapes": "^4.2.1", "chalk": "^4.1.1", @@ -4138,18 +8725,134 @@ "node": ">=12.0.0" } }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, - "optional": true + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -4163,11 +8866,24 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, "engines": { "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -4180,15 +8896,35 @@ "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==", + "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", "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true, "engines": { "node": ">=8" } }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -4198,6 +8934,21 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", @@ -4213,25 +8964,96 @@ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dependencies": { + "which-typed-array": "^1.1.14" + }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, "engines": { "node": ">=10" }, @@ -4245,6 +9067,18 @@ "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", "dev": true }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -4254,6 +9088,11 @@ "node": ">=0.10.0" } }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -4315,6 +9154,14 @@ "jiti": "bin/jiti.js" } }, + "node_modules/jmespath": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz", + "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/js-base64": { "version": "3.7.6", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.6.tgz", @@ -4350,6 +9197,11 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -4386,6 +9238,14 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/junk": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz", + "integrity": "sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==", + "engines": { + "node": ">=8" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -4415,6 +9275,40 @@ "dev": true, "optional": true }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file/node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "engines": { + "node": ">=4" + } + }, "node_modules/local-pkg": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", @@ -4493,7 +9387,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -4533,6 +9426,11 @@ "node": ">=10" } }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==" + }, "node_modules/magic-string": { "version": "0.30.6", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.6.tgz", @@ -4568,6 +9466,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/merge": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/merge/-/merge-2.1.1.tgz", @@ -4588,6 +9506,11 @@ "node": ">= 8" } }, + "node_modules/micro-ftch": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", + "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==" + }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -4626,7 +9549,6 @@ "version": "9.0.3", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, @@ -4650,7 +9572,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "peer": true, "bin": { "mkdirp": "bin/cmd.js" }, @@ -4677,8 +9598,7 @@ "node_modules/mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" }, "node_modules/nanoid": { "version": "3.3.7", @@ -4703,6 +9623,12 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "node_modules/node-cache": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/node-cache/-/node-cache-5.1.2.tgz", @@ -4741,6 +9667,220 @@ } } }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all/index.js", + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm-run-all/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/npm-run-all/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/npm-run-all/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/npm-run-all/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/npm-run-all/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/npm-run-all/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/npm-run-all/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/npm-run-all/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/npm-run-path": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", @@ -4760,10 +9900,64 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "engines": { - "node": ">=12" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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==", + "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==" + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/once": { @@ -4809,7 +10003,6 @@ "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dev": true, "dependencies": { "bl": "^4.1.0", "chalk": "^4.1.0", @@ -4832,7 +10025,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -4867,6 +10059,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "engines": { + "node": ">=4" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4932,6 +10132,11 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -4971,6 +10176,91 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha512-C+VUP+8jis7EsQZIhDYmS5qlNtjv2yP4SNtjXK9AP1ZcTRlnSfuumaTnRfYZnYgUUYVIKqL0fRvmUGDV2fmp6g==", + "dependencies": { + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "engines": { + "node": ">=4" + } + }, "node_modules/pkg-types": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", @@ -5103,6 +10393,14 @@ } ] }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, "node_modules/rdf-canonize": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/rdf-canonize/-/rdf-canonize-3.4.0.tgz", @@ -5119,11 +10417,36 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg/node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -5133,6 +10456,17 @@ "node": ">= 6" } }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/reduce-flatten": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", @@ -5142,6 +10476,32 @@ "node": ">=6" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -5150,6 +10510,22 @@ "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/resolve-dir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", @@ -5189,7 +10565,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" @@ -5202,7 +10577,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, "engines": { "node": ">=6" } @@ -5211,7 +10585,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, "dependencies": { "mimic-fn": "^2.1.0" }, @@ -5225,8 +10598,7 @@ "node_modules/restore-cursor/node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "node_modules/reusify": { "version": "1.0.4", @@ -5288,7 +10660,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true, "engines": { "node": ">=0.12.0" } @@ -5325,16 +10696,38 @@ "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "dev": true, "dependencies": { "tslib": "^2.1.0" } }, + "node_modules/safe-array-concat": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", + "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -5350,11 +10743,32 @@ } ] }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==" }, "node_modules/scrypt-js": { "version": "3.0.1", @@ -5366,53 +10780,225 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-function-length": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", + "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "dependencies": { + "define-data-property": "^1.1.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/shiki": { + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", + "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", + "dependencies": { + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" + } + }, + "node_modules/side-channel": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.5.tgz", + "integrity": "sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==" + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/signale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/signale/-/signale-1.4.0.tgz", + "integrity": "sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==", + "dependencies": { + "chalk": "^2.3.2", + "figures": "^2.0.0", + "pkg-conf": "^2.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/signale/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/signale/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": ">=10" + "node": ">=4" } }, - "node_modules/setimmediate": { + "node_modules/signale/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/signale/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/signale/node_modules/escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } }, - "node_modules/shebang-command": { + "node_modules/signale/node_modules/figures": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", "dependencies": { - "shebang-regex": "^3.0.0" + "escape-string-regexp": "^1.0.5" }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/shebang-regex": { + "node_modules/signale/node_modules/has-flag": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==" - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "engines": { - "node": ">=14" + "node_modules/signale/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "engines": { + "node": ">=4" } }, "node_modules/slash": { @@ -5440,6 +11026,38 @@ "node": ">=0.10.0" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", + "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", + "dev": true + }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -5454,7 +11072,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -5469,7 +11086,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -5479,11 +11095,72 @@ "node": ">=8" } }, + "node_modules/string.prototype.padend": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.5.tgz", + "integrity": "sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==", + "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/string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "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/string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -5511,6 +11188,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "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==", + "dependencies": { + "is-hex-prefixed": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -5545,6 +11234,17 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", @@ -5620,8 +11320,7 @@ "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" }, "node_modules/tinybench": { "version": "2.6.0", @@ -5648,7 +11347,6 @@ "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, "dependencies": { "os-tmpdir": "~1.0.2" }, @@ -5719,8 +11417,7 @@ "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/type-check": { "version": "0.4.0", @@ -5867,6 +11564,92 @@ "node": ">= 4.0.0" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.1.tgz", + "integrity": "sha512-RSqu1UEuSlrBhHTWC8O9FnPjOduNs4M7rJ4pRKoEjtx1zUNOPN2sSXHLDX+Y2WPbHIxbvg4JFo2DNAEfPIKWoQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.1.tgz", + "integrity": "sha512-tcqKMrTRXjqvHN9S3553NPCaGL0VPgFI92lXszmrE8DMhiDPLBYLlvo8Uu4WZAAX/aGqp/T1sbA4ph8EWjDF9Q==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typedoc": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.8.tgz", + "integrity": "sha512-mh8oLW66nwmeB9uTa0Bdcjfis+48bAjSH3uqdzSuSawfduROQLlXw//WSNZLYDdhmMVB7YcYZicq6e8T0d271A==", + "dependencies": { + "lunr": "^2.3.9", + "marked": "^4.3.0", + "minimatch": "^9.0.3", + "shiki": "^0.14.7" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 16" + }, + "peerDependencies": { + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x" + } + }, "node_modules/typescript": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", @@ -5893,6 +11676,21 @@ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz", "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==" }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -5917,11 +11715,50 @@ "punycode": "^2.1.0" } }, + "node_modules/url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==", + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" + }, + "node_modules/url/node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" + }, + "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==", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/uuid": { "version": "8.3.2", @@ -5944,6 +11781,16 @@ "node": ">=10.12.0" } }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "node_modules/validator": { "version": "13.11.0", "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", @@ -6092,11 +11939,20 @@ } } }, + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==" + }, + "node_modules/vscode-textmate": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==" + }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "dev": true, "dependencies": { "defaults": "^1.0.3" } @@ -6123,6 +11979,24 @@ "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-4.1.0.tgz", "integrity": "sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA==" }, + "node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -6151,6 +12025,40 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz", + "integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==", + "dependencies": { + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.5", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/why-is-node-running": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", @@ -6201,7 +12109,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -6239,11 +12146,64 @@ } } }, + "node_modules/xml2js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 4890b46..2097731 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,8 @@ "dist" ], "scripts": { + "test:prep:blockchain": "ganache --wallet.mnemonic \"indicate swing place chair flight used hammer soon photo region volume shuffle\" -i 1337", + "test:prep:contracts": "node test/prep/setup-contracts.mjs", "test": "vitest --run", "test:ci": "vitest --run --coverage", "build": "npm run clean && npm run build:cjs && npm run build:esm && npm run build:type", @@ -28,6 +30,7 @@ "commitizen": "^4.3.0", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.56.0", + "npm-run-all": "^4.1.5", "prettier": "^3.2.4", "typescript": "^5.3.3", "vitest": "^1.2.2" @@ -37,9 +40,14 @@ "url": "https://github.com/TradeTrust/tradetrust-core.git" }, "dependencies": { + "@tradetrust-tt/tradetrust": "^6.9.0", + "@tradetrust-tt/tradetrust-cli": "^2.17.1", "@tradetrust-tt/tradetrust-utils": "^1.9.1", "@tradetrust-tt/tt-verify": "^8.4.0", - "@vitest/coverage-v8": "^1.2.2" + "@vitest/coverage-v8": "^1.2.2", + "ethers": "^5.7.2", + "ganache": "^7.5.0", + "shelljs": "^0.8.5" }, "publishConfig": { "access": "public" diff --git a/src/verify/__snapshots__/verfiy.dns-txt.v2.integration.test.ts.snap b/src/verify/__snapshots__/verfiy.dns-txt.v2.integration.test.ts.snap new file mode 100644 index 0000000..c8c3b9c --- /dev/null +++ b/src/verify/__snapshots__/verfiy.dns-txt.v2.integration.test.ts.snap @@ -0,0 +1,555 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`verify(integration) dns-txt with document store > should return in-valid fragments for document issued correctly with DNS-TXT, but revoked 1`] = ` +[ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + ], + "revocation": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "reason": { + "code": 5, + "codeString": "DOCUMENT_REVOKED", + "message": "Document 0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df has been revoked under contract 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "revoked": true, + }, + ], + }, + "issuedOnAll": true, + "revokedOnAny": true, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 5, + "codeString": "DOCUMENT_REVOKED", + "message": "Document 0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df has been revoked under contract 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "status": "INVALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example.tradetrust.io", + "status": "VALID", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, +] +`; + +exports[`verify(integration) dns-txt with document store > should return in-valid fragments for document issued correctly with DNS-TXT, but the document store identity is not correct 1`] = ` +[ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "address": "0x5Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": false, + "reason": { + "code": 1, + "codeString": "DOCUMENT_NOT_ISSUED", + "message": "Bad document store address checksum", + }, + }, + ], + }, + "issuedOnAll": false, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 1, + "codeString": "DOCUMENT_NOT_ISSUED", + "message": "Bad document store address checksum", + }, + "status": "INVALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example123.tradetrust.io", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x5Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "status": "INVALID", + "value": "0x5Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x5Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "status": "INVALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, +] +`; + +exports[`verify(integration) dns-txt with document store > should return in-valid fragments for document issued correctly with DNS-TXT, but the issuer dns identity is not valid 1`] = ` +[ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + ], + "revocation": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "revoked": false, + }, + ], + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example123.tradetrust.io", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "status": "INVALID", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "status": "INVALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, +] +`; + +exports[`verify(integration) dns-txt with document store > should return in-valid fragments for tampered document with DNS-TXT 1`] = ` +[ + { + "data": false, + "name": "OpenAttestationHash", + "reason": { + "code": 0, + "codeString": "DOCUMENT_TAMPERED", + "message": "Document has been tampered with", + }, + "status": "INVALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + ], + "revocation": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "revoked": false, + }, + ], + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example.tradetrust.io", + "status": "VALID", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, +] +`; + +exports[`verify(integration) dns-txt with document store > should return valid fragments for document issued correctly with DNS-TXT and not revoked on a document store 1`] = ` +[ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + ], + "revocation": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "revoked": false, + }, + ], + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example.tradetrust.io", + "status": "VALID", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, +] +`; + +exports[`verify(integration) dns-txt with document store > should return valid fragments for documented with obfuscated fields 1`] = ` +[ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + ], + "revocation": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "revoked": false, + }, + ], + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example.tradetrust.io", + "status": "VALID", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, +] +`; diff --git a/src/verify/index.ts b/src/verify/index.ts index 153d33b..ada856a 100644 --- a/src/verify/index.ts +++ b/src/verify/index.ts @@ -2,6 +2,7 @@ import { verificationBuilder as originalVerificationBuilder, openAttestationVerifiers, openAttestationDidIdentityProof, + isValid, } from '@tradetrust-tt/tt-verify' import { DocumentsToVerify, @@ -12,6 +13,7 @@ import { interpretFragments } from '@tradetrust-tt/tradetrust-utils' const verificationBuilder = (builderOptions: VerificationBuilderOptions) => { return originalVerificationBuilder( [...openAttestationVerifiers, openAttestationDidIdentityProof], + // [...openAttestationVerifiers], builderOptions ) } @@ -23,4 +25,4 @@ const verify = ( return verificationBuilder(builderOptions)(document) } -export { verificationBuilder, verify, interpretFragments } +export { verificationBuilder, verify, interpretFragments, isValid } diff --git a/src/verify/verfiy.dns-txt.v2.integration.test.ts b/src/verify/verfiy.dns-txt.v2.integration.test.ts new file mode 100644 index 0000000..c5328de --- /dev/null +++ b/src/verify/verfiy.dns-txt.v2.integration.test.ts @@ -0,0 +1,83 @@ +import { + dnsTxtDocStore, + dnsTxtDocStoreTampered, + dnsTxtDocStoreRevoked, + dnsTxtDocStoreIncorrectDNS, + dnsTxtDocStoreIncorrectDocumentStore, + dnsTxtDocStoreObfuscated, +} from '../../test/fixtures/v2/wrapped/dns-txt-doc-store' +import { describe, it, expect } from 'vitest' +import { verify, isValid } from '.' +import { ethers } from 'ethers' +// import util from 'util' + +const localProvider = new ethers.providers.JsonRpcProvider( + 'http://127.0.0.1:8545' +) + +describe('verify(integration) dns-txt with document store', () => { + it('should return valid fragments for document issued correctly with DNS-TXT and not revoked on a document store', async () => { + const fragments = await verify(dnsTxtDocStore, { + provider: localProvider, + }) + expect(fragments).toMatchSnapshot() + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(true) + }) + it('should return in-valid fragments for tampered document with DNS-TXT', async () => { + const fragments = await verify(dnsTxtDocStoreTampered, { + provider: localProvider, + }) + expect(fragments).toMatchSnapshot() + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(false) + }) + it('should return in-valid fragments for document issued correctly with DNS-TXT, but revoked', async () => { + const fragments = await verify(dnsTxtDocStoreRevoked, { + provider: localProvider, + }) + expect(fragments).toMatchSnapshot() + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(false) + }) + it('should return in-valid fragments for document issued correctly with DNS-TXT, but the issuer dns identity is not valid', async () => { + const fragments = await verify(dnsTxtDocStoreIncorrectDNS, { + provider: localProvider, + }) + expect(fragments).toMatchSnapshot() + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) + expect(isValid(fragments)).toStrictEqual(false) + }) + it('should return in-valid fragments for document issued correctly with DNS-TXT, but the document store identity is not correct', async () => { + const fragments = await verify(dnsTxtDocStoreIncorrectDocumentStore, { + provider: localProvider, + }) + expect(fragments).toMatchSnapshot() + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) + expect(isValid(fragments)).toStrictEqual(false) + }) + it('should return valid fragments for documented with obfuscated fields', async () => { + const fragments = await verify(dnsTxtDocStoreObfuscated, { + provider: localProvider, + }) + expect(fragments).toMatchSnapshot() + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(true) + }) +}) + +describe('verify(integration) dns-txt with token-registry', () => {}) + +describe('verify(integration) dns-txt with dns:did', () => {}) diff --git a/test/fixtures/v2/wrapped/dns-txt-doc-store.ts b/test/fixtures/v2/wrapped/dns-txt-doc-store.ts new file mode 100644 index 0000000..dece4fc --- /dev/null +++ b/test/fixtures/v2/wrapped/dns-txt-doc-store.ts @@ -0,0 +1,217 @@ +import { SchemaId, WrappedDocument, v2 } from '@tradetrust-tt/tradetrust' + +interface CustomDocument extends v2.OpenAttestationDocument { + recipient: { + name: string + } +} + +interface CustomDocumentObfuscated extends v2.OpenAttestationDocument {} + +export const dnsTxtDocStore: WrappedDocument = { + version: SchemaId.v2, + data: { + $template: { + name: '456f5ada-b199-4012-b359-ad689d3a5df6:string:main', + type: 'a8b58b42-cd8c-4da5-ad83-fc0a71e342d0:string:EMBEDDED_RENDERER', + url: '92c32eb4-5119-4707-8c43-a4a4411d62ca:string:https://tutorial-renderer.openattestation.com', + }, + recipient: { + name: '3728fb07-d41b-47c6-b3c4-c2165cb76f3e:string:John Doe', + }, + issuers: [ + { + name: 'ea308a68-db59-422f-8da3-a37788f0fcd1:string:Demo Issuer', + documentStore: + 'af1be992-cf0e-477d-b5f2-a847c12289dd:string:0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', + identityProof: { + type: '5947b4b6-0d4e-4bef-9d50-5aee88f3783b:string:DNS-TXT', + location: + '5e0eba02-56ae-46a1-9c99-4008578cbe96:string:example.tradetrust.io', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '56a72ab0a30bef3d6fb767d16f66a854a21624739a773b590a2381d68eea9468', + proof: [], + merkleRoot: + '56a72ab0a30bef3d6fb767d16f66a854a21624739a773b590a2381d68eea9468', + }, +} + +export const dnsTxtDocStoreTampered: WrappedDocument = { + version: SchemaId.v2, + data: { + $template: { + name: '456f5ada-b199-4012-b359-ad689d3a5df6:string:main', + type: 'a8b58b42-cd8c-4da5-ad83-fc0a71e342d0:string:EMBEDDED_RENDERER', + url: '92c32eb4-5119-4707-8c43-a4a4411d62ca:string:https://tutorial-renderer.openattestation.com', + }, + recipient: { + name: '3728fb07-d41b-47c6-b3c4-c2165cb76f3e:string:John Doe123', + }, + issuers: [ + { + name: 'ea308a68-db59-422f-8da3-a37788f0fcd1:string:Demo Issuer', + documentStore: + 'af1be992-cf0e-477d-b5f2-a847c12289dd:string:0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', + identityProof: { + type: '5947b4b6-0d4e-4bef-9d50-5aee88f3783b:string:DNS-TXT', + location: + '5e0eba02-56ae-46a1-9c99-4008578cbe96:string:example.tradetrust.io', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '56a72ab0a30bef3d6fb767d16f66a854a21624739a773b590a2381d68eea9468', + proof: [], + merkleRoot: + '56a72ab0a30bef3d6fb767d16f66a854a21624739a773b590a2381d68eea9468', + }, +} + +export const dnsTxtDocStoreRevoked: WrappedDocument = { + version: SchemaId.v2, + data: { + $template: { + name: '972df188-c53c-4c30-ac89-06e0c4dced2a:string:main', + type: '423b0d90-246b-46e0-9e79-22cf1be59f65:string:EMBEDDED_RENDERER', + url: 'cb067340-ba6b-4d78-b190-4e33385770dc:string:https://tutorial-renderer.openattestation.com', + }, + recipient: { + name: 'b9f4c31b-fe8a-4d17-9248-1aa9dfe15b34:string:John Doe', + }, + issuers: [ + { + name: '36f6164a-ae7b-4fb1-9a0f-14be44b887af:string:Demo Issuer', + documentStore: + '2caad7b5-a48b-4163-9d0d-0eb00b21c29c:string:0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', + identityProof: { + type: 'a01aea55-bf30-468b-89bf-6d4c7ea4e8ae:string:DNS-TXT', + location: + '2e984e1e-3323-40bb-b1c8-808658a977c9:string:example.tradetrust.io', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df', + proof: [], + merkleRoot: + '8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df', + }, +} + +export const dnsTxtDocStoreIncorrectDNS: WrappedDocument = { + version: SchemaId.v2, + data: { + $template: { + name: '8650ba19-cce3-43b6-a966-ee4f8fc6485a:string:main', + type: '20a3fa71-a25c-425d-9d67-31d147c4e996:string:EMBEDDED_RENDERER', + url: '9f775314-bcfa-4069-b330-1dffcb2e3615:string:https://tutorial-renderer.openattestation.com', + }, + recipient: { + name: '9a037b55-2717-474f-821d-845aa4b7b054:string:John Doe', + }, + issuers: [ + { + name: '18322448-990c-45d0-961b-9e6c333ec5ef:string:Demo Issuer', + documentStore: + 'b08f8a5e-36ee-4008-bce6-9c8098eeaf2f:string:0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', + identityProof: { + type: '91fa0cf3-ec4e-409a-b934-38e6f21e3c39:string:DNS-TXT', + location: + 'd3be6135-2c5f-40bd-ac20-a4f03b497504:string:example123.tradetrust.io', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + 'ba891dc3da5db9155ec370bb80f17b8fbe115893feb4337a3e321fd2300ea9b0', + proof: [], + merkleRoot: + 'ba891dc3da5db9155ec370bb80f17b8fbe115893feb4337a3e321fd2300ea9b0', + }, +} + +export const dnsTxtDocStoreObfuscated: WrappedDocument = + { + version: SchemaId.v2, + data: { + $template: { + name: '456f5ada-b199-4012-b359-ad689d3a5df6:string:main', + type: 'a8b58b42-cd8c-4da5-ad83-fc0a71e342d0:string:EMBEDDED_RENDERER', + url: '92c32eb4-5119-4707-8c43-a4a4411d62ca:string:https://tutorial-renderer.openattestation.com', + }, + issuers: [ + { + name: 'ea308a68-db59-422f-8da3-a37788f0fcd1:string:Demo Issuer', + documentStore: + 'af1be992-cf0e-477d-b5f2-a847c12289dd:string:0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', + identityProof: { + type: '5947b4b6-0d4e-4bef-9d50-5aee88f3783b:string:DNS-TXT', + location: + '5e0eba02-56ae-46a1-9c99-4008578cbe96:string:example.tradetrust.io', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '56a72ab0a30bef3d6fb767d16f66a854a21624739a773b590a2381d68eea9468', + proof: [], + merkleRoot: + '56a72ab0a30bef3d6fb767d16f66a854a21624739a773b590a2381d68eea9468', + }, + privacy: { + obfuscatedData: [ + '8c5c965edb2e14df766ad1e77822428d2cbf2d2d761f7c36a5801deaa971fe83', + ], + }, + } + +export const dnsTxtDocStoreIncorrectDocumentStore: WrappedDocument = + { + version: SchemaId.v2, + data: { + $template: { + name: '780fdc2c-d385-46c3-8abc-cb72b412d98f:string:main', + type: 'f14b2cc9-2965-464a-b734-7235290016ff:string:EMBEDDED_RENDERER', + url: '5344265c-edb6-4700-800e-ea1625d8c3ab:string:https://tutorial-renderer.openattestation.com', + }, + recipient: { + name: 'c48268db-6655-41e0-b657-247b5e2ce973:string:John Doe', + }, + issuers: [ + { + name: '45ad3669-3dd8-47f2-864b-7d4e011ac8ea:string:Demo Issuer', + documentStore: + '91efd177-638f-474c-852f-d8c333c949a9:string:0x5Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', + identityProof: { + type: '093ff56d-05db-4ca4-a5cb-f775faa06397:string:DNS-TXT', + location: + '7382f992-2c4f-42d4-96d0-469b32b0a9ee:string:example123.tradetrust.io', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '920d98cd370552fa42013782bccd1b3ca23424d11b81f3d1850de3a65ce6fd82', + proof: [], + merkleRoot: + '920d98cd370552fa42013782bccd1b3ca23424d11b81f3d1850de3a65ce6fd82', + }, + } diff --git a/test/prep/setup-contracts.mjs b/test/prep/setup-contracts.mjs new file mode 100644 index 0000000..4f1fb48 --- /dev/null +++ b/test/prep/setup-contracts.mjs @@ -0,0 +1,46 @@ +import shell from 'shelljs' + +const TT_CLI_PATH = 'tradetrust' +const ACCOUNT_KEY = + '0xe82294532bcfcd8e0763ee5cef194f36f00396be59b94fb418f5f8d83140d9a7' +const TOKEN_REGISTRY_ADDRESS = '0x9Eb613a88534E2939518f4ffBFE65F5969b491FF' +const DOCUMENT_STORE_ADDRESS = '0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953' +const TITLE_ESCROW_FACTORY_ADDRESS = + '0x63A223E025256790E88778a01f480eBA77731D04' + +// const ACCOUNT_ADDR = '0xe0A71284EF59483795053266CB796B65E48B5124' +// const ISSUER_DNS = 'minhtetoo.lol' + +const issuedMerkleRoot = [ + '0x56a72ab0a30bef3d6fb767d16f66a854a21624739a773b590a2381d68eea9468', // issued correctly + '0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df', // revoked + '0xba891dc3da5db9155ec370bb80f17b8fbe115893feb4337a3e321fd2300ea9b0', // invalid dns + '0x1249f84c06bddebc947022569b77f6b30cdc9bff53fda9700ef2a8cc30e7dcc5', // incorrect document store +] + +const revokedMerkleRoot = [ + '0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df', +] + +shell.exec( + `${TT_CLI_PATH} deploy title-escrow-factory -n local -k ${ACCOUNT_KEY}` +) + +shell.exec( + `${TT_CLI_PATH} deploy token-registry "DEMO TOKEN REGISTRY" DTR -n local -k ${ACCOUNT_KEY} --factory-address ${TITLE_ESCROW_FACTORY_ADDRESS} --standalone` +) + +shell.exec( + `${TT_CLI_PATH} deploy document-store "test document store" --network local -k ${ACCOUNT_KEY}` +) + +issuedMerkleRoot.forEach((ele) => { + shell.exec( + `${TT_CLI_PATH} document-store issue --address ${DOCUMENT_STORE_ADDRESS} --hash ${ele} --network local --k ${ACCOUNT_KEY}` + ) +}) +revokedMerkleRoot.forEach((ele) => { + shell.exec( + `${TT_CLI_PATH} document-store revoke --address ${DOCUMENT_STORE_ADDRESS} --hash ${ele} --network local --k ${ACCOUNT_KEY}` + ) +}) diff --git a/tsconfig.json b/tsconfig.json index bfba394..91b8cba 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -39,7 +39,7 @@ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ + "resolveJsonModule": true /* Enable importing .json files. */, // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..3784538 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,8 @@ +/// +import { defineConfig } from 'vite' + +export default defineConfig({ + test: { + testTimeout: 10000, + }, +}) From dbea4f2a48e7c9446495e1399faebe8c17d4f786 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Tue, 20 Feb 2024 14:43:09 +0800 Subject: [PATCH 25/34] test: verify dns-did --- .eslintignore | 3 +- ...verfiy.dns-txt.v2.integration.test.ts.snap | 555 --------------- .../verfiy.dns-txt.v2.integration.test.ts | 640 +++++++++++++++++- .../verify.dns-did.v2.integration.test.ts | 373 ++++++++++ .../v2/did-ocsp-revocation-signed.json | 66 -- ...d-revocation-store-signed-no-location.json | 64 -- ...d-revocation-store-signed-not-revoked.json | 65 -- .../did-revocation-store-signed-revoked.json | 68 -- ...d-revocation-store-signed-not-revoked.json | 69 -- ...nsdid-revocation-store-signed-revoked.json | 69 -- test/fixtures/v2/document.ts | 59 -- .../v2/documentDidCustomRevocation.ts | 66 -- test/fixtures/v2/documentDidMissingProof.ts | 54 -- .../v2/documentDidMixedTokenRegistry.ts | 72 -- .../v2/documentDidObfuscatedRevocation.ts | 65 -- test/fixtures/v2/documentDidSigned.ts | 70 -- test/fixtures/v2/documentDidWrongSignature.ts | 64 -- .../v2/documentDnsDidMixedTokenRegistry.ts | 146 ---- test/fixtures/v2/documentDnsDidNoDnsTxt.ts | 65 -- test/fixtures/v2/documentDnsDidSigned.ts | 71 -- .../documentGoerliNotIssuedTokenRegistry.ts | 82 --- test/fixtures/v2/documentGoerliObfuscated.ts | 94 --- .../documentGoerliRevokedWithDocumentStore.ts | 92 --- .../documentGoerliValidWithDocumentStore.ts | 65 -- .../v2/documentGoerliValidWithToken.ts | 67 -- ...ntMainnetInvalidWithIncorrectMerkleRoot.ts | 79 --- ...ntMainnetInvalidWithOddLengthMerkleRoot.ts | 79 --- test/fixtures/v2/documentMainnetValid.ts | 47 -- test/fixtures/v2/documentMixedIssuance.ts | 94 --- .../v2/documentNotIssuedWithDocumentStore.ts | 65 -- .../v2/documentNotIssuedWithTokenRegistry.ts | 65 -- test/fixtures/v2/tamperedDocument.ts | 106 --- test/fixtures/v2/wrapped/dns-did.ts | 139 ++++ test/fixtures/v2/wrapped/token-registry.ts | 41 ++ test/prep/setup-contracts.mjs | 27 +- 35 files changed, 1209 insertions(+), 2637 deletions(-) delete mode 100644 src/verify/__snapshots__/verfiy.dns-txt.v2.integration.test.ts.snap create mode 100644 src/verify/verify.dns-did.v2.integration.test.ts delete mode 100644 test/fixtures/v2/did-ocsp-revocation-signed.json delete mode 100644 test/fixtures/v2/did-revocation-store-signed-no-location.json delete mode 100644 test/fixtures/v2/did-revocation-store-signed-not-revoked.json delete mode 100644 test/fixtures/v2/did-revocation-store-signed-revoked.json delete mode 100644 test/fixtures/v2/dnsdid-revocation-store-signed-not-revoked.json delete mode 100644 test/fixtures/v2/dnsdid-revocation-store-signed-revoked.json delete mode 100644 test/fixtures/v2/document.ts delete mode 100644 test/fixtures/v2/documentDidCustomRevocation.ts delete mode 100644 test/fixtures/v2/documentDidMissingProof.ts delete mode 100644 test/fixtures/v2/documentDidMixedTokenRegistry.ts delete mode 100644 test/fixtures/v2/documentDidObfuscatedRevocation.ts delete mode 100644 test/fixtures/v2/documentDidSigned.ts delete mode 100644 test/fixtures/v2/documentDidWrongSignature.ts delete mode 100644 test/fixtures/v2/documentDnsDidMixedTokenRegistry.ts delete mode 100644 test/fixtures/v2/documentDnsDidNoDnsTxt.ts delete mode 100644 test/fixtures/v2/documentDnsDidSigned.ts delete mode 100644 test/fixtures/v2/documentGoerliNotIssuedTokenRegistry.ts delete mode 100644 test/fixtures/v2/documentGoerliObfuscated.ts delete mode 100644 test/fixtures/v2/documentGoerliRevokedWithDocumentStore.ts delete mode 100644 test/fixtures/v2/documentGoerliValidWithDocumentStore.ts delete mode 100644 test/fixtures/v2/documentGoerliValidWithToken.ts delete mode 100644 test/fixtures/v2/documentMainnetInvalidWithIncorrectMerkleRoot.ts delete mode 100644 test/fixtures/v2/documentMainnetInvalidWithOddLengthMerkleRoot.ts delete mode 100644 test/fixtures/v2/documentMainnetValid.ts delete mode 100644 test/fixtures/v2/documentMixedIssuance.ts delete mode 100644 test/fixtures/v2/documentNotIssuedWithDocumentStore.ts delete mode 100644 test/fixtures/v2/documentNotIssuedWithTokenRegistry.ts delete mode 100644 test/fixtures/v2/tamperedDocument.ts create mode 100644 test/fixtures/v2/wrapped/dns-did.ts create mode 100644 test/fixtures/v2/wrapped/token-registry.ts diff --git a/.eslintignore b/.eslintignore index 76add87..6bfead1 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,3 @@ node_modules -dist \ No newline at end of file +dist +**/__snapshots__/ \ No newline at end of file diff --git a/src/verify/__snapshots__/verfiy.dns-txt.v2.integration.test.ts.snap b/src/verify/__snapshots__/verfiy.dns-txt.v2.integration.test.ts.snap deleted file mode 100644 index c8c3b9c..0000000 --- a/src/verify/__snapshots__/verfiy.dns-txt.v2.integration.test.ts.snap +++ /dev/null @@ -1,555 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`verify(integration) dns-txt with document store > should return in-valid fragments for document issued correctly with DNS-TXT, but revoked 1`] = ` -[ - { - "data": true, - "name": "OpenAttestationHash", - "status": "VALID", - "type": "DOCUMENT_INTEGRITY", - }, - { - "name": "OpenAttestationEthereumTokenRegistryStatus", - "reason": { - "code": 4, - "codeString": "SKIPPED", - "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "data": { - "details": { - "issuance": [ - { - "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - "issued": true, - }, - ], - "revocation": [ - { - "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - "reason": { - "code": 5, - "codeString": "DOCUMENT_REVOKED", - "message": "Document 0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df has been revoked under contract 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - }, - "revoked": true, - }, - ], - }, - "issuedOnAll": true, - "revokedOnAny": true, - }, - "name": "OpenAttestationEthereumDocumentStoreStatus", - "reason": { - "code": 5, - "codeString": "DOCUMENT_REVOKED", - "message": "Document 0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df has been revoked under contract 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - }, - "status": "INVALID", - "type": "DOCUMENT_STATUS", - }, - { - "name": "OpenAttestationDidSignedDocumentStatus", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not signed by DID directly", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "data": [ - { - "location": "example.tradetrust.io", - "status": "VALID", - "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - }, - ], - "name": "OpenAttestationDnsTxtIdentityProof", - "status": "VALID", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDnsDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not issued using DNS-DID", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document is not using DID as top level identifier or has not been wrapped", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, -] -`; - -exports[`verify(integration) dns-txt with document store > should return in-valid fragments for document issued correctly with DNS-TXT, but the document store identity is not correct 1`] = ` -[ - { - "data": true, - "name": "OpenAttestationHash", - "status": "VALID", - "type": "DOCUMENT_INTEGRITY", - }, - { - "name": "OpenAttestationEthereumTokenRegistryStatus", - "reason": { - "code": 4, - "codeString": "SKIPPED", - "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "data": { - "details": { - "issuance": [ - { - "address": "0x5Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - "issued": false, - "reason": { - "code": 1, - "codeString": "DOCUMENT_NOT_ISSUED", - "message": "Bad document store address checksum", - }, - }, - ], - }, - "issuedOnAll": false, - }, - "name": "OpenAttestationEthereumDocumentStoreStatus", - "reason": { - "code": 1, - "codeString": "DOCUMENT_NOT_ISSUED", - "message": "Bad document store address checksum", - }, - "status": "INVALID", - "type": "DOCUMENT_STATUS", - }, - { - "name": "OpenAttestationDidSignedDocumentStatus", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not signed by DID directly", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "data": [ - { - "location": "example123.tradetrust.io", - "reason": { - "code": 4, - "codeString": "MATCHING_RECORD_NOT_FOUND", - "message": "Matching DNS record not found for 0x5Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - }, - "status": "INVALID", - "value": "0x5Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - }, - ], - "name": "OpenAttestationDnsTxtIdentityProof", - "reason": { - "code": 4, - "codeString": "MATCHING_RECORD_NOT_FOUND", - "message": "Matching DNS record not found for 0x5Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - }, - "status": "INVALID", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDnsDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not issued using DNS-DID", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document is not using DID as top level identifier or has not been wrapped", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, -] -`; - -exports[`verify(integration) dns-txt with document store > should return in-valid fragments for document issued correctly with DNS-TXT, but the issuer dns identity is not valid 1`] = ` -[ - { - "data": true, - "name": "OpenAttestationHash", - "status": "VALID", - "type": "DOCUMENT_INTEGRITY", - }, - { - "name": "OpenAttestationEthereumTokenRegistryStatus", - "reason": { - "code": 4, - "codeString": "SKIPPED", - "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "data": { - "details": { - "issuance": [ - { - "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - "issued": true, - }, - ], - "revocation": [ - { - "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - "revoked": false, - }, - ], - }, - "issuedOnAll": true, - "revokedOnAny": false, - }, - "name": "OpenAttestationEthereumDocumentStoreStatus", - "status": "VALID", - "type": "DOCUMENT_STATUS", - }, - { - "name": "OpenAttestationDidSignedDocumentStatus", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not signed by DID directly", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "data": [ - { - "location": "example123.tradetrust.io", - "reason": { - "code": 4, - "codeString": "MATCHING_RECORD_NOT_FOUND", - "message": "Matching DNS record not found for 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - }, - "status": "INVALID", - "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - }, - ], - "name": "OpenAttestationDnsTxtIdentityProof", - "reason": { - "code": 4, - "codeString": "MATCHING_RECORD_NOT_FOUND", - "message": "Matching DNS record not found for 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - }, - "status": "INVALID", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDnsDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not issued using DNS-DID", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document is not using DID as top level identifier or has not been wrapped", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, -] -`; - -exports[`verify(integration) dns-txt with document store > should return in-valid fragments for tampered document with DNS-TXT 1`] = ` -[ - { - "data": false, - "name": "OpenAttestationHash", - "reason": { - "code": 0, - "codeString": "DOCUMENT_TAMPERED", - "message": "Document has been tampered with", - }, - "status": "INVALID", - "type": "DOCUMENT_INTEGRITY", - }, - { - "name": "OpenAttestationEthereumTokenRegistryStatus", - "reason": { - "code": 4, - "codeString": "SKIPPED", - "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "data": { - "details": { - "issuance": [ - { - "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - "issued": true, - }, - ], - "revocation": [ - { - "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - "revoked": false, - }, - ], - }, - "issuedOnAll": true, - "revokedOnAny": false, - }, - "name": "OpenAttestationEthereumDocumentStoreStatus", - "status": "VALID", - "type": "DOCUMENT_STATUS", - }, - { - "name": "OpenAttestationDidSignedDocumentStatus", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not signed by DID directly", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "data": [ - { - "location": "example.tradetrust.io", - "status": "VALID", - "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - }, - ], - "name": "OpenAttestationDnsTxtIdentityProof", - "status": "VALID", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDnsDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not issued using DNS-DID", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document is not using DID as top level identifier or has not been wrapped", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, -] -`; - -exports[`verify(integration) dns-txt with document store > should return valid fragments for document issued correctly with DNS-TXT and not revoked on a document store 1`] = ` -[ - { - "data": true, - "name": "OpenAttestationHash", - "status": "VALID", - "type": "DOCUMENT_INTEGRITY", - }, - { - "name": "OpenAttestationEthereumTokenRegistryStatus", - "reason": { - "code": 4, - "codeString": "SKIPPED", - "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "data": { - "details": { - "issuance": [ - { - "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - "issued": true, - }, - ], - "revocation": [ - { - "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - "revoked": false, - }, - ], - }, - "issuedOnAll": true, - "revokedOnAny": false, - }, - "name": "OpenAttestationEthereumDocumentStoreStatus", - "status": "VALID", - "type": "DOCUMENT_STATUS", - }, - { - "name": "OpenAttestationDidSignedDocumentStatus", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not signed by DID directly", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "data": [ - { - "location": "example.tradetrust.io", - "status": "VALID", - "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - }, - ], - "name": "OpenAttestationDnsTxtIdentityProof", - "status": "VALID", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDnsDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not issued using DNS-DID", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document is not using DID as top level identifier or has not been wrapped", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, -] -`; - -exports[`verify(integration) dns-txt with document store > should return valid fragments for documented with obfuscated fields 1`] = ` -[ - { - "data": true, - "name": "OpenAttestationHash", - "status": "VALID", - "type": "DOCUMENT_INTEGRITY", - }, - { - "name": "OpenAttestationEthereumTokenRegistryStatus", - "reason": { - "code": 4, - "codeString": "SKIPPED", - "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "data": { - "details": { - "issuance": [ - { - "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - "issued": true, - }, - ], - "revocation": [ - { - "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - "revoked": false, - }, - ], - }, - "issuedOnAll": true, - "revokedOnAny": false, - }, - "name": "OpenAttestationEthereumDocumentStoreStatus", - "status": "VALID", - "type": "DOCUMENT_STATUS", - }, - { - "name": "OpenAttestationDidSignedDocumentStatus", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not signed by DID directly", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "data": [ - { - "location": "example.tradetrust.io", - "status": "VALID", - "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", - }, - ], - "name": "OpenAttestationDnsTxtIdentityProof", - "status": "VALID", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDnsDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not issued using DNS-DID", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document is not using DID as top level identifier or has not been wrapped", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, -] -`; diff --git a/src/verify/verfiy.dns-txt.v2.integration.test.ts b/src/verify/verfiy.dns-txt.v2.integration.test.ts index c5328de..341a298 100644 --- a/src/verify/verfiy.dns-txt.v2.integration.test.ts +++ b/src/verify/verfiy.dns-txt.v2.integration.test.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { dnsTxtDocStore, dnsTxtDocStoreTampered, @@ -20,7 +21,91 @@ describe('verify(integration) dns-txt with document store', () => { const fragments = await verify(dnsTxtDocStore, { provider: localProvider, }) - expect(fragments).toMatchSnapshot() + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + ], + "revocation": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "revoked": false, + }, + ], + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example.tradetrust.io", + "status": "VALID", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) @@ -30,7 +115,96 @@ describe('verify(integration) dns-txt with document store', () => { const fragments = await verify(dnsTxtDocStoreTampered, { provider: localProvider, }) - expect(fragments).toMatchSnapshot() + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": false, + "name": "OpenAttestationHash", + "reason": { + "code": 0, + "codeString": "DOCUMENT_TAMPERED", + "message": "Document has been tampered with", + }, + "status": "INVALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + ], + "revocation": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "revoked": false, + }, + ], + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example.tradetrust.io", + "status": "VALID", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(false) expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) @@ -40,7 +214,101 @@ describe('verify(integration) dns-txt with document store', () => { const fragments = await verify(dnsTxtDocStoreRevoked, { provider: localProvider, }) - expect(fragments).toMatchSnapshot() + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + ], + "revocation": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "reason": { + "code": 5, + "codeString": "DOCUMENT_REVOKED", + "message": "Document 0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df has been revoked under contract 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "revoked": true, + }, + ], + }, + "issuedOnAll": true, + "revokedOnAny": true, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 5, + "codeString": "DOCUMENT_REVOKED", + "message": "Document 0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df has been revoked under contract 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "status": "INVALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example.tradetrust.io", + "status": "VALID", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) @@ -50,7 +318,101 @@ describe('verify(integration) dns-txt with document store', () => { const fragments = await verify(dnsTxtDocStoreIncorrectDNS, { provider: localProvider, }) - expect(fragments).toMatchSnapshot() + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + ], + "revocation": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "revoked": false, + }, + ], + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example123.tradetrust.io", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "status": "INVALID", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "status": "INVALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) @@ -60,7 +422,104 @@ describe('verify(integration) dns-txt with document store', () => { const fragments = await verify(dnsTxtDocStoreIncorrectDocumentStore, { provider: localProvider, }) - expect(fragments).toMatchSnapshot() + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "address": "0x5Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": false, + "reason": { + "code": 1, + "codeString": "DOCUMENT_NOT_ISSUED", + "message": "Bad document store address checksum", + }, + }, + ], + }, + "issuedOnAll": false, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 1, + "codeString": "DOCUMENT_NOT_ISSUED", + "message": "Bad document store address checksum", + }, + "status": "INVALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example123.tradetrust.io", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x5Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "status": "INVALID", + "value": "0x5Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x5Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "status": "INVALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) @@ -70,14 +529,175 @@ describe('verify(integration) dns-txt with document store', () => { const fragments = await verify(dnsTxtDocStoreObfuscated, { provider: localProvider, }) - expect(fragments).toMatchSnapshot() + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + ], + "revocation": [ + { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "revoked": false, + }, + ], + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example.tradetrust.io", + "status": "VALID", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) expect(isValid(fragments)).toStrictEqual(true) }) + it('should return in-valid fragments for empty document', async () => { + const fragments = await verify({}, { provider: localProvider }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "name": "OpenAttestationHash", + "reason": { + "code": 2, + "codeString": "SKIPPED", + "message": "Document does not have merkle root, target hash or data.", + }, + "status": "SKIPPED", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 2, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(false) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) + expect(isValid(fragments)).toStrictEqual(false) + }) }) - -describe('verify(integration) dns-txt with token-registry', () => {}) - -describe('verify(integration) dns-txt with dns:did', () => {}) diff --git a/src/verify/verify.dns-did.v2.integration.test.ts b/src/verify/verify.dns-did.v2.integration.test.ts new file mode 100644 index 0000000..2991339 --- /dev/null +++ b/src/verify/verify.dns-did.v2.integration.test.ts @@ -0,0 +1,373 @@ +// @ts-nocheck +import { + dnsDidSignedAndTampered, + dnsDidUnSigned, + dnsDidSigned, +} from '../../test/fixtures/v2/wrapped/dns-did' +import { describe, it, expect } from 'vitest' +import { isValid, verify } from '.' +import { ethers } from 'ethers' +import util from 'util' + +const localProvider = new ethers.providers.JsonRpcProvider( + 'http://127.0.0.1:8545' +) + +describe('verify(integration) dns-txt with dns:did', () => { + it('should return in-valid fragments for signed document', async () => { + const fragments = await verify(dnsDidSigned, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "did": "did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7", + "issued": true, + }, + ], + "revocation": [ + { + "revoked": false, + }, + ], + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationDidSignedDocumentStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 2, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "data": [ + { + "key": "did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7#controller", + "location": "example.tradetrust.io", + "status": "VALID", + }, + ], + "name": "OpenAttestationDnsDidIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(true) + }) + it('should return in-valid fragments for unsigned document', async () => { + const fragments = await verify(dnsDidUnSigned, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 2, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) + expect(isValid(fragments)).toStrictEqual(false) + }) + it('should return in-valid fragments for signed but tampared document', async () => { + const fragments = await verify(dnsDidSignedAndTampered, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": false, + "name": "OpenAttestationHash", + "reason": { + "code": 0, + "codeString": "DOCUMENT_TAMPERED", + "message": "Document has been tampered with", + }, + "status": "INVALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": [ + { + "did": "did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7", + "issued": true, + }, + ], + "revocation": [ + { + "revoked": false, + }, + ], + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationDidSignedDocumentStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 2, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "data": [ + { + "key": "did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7#controller", + "location": "example.tradetrust.io", + "status": "VALID", + }, + ], + "name": "OpenAttestationDnsDidIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(false) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(false) + }) + it('should return in-valid fragments for signed document with invalid provider', async () => { + const fragments = await verify( + {}, + { + provider: localProvider, + } + ) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "name": "OpenAttestationHash", + "reason": { + "code": 2, + "codeString": "SKIPPED", + "message": "Document does not have merkle root, target hash or data.", + }, + "status": "SKIPPED", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 2, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(false) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) + expect(isValid(fragments)).toStrictEqual(false) + }) +}) diff --git a/test/fixtures/v2/did-ocsp-revocation-signed.json b/test/fixtures/v2/did-ocsp-revocation-signed.json deleted file mode 100644 index 3aafb62..0000000 --- a/test/fixtures/v2/did-ocsp-revocation-signed.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "version": "https://schema.openattestation.com/2.0/schema.json", - "data": { - "id": "34d75f11-a68e-4377-9def-5a378ac931de:string:SGCNM21566327", - "recipient": { - "name": "610ab6a5-34e9-4b30-b2dd-3364beb36a62:string:AUS FREIGHT", - "address": { - "street": "05167e77-04ee-4515-b725-7a0504b3ecf1:string:101 APPLE ROAD", - "country": "d66f1e51-30e2-4f3b-ae65-7c3097e3be31:string:AUSTRALIA" - } - }, - "consignment": { - "description": "6b54955f-f521-4d8e-8c1c-caa3492331ac:string:16667 CARTONS OF RED WINE", - "quantity": { - "value": "3f0f6603-f239-4272-b7e4-ca9adfa311da:string:5000", - "unit": "e118af6d-cc85-4473-b995-780b7a7768a4:string:LITRES" - }, - "countryOfOrigin": "a63f3624-3751-40b1-b37c-32cbc451b6e7:string:AUSTRALIA", - "outwardBillNo": "9387719e-7a8b-4d81-8d92-d2bab87e3617:string:AQSIQ170923150", - "dateOfDischarge": "3aeae321-1f6e-4fba-bc66-10fba2b44308:string:2018-01-26", - "dateOfDeparture": "282ab552-81a2-4423-a860-38b8b22f2aec:string:2018-01-30", - "countryOfFinalDestination": "c59ce94d-7ca4-496f-a6b5-95fc3e113c14:string:CHINA", - "outgoingVehicleNo": "e03b4762-b5a7-4830-ada2-885a513f44fd:string:COSCO JAPAN 074E/30-JAN" - }, - "declaration": { - "name": "f7cb21aa-38a1-43f1-8e8e-56a01e271ed4:string:PETER LEE", - "designation": "b993c20a-d347-47df-b125-944812b28ae8:string:SHIPPING MANAGER", - "date": "3d83f95a-adf1-4f0e-9929-5a05b3d0eb39:string:2018-01-28" - }, - "$template": { - "name": "579a0440-6365-4635-ba37-93588c62a0b1:string:CERTIFICATE_OF_NON_MANIPULATION", - "type": "65356aaf-2c83-45e9-8553-2f3f86f4cb4b:string:EMBEDDED_RENDERER", - "url": "d16fa0f1-a34f-4e6d-8dbb-1f1604bb8c95:string:https://demo-cnm.openattestation.com" - }, - "issuers": [ - { - "id": "11152e6e-3095-4854-9528-6b287d764e4d:string:did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", - "name": "83caf389-6532-4e7a-8cc0-9c2d1c967178:string:Demo Issuer", - "revocation": { - "type": "e248e987-f202-45b7-96db-0c2f875c780f:string:OCSP_RESPONDER", - "location": "ff751117-df1b-400d-a631-f4e9772cc348:string:https://ocsp.example.com" - }, - "identityProof": { - "type": "584d86d0-441b-4f05-848a-d912dc96a1e8:string:DNS-DID", - "location": "fc729041-e639-4bd2-988b-7f8727e5ad48:string:example.openattestation.com", - "key": "a40f13ba-81dd-43a3-b084-77fd83c908ba:string:did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90#controller" - } - } - ] - }, - "signature": { - "type": "SHA3MerkleProof", - "targetHash": "28b221f6287d8e4f8da09a835bcb750537cc8385e2535ff63591fdf0162be824", - "proof": ["75cb35254e73f3cbb2b63ff2d07a051d2c9e5f81f7e1fd77631df8b8ed93c1bc"], - "merkleRoot": "56961854a82feafe9a56eb57acfe3b97f17eda5d497b622c9acc9f03c412618c" - }, - "proof": [ - { - "type": "OpenAttestationSignature2018", - "created": "2022-06-10T04:05:01.095Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90#controller", - "signature": "0x486ff94db8e88f434c260792d92ef0f528f5834b6c42460fb255e2876002c14460bd8311bdb987514e5e2e0581b580d5b1ef114054b0b397295eb5421e1038111c" - } - ] -} diff --git a/test/fixtures/v2/did-revocation-store-signed-no-location.json b/test/fixtures/v2/did-revocation-store-signed-no-location.json deleted file mode 100644 index c9fbd20..0000000 --- a/test/fixtures/v2/did-revocation-store-signed-no-location.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "version": "https://schema.openattestation.com/2.0/schema.json", - "data": { - "id": "0d68bfdc-be22-4f3b-b93a-9be49b005eec:string:SGCNM21566325", - "$template": { - "name": "821ffc56-91b6-47c7-9137-a6e928eda8f3:string:CERTIFICATE_OF_NON_MANIPULATION", - "type": "8b70d29e-f3b7-4e8b-85cd-cbb50a31a530:string:EMBEDDED_RENDERER", - "url": "672d733e-8d15-400c-acd2-055da7f47ea0:string:https://demo-cnm.openattestation.com" - }, - "issuers": [ - { - "id": "678c27ca-0555-4333-b3c6-9c598bfe98a6:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - "name": "5b8fe517-4f4f-48d1-a007-b3007e130220:string:DEMO STORE", - "revocation": { - "type": "20b3bb4d-e9fe-4479-8f22-165dd228d4c7:string:REVOCATION_STORE" - }, - "identityProof": { - "type": "1f01cb81-e107-430c-805c-88a0687f26d7:string:DID", - "key": "d9785ba2-08b9-4a15-8ad1-ba2746ea1814:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller" - } - } - ], - "recipient": { - "name": "eab9094a-f4ab-499b-9a1e-0c480784f0f1:string:SG FREIGHT", - "address": { - "street": "e56867b5-e1b9-4a0d-91a2-7c23896eda06:string:101 ORCHARD ROAD", - "country": "e74b558b-d937-4478-88fb-5f1d8fb718e4:string:SINGAPORE" - } - }, - "consignment": { - "description": "9bc9cf4d-8bd9-4d67-8519-ae92f8463b29:string:16667 CARTONS OF RED WINE", - "quantity": { - "value": "a0811fd0-9fd0-485e-a91b-f3290aa16777:number:5000", - "unit": "381c64e1-670b-49dc-b238-800df31a8238:string:LITRES" - }, - "countryOfOrigin": "e6f1c08e-bc12-4caf-88d0-c6e8d5693f8f:string:AUSTRALIA", - "outwardBillNo": "a6ffd1c7-c42d-40df-9c39-c6b2044c574c:string:AQSIQ170923150", - "dateOfDischarge": "89e1172f-0a39-4887-855a-51f9dfe08e1f:string:2018-01-26", - "dateOfDeparture": "8df514b9-c48f-4a96-a1ac-d3e0ae7c50ee:string:2018-01-30", - "countryOfFinalDestination": "3d6c734e-d7c8-433a-a4a3-8213d3140f4b:string:CHINA", - "outgoingVehicleNo": "42a2fd22-977f-48ad-ad86-9a0d28541389:string:COSCO JAPAN 074E/30-JAN" - }, - "declaration": { - "name": "d8f1f66b-88f0-42c5-8b66-8429f2bc78a2:string:PETER LEE", - "designation": "30d17b4e-274c-49b2-80d5-5c1cfd1af15d:string:SHIPPING MANAGER", - "date": "6462d1dd-9d6d-423f-b43d-63c1c3c12866:string:2018-01-28" - } - }, - "signature": { - "type": "SHA3MerkleProof", - "targetHash": "b6db3e59d4354116451b603abc194f146df23946f637e9b25c3899a7697ed121", - "proof": [], - "merkleRoot": "b6db3e59d4354116451b603abc194f146df23946f637e9b25c3899a7697ed121" - }, - "proof": [ - { - "type": "OpenAttestationSignature2018", - "created": "2021-02-17T02:06:22.110Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - "signature": "0x4cced3e9865ab16f6a32464e73f32fca6ed42e377bdc36fe2e049716cd2bdc812db49a3540f93ecc615c98518afcb7602c133d261d6bdb8f6bded799964241d21b" - } - ] -} \ No newline at end of file diff --git a/test/fixtures/v2/did-revocation-store-signed-not-revoked.json b/test/fixtures/v2/did-revocation-store-signed-not-revoked.json deleted file mode 100644 index fa10f51..0000000 --- a/test/fixtures/v2/did-revocation-store-signed-not-revoked.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "version": "https://schema.openattestation.com/2.0/schema.json", - "data": { - "id": "3bc31040-b886-47c3-a6c0-a395d891d454:string:SGCNM21566325", - "$template": { - "name": "6eee90b2-57cd-4eba-a4a5-65d256c8be2f:string:CERTIFICATE_OF_NON_MANIPULATION", - "type": "16cddbe8-4688-4a63-8602-e6ca07d260be:string:EMBEDDED_RENDERER", - "url": "f3311983-7356-4e6d-8221-652217d5bc4c:string:https://demo-cnm.openattestation.com" - }, - "issuers": [ - { - "id": "ca04eb24-4389-4de9-b956-abab1318305f:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "name": "7a03686c-81e0-4635-bc54-66c82034346c:string:DEMO STORE", - "revocation": { - "type": "100d7b3c-e5cb-48fa-af83-6b4f46c17417:string:REVOCATION_STORE", - "location": "519124d9-c6bd-48cc-a3b2-4d6ced92d377:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" - }, - "identityProof": { - "type": "db36447a-c71d-4542-8c3a-8d3b94fd1590:string:DID", - "key": "4711fb5e-f8c9-4b8d-970f-a88428b2a3a8:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller" - } - } - ], - "recipient": { - "name": "4861069e-d81b-46ef-aeeb-c7d1c2150f49:string:AUS FREIGHT", - "address": { - "street": "2e4717be-99fe-411d-9f6e-ca2cb5fe5117:string:101 APPLE ROAD", - "country": "e47544b6-c282-4820-a6ab-2e906ce9a4ca:string:AUSTRALIA" - } - }, - "consignment": { - "description": "af1a024c-2222-4252-847e-e461fe0166b8:string:16667 CARTONS OF RED WINE", - "quantity": { - "value": "c628afb0-5f50-41ce-853e-390a92c43ae8:string:5000", - "unit": "189b46a4-43de-44c0-ac83-326551c35e72:string:LITRES" - }, - "countryOfOrigin": "7eb30f60-759e-4e02-99cc-ce8fae2595cc:string:AUSTRALIA", - "outwardBillNo": "850cf108-3e45-492e-b5a4-d50890f91b67:string:AQSIQ170923150", - "dateOfDischarge": "c4b94c07-d0ad-437a-be64-1311ccd317e6:string:2018-01-26", - "dateOfDeparture": "4fbab36b-2f13-4ea6-b121-caa57649424a:string:2018-01-30", - "countryOfFinalDestination": "d6eed6f6-635e-4b00-94fd-b475f13437b3:string:CHINA", - "outgoingVehicleNo": "21dad20a-8d71-46bb-b5fe-139984088963:string:COSCO JAPAN 074E/30-JAN" - }, - "declaration": { - "name": "a93a12e7-81b5-4b34-a77e-1d78ab0161c8:string:PETER LEE", - "designation": "fa92377c-e619-4b01-bd21-91f375b37158:string:SHIPPING MANAGER", - "date": "16899578-2c2b-418b-9b48-2e0d71bae3dd:string:2018-01-28" - } - }, - "signature": { - "type": "SHA3MerkleProof", - "targetHash": "a79c619aa426022c31d55ce8fe0699f99477d07b5d9564b73b094834dd5de5ec", - "proof": [], - "merkleRoot": "a79c619aa426022c31d55ce8fe0699f99477d07b5d9564b73b094834dd5de5ec" - }, - "proof": [ - { - "type": "OpenAttestationSignature2018", - "created": "2022-10-27T07:44:00.116Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x14272f7a1a83090efdeefe1d785a58f49272585b1136914bacee6ea167c5cf84760b395d72784c82af2e1e5952f243e5a07cea972fe243657bdd2ccfff1c1c2d1c" - } - ] -} diff --git a/test/fixtures/v2/did-revocation-store-signed-revoked.json b/test/fixtures/v2/did-revocation-store-signed-revoked.json deleted file mode 100644 index 7c212a5..0000000 --- a/test/fixtures/v2/did-revocation-store-signed-revoked.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": "https://schema.openattestation.com/2.0/schema.json", - "data": { - "id": "f9a88a07-4576-42ec-bbf5-5bafc35fbf75:string:SGCNM21566325", - "$template": { - "name": "0e9219cf-870f-44b6-a4e4-67d10c0769c2:string:CERTIFICATE_OF_NON_MANIPULATION", - "type": "fad3a151-3c2a-4138-9ec4-5f8fe0fe9c3b:string:EMBEDDED_RENDERER", - "url": "bd5822c3-3842-4bb9-b99f-cc508245fc83:string:https://demo-cnm.openattestation.com" - }, - "issuers": [ - { - "id": "7f742627-9f59-4d10-bd51-3e2887641e0c:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "name": "f39ed1fa-36f0-40b5-a42d-9719e5df19a1:string:DEMO STORE", - "revocation": { - "type": "1e2f2f88-6406-44d6-9457-e4ac56313212:string:REVOCATION_STORE", - "location": "c4dcac52-da5e-42cc-8b05-349d459a7ad5:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" - }, - "identityProof": { - "type": "7a1519ab-eac7-4fa9-8059-e243d9e6674c:string:DID", - "key": "d8814e37-8976-4003-872f-2cca11726cf6:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller" - } - } - ], - "recipient": { - "name": "67a8b009-cb8a-4bbc-8852-ee6b2bf5e158:string:AUS FREIGHT", - "address": { - "street": "ea27af39-9463-43c8-8801-10accdfeef43:string:101 APPLE ROAD", - "country": "676e60fb-1801-49de-b6b7-12431c7df4c9:string:AUSTRALIA" - } - }, - "consignment": { - "description": "0e342f00-dc82-4574-968f-30260156de3f:string:16667 CARTONS OF RED WINE", - "quantity": { - "value": "62287e86-038b-436b-9084-4fa6ad0fb784:string:5000", - "unit": "657bfd5f-7cfd-40e5-9e73-79525918c125:string:LITRES" - }, - "countryOfOrigin": "718ac80c-4ab3-4bb1-833e-6e7b9b1d3870:string:AUSTRALIA", - "outwardBillNo": "e1efd1dc-ec8e-4128-8f1b-339abeaec03c:string:AQSIQ170923150", - "dateOfDischarge": "e664ecb4-067a-416f-8b26-e7130f3a6205:string:2018-01-26", - "dateOfDeparture": "c4e6f710-6378-40f1-91ca-7f431fc5b9d6:string:2018-01-30", - "countryOfFinalDestination": "d88ffaca-0a4a-4907-8b49-e6d72799ed53:string:CHINA", - "outgoingVehicleNo": "23777fb5-ff20-4567-8cb3-a0c9ae548604:string:COSCO JAPAN 074E/30-JAN" - }, - "declaration": { - "name": "63c12150-6d12-463a-9a9b-f438ecfec511:string:PETER LEE", - "designation": "34d089c3-15f5-48e8-8d2b-72e5c0066421:string:SHIPPING MANAGER", - "date": "50bd4ccb-6bb4-483b-890d-609dd02d038f:string:2018-01-28" - } - }, - "signature": { - "type": "SHA3MerkleProof", - "targetHash": "abe59845be21c1607b0cbdab0f622e0d82019fe316072de312bab6b700d9ad13", - "proof": [ - "ff892056d1397e1146b625ac40d77bb4c5c3b47e22858729a65197fd5e89e683", - "ee52e200f490b1331ae6877d7b0992572fdcaf6168bcfc1ff879d1fc5f1e06d9" - ], - "merkleRoot": "3752f29527952e7ccc6bf4da614d80f2fec9e5bd8b71adf10beb4e6763e6c233" - }, - "proof": [ - { - "type": "OpenAttestationSignature2018", - "created": "2022-10-27T07:52:38.199Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x0cc602d746237f445af62a32aeb8e93701a96600b450d8b02005ec230d88351e40f89b31f8e0b13df35175cfd1321862098ce4aa34ed0686738f5322e9fea97e1c" - } - ] -} diff --git a/test/fixtures/v2/dnsdid-revocation-store-signed-not-revoked.json b/test/fixtures/v2/dnsdid-revocation-store-signed-not-revoked.json deleted file mode 100644 index 6a94ca7..0000000 --- a/test/fixtures/v2/dnsdid-revocation-store-signed-not-revoked.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "version": "https://schema.openattestation.com/2.0/schema.json", - "data": { - "id": "9e311b70-979d-4728-af5a-e37c777cbbfd:string:SGCNM21566325", - "$template": { - "name": "1ecc233b-d3e4-431d-9cfb-14f080b5576e:string:CERTIFICATE_OF_NON_MANIPULATION", - "type": "9f27a50f-158a-4286-b4d9-92a7ae13be30:string:EMBEDDED_RENDERER", - "url": "09263ccd-e804-4d07-9582-0646600c69e2:string:https://demo-cnm.openattestation.com" - }, - "issuers": [ - { - "id": "140c686a-4017-421c-a5e9-fdb07c1accd0:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "name": "6c0c26dc-f744-4af6-9ccc-ab2f67248e1b:string:DEMO STORE", - "revocation": { - "type": "7432f2cc-00d8-4c58-a5d0-f922f21c8614:string:REVOCATION_STORE", - "location": "dbe5fb41-b2a5-47bd-85d1-fea9d1b4caef:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" - }, - "identityProof": { - "type": "0c12407d-31a4-4a4e-839e-f5f8bb77c317:string:DNS-DID", - "key": "1949b9e6-7dc2-49c8-bf07-e88931ceef59:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "location": "0259c7c5-b373-467c-95f9-a63b8be53b13:string:demo-tradetrust.openattestation.com" - } - } - ], - "recipient": { - "name": "779ac49c-fa53-4c8c-abdf-95996303ceca:string:AUS FREIGHT", - "address": { - "street": "daf7f3c9-cd36-4346-bd8b-136e6947042a:string:101 APPLE ROAD", - "country": "0092049b-7f24-41da-be58-98c12a8e54b6:string:AUSTRALIA" - } - }, - "consignment": { - "description": "e8d63dc8-336b-47ed-8c32-f885a13bb3f9:string:16667 CARTONS OF RED WINE", - "quantity": { - "value": "ffe30ea1-0926-4689-9808-5a5d1e95bd26:string:5000", - "unit": "e33096b6-a55d-42f3-82fd-afd79c5a21a6:string:LITRES" - }, - "countryOfOrigin": "3b9ee621-df41-440c-82d9-b7aed1e06db1:string:AUSTRALIA", - "outwardBillNo": "a7af0df6-b3bd-477d-887a-05bcd0e53e04:string:AQSIQ170923150", - "dateOfDischarge": "85e1e2be-1f7d-43de-987d-810a8371eb04:string:2018-01-26", - "dateOfDeparture": "96afa038-4f13-4dd4-b4e8-12adf1a261c2:string:2018-01-30", - "countryOfFinalDestination": "80e2c732-c59f-4f94-88a7-5f6c575eda3b:string:CHINA", - "outgoingVehicleNo": "b3f98636-2c62-40ab-bfa4-8b3f414068f6:string:COSCO JAPAN 074E/30-JAN" - }, - "declaration": { - "name": "ed764112-16fa-4627-9541-7cd99ddc2ca3:string:PETER LEE", - "designation": "cf9221f7-4861-446a-a554-3efb54edeff3:string:SHIPPING MANAGER", - "date": "e7c1b037-56f4-45ec-9903-3c2dd330d39f:string:2018-01-28" - } - }, - "signature": { - "type": "SHA3MerkleProof", - "targetHash": "a428e123d99b68a76228f8d5255e27e9d158147767ad3e54e9ef2fe117a2b446", - "proof": [ - "2328c806fcc07f91df394965e0050130089882f7e1059747859387a38e5a6542", - "4ddcee582f5ea9e24c1c4983fb365714dc444ba15e89d76eb05cd87886a92732" - ], - "merkleRoot": "3752f29527952e7ccc6bf4da614d80f2fec9e5bd8b71adf10beb4e6763e6c233" - }, - "proof": [ - { - "type": "OpenAttestationSignature2018", - "created": "2022-10-27T07:52:38.199Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x0cc602d746237f445af62a32aeb8e93701a96600b450d8b02005ec230d88351e40f89b31f8e0b13df35175cfd1321862098ce4aa34ed0686738f5322e9fea97e1c" - } - ] -} diff --git a/test/fixtures/v2/dnsdid-revocation-store-signed-revoked.json b/test/fixtures/v2/dnsdid-revocation-store-signed-revoked.json deleted file mode 100644 index d55246a..0000000 --- a/test/fixtures/v2/dnsdid-revocation-store-signed-revoked.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "version": "https://schema.openattestation.com/2.0/schema.json", - "data": { - "id": "a17c05cb-e8aa-4f4f-b49e-75774807a096:string:SGCNM21566325", - "$template": { - "name": "8a436418-3c4f-4995-8f3e-f11bef42c664:string:CERTIFICATE_OF_NON_MANIPULATION", - "type": "81f85891-d163-4096-ac06-5b802a2c1de4:string:EMBEDDED_RENDERER", - "url": "893be80a-0bc7-4e6d-93c1-9010c159bed3:string:https://demo-cnm.openattestation.com" - }, - "issuers": [ - { - "id": "20a0a806-8975-4df7-8084-59f5b52136f1:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "name": "ad28c221-4816-4057-9f45-5cab17cf1ba0:string:DEMO STORE", - "revocation": { - "type": "bde8af07-4788-4c38-a214-aa176d54e8da:string:REVOCATION_STORE", - "location": "56089f8b-daae-48c4-95fb-6e67663d3e30:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" - }, - "identityProof": { - "type": "64da16e2-6aa9-4cbb-ab72-912a553fff44:string:DNS-DID", - "key": "283ab372-8e53-46c1-8197-6f8cc82f4d3b:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "location": "294eb849-6484-41a9-b37b-2912e6b0ff3a:string:demo-tradetrust.openattestation.com" - } - } - ], - "recipient": { - "name": "30bbcd3e-8214-4d81-bf28-1128a6959fe6:string:AUS FREIGHT", - "address": { - "street": "f58322c7-981b-4e2c-b34d-65731c0cc427:string:101 APPLE ROAD", - "country": "901081c2-76cb-41ca-b5e0-e45a24c88af9:string:AUSTRALIA" - } - }, - "consignment": { - "description": "771bef92-2ae7-4527-9ff1-8679d349c581:string:16667 CARTONS OF RED WINE", - "quantity": { - "value": "f26200de-5bc7-48e2-ac78-4fd05e7709fc:string:5000", - "unit": "5bf3045b-e983-405a-937a-5e64d2df9dbc:string:LITRES" - }, - "countryOfOrigin": "eef83b28-25ff-47df-aed3-29f76e62bf41:string:AUSTRALIA", - "outwardBillNo": "4e34b9c4-504c-44f8-9367-64ff0f55e140:string:AQSIQ170923150", - "dateOfDischarge": "d57fa170-0c16-4c1e-8375-fc5c35ba7f31:string:2018-01-26", - "dateOfDeparture": "841cb84a-22bc-45c9-a742-4eee535eba3b:string:2018-01-30", - "countryOfFinalDestination": "81f60c90-0554-4a19-9b2b-48c6ba029c54:string:CHINA", - "outgoingVehicleNo": "a949e936-bdba-41a9-9d46-8df724d54ee0:string:COSCO JAPAN 074E/30-JAN" - }, - "declaration": { - "name": "e898019d-982b-40fe-92db-861302d69659:string:PETER LEE", - "designation": "ad90c66e-e5af-430f-81ca-05d9ad26076c:string:SHIPPING MANAGER", - "date": "7dfdf511-a519-4632-baa6-615f6f621c14:string:2018-01-28" - } - }, - "signature": { - "type": "SHA3MerkleProof", - "targetHash": "2328c806fcc07f91df394965e0050130089882f7e1059747859387a38e5a6542", - "proof": [ - "a428e123d99b68a76228f8d5255e27e9d158147767ad3e54e9ef2fe117a2b446", - "4ddcee582f5ea9e24c1c4983fb365714dc444ba15e89d76eb05cd87886a92732" - ], - "merkleRoot": "3752f29527952e7ccc6bf4da614d80f2fec9e5bd8b71adf10beb4e6763e6c233" - }, - "proof": [ - { - "type": "OpenAttestationSignature2018", - "created": "2022-10-27T07:52:38.200Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x0cc602d746237f445af62a32aeb8e93701a96600b450d8b02005ec230d88351e40f89b31f8e0b13df35175cfd1321862098ce4aa34ed0686738f5322e9fea97e1c" - } - ] -} diff --git a/test/fixtures/v2/document.ts b/test/fixtures/v2/document.ts deleted file mode 100644 index 4e0877c..0000000 --- a/test/fixtures/v2/document.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; - -interface CustomDocument extends v2.OpenAttestationDocument { - name: string; - issuedOn: string; - transcript: any; - issuers: { url: string; name: string; certificateStore: string }[]; - recipient: { - name: string; - email: string; - phone: string; - }; -} -export const document: WrappedDocument = { - version: SchemaId.v2, - schema: "opencerts/1.4", - data: { - id: "046bebd9-1c59-4d82-b70b-b6c8aa5c502d:string:2018091259", - name: "e91c1c2e-534b-43d1-b73b-e2de2c799242:string:SEAB Certificate for SEAB", - issuedOn: "8332eaaa-cb87-46ae-a5d0-1f9cae661fba:string:2018-08-31T23:59:32+08:00", - issuers: [ - { - name: "1f525e1b-50c3-49b7-bfbf-0f110453ff3b:string:Singapore Examination and Assessment Board", - url: "de6fcb26-c53a-49fc-a872-432213d135f3:string:https://www.seab.gov.sg/", - certificateStore: "4b467479-77ed-47c7-bfdf-7be8e6618dcd:string:0x20bc9C354A18C8178A713B9BcCFFaC2152b53990", - }, - ], - recipient: { - name: "9dcfe063-b692-4ff6-901c-134c29e4e1df:string:John Snow", - email: "03a578d3-ab41-4572-bf7b-fc8763832918:string:johnsnow@gmail.com", - phone: "a2be0e32-4a9e-45fa-9690-a300fadaa5f7:string:+6588888888", - }, - transcript: [ - { - name: "97fb29de-56db-4cde-9032-5ef91423bcf4:string:Introduction to SEAB", - grade: "df28e06b-d06f-4283-ae72-b5b3e30aee28:string:B+", - courseCredit: "50dc8869-ef3c-4276-a72e-c247d6e64b72:number:3", - courseCode: "519f79a3-4f8c-4345-9474-d173e6c9a7fe:string:SEAB-HIST", - url: "c3954ba1-023c-45ad-bbd4-eb4a8df82dc2:string:https://www.seab.gov.sg/pages/about/introduction", - description: "8d6e4172-51e2-49ba-b98b-d1c5906a0339:string:Understanding the vision, mission, and values", - }, - { - name: "4da6b8d8-21d3-4228-937b-acc65a648bf7:string:SEAB - About Us", - grade: "1cf384cd-8951-4a56-9e42-e3d9954d0c85:string:A", - courseCredit: "f000cbd2-cf8d-4bf6-94b7-6e73f8037c3f:number:3", - courseCode: "d52233d5-a137-4e94-ad75-daac38536c87:string:SEAB-ABT", - url: "148a3906-8cfe-4971-9f17-6f2751a54b8e:string:https://www.seab.gov.sg/pages/about/aboutus", - description: "69179ec5-78fc-427e-8680-ba91f86d761f:string:About the history of SEAB", - }, - ], - }, - privacy: {}, - signature: { - type: "SHA3MerkleProof", - targetHash: "85df2b4e905a82cf10c317df8f4b659b5cf38cc12bd5fbaffba5fc901ef0011b", - proof: [], - merkleRoot: "85df2b4e905a82cf10c317df8f4b659b5cf38cc12bd5fbaffba5fc901ef0011b", - }, -}; diff --git a/test/fixtures/v2/documentDidCustomRevocation.ts b/test/fixtures/v2/documentDidCustomRevocation.ts deleted file mode 100644 index bbc83f2..0000000 --- a/test/fixtures/v2/documentDidCustomRevocation.ts +++ /dev/null @@ -1,66 +0,0 @@ -export const documentDidCustomRevocation: any = { - version: "https://schema.openattestation.com/2.0/schema.json", - data: { - id: "875d57ec-2768-408a-b8d3-bb5ebda17b80:string:SGCNM21566325", - $template: { - name: "1449b124-9bc4-4722-bed1-47272c69f802:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "ba303026-4130-4801-a6a0-1d17db61a6c5:string:EMBEDDED_RENDERER", - url: "87c3c915-4d6e-4f27-b7d1-614181d2f620:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - id: "21d8b192-f449-4413-a311-5c9e211082d6:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - name: "f1ca0af7-5e9a-45f3-8635-720babd76387:string:DEMO STORE", - revocation: { - type: "edcb13e4-1e1a-4317-a194-ec372345c14f:string:CUSTOM", - foo: "4f18c9c0-e872-44b0-961e-23c3e6b7be50:string:bar", - }, - identityProof: { - type: "877d7405-ee94-434a-a258-ec6add2877d5:string:DID", - key: - "37fec355-da53-4c2f-b8d7-b064b305e879:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - }, - }, - ], - recipient: { - name: "8a5bffe7-ceb1-41b9-b240-84025eebdc0c:string:SG FREIGHT", - address: { - street: "83265d64-7fc8-4201-b21e-0b87d5bc8007:string:101 ORCHARD ROAD", - country: "beb02ccd-02cf-48c2-adb2-9ea1b55442b0:string:SINGAPORE", - }, - }, - consignment: { - description: "bfd4a9ae-47fb-4b72-a131-1827d45f8b72:string:16667 CARTONS OF RED WINE", - quantity: { - value: "003d32f5-e663-48f1-ac7d-db4ae1f79cce:number:5000", - unit: "2dac8afd-3a2b-43f5-9853-b92ad5727fd2:string:LITRES", - }, - countryOfOrigin: "20e4cadc-41e8-49b0-bad9-534f4cdae00f:string:AUSTRALIA", - outwardBillNo: "3cb5790f-379d-4360-884b-d45345437394:string:AQSIQ170923130", - dateOfDischarge: "1d774eb3-759d-4d3e-a38f-1aaa5579a3fe:string:2018-01-26", - dateOfDeparture: "0538a21c-acdd-4de3-aa33-9000b818dc9a:string:2018-01-30", - countryOfFinalDestination: "2a55a98e-0043-4f26-b23b-7b08d2c30505:string:CHINA", - outgoingVehicleNo: "154ae7f3-74dc-4972-b001-275a929cb72a:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "397bd565-7902-4201-92fd-2a7b3686d740:string:PETER LEE", - designation: "53feef96-c973-4f03-bdee-3bae76b139e3:string:SHIPPING MANAGER", - date: "52c7a56b-23ab-41b5-b7f6-a86e9fbeae44:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "eea9ad6c2998a3d00fe70f91b3c6cefcd7a5c2068e6b13c9d93c00e5d4fcec1a", - proof: [], - merkleRoot: "eea9ad6c2998a3d00fe70f91b3c6cefcd7a5c2068e6b13c9d93c00e5d4fcec1a", - }, - proof: [ - { - type: "OpenAttestationSignature2018", - proofPurpose: "assertionMethod", - verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - signature: - "0x5fff5ed3d62fbe92b7a358260f924ea31ba57c53d01fe849d4fc3843beec4b7345a1c00035cf96f11cab9d908ad10aac8d077d5feca2c393240c9cc9e0b9c7e81b", - }, - ], -}; diff --git a/test/fixtures/v2/documentDidMissingProof.ts b/test/fixtures/v2/documentDidMissingProof.ts deleted file mode 100644 index 5862a00..0000000 --- a/test/fixtures/v2/documentDidMissingProof.ts +++ /dev/null @@ -1,54 +0,0 @@ -export const documentDidMissingProof: any = { - version: "https://schema.openattestation.com/2.0/schema.json", - data: { - id: "e1917cfe-70fa-4187-ac6d-ccc57c0d4645:string:SGCNM21566325", - $template: { - name: "95b39779-f300-43b7-9010-1eb96eafc6b5:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "43e9f19d-1ebd-485d-8cbf-2726c1f7c755:string:EMBEDDED_RENDERER", - url: "7b0602b0-5e55-42de-813a-27c4f2b54d20:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - id: "6002d4ab-d1a6-447e-9f86-945ee220fedb:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - name: "f46a0b69-983b-4b5e-83f6-aebe14625810:string:DEMO STORE", - revocation: { type: "bcd9fe64-1b8a-41d3-a176-5d750b4a6cef:string:NONE" }, - identityProof: { - type: "c2990f33-814c-4c7f-a14c-8cef4b1aa8ad:string:DID", - key: - "4ef2653f-7fb5-409b-acc1-a76344ff2de0:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - }, - }, - ], - recipient: { - name: "a5bcf044-94e4-421e-a0d6-960546dc3b41:string:SG FREIGHT", - address: { - street: "1b8dc011-05e0-405e-a687-4b2292a9455a:string:101 ORCHARD ROAD", - country: "39f0508c-637c-407f-9087-c0d1239c9407:string:SINGAPORE", - }, - }, - consignment: { - description: "6819ad4b-ffb2-427c-ac5a-6b812cbefff9:string:16667 CARTONS OF RED WINE", - quantity: { - value: "fb57e16f-d2f4-4caa-8c37-86514695a3ac:number:5000", - unit: "b4259694-628d-4dc0-bce1-f7d34bab8a75:string:LITRES", - }, - countryOfOrigin: "68c4b3bf-6ecf-4b55-894b-3def8c287c6f:string:AUSTRALIA", - outwardBillNo: "2f5b4abf-47d8-4530-8e13-0f78688637e5:string:AQSIQ170923130", - dateOfDischarge: "5dde46da-25cb-4721-96c8-a8f7fee4789a:string:2018-01-26", - dateOfDeparture: "6cc4d4bd-52a4-4998-9cf7-c32a86e78fb0:string:2018-01-30", - countryOfFinalDestination: "054ea1a5-37ae-4625-b8bf-d2ac43ddfcf2:string:CHINA", - outgoingVehicleNo: "11ac7f5b-2839-4d27-b4fb-7ac77acb36c7:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "1954f051-1fde-4288-8468-5020dcc883a6:string:PETER LEE", - designation: "07ff6d5c-40e5-496d-86fd-704866dc8e06:string:SHIPPING MANAGER", - date: "3873ff50-223f-41d0-b37c-6572328594ae:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "cce7bd33bd80b746b71e943e23ddc88fcb99c9011becdd1b4d8b7ab9567d2adb", - proof: [], - merkleRoot: "cce7bd33bd80b746b71e943e23ddc88fcb99c9011becdd1b4d8b7ab9567d2adb", - }, -}; diff --git a/test/fixtures/v2/documentDidMixedTokenRegistry.ts b/test/fixtures/v2/documentDidMixedTokenRegistry.ts deleted file mode 100644 index 127ad13..0000000 --- a/test/fixtures/v2/documentDidMixedTokenRegistry.ts +++ /dev/null @@ -1,72 +0,0 @@ -export const documentDidMixedTokenRegistry: any = { - version: "https://schema.openattestation.com/2.0/schema.json", - data: { - id: "d1ac6885-4874-4a58-b8be-e7a77394cab3:string:SGCNM21566325", - $template: { - name: "03d57283-6708-4b41-a353-77c51482a66c:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "6376de63-a270-4c32-b5ed-5f07c74690ca:string:EMBEDDED_RENDERER", - url: "cb970225-54fc-4af5-a8a6-b8dd2f03a561:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - id: "76f6aed2-3df9-4e26-94df-2087a1cbef96:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - name: "74370115-61fe-4525-83ad-c18fbf76ac89:string:DEMO STORE", - revocation: { type: "6ebb23bb-d83d-4ca9-8523-d8618b6c34d5:string:NONE" }, - identityProof: { - type: "1fd92bf6-0b01-4705-8b04-805747b7eec1:string:DID", - key: - "3e1d0a2e-6b33-45ee-addd-c7fc4a39276a:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - }, - }, - { - name: "b11c04a0-5cda-4066-9b97-9faa40a56d8e:string:DEMO STORE", - tokenRegistry: "5f86b163-9546-446e-8cd0-d82cca92bd0c:string:0x9178F546D3FF57D7A6352bD61B80cCCD46199C2d", - identityProof: { - type: "79fc0ddf-5880-4e67-8fa0-1c0f937e5cf4:string:DNS-TXT", - location: "e6dcdbfc-9c29-4852-82cf-9d25c086eac6:string:tradetrust.io", - }, - }, - ], - recipient: { - name: "cb8877ab-cdca-4150-8a57-54a471016b3b:string:SG FREIGHT", - address: { - street: "ff30ea3d-24f5-4037-b164-42ced9144975:string:101 ORCHARD ROAD", - country: "0d38260b-b6b5-49ae-bc6d-873fcc924bf7:string:SINGAPORE", - }, - }, - consignment: { - description: "e3b6f085-f2fc-495c-8a85-006ab6a947c8:string:16667 CARTONS OF RED WINE", - quantity: { - value: "ce772105-828f-4af0-af06-c6fd22cdd62a:number:5000", - unit: "ebcb0261-d6a3-46a0-9d57-d19fbda7eaf9:string:LITRES", - }, - countryOfOrigin: "c6c7a77d-cada-494e-bd16-d4b87a1bcc67:string:AUSTRALIA", - outwardBillNo: "7c3e4832-56dd-4b07-a59f-aba34fdcc7ee:string:AQSIQ170923130", - dateOfDischarge: "5132b797-033e-4a4a-b154-7a2bf4ab75cd:string:2018-01-26", - dateOfDeparture: "1079d65f-767d-4866-8174-7bd424e8c65e:string:2018-01-30", - countryOfFinalDestination: "df7bba94-4dbc-41bb-a4ec-40bf4804d951:string:CHINA", - outgoingVehicleNo: "3c7eb8a9-ca34-46a9-bc52-ecfe087a9d9a:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "9ffde9a1-8d3c-4839-a64f-9474d4b1c5e0:string:PETER LEE", - designation: "445c12d0-0e9d-4d7b-a436-8a1310066220:string:SHIPPING MANAGER", - date: "791192b2-dd1a-40c9-8158-2188338162a9:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "1938abeb1de47174949bb01fccefdda17f19a932bc79cb121119855f4aa89471", - proof: [], - merkleRoot: "1938abeb1de47174949bb01fccefdda17f19a932bc79cb121119855f4aa89471", - }, - proof: [ - { - created: "2021-03-25T07:52:31.291Z", - type: "OpenAttestationSignature2018", - proofPurpose: "assertionMethod", - verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - signature: - "0xc0d9a94cb981d2f70432032f711b363e191a885a2802e02209d0e5db1983fba618a82c769ba0edc866f9f9166c006dd018455138ff29124b825d531ab2be70db1c", - }, - ], -}; diff --git a/test/fixtures/v2/documentDidObfuscatedRevocation.ts b/test/fixtures/v2/documentDidObfuscatedRevocation.ts deleted file mode 100644 index c67b0fe..0000000 --- a/test/fixtures/v2/documentDidObfuscatedRevocation.ts +++ /dev/null @@ -1,65 +0,0 @@ -export const documentDidObfuscatedRevocation: any = { - version: "https://schema.openattestation.com/2.0/schema.json", - data: { - id: "e1917cfe-70fa-4187-ac6d-ccc57c0d4645:string:SGCNM21566325", - $template: { - name: "95b39779-f300-43b7-9010-1eb96eafc6b5:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "43e9f19d-1ebd-485d-8cbf-2726c1f7c755:string:EMBEDDED_RENDERER", - url: "7b0602b0-5e55-42de-813a-27c4f2b54d20:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - id: "6002d4ab-d1a6-447e-9f86-945ee220fedb:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - name: "f46a0b69-983b-4b5e-83f6-aebe14625810:string:DEMO STORE", - identityProof: { - type: "c2990f33-814c-4c7f-a14c-8cef4b1aa8ad:string:DID", - key: - "4ef2653f-7fb5-409b-acc1-a76344ff2de0:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - }, - }, - ], - recipient: { - name: "a5bcf044-94e4-421e-a0d6-960546dc3b41:string:SG FREIGHT", - address: { - street: "1b8dc011-05e0-405e-a687-4b2292a9455a:string:101 ORCHARD ROAD", - country: "39f0508c-637c-407f-9087-c0d1239c9407:string:SINGAPORE", - }, - }, - consignment: { - description: "6819ad4b-ffb2-427c-ac5a-6b812cbefff9:string:16667 CARTONS OF RED WINE", - quantity: { - value: "fb57e16f-d2f4-4caa-8c37-86514695a3ac:number:5000", - unit: "b4259694-628d-4dc0-bce1-f7d34bab8a75:string:LITRES", - }, - countryOfOrigin: "68c4b3bf-6ecf-4b55-894b-3def8c287c6f:string:AUSTRALIA", - outwardBillNo: "2f5b4abf-47d8-4530-8e13-0f78688637e5:string:AQSIQ170923130", - dateOfDischarge: "5dde46da-25cb-4721-96c8-a8f7fee4789a:string:2018-01-26", - dateOfDeparture: "6cc4d4bd-52a4-4998-9cf7-c32a86e78fb0:string:2018-01-30", - countryOfFinalDestination: "054ea1a5-37ae-4625-b8bf-d2ac43ddfcf2:string:CHINA", - outgoingVehicleNo: "11ac7f5b-2839-4d27-b4fb-7ac77acb36c7:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "1954f051-1fde-4288-8468-5020dcc883a6:string:PETER LEE", - designation: "07ff6d5c-40e5-496d-86fd-704866dc8e06:string:SHIPPING MANAGER", - date: "3873ff50-223f-41d0-b37c-6572328594ae:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "cce7bd33bd80b746b71e943e23ddc88fcb99c9011becdd1b4d8b7ab9567d2adb", - proof: [], - merkleRoot: "cce7bd33bd80b746b71e943e23ddc88fcb99c9011becdd1b4d8b7ab9567d2adb", - }, - privacy: { - obfuscatedData: ["3dcde1cfa4a6716392514fd5ea8c451c82081a5f2d95f0fc7b045c4f461389ee"], - }, - proof: [ - { - type: "OpenAttestationSignature2018", - proofPurpose: "assertionMethod", - verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - signature: - "0xff0227ce8400a17a2d80073a95fd895f4fed0011954c90eef389bc618087a4b36ed958775420d122e9a6764c6ffe9d3302d4f45fb065d5e962c3572d3872f31a1b", - }, - ], -}; diff --git a/test/fixtures/v2/documentDidSigned.ts b/test/fixtures/v2/documentDidSigned.ts deleted file mode 100644 index 3a94b6c..0000000 --- a/test/fixtures/v2/documentDidSigned.ts +++ /dev/null @@ -1,70 +0,0 @@ -export const documentDidSigned: any = { - version: "https://schema.openattestation.com/2.0/schema.json", - data: { - id: "c3b43b01-75dd-45d7-bdaf-74a492c0fb4a:string:SGCNM21566325", - $template: { - name: "5f8a8324-fa3b-4e3b-81e8-940fca2fe169:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "8e554aa1-56ba-45a5-b078-f7e061b13b0b:string:EMBEDDED_RENDERER", - url: "fa1fc35f-49ac-4e09-9b9e-46d4c007f6d3:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - id: "67fa28bf-483d-4aaa-bc8a-89006e6f03b9:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - name: "0324b7c4-c806-4e0a-b9e1-e24e6ca4139d:string:DEMO STORE", - revocation: { - type: "a067bbe3-dff5-40c6-9422-584235c57a7e:string:REVOCATION_STORE", - location: "0fde8a61-9b87-4881-bdaf-335484771848:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", - }, - identityProof: { - type: "aa9eb261-43b8-4121-867b-be805c526da0:string:DID", - key: - "43771c2e-b8c7-49b2-a274-17f4d4982bec:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - }, - }, - ], - recipient: { - name: "db253694-2cc3-4911-845e-272dc8671663:string:AUS FREIGHT", - address: { - street: "82679ca5-4ea0-4bcb-b917-fc49e386ac5c:string:101 APPLE ROAD", - country: "20491ded-2895-4ee3-b2ad-4e16a4515c22:string:AUSTRALIA", - }, - }, - consignment: { - description: "e6ade4ce-5a11-488e-9507-a95fa5229679:string:16667 CARTONS OF RED WINE", - quantity: { - value: "af96fb9f-f244-4361-aaa3-adac581fd57a:string:5000", - unit: "eea4921b-e24e-4946-9cae-46e80fe84d5d:string:LITRES", - }, - countryOfOrigin: "585f7416-6a20-4230-8cfc-5ed89719e55b:string:AUSTRALIA", - outwardBillNo: "0d746b5d-a30e-4db8-8806-529755234c18:string:AQSIQ170923150", - dateOfDischarge: "547b717b-8b83-4d26-bb6f-16044d7a9275:string:2018-01-26", - dateOfDeparture: "22aa8673-fc46-4eeb-baa6-ad69f258adaa:string:2018-01-30", - countryOfFinalDestination: "9e11e058-1030-4454-bbdc-11b9fafd7796:string:CHINA", - outgoingVehicleNo: "2af1326e-3149-4ddd-8014-7314cda8c3cb:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "0b4092fa-2a80-4304-a5c3-bde34f4931be:string:PETER LEE", - designation: "5dca9da0-a7d3-4078-8411-852be410fd8b:string:SHIPPING MANAGER", - date: "eca81dc4-54f8-435f-9b96-2104ff79355a:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "ff892056d1397e1146b625ac40d77bb4c5c3b47e22858729a65197fd5e89e683", - proof: [ - "abe59845be21c1607b0cbdab0f622e0d82019fe316072de312bab6b700d9ad13", - "ee52e200f490b1331ae6877d7b0992572fdcaf6168bcfc1ff879d1fc5f1e06d9", - ], - merkleRoot: "3752f29527952e7ccc6bf4da614d80f2fec9e5bd8b71adf10beb4e6763e6c233", - }, - proof: [ - { - type: "OpenAttestationSignature2018", - created: "2022-10-27T07:52:38.199Z", - proofPurpose: "assertionMethod", - verificationMethod: "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - signature: - "0x0cc602d746237f445af62a32aeb8e93701a96600b450d8b02005ec230d88351e40f89b31f8e0b13df35175cfd1321862098ce4aa34ed0686738f5322e9fea97e1c", - }, - ], -}; diff --git a/test/fixtures/v2/documentDidWrongSignature.ts b/test/fixtures/v2/documentDidWrongSignature.ts deleted file mode 100644 index d58df74..0000000 --- a/test/fixtures/v2/documentDidWrongSignature.ts +++ /dev/null @@ -1,64 +0,0 @@ -export const documentDidWrongSignature: any = { - version: "https://schema.openattestation.com/2.0/schema.json", - data: { - id: "e1917cfe-70fa-4187-ac6d-ccc57c0d4645:string:SGCNM21566325", - $template: { - name: "95b39779-f300-43b7-9010-1eb96eafc6b5:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "43e9f19d-1ebd-485d-8cbf-2726c1f7c755:string:EMBEDDED_RENDERER", - url: "7b0602b0-5e55-42de-813a-27c4f2b54d20:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - id: "6002d4ab-d1a6-447e-9f86-945ee220fedb:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - name: "f46a0b69-983b-4b5e-83f6-aebe14625810:string:DEMO STORE", - revocation: { type: "bcd9fe64-1b8a-41d3-a176-5d750b4a6cef:string:NONE" }, - identityProof: { - type: "c2990f33-814c-4c7f-a14c-8cef4b1aa8ad:string:DID", - key: - "4ef2653f-7fb5-409b-acc1-a76344ff2de0:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - }, - }, - ], - recipient: { - name: "a5bcf044-94e4-421e-a0d6-960546dc3b41:string:SG FREIGHT", - address: { - street: "1b8dc011-05e0-405e-a687-4b2292a9455a:string:101 ORCHARD ROAD", - country: "39f0508c-637c-407f-9087-c0d1239c9407:string:SINGAPORE", - }, - }, - consignment: { - description: "6819ad4b-ffb2-427c-ac5a-6b812cbefff9:string:16667 CARTONS OF RED WINE", - quantity: { - value: "fb57e16f-d2f4-4caa-8c37-86514695a3ac:number:5000", - unit: "b4259694-628d-4dc0-bce1-f7d34bab8a75:string:LITRES", - }, - countryOfOrigin: "68c4b3bf-6ecf-4b55-894b-3def8c287c6f:string:AUSTRALIA", - outwardBillNo: "2f5b4abf-47d8-4530-8e13-0f78688637e5:string:AQSIQ170923130", - dateOfDischarge: "5dde46da-25cb-4721-96c8-a8f7fee4789a:string:2018-01-26", - dateOfDeparture: "6cc4d4bd-52a4-4998-9cf7-c32a86e78fb0:string:2018-01-30", - countryOfFinalDestination: "054ea1a5-37ae-4625-b8bf-d2ac43ddfcf2:string:CHINA", - outgoingVehicleNo: "11ac7f5b-2839-4d27-b4fb-7ac77acb36c7:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "1954f051-1fde-4288-8468-5020dcc883a6:string:PETER LEE", - designation: "07ff6d5c-40e5-496d-86fd-704866dc8e06:string:SHIPPING MANAGER", - date: "3873ff50-223f-41d0-b37c-6572328594ae:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "cce7bd33bd80b746b71e943e23ddc88fcb99c9011becdd1b4d8b7ab9567d2adb", - proof: [], - merkleRoot: "cce7bd33bd80b746b71e943e23ddc88fcb99c9011becdd1b4d8b7ab9567d2adb", - }, - proof: [ - { - created: "2021-03-25T07:52:31.291Z", - type: "OpenAttestationSignature2018", - proofPurpose: "assertionMethod", - verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - signature: - "0xff0227ce8400a17a2d80073a95fd895f4fed0011954c90eef389bc618087a4b36ed958775420d122e9a6764c6ffe9d3302d4f45fb065d5e962c3572d3872f31a1c", - }, - ], -}; diff --git a/test/fixtures/v2/documentDnsDidMixedTokenRegistry.ts b/test/fixtures/v2/documentDnsDidMixedTokenRegistry.ts deleted file mode 100644 index 611ed4b..0000000 --- a/test/fixtures/v2/documentDnsDidMixedTokenRegistry.ts +++ /dev/null @@ -1,146 +0,0 @@ -export const documentDnsDidMixedTokenRegistryInvalid: any = { - version: "https://schema.openattestation.com/2.0/schema.json", - data: { - id: "9786e905-b7b4-4350-bd03-c24d3cd126f7:string:SGCNM21566325", - $template: { - name: "a0414285-7a0a-4ee0-abc9-f5a747956cac:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "1b4c544b-38fb-4198-8a47-0cbedc8912e4:string:EMBEDDED_RENDERER", - url: "2931df4d-275b-4306-b1c2-2dfe63a07b8b:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - id: "4b5696c5-1a16-4d5a-8b3b-34a3c9e77d48:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - name: "12d16f53-cabc-4a05-b754-a7b6e19541bb:string:DEMO STORE", - revocation: { type: "f616b59c-10d4-4321-b3c5-8a68b6cde69e:string:NONE" }, - identityProof: { - type: "30260b01-59ea-4f98-9ac8-f01e7a2fdb3b:string:DNS-DID", - key: - "fde9b540-0e21-4a22-a055-d0238c226911:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - location: "600bf394-130b-4440-a294-3c838e6b4dd4:string:example.com", - }, - }, - { - name: "eded8bed-d5d2-4d4a-993f-f347d1d27523:string:DEMO STORE", - tokenRegistry: "5768a07f-5dd0-4432-9a06-17f0e6e24c89:string:0x9178F546D3FF57D7A6352bD61B80cCCD46199C2d", - identityProof: { - type: "827202b9-fe95-420b-a7fe-e8c9eb02a673:string:DNS-TXT", - location: "68a2c24c-14e6-4bf4-8f59-8cac38067bfe:string:tradetrust.io", - }, - }, - ], - recipient: { - name: "38aa1bad-4b94-4ac0-84c2-dab180cde903:string:SG FREIGHT", - address: { - street: "56f34fcb-db0b-4110-b118-55612a68b6c2:string:101 ORCHARD ROAD", - country: "08ea59a8-af0a-4d8f-a61b-b10801c560af:string:SINGAPORE", - }, - }, - consignment: { - description: "589cc4bb-1c64-4f17-8874-45455e0a7c6e:string:16667 CARTONS OF RED WINE", - quantity: { - value: "a76dcc2b-ed0e-4a7e-bc58-5009eecbbc64:number:5000", - unit: "fd4b29b2-2c6c-4f1a-8357-cec57d66df6c:string:LITRES", - }, - countryOfOrigin: "fed2ff09-944b-422f-b596-ec76aaee7316:string:AUSTRALIA", - outwardBillNo: "8679db7b-1830-4319-b0ba-14ca508ffa4c:string:AQSIQ170923130", - dateOfDischarge: "c7076463-9dbe-4294-ae34-3f97e372ee93:string:2018-01-26", - dateOfDeparture: "19e1e5f1-af19-4d48-a21d-63b678e4478c:string:2018-01-30", - countryOfFinalDestination: "9c09a0cc-35b1-4a6d-91d1-7a3454b6c1c1:string:CHINA", - outgoingVehicleNo: "48189627-95be-4409-8d2d-cebb8f2ec2fb:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "36a654a2-d668-46b5-9ed5-5a7de35c3d9a:string:PETER LEE", - designation: "64559706-cc9e-464d-8d2e-9a46ecf7ad40:string:SHIPPING MANAGER", - date: "ebd98e6b-3541-46a2-9237-245dae5b74d7:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "ee1548c091767b09be53a54e576341d8fd07d1ba3fb17873ad334e22f4a28dcc", - proof: [], - merkleRoot: "ee1548c091767b09be53a54e576341d8fd07d1ba3fb17873ad334e22f4a28dcc", - }, - proof: [ - { - type: "OpenAttestationSignature2018", - proofPurpose: "assertionMethod", - verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - signature: - "0xd05bb71bdb6f78451e2d12851825421666c6c5e355f516325ce5002a0586f89f6ebbd465227bec59c745dd26918dd8dab9122dcd398256d8e487e0ecf82a53421b", - }, - ], -}; - -export const documentDnsDidMixedTokenRegistryValid: any = { - version: "https://schema.openattestation.com/2.0/schema.json", - data: { - id: "7746e414-5b1e-4497-b3f2-ae30a1d766ca:string:SGCNM21566325", - $template: { - name: "10a917b1-b8da-4daa-b115-19571c233102:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "31524d9c-f406-4a93-affe-617b7ccbabb9:string:EMBEDDED_RENDERER", - url: "a503fb11-4cdd-4ef6-8381-7092857a321b:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - id: "c6b0f1f7-1e1d-47b4-9eb6-8db9d072b144:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - name: "df597fac-5886-42e5-9859-822bfc897fea:string:DEMO STORE", - revocation: { type: "a13d5e6d-b566-446e-aab9-ce18901199bb:string:NONE" }, - identityProof: { - type: "f06b7de2-b0a0-4f8a-ae9f-5d3b57996222:string:DNS-DID", - key: - "6848a56a-927b-4b78-a028-1f749950b431:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - location: "5aed1f89-5dec-4296-aa5f-41902c344312:string:example.tradetrust.io", - }, - }, - { - name: "61c8f21a-1d24-4ed6-b12f-8cce0f85a1a7:string:DEMO STORE", - tokenRegistry: "c256d47c-efd5-4b84-8b55-9f6f97dd8c88:string:0x9178F546D3FF57D7A6352bD61B80cCCD46199C2d", - identityProof: { - type: "2d0551a9-ffa1-44ec-8ef2-6e2cb3baf276:string:DNS-TXT", - location: "fa306803-4a9d-4959-9bc6-8379d27760a0:string:tradetrust.io", - }, - }, - ], - recipient: { - name: "441e25a8-adc0-4d9f-a57d-43a7acf44c63:string:SG FREIGHT", - address: { - street: "f3c69786-b96f-4806-ac3d-748d039bfb80:string:101 ORCHARD ROAD", - country: "22370452-6a31-4189-bc6d-1b1b7ac5bc45:string:SINGAPORE", - }, - }, - consignment: { - description: "5018b9f8-a92b-48e1-85e7-11fbdde783cc:string:16667 CARTONS OF RED WINE", - quantity: { - value: "583b8fd8-fca5-4575-b957-9e21b8b32b5b:number:5000", - unit: "51a5552c-4ea0-4b47-bbba-c633e9a27c51:string:LITRES", - }, - countryOfOrigin: "e11325d6-d527-4887-a81e-eba9526829e0:string:AUSTRALIA", - outwardBillNo: "26c55eb5-11d4-487f-b96a-5f0dd460fb09:string:AQSIQ170923130", - dateOfDischarge: "0ee92f67-d538-4ec3-9794-2f3b37e964fa:string:2018-01-26", - dateOfDeparture: "6063d2b6-fda2-42d8-9780-e7d73ef97109:string:2018-01-30", - countryOfFinalDestination: "ab979384-cd78-4f4e-b0ec-9235993515d8:string:CHINA", - outgoingVehicleNo: "d4e7d1da-3adb-456c-a203-3df9f78ae23e:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "a07d1811-57ce-48fb-a2b8-ca33c63610f2:string:PETER LEE", - designation: "a6153112-5299-43ae-9752-e34e37c63d13:string:SHIPPING MANAGER", - date: "505b1345-1413-4fff-ad33-4f5c1f26688e:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "3795511eabef18fa494b20e4634f8a138bf69376eaf42dedd29766bf3d47d703", - proof: [], - merkleRoot: "3795511eabef18fa494b20e4634f8a138bf69376eaf42dedd29766bf3d47d703", - }, - proof: [ - { - created: "2021-03-25T07:52:31.291Z", - type: "OpenAttestationSignature2018", - proofPurpose: "assertionMethod", - verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - signature: - "0xd05bb71bdb6f78451e2d12851825421666c6c5e355f516325ce5002a0586f89f6ebbd465227bec59c745dd26918dd8dab9122dcd398256d8e487e0ecf82a53421b", - }, - ], -}; diff --git a/test/fixtures/v2/documentDnsDidNoDnsTxt.ts b/test/fixtures/v2/documentDnsDidNoDnsTxt.ts deleted file mode 100644 index ecb6139..0000000 --- a/test/fixtures/v2/documentDnsDidNoDnsTxt.ts +++ /dev/null @@ -1,65 +0,0 @@ -export const documentDnsDidNoDnsTxt: any = { - version: "https://schema.openattestation.com/2.0/schema.json", - data: { - id: "e3c28bb6-2d76-4fb4-9ee1-05a41afe9c42:string:SGCNM21566325", - $template: { - name: "80c3721b-9a53-45d6-a640-c880208dd479:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "87940099-cea2-4ce6-a4cf-6afe995b82cb:string:EMBEDDED_RENDERER", - url: "bd983975-4c48-4a24-bb45-d4eaf933b010:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - id: "13657cb7-f8c2-4742-8d75-2c6c728d5cfd:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - name: "b735c8da-dfe5-4e8b-8fca-d668ca7109c8:string:DEMO STORE", - revocation: { type: "adec602e-b8a1-49c6-b0d6-1c10022e0ee3:string:NONE" }, - identityProof: { - type: "35a65289-4ca0-4e73-ab7e-c4d50949c186:string:DNS-DID", - key: - "37f0906b-0c43-4ce4-80d3-e239b79ef087:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - location: "cf6df0b9-daca-4998-bb77-86b251d23f36:string:example.com", - }, - }, - ], - recipient: { - name: "bea2a061-fdfd-46dc-aeae-dbd860d9d995:string:SG FREIGHT", - address: { - street: "f71591ee-e700-482b-b4ff-048c1810ebdf:string:101 ORCHARD ROAD", - country: "c59b4c56-48fe-49e0-810b-1fa7981d58f9:string:SINGAPORE", - }, - }, - consignment: { - description: "dcc4063e-ad49-422b-980f-ccf52d3c98a6:string:16667 CARTONS OF RED WINE", - quantity: { - value: "5e1accca-a1a7-44a0-8604-e54acf2442b7:number:5000", - unit: "ec669ca1-d892-432b-8251-a27137a4b5ec:string:LITRES", - }, - countryOfOrigin: "a2f88c34-aaec-416b-868d-de3488f34d63:string:AUSTRALIA", - outwardBillNo: "0c774978-b299-4c1f-836c-ac6aaa7caeba:string:AQSIQ170923130", - dateOfDischarge: "602a8488-1466-4c2b-b2f9-1357d90b09a5:string:2018-01-26", - dateOfDeparture: "417cbf7e-da31-4ee5-8592-f3ae06217e04:string:2018-01-30", - countryOfFinalDestination: "183de2df-8df8-4e51-8ef9-36908da7f1ce:string:CHINA", - outgoingVehicleNo: "7925a245-79a3-47bb-b09e-050796f4abdf:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "e7220c86-0ca5-4a90-8536-311952ac82df:string:PETER LEE", - designation: "ddfb2c03-2657-4543-bcc5-a95f95189074:string:SHIPPING MANAGER", - date: "261243b3-2124-49b3-8601-5a66fe448be7:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "4fafb6ff912d651c32cf30ebd8163b3fb95c789120800458b8214e16efabe517", - proof: [], - merkleRoot: "4fafb6ff912d651c32cf30ebd8163b3fb95c789120800458b8214e16efabe517", - }, - proof: [ - { - created: "2021-03-25T07:52:31.291Z", - type: "OpenAttestationSignature2018", - proofPurpose: "assertionMethod", - verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - signature: - "0xd05bb71bdb6f78451e2d12851825421666c6c5e355f516325ce5002a0586f89f6ebbd465227bec59c745dd26918dd8dab9122dcd398256d8e487e0ecf82a53421b", - }, - ], -}; diff --git a/test/fixtures/v2/documentDnsDidSigned.ts b/test/fixtures/v2/documentDnsDidSigned.ts deleted file mode 100644 index 5024a90..0000000 --- a/test/fixtures/v2/documentDnsDidSigned.ts +++ /dev/null @@ -1,71 +0,0 @@ -export const documentDnsDidSigned: any = { - version: "https://schema.openattestation.com/2.0/schema.json", - data: { - id: "9e311b70-979d-4728-af5a-e37c777cbbfd:string:SGCNM21566325", - $template: { - name: "1ecc233b-d3e4-431d-9cfb-14f080b5576e:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "9f27a50f-158a-4286-b4d9-92a7ae13be30:string:EMBEDDED_RENDERER", - url: "09263ccd-e804-4d07-9582-0646600c69e2:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - id: "140c686a-4017-421c-a5e9-fdb07c1accd0:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - name: "6c0c26dc-f744-4af6-9ccc-ab2f67248e1b:string:DEMO STORE", - revocation: { - type: "7432f2cc-00d8-4c58-a5d0-f922f21c8614:string:REVOCATION_STORE", - location: "dbe5fb41-b2a5-47bd-85d1-fea9d1b4caef:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", - }, - identityProof: { - type: "0c12407d-31a4-4a4e-839e-f5f8bb77c317:string:DNS-DID", - key: - "1949b9e6-7dc2-49c8-bf07-e88931ceef59:string:did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - location: "0259c7c5-b373-467c-95f9-a63b8be53b13:string:demo-tradetrust.openattestation.com", - }, - }, - ], - recipient: { - name: "779ac49c-fa53-4c8c-abdf-95996303ceca:string:AUS FREIGHT", - address: { - street: "daf7f3c9-cd36-4346-bd8b-136e6947042a:string:101 APPLE ROAD", - country: "0092049b-7f24-41da-be58-98c12a8e54b6:string:AUSTRALIA", - }, - }, - consignment: { - description: "e8d63dc8-336b-47ed-8c32-f885a13bb3f9:string:16667 CARTONS OF RED WINE", - quantity: { - value: "ffe30ea1-0926-4689-9808-5a5d1e95bd26:string:5000", - unit: "e33096b6-a55d-42f3-82fd-afd79c5a21a6:string:LITRES", - }, - countryOfOrigin: "3b9ee621-df41-440c-82d9-b7aed1e06db1:string:AUSTRALIA", - outwardBillNo: "a7af0df6-b3bd-477d-887a-05bcd0e53e04:string:AQSIQ170923150", - dateOfDischarge: "85e1e2be-1f7d-43de-987d-810a8371eb04:string:2018-01-26", - dateOfDeparture: "96afa038-4f13-4dd4-b4e8-12adf1a261c2:string:2018-01-30", - countryOfFinalDestination: "80e2c732-c59f-4f94-88a7-5f6c575eda3b:string:CHINA", - outgoingVehicleNo: "b3f98636-2c62-40ab-bfa4-8b3f414068f6:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "ed764112-16fa-4627-9541-7cd99ddc2ca3:string:PETER LEE", - designation: "cf9221f7-4861-446a-a554-3efb54edeff3:string:SHIPPING MANAGER", - date: "e7c1b037-56f4-45ec-9903-3c2dd330d39f:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "a428e123d99b68a76228f8d5255e27e9d158147767ad3e54e9ef2fe117a2b446", - proof: [ - "2328c806fcc07f91df394965e0050130089882f7e1059747859387a38e5a6542", - "4ddcee582f5ea9e24c1c4983fb365714dc444ba15e89d76eb05cd87886a92732", - ], - merkleRoot: "3752f29527952e7ccc6bf4da614d80f2fec9e5bd8b71adf10beb4e6763e6c233", - }, - proof: [ - { - type: "OpenAttestationSignature2018", - created: "2022-10-27T07:52:38.199Z", - proofPurpose: "assertionMethod", - verificationMethod: "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - signature: - "0x0cc602d746237f445af62a32aeb8e93701a96600b450d8b02005ec230d88351e40f89b31f8e0b13df35175cfd1321862098ce4aa34ed0686738f5322e9fea97e1c", - }, - ], -}; diff --git a/test/fixtures/v2/documentGoerliNotIssuedTokenRegistry.ts b/test/fixtures/v2/documentGoerliNotIssuedTokenRegistry.ts deleted file mode 100644 index a56a3ca..0000000 --- a/test/fixtures/v2/documentGoerliNotIssuedTokenRegistry.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; - -interface CustomDocument extends v2.OpenAttestationDocument { - recipient: { - name: string; - address: { - street: string; - country: string; - }; - }; - consignment: { - description: string; - quantity: { - value: string; - unit: string; - }; - countryOfOrigin: string; - outwardBillNo: string; - dateOfDischarge: string; - dateOfDeparture: string; - countryOfFinalDestination: string; - outgoingVehicleNo: "string"; - }; - declaration: { - name: string; - designation: string; - date: string; - }; -} - -export const documentGoerliNotIssuedTokenRegistry: WrappedDocument = { - version: SchemaId.v2, - data: { - id: "9b6c8095-0050-4624-a899-05562cf87849:string:SGCNM21566325", - $template: { - name: "8297569b-f29a-41d6-8d09-69d28ed564a8:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "0b383315-4945-42d3-96a9-b610073ad940:string:EMBEDDED_RENDERER", - url: "048f1a2d-ac9b-4ceb-b6fa-15cbbe58f246:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - name: "697c685c-076e-4e15-841c-547b22801289:string:DEMO STORE", - tokenRegistry: "73773f41-579c-4ad6-8fa1-91c53915c684:string:0x921dC7cEF00155ac3A33f04DA7395324d7809757", - identityProof: { - type: "57cb7721-e760-433b-ad9c-89ecba31b150:string:DNS-TXT", - location: "b5b7ed81-4892-4c44-babe-7f1e22e2359c:string:demo-tradetrust.openattestation.com", - }, - }, - ], - recipient: { - name: "7e6868ec-5478-4566-bfa8-8044574df289:string:SG FREIGHT", - address: { - street: "c1fd89ae-25a3-4092-bb60-97f1d25f41a6:string:101 ORCHARD ROAD", - country: "f3595865-c6f2-48b9-abfb-ec43ae8cb971:string:SINGAPORE", - }, - }, - consignment: { - description: "8a17256a-465c-4db6-a6bb-da6f6be053d1:string:16667 CARTONS OF RED WINE", - quantity: { - value: "5e5458f0-e906-48b7-a530-92cf5adddd64:string:5000", - unit: "28334a58-3a6f-4c16-a454-ca3521283c38:string:LITRES", - }, - countryOfOrigin: "0c73c19b-3b96-49db-9dd5-5c1ec976ba70:string:AUSTRALIA", - outwardBillNo: "00298c54-14c6-4fe3-b9c1-4ee394708826:string:AQSIQ170923130", - dateOfDischarge: "dff609a1-dcad-4e4c-8172-b564a783aa18:string:2018-01-26", - dateOfDeparture: "b5d4cebe-e86c-44bf-88ae-08934e89df6c:string:2018-01-30", - countryOfFinalDestination: "ac044b08-3b96-49bc-979d-e43d178e46ce:string:CHINA", - outgoingVehicleNo: "f2835d1a-60bd-4616-bffd-26478185a7a1:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "8f9e1c71-1650-41f9-b6e7-88c18cde1813:string:PETER LEE", - designation: "6540be75-acb8-4549-be18-4edefa8b000d:string:SHIPPING MANAGER", - date: "cf301a47-fff7-48b0-893d-d00ca6be04e0:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "d87b75bed186f8320a344130a89f91092e91115c5095f49dbc8e1aa3c5ad64f9", - proof: [], - merkleRoot: "d87b75bed186f8320a344130a89f91092e91115c5095f49dbc8e1aa3c5ad64f9", - }, -}; diff --git a/test/fixtures/v2/documentGoerliObfuscated.ts b/test/fixtures/v2/documentGoerliObfuscated.ts deleted file mode 100644 index 7126ae8..0000000 --- a/test/fixtures/v2/documentGoerliObfuscated.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; - -interface CustomDocument extends v2.OpenAttestationDocument { - billFrom: any; - billTo: { - company: any; - email: string; - }; - links: { - self: { - href: string; - }; - }; - network: { - chain: string; - chainId: string; - }; - date: string; - customerId: string; - terms: string; - subtotal: string; - tax: string; - taxTotal: string; - total: string; -} -export const documentGoerliObfuscated: WrappedDocument = { - version: SchemaId.v2, - data: { - billFrom: { - name: "0482dac7-db36-45b2-ad59-8c2853bcbd33:string:acdc", - streetAddress: "a692611b-111d-45b2-a0b9-d2d33a9009f6:string:abxc", - city: "d2fce47b-bd92-4cdf-9024-7c76fe114c37:string:asdf", - postalCode: "0d987517-4044-43b1-8178-ec80e72e6c33:string:asdf", - }, - billTo: { - company: { - name: "09dceb13-bcc5-4269-9812-44fcd274216b:string:avcx", - city: "701f6beb-80ec-48f1-a518-af1aab7e1964:string:eee", - }, - email: "46a48838-2a6a-4741-a4a2-b64189b6616e:string:b@gmail.com", - }, - $template: { - type: "14a8a819-72dd-46b7-bfae-1b25ea43e4c7:string:EMBEDDED_RENDERER", - name: "c77f3848-4eea-45a6-97af-4a3b2e7b8c71:string:INVOICE", - url: "153fa998-12da-4f76-999d-b550b75277be:string:https://generic-templates.tradetrust.io", - }, - issuers: [ - { - name: "0e64dcbe-986e-47fc-a334-ebd844572a29:string:Demo Issuer", - documentStore: "04e43d7e-7ffa-4bdd-af78-be0a7ff9e9b7:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", - identityProof: { - type: "c43706cf-b681-4593-9076-8e0aeb156e48:string:DNS-TXT", - location: "24696096-730e-41b0-a3ff-40df8e5b0f11:string:demo-tradetrust.openattestation.com", - }, - revocation: { - type: "9b0b3348-cb8e-4f05-bd0b-5ec603e48422:string:NONE" as v2.RevocationType, - }, - }, - ], - id: "53568df3-3254-4950-ad52-3b3bf858f3aa:string:1234567", - date: "f40b8540-1da3-477a-aaa8-234dd283bee4:string:2022-10-05", - customerId: "9bb1cec7-9892-42da-a40b-d89d6617faf0:string:43123", - terms: "dbad7460-9b8c-4572-ac22-2eb403ead732:string:Best Customer", - subtotal: "bc2a28fa-71f8-4f08-83de-8f2c6b01de62:string:werew", - tax: "8f5246f3-e6c9-4d22-aaed-c440bb3ef64d:string:were", - taxTotal: "a24178d2-6390-4f20-baa7-c7a0817510ca:string:ewerd", - total: "b3f99049-89ba-41fc-8087-0d1003da4c32:string:sdf", - links: { - self: { - href: - "8252ae56-0bb0-4937-ba16-b03170553f07:string:https://action.openattestation.com?q=%7B%22type%22%3A%22DOCUMENT%22%2C%22payload%22%3A%7B%22uri%22%3A%22https%3A%2F%2Ftradetrust-functions.netlify.app%2F.netlify%2Ffunctions%2Fstorage%2F65e44a7c-264f-4b6d-8719-bb9401de1f9c%22%2C%22key%22%3A%225d18dc966ca159297b036b1ac6757d74aaf9fa6c4973b99fd164bfec9490d75b%22%2C%22permittedActions%22%3A%5B%22STORE%22%5D%2C%22redirect%22%3A%22https%3A%2F%2Fdev.tradetrust.io%2F%22%2C%22chainId%22%3A%225%22%7D%7D", - }, - }, - network: { - chain: "55276dc8-ac7f-49db-beb7-dacdb0ecad41:string:ETH", - chainId: "0ebd6e85-2228-4294-945a-83ede1a537ff:string:5", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "d87a560204a69bb9c0f495b66f6481ce566e2a639935ae07af131d0c7dcbac90", - proof: [], - merkleRoot: "d87a560204a69bb9c0f495b66f6481ce566e2a639935ae07af131d0c7dcbac90", - }, - privacy: { - obfuscatedData: [ - "edad95328cb21cc7d4de6f7b4733e1102bd481ff43ddc095e9fe2541db2cd203", - "bfec4cb3960209b066ba9a3f3bde05762916e100dd9abf89a37a0a6113fdf760", - "b6ba37889b18f66810a5db577d73d3ca16112a43bfb76a7865175dd85fdeff7b", - "8753e0563b0f3f12a97a61c5c1f0bc404c4238552726c120938ce40065706628", - "e21d49f3c53eb9100c6534a08ddb6fbd19e694e3e3c8b0a3adcecfd41eb43cf8", - ], - }, -}; diff --git a/test/fixtures/v2/documentGoerliRevokedWithDocumentStore.ts b/test/fixtures/v2/documentGoerliRevokedWithDocumentStore.ts deleted file mode 100644 index 21b15c3..0000000 --- a/test/fixtures/v2/documentGoerliRevokedWithDocumentStore.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; - -interface CustomDocument extends v2.OpenAttestationDocument { - billFrom: any; - billTo: { - company: any; - name: string; - email: string; - }; - links: { - self: { - href: string; - }; - }; - network: { - chain: string; - chainId: string; - }; - date: string; - customerId: string; - terms: string; - subtotal: string; - tax: string; - taxTotal: string; - total: string; -} - -export const documentGoerliRevokedWithDocumentStore: WrappedDocument = { - version: SchemaId.v2, - data: { - billFrom: { - name: "d8a6ba1a-70b0-4bd0-94f7-1e60e6a97793:string:acdc", - streetAddress: "17655fc2-6d53-427f-8319-7ad8e76f9e5e:string:abxc", - city: "474ae8f6-c2a4-40e2-957a-44445b62aee6:string:asdf", - postalCode: "858506ab-1cb6-4ea6-b15f-cdf46e9d4359:string:asdf", - phoneNumber: "2301a5bc-ad7e-4b75-b9ab-3d4e91af3a62:string:89482323", - }, - billTo: { - company: { - name: "b8478913-1096-42ba-96f9-2e827e5a1b3d:undefined:undefined", - streetAddress: "61e3ec46-f9ab-4001-a3df-bb5d070ea877:undefined:undefined", - city: "3f7243a2-47ad-42a8-9d95-3f5bb572e9b8:undefined:undefined", - postalCode: "0cd42903-7a8d-413d-a297-e78893b525a6:undefined:undefined", - phoneNumber: "f5aa5a8f-1619-4193-9985-ff610e4cfcef:undefined:undefined", - }, - name: "f0c16fca-a59a-4760-a25f-387635af3192:string:butter", - email: "0d0d2442-d520-4c54-aec6-e7263aa184f7:string:b@gmail.com", - }, - $template: { - type: "d8bbf449-8a40-420a-a675-1e91add264e9:string:EMBEDDED_RENDERER", - name: "6e66e30d-ef29-41e3-b3f1-517db214901d:string:INVOICE", - url: "5142eaf5-0a27-4d92-a925-1bb0307fc8b3:string:https://generic-templates.tradetrust.io", - }, - issuers: [ - { - name: "8c9ccf0d-107b-4568-87d9-868c2fcf24b9:string:Demo Issuer", - documentStore: "cdbcfda6-2eb9-4e19-9bb9-b86161914ca7:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", - identityProof: { - type: "9487502b-0be7-4be9-be3f-ee7cb6582584:string:DNS-TXT", - location: "71555492-8db6-4068-a8c8-2cca4bd7d6e7:string:demo-tradetrust.openattestation.com", - }, - revocation: { - type: "073b40d8-bfbe-4b57-b483-bcb4e212c472:string:NONE" as v2.RevocationType, - }, - }, - ], - id: "ab719e3a-24d1-46cc-bdff-f5284ebcb42f:string:1234567", - date: "7071426a-bb95-4352-8025-cba2c60e4e76:string:2022-10-05", - customerId: "0b8c36fd-9156-47b0-b329-928de93d2e08:string:43123", - terms: "99a2dbd9-a90c-4571-823b-7475bc38585a:string:Best Customer", - subtotal: "8c18b95f-73ae-426e-9a6a-cc428b9563de:undefined:undefined", - tax: "e6bdd02e-ffb7-46cb-9cfc-bdc607bfd64d:undefined:undefined", - taxTotal: "2d49b39d-c490-4ff4-a723-1e1b68d42661:undefined:undefined", - total: "d65c69f7-7a5a-4e4d-b8b3-2ec3cf5a3b03:undefined:undefined", - links: { - self: { - href: - "313a2de3-43b8-41be-afc3-59011421f76c:string:https://action.openattestation.com?q=%7B%22type%22%3A%22DOCUMENT%22%2C%22payload%22%3A%7B%22uri%22%3A%22https%3A%2F%2Ftradetrust-functions.netlify.app%2F.netlify%2Ffunctions%2Fstorage%2F23a6f749-fdc3-4a7c-9733-87b023c27c7b%22%2C%22key%22%3A%22703f5f5d796c5a39bfcea5682fbca440df21c341462233008e3be5bab475ee49%22%2C%22permittedActions%22%3A%5B%22STORE%22%5D%2C%22redirect%22%3A%22https%3A%2F%2Fdev.tradetrust.io%2F%22%2C%22chainId%22%3A%225%22%7D%7D", - }, - }, - network: { - chain: "dd0e5db4-27a3-4e64-8678-82b47d408f69:string:ETH", - chainId: "52289b91-ffa0-46bf-85c7-7ab8d483b24d:string:5", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "6a6c94352e6327437970a41126c041a83cec0fe684b13045991942ea67fca554", - proof: [], - merkleRoot: "6a6c94352e6327437970a41126c041a83cec0fe684b13045991942ea67fca554", - }, -}; diff --git a/test/fixtures/v2/documentGoerliValidWithDocumentStore.ts b/test/fixtures/v2/documentGoerliValidWithDocumentStore.ts deleted file mode 100644 index 8caf1df..0000000 --- a/test/fixtures/v2/documentGoerliValidWithDocumentStore.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; - -interface CustomDocument extends v2.OpenAttestationDocument { - recipient: { - name: string; - address: { - street: string; - country: string; - }; - }; - consignment: any; - declaration: any; -} -export const documentGoerliValidWithDocumentStore: WrappedDocument = { - version: SchemaId.v2, - data: { - id: "64158d51-eafe-4729-9906-9d6c30d316e3:string:SGCNM21566325", - $template: { - name: "a86bd538-8e50-4ce8-a399-ac7ae1e55279:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "7d1d7b85-3d49-4516-9fb7-d58f6840017a:string:EMBEDDED_RENDERER", - url: "b52c809d-bbc2-426c-94d2-a1a0b1a26982:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - name: "907a1495-7c10-43cb-8aab-54e3ad8fefea:string:DEMO STORE", - documentStore: "38229e0e-9ae6-401f-a80e-8a6c2166a42a:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", - identityProof: { - type: "7efb0791-788b-425c-b16d-4b6de3da428c:string:DNS-TXT", - location: "73b5c847-99f8-44f2-ba8d-1a0f36cc9c6f:string:demo-tradetrust.openattestation.com", - }, - }, - ], - recipient: { - name: "2d74acae-9ede-4b1a-83ed-3b3347a89475:string:SG FREIGHT", - address: { - street: "81ac9def-b249-4b0e-ac41-4905a364dee0:string:101 ORCHARD ROAD", - country: "dd94c51b-1567-4f33-81dd-a4266558a46b:string:SINGAPORE", - }, - }, - consignment: { - description: "ec926c9f-7ba5-4ee2-8bb1-c5e8a503f14c:string:16667 CARTONS OF RED WINE", - quantity: { - value: "d5f4854f-6aa2-4d5d-bca3-625f04f7e782:string:5000", - unit: "bb2432e2-3487-4fbd-8c7e-ee9ba01c87e5:string:LITRES", - }, - countryOfOrigin: "2bfbb0c3-8da0-4aee-9859-030399ed8d1d:string:AUSTRALIA", - outwardBillNo: "a1c730a9-a9c8-46e0-b50a-b3af5ebce1bc:string:AQSIQ170923130", - dateOfDischarge: "8a53a611-ab41-426a-94cf-895211ea81f2:string:2018-01-26", - dateOfDeparture: "905f5dfd-00ae-498f-8622-1c11118b52d9:string:2018-01-30", - countryOfFinalDestination: "a90adff1-7156-406c-81b5-2820bd32813d:string:CHINA", - outgoingVehicleNo: "8a5a76bb-0879-4775-9436-ad41c5e4114d:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "2ed2103d-a0b0-4eac-b22f-e69b37b4b669:string:PETER LEE", - designation: "1e3008e3-bbed-486c-a0dd-1b5630c0964c:string:SHIPPING MANAGER", - date: "e6c1ec4a-e8ad-49b9-a1dc-98c60953fbc9:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "9ece474bfd087cf3fc2e7fcf62f82af22cd8ae6a68ff40d7992b6335399309b4", - proof: [], - merkleRoot: "9ece474bfd087cf3fc2e7fcf62f82af22cd8ae6a68ff40d7992b6335399309b4", - }, -}; diff --git a/test/fixtures/v2/documentGoerliValidWithToken.ts b/test/fixtures/v2/documentGoerliValidWithToken.ts deleted file mode 100644 index 08d8805..0000000 --- a/test/fixtures/v2/documentGoerliValidWithToken.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; - -interface CustomDocument extends v2.OpenAttestationDocument { - recipient: { - name: string; - address: { - street: string; - country: string; - }; - }; - consignment: any; - declaration: any; -} - -export const documentGoerliValidWithToken: WrappedDocument = { - version: SchemaId.v2, - schema: "tradetrust/1.0", - data: { - id: "b4b7735f-d839-4b61-8562-682c118620ca:string:SGCNM21566325", - $template: { - name: "cdbd9bf8-db70-40ef-a660-04d1446192e0:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "d02fda95-451d-4b49-a438-bb4174d26d1b:string:EMBEDDED_RENDERER", - url: "cbf5c211-a5df-4d69-a6e4-062d3062fbae:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - name: "60db3167-d701-4580-b4e6-7ec278c1a4e4:string:DEMO STORE", - tokenRegistry: "241d39b4-fcfb-4ee4-9b61-6cc9ef58a862:string:0x921dC7cEF00155ac3A33f04DA7395324d7809757", - identityProof: { - type: "d3417093-acc8-4077-a087-c2d1368e9e0b:string:DNS-TXT", - location: "53b7dd38-15a4-4430-bed2-f0b39f85dbf1:string:demo-tradetrust.openattestation.com", - }, - }, - ], - recipient: { - name: "2647df56-1645-4790-8117-c0a7ac4fbb17:string:SG FREIGHT", - address: { - street: "484606d0-7d3a-4b50-8afc-dbf11e62bdb3:string:101 ORCHARD ROAD", - country: "d34931c4-c9f7-4c02-b0a0-a64d138e9fa1:string:SINGAPORE", - }, - }, - consignment: { - description: "66a5360a-e6d4-4a57-8852-094c32d3cfe0:string:16667 CARTONS OF RED WINE", - quantity: { - value: "680a3958-3ca6-4e7d-9bc2-18739cc97a89:string:5000", - unit: "3ffedb5f-79b0-4630-b512-4a74713f4518:string:LITRES", - }, - countryOfOrigin: "da7eacec-70c7-4f78-afd9-28bdfc33b29e:string:AUSTRALIA", - outwardBillNo: "4fdf53a9-03e1-4bf4-8cd6-e79561c78252:string:AQSIQ170923130", - dateOfDischarge: "a1c27be0-2558-45bc-9083-68522489364e:string:2018-01-26", - dateOfDeparture: "062a1194-66ff-4006-a21d-6afcea605c32:string:2018-01-30", - countryOfFinalDestination: "90492aeb-f6f9-4ffc-8421-49976256f60b:string:CHINA", - outgoingVehicleNo: "f4b92304-6202-4c59-83e4-9f3d3ca9119b:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "4b62946c-2fe5-49ed-b5cb-bf6e7f58e7a2:string:PETER LEE", - designation: "1f877dba-9e25-4eac-84af-5bfabbeb890a:string:SHIPPING MANAGER", - date: "43cf2bbc-e022-4c7d-b973-6e7057c94c8d:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "01c8d28b49c21a664befab9d63981f029e28468b49b73ec04b35748b08911544", - proof: [], - merkleRoot: "01c8d28b49c21a664befab9d63981f029e28468b49b73ec04b35748b08911544", - }, -}; diff --git a/test/fixtures/v2/documentMainnetInvalidWithIncorrectMerkleRoot.ts b/test/fixtures/v2/documentMainnetInvalidWithIncorrectMerkleRoot.ts deleted file mode 100644 index f02baf4..0000000 --- a/test/fixtures/v2/documentMainnetInvalidWithIncorrectMerkleRoot.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { v2, WrappedDocument, SchemaId } from "@tradetrust-tt/tradetrust"; - -interface CustomDocument extends v2.OpenAttestationDocument { - recipient: { - name: string; - address: { - street: string; - country: string; - }; - }; - certification: any; - consignment: any; - declaration: any; -} -export const documentMainnetInvalidWithIncorrectMerkleRoot: WrappedDocument = { - version: SchemaId.v2, - schema: "tradetrust/v1.0", - data: { - id: "26e3bba1-7649-420e-a27e-f38fdbec3469:string:SGCNM21566325", - $template: { - name: "8fb7df2e-3ba1-479e-a355-5467d38bd52c:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "3ce0413d-9047-4a18-8789-7483632a512e:string:EMBEDDED_RENDERER", - url: "983fff6e-5385-4bd0-a635-c20a50c27691:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - name: "c1414e34-a87b-467c-946b-361edb0d426d:string:TradeTrust Demo", - documentStore: "7762001c-bf13-4ec3-b5a5-adcc149d039f:string:0x6d71da10Ae0e5B73d0565E2De46741231Eb247C7", - identityProof: { - type: "1416fc74-d941-4370-8cfb-88997097e309:string:DNS-TXT", - location: "f542bcfc-00fb-4926-9145-bc22adff4edb:string:demo.tradetrust.io", - }, - }, - ], - recipient: { - name: "9727b3c8-2d64-43ca-9fc4-9ce4ee7fa203:string:SG FREIGHT", - address: { - street: "ecf485df-8ff4-416e-bde2-63e1b6072e0a:string:101 ORCHARD ROAD", - country: "47929d19-ec95-4869-b6a4-c706ec50530a:string:SINGAPORE", - }, - }, - consignment: { - description: "eb8ef708-0335-4ece-8bbb-139b06f264e8:string:16667 CARTONS OF RED WINE", - quantity: { - value: "556317b3-1fb1-4334-a7d7-f88a7477d268:number:5000", - unit: "10c54e5a-4f7d-45d5-801b-c17787b2d770:string:LITRES", - }, - countryOfOrigin: "4b3d95fd-6aaf-4694-a994-8b4cc9f2eaa0:string:AUSTRALIA", - outwardBillNo: "cee74dbd-6117-490c-9bff-9665ea0cbabe:string:AQSIQ170923130", - dateOfDischarge: "b2b91700-a71f-44e0-ac7c-16ddbe1b5577:string:2018-01-26", - dateOfDeparture: "f3bb7427-86b4-4a75-adf6-a41c675a9f0f:string:2018-01-30", - countryOfFinalDestination: "4fdd92ba-2ec9-4eb3-9bde-2c167e957e12:string:CHINA", - outgoingVehicleNo: "4d9c9e3e-e844-4660-96c3-4a8bf07e22f2:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "882d9945-b2c1-4b22-ba82-3d9e049af588:string:PETER LEE", - designation: "370d8b2f-78ea-4235-ab91-e1a426deef91:string:SHIPPING MANAGER", - date: "92c1285c-71e8-4494-b082-ed29ff3668b9:string:2018-01-28", - }, - certification: { - name: "1a60ca05-c279-466e-8905-7e6ef4e6054e:string:DEMO JOHN TAN", - designation: "d75ff67f-b931-4161-84d8-6fd514d646a3:string:DEMO", - date: "ea2b71b1-e347-4074-8bdd-e95fee8297f0:string:2018-01-28", - }, - }, - privacy: { - obfuscatedData: [ - "323cf61a32c24a193aea9609caeeb5b5cf5d47a8fa1dbc8f67921f330dd406e5", - "f03cbac0ac3876ccb82e489140fc8a6cd93126f1d60161ae319558a25df985b7", - ], - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "61dc9186345e05cc2ae53dc72af880a3b66e2fa7983feaa6254d1518540de50a", - proof: [], - // merkleRoot's last 2 characters have been removed to make it even-length (62 char), but not 64 char - merkleRoot: "61dc9186345e05cc2ae53dc72af880a3b66e2fa7983feaa6254d1518540de5", - }, -}; diff --git a/test/fixtures/v2/documentMainnetInvalidWithOddLengthMerkleRoot.ts b/test/fixtures/v2/documentMainnetInvalidWithOddLengthMerkleRoot.ts deleted file mode 100644 index 679a819..0000000 --- a/test/fixtures/v2/documentMainnetInvalidWithOddLengthMerkleRoot.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { v2, WrappedDocument, SchemaId } from "@tradetrust-tt/tradetrust"; - -interface CustomDocument extends v2.OpenAttestationDocument { - recipient: { - name: string; - address: { - street: string; - country: string; - }; - }; - certification: any; - consignment: any; - declaration: any; -} -export const documentMainnetInvalidWithOddLengthMerkleRoot: WrappedDocument = { - version: SchemaId.v2, - schema: "tradetrust/v1.0", - data: { - id: "26e3bba1-7649-420e-a27e-f38fdbec3469:string:SGCNM21566325", - $template: { - name: "8fb7df2e-3ba1-479e-a355-5467d38bd52c:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "3ce0413d-9047-4a18-8789-7483632a512e:string:EMBEDDED_RENDERER", - url: "983fff6e-5385-4bd0-a635-c20a50c27691:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - name: "c1414e34-a87b-467c-946b-361edb0d426d:string:TradeTrust Demo", - documentStore: "7762001c-bf13-4ec3-b5a5-adcc149d039f:string:0x6d71da10Ae0e5B73d0565E2De46741231Eb247C7", - identityProof: { - type: "1416fc74-d941-4370-8cfb-88997097e309:string:DNS-TXT", - location: "f542bcfc-00fb-4926-9145-bc22adff4edb:string:demo.tradetrust.io", - }, - }, - ], - recipient: { - name: "9727b3c8-2d64-43ca-9fc4-9ce4ee7fa203:string:SG FREIGHT", - address: { - street: "ecf485df-8ff4-416e-bde2-63e1b6072e0a:string:101 ORCHARD ROAD", - country: "47929d19-ec95-4869-b6a4-c706ec50530a:string:SINGAPORE", - }, - }, - consignment: { - description: "eb8ef708-0335-4ece-8bbb-139b06f264e8:string:16667 CARTONS OF RED WINE", - quantity: { - value: "556317b3-1fb1-4334-a7d7-f88a7477d268:number:5000", - unit: "10c54e5a-4f7d-45d5-801b-c17787b2d770:string:LITRES", - }, - countryOfOrigin: "4b3d95fd-6aaf-4694-a994-8b4cc9f2eaa0:string:AUSTRALIA", - outwardBillNo: "cee74dbd-6117-490c-9bff-9665ea0cbabe:string:AQSIQ170923130", - dateOfDischarge: "b2b91700-a71f-44e0-ac7c-16ddbe1b5577:string:2018-01-26", - dateOfDeparture: "f3bb7427-86b4-4a75-adf6-a41c675a9f0f:string:2018-01-30", - countryOfFinalDestination: "4fdd92ba-2ec9-4eb3-9bde-2c167e957e12:string:CHINA", - outgoingVehicleNo: "4d9c9e3e-e844-4660-96c3-4a8bf07e22f2:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "882d9945-b2c1-4b22-ba82-3d9e049af588:string:PETER LEE", - designation: "370d8b2f-78ea-4235-ab91-e1a426deef91:string:SHIPPING MANAGER", - date: "92c1285c-71e8-4494-b082-ed29ff3668b9:string:2018-01-28", - }, - certification: { - name: "1a60ca05-c279-466e-8905-7e6ef4e6054e:string:DEMO JOHN TAN", - designation: "d75ff67f-b931-4161-84d8-6fd514d646a3:string:DEMO", - date: "ea2b71b1-e347-4074-8bdd-e95fee8297f0:string:2018-01-28", - }, - }, - privacy: { - obfuscatedData: [ - "323cf61a32c24a193aea9609caeeb5b5cf5d47a8fa1dbc8f67921f330dd406e5", - "f03cbac0ac3876ccb82e489140fc8a6cd93126f1d60161ae319558a25df985b7", - ], - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "61dc9186345e05cc2ae53dc72af880a3b66e2fa7983feaa6254d1518540de50a", - proof: [], - // merkleRoot's last character has been removed to make it odd-length (63 char) - merkleRoot: "61dc9186345e05cc2ae53dc72af880a3b66e2fa7983feaa6254d1518540de50", - }, -}; diff --git a/test/fixtures/v2/documentMainnetValid.ts b/test/fixtures/v2/documentMainnetValid.ts deleted file mode 100644 index 10b13be..0000000 --- a/test/fixtures/v2/documentMainnetValid.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; - -interface CustomDocument extends v2.OpenAttestationDocument { - name: string; - issuedOn: string; - $template: string; - recipient: { - name: string; - }; -} - -export const documentMainnetValid: WrappedDocument = { - version: SchemaId.v2, - schema: "opencerts/1.4", - data: { - id: "ab89a9ae-954f-4d28-8b48-2a534d3a3d60:string:2018-SAF-01", - $template: "2d00853b-43ae-4bc9-82a2-c614ec0fca49:string:SG-GOVTECH-OPENCERTS", - name: "9a4499fa-8f68-43d8-b42b-57dc365ab249:string:Certified OpenCerts Associate", - issuedOn: "60bf1feb-e373-4757-8a5d-cf485199bf7a:string:2018-11-30T15:00:00+08:00", - issuers: [ - { - name: "a8d46c32-2e35-4f4e-99b1-f8a5acb04180:string:GovTech", - certificateStore: "9f3ffc2c-2e06-4a9d-a762-8449aec4ca9e:string:0x007d40224f6562461633ccfbaffd359ebb2fc9ba", - }, - ], - recipient: { - name: "d93f6840-0219-4f16-991e-d02fae161c6b:string:Jonathan Tay", - }, - }, - privacy: { - obfuscatedData: [ - "38c3bb23e0e0bb29d1e6efecc25ff6f95cf4bc05e6310e767f2ebd3eac766fa9", - "825aff8c9c91518b75aaa583ee72f182fa3b40a2c09d9a2e1092b6b5d8ed0b7d", - "54ea1052e0a5dd98a1a674b14af0f21aa8a3d7a23d6c90adcebc1215622fb0d2", - ], - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "5b5ed60a40d445c58ffa21e73d11a98acc04be538ab9729da5066f75f0eaddb4", - proof: [ - "86874cd45a74f39759c21028ddacb6b45c56cd1b36203a874d91d3ef276eab7b", - "cd6d9d9a5969a6c5f428b7b4d8e854a798143072371f477bf09145a66951a9d8", - "6e78b6b1bfc66f4f34fe70f97d3e91bcc318f17916394eab95cf15e2e20ac63e", - ], - merkleRoot: "1a040999254caaf7a33cba67ec6a9b862da1dacf8a0d1e3bb76347060fc615d6", - }, -}; diff --git a/test/fixtures/v2/documentMixedIssuance.ts b/test/fixtures/v2/documentMixedIssuance.ts deleted file mode 100644 index 09afef9..0000000 --- a/test/fixtures/v2/documentMixedIssuance.ts +++ /dev/null @@ -1,94 +0,0 @@ -export const documentMixedIssuance: any = { - version: "https://schema.openattestation.com/2.0/schema.json", - data: { - id: "adb44816-1e3e-43c3-8f49-835ee0ef79a7:string:SGCNM21566325", - $template: { - name: "4fb89978-800b-4dae-84d9-b899287fa7b2:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "1e0b6830-7907-4c4f-b6eb-26ddbcf4dd89:string:EMBEDDED_RENDERER", - url: "d1ef0610-b737-4255-b688-d0f191ecea4c:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - name: "3911b21e-a787-41d2-8cfa-e074fac4e96f:string:DEMO STORE", - tokenRegistry: "52235eed-ef39-47b0-8f3d-46d20f0ddfb9:string:0x257DFD21f991DA9BD420882365020991eec0494E", - identityProof: { - type: "b5a46073-1c7c-4dc4-a209-7bb66d767cc9:string:DNS-TXT", - location: "0170ca49-42ad-4520-a347-46182b2235df:string:example.tradetrust.io", - }, - }, - { - name: "c9a9702a-c392-495f-bdef-7d3379f004ca:string:DEMO STORE", - documentStore: "dea6ee74-bbfb-47e1-ace0-f6de4b8b446a:string:0xEE1772da1Fe18a4506de2AA0567637E9b7aD27Bf", - identityProof: { - type: "4e24bbc4-52ef-48ad-819f-c81ad06d4382:string:DNS-TXT", - location: "33c4da0d-2330-4a1a-8932-8865aca269fb:string:example.tradetrust.io", - }, - }, - { - id: "b91ec331-37f0-4011-93cf-bf9624391488:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - name: "016c596d-afaa-4254-a8f5-51f71692a670:string:DEMO STORE", - revocation: { - type: "3e9799cb-6187-4a53-b29d-657f8d9fa0cb:string:NONE", - }, - identityProof: { - type: "5bb93c34-0252-4d8b-8c77-afbc878ed7f2:string:DNS-DID", - key: - "672297df-72a8-417a-ac6c-ed7b154e70c8:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - location: "55dc441f-61ca-4d6f-9f56-0c751f11f210:string:eexample.tradetrust.io", - }, - }, - { - id: "8590313c-8755-4e81-a812-8b02ceccc58f:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - name: "b34ac64b-cf5a-4025-a6db-0b33949be981:string:DEMO STORE", - revocation: { - type: "36f5c212-5863-4434-a870-7343018c0307:string:NONE", - }, - identityProof: { - type: "382e37a8-b296-4acb-ad33-315d4d7ddadb:string:DID", - key: - "159a2583-e1e1-4b33-a5ca-397ef537bf53:string:did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - }, - }, - ], - recipient: { - name: "5c326805-3ff7-4dbc-84de-46973fef0cca:string:SG FREIGHT", - address: { - street: "f79e01b7-e360-484f-8b13-e1da62041621:string:101 ORCHARD ROAD", - country: "c6a6c96c-fc82-4c91-8911-1cbd449a05c4:string:SINGAPORE", - }, - consignment: { - description: "dae0efef-faa6-44d2-90fe-93835d3523a0:string:16667 CARTONS OF RED WINE", - quantity: { - value: "32a553f5-28f9-429b-893e-5fb024605958:number:5000", - unit: "75060d15-8d4a-4f41-bc11-2f210f04fa99:string:LITRES", - }, - countryOfOrigin: "e44f847f-1c2d-49e6-8266-94439365d548:string:AUSTRALIA", - outwardBillNo: "74db08f9-61fd-4d3c-b86c-db972f7d9b9e:string:AQSIQ170923130", - dateOfDischarge: "8d1a62b8-adc2-49a5-9b40-aa1ed9d1fe30:string:2018-01-26", - dateOfDeparture: "22b0861c-2ef2-4b0a-9cb4-e52b7f45c037:string:2018-01-30", - countryOfFinalDestination: "dbc538a3-fe51-43ab-9722-09e0ca32ab72:string:CHINA", - outgoingVehicleNo: "441b8340-1966-44af-8170-75c93ed5bc02:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "7bd3ce94-d062-4296-aa2f-b554bc9d05bc:string:PETER LEE", - designation: "24cdf60c-8765-4b4d-aa33-84111068a143:string:SHIPPING MANAGER", - date: "73bd3d1b-c4b1-4005-8e07-22e0bd56fdd8:string:2018-01-28", - }, - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "259ba081c4fd06a56f200273d628fb4e72a01a8348afc9e4334b0bfd74fcb386", - proof: [], - merkleRoot: "259ba081c4fd06a56f200273d628fb4e72a01a8348afc9e4334b0bfd74fcb386", - }, - proof: [ - { - type: "OpenAttestationSignature2018", - proofPurpose: "assertionMethod", - verificationMethod: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89#controller", - signature: - "0x51acb43022928e988127d040d9a9de5e3d1b487bf65324d3ed1d284ec6994ff10e9a9985cc2ffded3723afcddf9702b38c854c13be11e326daebaee6778aec4c1c", - }, - ], -}; diff --git a/test/fixtures/v2/documentNotIssuedWithDocumentStore.ts b/test/fixtures/v2/documentNotIssuedWithDocumentStore.ts deleted file mode 100644 index 4c39446..0000000 --- a/test/fixtures/v2/documentNotIssuedWithDocumentStore.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; - -interface CustomDocument extends v2.OpenAttestationDocument { - recipient: { - name: string; - address: { - street: string; - country: string; - }; - }; - consignment: any; - declaration: any; -} -export const documentNotIssuedWithDocumentStore: WrappedDocument = { - version: SchemaId.v2, - data: { - id: "2d67702d-039a-4911-b88c-c28e744ded1c:string:SGCNM21566325", - $template: { - name: "8b74a7f5-f162-4f3a-9a89-b91cd363f53a:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "d0352270-90df-414c-85c0-99ce0d2c7997:string:EMBEDDED_RENDERER", - url: "4158c318-83cc-4ebf-b84c-2984b5c97322:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - name: "f31f87fd-9140-434c-92cc-51f3dad46255:string:DEMO STORE", - documentStore: "9ae80379-ee30-44ea-8ed6-b2e7c0971b19:string:0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", - identityProof: { - type: "a0a15cab-b612-4374-90e5-649f82237509:string:DNS-TXT", - location: "3cf0e135-5018-479f-8482-32fea82e9715:string:demo-tradetrust.openattestation.com", - }, - }, - ], - recipient: { - name: "c266b92b-5216-454f-a853-1da726ea3bf5:string:SG FREIGHT", - address: { - street: "9a5e5fb2-daec-4f35-9f00-915366857568:string:101 ORCHARD ROAD", - country: "e9cb2f52-4504-4c22-8f1c-3ef5361e44ce:string:SINGAPORE", - }, - }, - consignment: { - description: "77c016a7-bd4e-4814-a161-aa2092caa441:string:16667 CARTONS OF RED WINE", - quantity: { - value: "f862b235-e797-42cf-985b-e5cb5d5a3b02:string:5000", - unit: "b310de39-0a16-439e-a2c0-2220d57ddf87:string:LITRES", - }, - countryOfOrigin: "b6817140-a5bf-4e68-afb8-4f9e15e13ab3:string:AUSTRALIA", - outwardBillNo: "8ad8ac57-5693-435c-947f-d002458c7d93:string:AQSIQ170923130", - dateOfDischarge: "024670de-9e20-4356-a3af-0465a3d7337b:string:2018-01-26", - dateOfDeparture: "436e251b-5018-4827-a45b-f7a7f226c539:string:2018-01-30", - countryOfFinalDestination: "823b70bd-1aa5-49e6-8374-278ebec07013:string:CHINA", - outgoingVehicleNo: "2893dd44-1e77-444f-b3de-2061f5e65481:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "63557bd5-8d82-49e3-9d60-78c962cccb26:string:PETER LEE", - designation: "2083ddc4-e2ad-4f92-9162-a48556024ba9:string:SHIPPING MANAGER", - date: "79b715af-95f6-432f-b0ab-8476cf2f14d3:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "c23ebdac0fd3a5e5c37a7b29bc3a82bdd1dd85ea8fbe648576ea2c9fb52ef925", - proof: [], - merkleRoot: "c23ebdac0fd3a5e5c37a7b29bc3a82bdd1dd85ea8fbe648576ea2c9fb52ef925", - }, -}; diff --git a/test/fixtures/v2/documentNotIssuedWithTokenRegistry.ts b/test/fixtures/v2/documentNotIssuedWithTokenRegistry.ts deleted file mode 100644 index fdb83ba..0000000 --- a/test/fixtures/v2/documentNotIssuedWithTokenRegistry.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; - -interface CustomDocument extends v2.OpenAttestationDocument { - recipient: { - name: string; - address: { - street: string; - country: string; - }; - }; - consignment: any; - declaration: any; -} -export const documentNotIssuedWithTokenRegistry: WrappedDocument = { - version: SchemaId.v2, - data: { - id: "a6d1bed7-4819-47a6-8643-cf1655546fed:string:SGCNM21566325", - $template: { - name: "fcc0fc9c-325d-4ab6-a2cb-658edac82118:string:CERTIFICATE_OF_NON_MANIPULATION", - type: "636e41a5-ba82-4841-ba31-a63a6aa842a4:string:EMBEDDED_RENDERER", - url: "294b25d5-68a2-4681-9486-87df3c783da9:string:https://demo-cnm.openattestation.com", - }, - issuers: [ - { - name: "71c5b4f1-58c6-4d27-9670-388c7cf4b05e:string:DEMO STORE", - tokenRegistry: "d3e0ca72-96b4-41b0-b7a6-2ef587363aa6:string:0x921dC7cEF00155ac3A33f04DA7395324d7809757", - identityProof: { - type: "97bb92fa-b016-42cd-82f3-184e8c24792e:string:DNS-TXT", - location: "9034d15c-135d-493b-9e2b-817061c9c3bd:string:demo-tradetrust.openattestation.com", - }, - }, - ], - recipient: { - name: "32b3d684-42a7-4e26-807b-f7e4c3a5bb3e:string:SG FREIGHT", - address: { - street: "dfd2aefd-b4ed-434e-bfff-bee42e845f62:string:101 ORCHARD ROAD", - country: "b6f1e943-abfc-4d41-ac77-47a937412e87:string:SINGAPORE", - }, - }, - consignment: { - description: "f530de49-07fc-49ec-a071-f0b8d011d247:string:16667 CARTONS OF RED WINE", - quantity: { - value: "5fe2abab-0305-4f81-95a4-ca244267cc80:string:5000", - unit: "a12b43e9-2c23-4bf1-b90f-5108feeef294:string:LITRES", - }, - countryOfOrigin: "fe821cf7-4e42-4153-8c31-b480eb374667:string:AUSTRALIA", - outwardBillNo: "4c171bc7-ef6a-43c5-8886-ec35de4b34d2:string:AQSIQ170923130", - dateOfDischarge: "51e76949-e328-4645-8bfd-6d797d5e50a8:string:2018-01-26", - dateOfDeparture: "1269315c-9cf3-436d-9ea4-82672726c932:string:2018-01-30", - countryOfFinalDestination: "3c4ca82a-5f3c-4ae9-89cb-0e6100b392cc:string:CHINA", - outgoingVehicleNo: "e72830b1-2ce7-4334-8ee2-657e2345414d:string:COSCO JAPAN 074E/30-JAN", - }, - declaration: { - name: "0116fd8a-8ce7-4841-9a91-ad1a1e86830a:string:PETER LEE", - designation: "3bfdb115-60d5-4e9f-9e3e-5b2c29220b36:string:SHIPPING MANAGER", - date: "5cc2bef4-b4d1-46c4-979b-8436e4d8d3df:string:2018-01-28", - }, - }, - signature: { - type: "SHA3MerkleProof", - targetHash: "40f9728e5abcd23b220fa62dcd9075eba77229a1cf5330ecc6e0a8d0fe9f9259", - proof: [], - merkleRoot: "40f9728e5abcd23b220fa62dcd9075eba77229a1cf5330ecc6e0a8d0fe9f9259", - }, -}; diff --git a/test/fixtures/v2/tamperedDocument.ts b/test/fixtures/v2/tamperedDocument.ts deleted file mode 100644 index 43dd155..0000000 --- a/test/fixtures/v2/tamperedDocument.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust"; - -interface CustomDocument extends v2.OpenAttestationDocument { - name: string; - issuedOn: string; - transcript: any; - issuers: { url: string; name: string; certificateStore: string }[]; - recipient: { - name: string; - email: string; - phone: string; - }; -} -export const tamperedDocument: WrappedDocument = { - version: SchemaId.v2, - schema: "tradetrust/1.0", - data: { - id: "046bebd9-1c59-4d82-b70b-b6c8aa5c502d:string:2018091259", - name: "e91c1c2e-534b-43d1-b73b-e2de2c799242:string:SEAB Certificate for SEAB", - issuedOn: "8332eaaa-cb87-46ae-a5d0-1f9cae661fba:string:2018-08-31T23:59:32+08:00", - issuers: [ - { - name: "1f525e1b-50c3-49b7-bfbf-0f110453ff3b:string:Singapore Examination and Assessment Board", - url: "de6fcb26-c53a-49fc-a872-432213d135f3:string:https://www.seab.gov.sg/", - certificateStore: "4b467479-77ed-47c7-bfdf-7be8e6618dcd:string:0x20bc9C354A18C8178A713B9BcCFFaC2152b53990", - }, - ], - recipient: { - name: "9dcfe063-b692-4ff6-901c-134c29e4e1df:string:John Snow", - email: "03a578d3-ab41-4572-bf7b-fc8763832918:string:johnsnow@gmail.com", - phone: "a2be0e32-4a9e-45fa-9690-a300fadaa5f7:string:+6588888888", - }, - transcript: [ - { - name: "97fb29de-56db-4cde-9032-5ef91423bcf4:string:Introduction to SEAB", - grade: "df28e06b-d06f-4283-ae72-b5b3e30aee28:string:A+", - courseCredit: "50dc8869-ef3c-4276-a72e-c247d6e64b72:number:3", - courseCode: "519f79a3-4f8c-4345-9474-d173e6c9a7fe:string:SEAB-HIST", - url: "c3954ba1-023c-45ad-bbd4-eb4a8df82dc2:string:https://www.seab.gov.sg/pages/about/introduction", - description: "8d6e4172-51e2-49ba-b98b-d1c5906a0339:string:Understanding the vision, mission, and values", - }, - { - name: "4da6b8d8-21d3-4228-937b-acc65a648bf7:string:SEAB - About Us", - grade: "1cf384cd-8951-4a56-9e42-e3d9954d0c85:string:A", - courseCredit: "f000cbd2-cf8d-4bf6-94b7-6e73f8037c3f:number:3", - courseCode: "d52233d5-a137-4e94-ad75-daac38536c87:string:SEAB-ABT", - url: "148a3906-8cfe-4971-9f17-6f2751a54b8e:string:https://www.seab.gov.sg/pages/about/aboutus", - description: "69179ec5-78fc-427e-8680-ba91f86d761f:string:About the history of SEAB", - }, - ], - }, - privacy: {}, - signature: { - type: "SHA3MerkleProof", - targetHash: "85df2b4e905a82cf10c317df8f4b659b5cf38cc12bd5fbaffba5fc901ef0011b", - proof: [], - merkleRoot: "85df2b4e905a82cf10c317df8f4b659b5cf38cc12bd5fbaffba5fc901ef0011b", - }, -}; - -export const tamperedDocumentInvalid: WrappedDocument = { - version: SchemaId.v2, - schema: "tradetrust/1.0", - data: { - id: "046bebd9-1c59-4d82-b70b-b6c8aa5c502d:string:2018091259", - name: "e91c1c2e-534b-43d1-b73b-e2de2c799242:string:SEAB Certificate for SEAB", - issuedOn: "8332eaaa-cb87-46ae-a5d0-1f9cae661fba:string:2018-08-31T23:59:32+08:00", - issuers: [ - { - name: "1f525e1b-50c3-49b7-bfbf-0f110453ff3b:string:Singapore Examination and Assessment Board", - url: "de6fcb26-c53a-49fc-a872-432213d135f3:string:https://www.seab.gov.sg/", - certificateStore: "4b467479-77ed-47c7-bfdf-7be8e6618dcd:string:0x20bc9C354A18C8178A713B9BcCFFaC2152b53991", - }, - ], - recipient: { - name: "9dcfe063-b692-4ff6-901c-134c29e4e1df:string:John Snow", - email: "03a578d3-ab41-4572-bf7b-fc8763832918:string:johnsnow@gmail.com", - phone: "a2be0e32-4a9e-45fa-9690-a300fadaa5f7:string:+6588888888", - }, - transcript: [ - { - name: "97fb29de-56db-4cde-9032-5ef91423bcf4:string:Introduction to SEAB", - grade: "df28e06b-d06f-4283-ae72-b5b3e30aee28:string:A+", - courseCredit: "50dc8869-ef3c-4276-a72e-c247d6e64b72:number:3", - courseCode: "519f79a3-4f8c-4345-9474-d173e6c9a7fe:string:SEAB-HIST", - url: "c3954ba1-023c-45ad-bbd4-eb4a8df82dc2:string:https://www.seab.gov.sg/pages/about/introduction", - description: "8d6e4172-51e2-49ba-b98b-d1c5906a0339:string:Understanding the vision, mission, and values", - }, - { - name: "4da6b8d8-21d3-4228-937b-acc65a648bf7:string:SEAB - About Us", - grade: "1cf384cd-8951-4a56-9e42-e3d9954d0c85:string:A", - courseCredit: "f000cbd2-cf8d-4bf6-94b7-6e73f8037c3f:number:3", - courseCode: "d52233d5-a137-4e94-ad75-daac38536c87:string:SEAB-ABT", - url: "148a3906-8cfe-4971-9f17-6f2751a54b8e:string:https://www.seab.gov.sg/pages/about/aboutus", - description: "69179ec5-78fc-427e-8680-ba91f86d761f:string:About the history of SEAB", - }, - ], - }, - privacy: {}, - signature: { - type: "SHA3MerkleProof", - targetHash: "85df2b4e905a82cf10c317df8f4b659b5cf38cc12bd5fbaffba5fc901ef0011b", - proof: [], - merkleRoot: "85df2b4e905a82cf10c317df8f4b659b5cf38cc12bd5fbaffba5fc901ef0011b", - }, -}; diff --git a/test/fixtures/v2/wrapped/dns-did.ts b/test/fixtures/v2/wrapped/dns-did.ts new file mode 100644 index 0000000..06cd15a --- /dev/null +++ b/test/fixtures/v2/wrapped/dns-did.ts @@ -0,0 +1,139 @@ +import { SchemaId, WrappedDocument, v2 } from '@tradetrust-tt/tradetrust' + +interface CustomDocument extends v2.OpenAttestationDocument { + recipient: { + name: string + } +} + +export const dnsDidSigned: WrappedDocument = { + version: SchemaId.v2, + data: { + recipient: { + name: 'c84cfdbe-1c0b-4054-96b5-b47f3a2e8d54:string:John Doe', + }, + $template: { + name: '6a251ceb-eaef-4d0c-b12d-6cdcd65bb99a:string:main', + type: '6bd991b7-9577-4619-81b4-ec7ba837e09d:string:EMBEDDED_RENDERER', + url: '4c29c7df-a84f-4415-8b78-793d852164a2:string:https://tutorial-renderer.openattestation.com', + }, + issuers: [ + { + id: '41393850-42d7-4555-be18-c422c25faccb:string:did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7', + name: 'd21dd4c4-493a-44ac-ba6c-4ccca772d0cc:string:Demo Issuer', + revocation: { + type: '79404e49-d587-4438-b6a2-b799cc306e3b:string:NONE', + }, + identityProof: { + type: 'abbb99fa-98cb-42d0-bc3f-4500623146ad:string:DNS-DID', + location: + 'becf6fed-784b-4871-a96d-9f0c7936d7b3:string:example.tradetrust.io', + key: '19600faf-b8eb-47d7-be35-ccf3923494b3:string:did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7#controller', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '229f6c1a45e3ca687d1ffcd98283e1199e22d264f212821d1c23c7c09983108e', + proof: [], + merkleRoot: + '229f6c1a45e3ca687d1ffcd98283e1199e22d264f212821d1c23c7c09983108e', + }, + proof: [ + { + type: 'OpenAttestationSignature2018', + created: '2024-02-20T03:57:40.810Z', + proofPurpose: 'assertionMethod', + verificationMethod: + 'did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7#controller', + signature: + '0xea27eee0c6d12aabf7d823321b48cf45d04bc761daed9e132de988199b874a3e5275e166b4f84858372b9a3e83242898872897bc4bf8f5b79c5754cd43067e141c', + }, + ], +} +export const dnsDidUnSigned: WrappedDocument = { + version: SchemaId.v2, + data: { + recipient: { + name: 'c84cfdbe-1c0b-4054-96b5-b47f3a2e8d54:string:John Doe', + }, + $template: { + name: '6a251ceb-eaef-4d0c-b12d-6cdcd65bb99a:string:main', + type: '6bd991b7-9577-4619-81b4-ec7ba837e09d:string:EMBEDDED_RENDERER', + url: '4c29c7df-a84f-4415-8b78-793d852164a2:string:https://tutorial-renderer.openattestation.com', + }, + issuers: [ + { + id: '41393850-42d7-4555-be18-c422c25faccb:string:did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7', + name: 'd21dd4c4-493a-44ac-ba6c-4ccca772d0cc:string:Demo Issuer', + revocation: { + type: '79404e49-d587-4438-b6a2-b799cc306e3b:string:NONE', + }, + identityProof: { + type: 'abbb99fa-98cb-42d0-bc3f-4500623146ad:string:DNS-DID', + location: + 'becf6fed-784b-4871-a96d-9f0c7936d7b3:string:example.tradetrust.io', + key: '19600faf-b8eb-47d7-be35-ccf3923494b3:string:did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7#controller', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '229f6c1a45e3ca687d1ffcd98283e1199e22d264f212821d1c23c7c09983108e', + proof: [], + merkleRoot: + '229f6c1a45e3ca687d1ffcd98283e1199e22d264f212821d1c23c7c09983108e', + }, +} + +export const dnsDidSignedAndTampered: WrappedDocument = { + version: SchemaId.v2, + data: { + recipient: { + name: 'c84cfdbe-1c0b-4054-96b5-b47f3a2e8d54:string:John Doe 123', + }, + $template: { + name: '6a251ceb-eaef-4d0c-b12d-6cdcd65bb99a:string:main', + type: '6bd991b7-9577-4619-81b4-ec7ba837e09d:string:EMBEDDED_RENDERER', + url: '4c29c7df-a84f-4415-8b78-793d852164a2:string:https://tutorial-renderer.openattestation.com', + }, + issuers: [ + { + id: '41393850-42d7-4555-be18-c422c25faccb:string:did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7', + name: 'd21dd4c4-493a-44ac-ba6c-4ccca772d0cc:string:Demo Issuer', + revocation: { + type: '79404e49-d587-4438-b6a2-b799cc306e3b:string:NONE', + }, + identityProof: { + type: 'abbb99fa-98cb-42d0-bc3f-4500623146ad:string:DNS-DID', + location: + 'becf6fed-784b-4871-a96d-9f0c7936d7b3:string:example.tradetrust.io', + key: '19600faf-b8eb-47d7-be35-ccf3923494b3:string:did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7#controller', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '229f6c1a45e3ca687d1ffcd98283e1199e22d264f212821d1c23c7c09983108e', + proof: [], + merkleRoot: + '229f6c1a45e3ca687d1ffcd98283e1199e22d264f212821d1c23c7c09983108e', + }, + proof: [ + { + type: 'OpenAttestationSignature2018', + created: '2024-02-20T03:57:40.810Z', + proofPurpose: 'assertionMethod', + verificationMethod: + 'did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7#controller', + signature: + '0xea27eee0c6d12aabf7d823321b48cf45d04bc761daed9e132de988199b874a3e5275e166b4f84858372b9a3e83242898872897bc4bf8f5b79c5754cd43067e141c', + }, + ], +} diff --git a/test/fixtures/v2/wrapped/token-registry.ts b/test/fixtures/v2/wrapped/token-registry.ts new file mode 100644 index 0000000..6bd2eca --- /dev/null +++ b/test/fixtures/v2/wrapped/token-registry.ts @@ -0,0 +1,41 @@ +import { SchemaId, WrappedDocument, v2 } from '@tradetrust-tt/tradetrust' + +interface CustomDocument extends v2.OpenAttestationDocument { + recipient: { + name: string + } +} + +export const tokenRegistryMinted: WrappedDocument = { + version: SchemaId.v2, + data: { + $template: { + name: '65deecd5-b41f-408c-b2ee-7f2561f32502:string:main', + type: 'a8cdd6cd-e0bd-4b1b-9de3-63c49d66e226:string:EMBEDDED_RENDERER', + url: '060acff7-fca4-4c3d-ac2e-b9d70a031924:string:https://tutorial-renderer.openattestation.com', + }, + recipient: { + name: '24d1e2cf-e245-4fca-b8b4-76f4ad61c7b6:string:John Doe', + }, + issuers: [ + { + name: '1b949346-fc02-404f-94ff-a3b0a442141c:string:Demo Issuer', + tokenRegistry: + '9c9e8d16-aaa0-40ca-8633-f61e2f2d3b81:string:0x9Eb613a88534E2939518f4ffBFE65F5969b491FF', + identityProof: { + type: 'd1d58014-31af-45cc-a1c2-2b48022a0cb7:string:DNS-TXT', + location: + '195e5963-b6ed-440a-9e31-1f52f41df24f:string:example.tradetrust.io', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '8b59f2f2792f802e15c7ecfc44eb4e5a8da3ce830c1c53faaafbab9de5812bdb', + proof: [], + merkleRoot: + '8b59f2f2792f802e15c7ecfc44eb4e5a8da3ce830c1c53faaafbab9de5812bdb', + }, +} diff --git a/test/prep/setup-contracts.mjs b/test/prep/setup-contracts.mjs index 4f1fb48..e88a639 100644 --- a/test/prep/setup-contracts.mjs +++ b/test/prep/setup-contracts.mjs @@ -1,8 +1,14 @@ import shell from 'shelljs' const TT_CLI_PATH = 'tradetrust' +const ACCOUNT = '0xe0A71284EF59483795053266CB796B65E48B5124' const ACCOUNT_KEY = '0xe82294532bcfcd8e0763ee5cef194f36f00396be59b94fb418f5f8d83140d9a7' + +// account used to test dns did documents +const ACCOUNT_DNS_DID = '0x391aFf3942857a10958425FebF1fC1938D9F5AE7' +const ACCOUNT_KEY_DNS_DID = + '0x3760fb287bee810607433485cfa3fc665c2d682a1816991dccce645b096ae19a' const TOKEN_REGISTRY_ADDRESS = '0x9Eb613a88534E2939518f4ffBFE65F5969b491FF' const DOCUMENT_STORE_ADDRESS = '0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953' const TITLE_ESCROW_FACTORY_ADDRESS = @@ -11,17 +17,21 @@ const TITLE_ESCROW_FACTORY_ADDRESS = // const ACCOUNT_ADDR = '0xe0A71284EF59483795053266CB796B65E48B5124' // const ISSUER_DNS = 'minhtetoo.lol' -const issuedMerkleRoot = [ +const issuedMerkleRootVerifiableDocs = [ '0x56a72ab0a30bef3d6fb767d16f66a854a21624739a773b590a2381d68eea9468', // issued correctly '0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df', // revoked '0xba891dc3da5db9155ec370bb80f17b8fbe115893feb4337a3e321fd2300ea9b0', // invalid dns '0x1249f84c06bddebc947022569b77f6b30cdc9bff53fda9700ef2a8cc30e7dcc5', // incorrect document store ] +const mintedMerkleRoot = [ + '0x8b59f2f2792f802e15c7ecfc44eb4e5a8da3ce830c1c53faaafbab9de5812bdb', // issued correctly +] + const revokedMerkleRoot = [ '0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df', ] - +console.log('\n## Deploying Token Registry ##\n') shell.exec( `${TT_CLI_PATH} deploy title-escrow-factory -n local -k ${ACCOUNT_KEY}` ) @@ -30,17 +40,28 @@ shell.exec( `${TT_CLI_PATH} deploy token-registry "DEMO TOKEN REGISTRY" DTR -n local -k ${ACCOUNT_KEY} --factory-address ${TITLE_ESCROW_FACTORY_ADDRESS} --standalone` ) +console.log('\n## Deploying Document Store ##\n') shell.exec( `${TT_CLI_PATH} deploy document-store "test document store" --network local -k ${ACCOUNT_KEY}` ) -issuedMerkleRoot.forEach((ele) => { +console.log('\n## Issuing Documents on Document Store ##\n') +issuedMerkleRootVerifiableDocs.forEach((ele) => { shell.exec( `${TT_CLI_PATH} document-store issue --address ${DOCUMENT_STORE_ADDRESS} --hash ${ele} --network local --k ${ACCOUNT_KEY}` ) }) + +console.log('\n## Revoking Documents on Document Store ##\n') revokedMerkleRoot.forEach((ele) => { shell.exec( `${TT_CLI_PATH} document-store revoke --address ${DOCUMENT_STORE_ADDRESS} --hash ${ele} --network local --k ${ACCOUNT_KEY}` ) }) + +console.log('\n## Minting Documents on Token Registry ##\n') +mintedMerkleRoot.forEach((ele) => { + shell.exec( + `${TT_CLI_PATH} token-registry mint --address ${TOKEN_REGISTRY_ADDRESS} --tokenId ${ele} --beneficiary ${ACCOUNT} --holder ${ACCOUNT} --network local --k ${ACCOUNT_KEY}` + ) +}) From 024009bd4e2196bccd274a8d6cf5f77124e9a0b8 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Wed, 21 Feb 2024 14:06:34 +0800 Subject: [PATCH 26/34] test: verify dns-txt-token reg for v2 and dns-did, dns-txt-doc-store for v3 --- index.ts | 2 +- package-lock.json | 94 +-- package.json | 6 +- src/greet/greet.spec.ts | 9 - src/greet/index.ts | 7 - src/verify/index.ts | 1 - ....v2.dns-txt-doc-store.integration.test.ts} | 2 +- ... => verify.v2.dns-did.integration.test.ts} | 6 +- ...y.v2.dns-txt-token-reg.integration.test.ts | 577 ++++++++++++++++++ .../verify.v3.dns-did.integration.test.ts | 275 +++++++++ ...y.v3.dns-txt-doc-store.integration.test.ts | 505 +++++++++++++++ test/fixtures/v2/{wrapped => }/dns-did.ts | 0 .../v2/{wrapped => }/dns-txt-doc-store.ts | 0 test/fixtures/v2/dns-txt-token-reg.ts | 178 ++++++ test/fixtures/v2/wrapped/token-registry.ts | 41 -- test/fixtures/v3/did-invalid-signed.json | 75 --- .../v3/did-ocsp-revocation-signed.json | 44 -- ...d-revocation-store-signed-no-location.json | 75 --- ...d-revocation-store-signed-not-revoked.json | 76 --- .../did-revocation-store-signed-revoked.json | 76 --- test/fixtures/v3/did-signed.json | 75 --- test/fixtures/v3/did-wrapped.json | 69 --- test/fixtures/v3/did.json | 61 -- test/fixtures/v3/dns-did.ts | 219 +++++++ test/fixtures/v3/dns-txt-doc-store.ts | 412 +++++++++++++ test/fixtures/v3/dnsdid-invalid-signed.json | 75 --- ...d-revocation-store-signed-not-revoked.json | 76 --- ...nsdid-revocation-store-signed-revoked.json | 76 --- test/fixtures/v3/dnsdid-signed.json | 74 --- test/fixtures/v3/dnsdid-wrapped.json | 72 --- test/fixtures/v3/dnsdid.json | 61 -- .../v3/documentStore-invalid-issued.json | 66 -- test/fixtures/v3/documentStore-issued.json | 66 -- test/fixtures/v3/documentStore-revoked.json | 66 -- test/fixtures/v3/documentStore-wrapped.json | 66 -- test/fixtures/v3/documentStore.json | 58 -- test/fixtures/v3/documents.ts | 101 --- .../v3/tokenRegistry-invalid-issued.json | 66 -- test/fixtures/v3/tokenRegistry-issued.json | 66 -- test/fixtures/v3/tokenRegistry-wrapped.json | 66 -- test/fixtures/v3/tokenRegistry.json | 54 -- test/prep/setup-contracts.mjs | 29 +- 42 files changed, 2243 insertions(+), 1780 deletions(-) delete mode 100644 src/greet/greet.spec.ts delete mode 100644 src/greet/index.ts rename src/verify/{verfiy.dns-txt.v2.integration.test.ts => verfiy.v2.dns-txt-doc-store.integration.test.ts} (99%) rename src/verify/{verify.dns-did.v2.integration.test.ts => verify.v2.dns-did.integration.test.ts} (98%) create mode 100644 src/verify/verify.v2.dns-txt-token-reg.integration.test.ts create mode 100644 src/verify/verify.v3.dns-did.integration.test.ts create mode 100644 src/verify/verify.v3.dns-txt-doc-store.integration.test.ts rename test/fixtures/v2/{wrapped => }/dns-did.ts (100%) rename test/fixtures/v2/{wrapped => }/dns-txt-doc-store.ts (100%) create mode 100644 test/fixtures/v2/dns-txt-token-reg.ts delete mode 100644 test/fixtures/v2/wrapped/token-registry.ts delete mode 100644 test/fixtures/v3/did-invalid-signed.json delete mode 100644 test/fixtures/v3/did-ocsp-revocation-signed.json delete mode 100644 test/fixtures/v3/did-revocation-store-signed-no-location.json delete mode 100644 test/fixtures/v3/did-revocation-store-signed-not-revoked.json delete mode 100644 test/fixtures/v3/did-revocation-store-signed-revoked.json delete mode 100644 test/fixtures/v3/did-signed.json delete mode 100644 test/fixtures/v3/did-wrapped.json delete mode 100644 test/fixtures/v3/did.json create mode 100644 test/fixtures/v3/dns-did.ts create mode 100644 test/fixtures/v3/dns-txt-doc-store.ts delete mode 100644 test/fixtures/v3/dnsdid-invalid-signed.json delete mode 100644 test/fixtures/v3/dnsdid-revocation-store-signed-not-revoked.json delete mode 100644 test/fixtures/v3/dnsdid-revocation-store-signed-revoked.json delete mode 100644 test/fixtures/v3/dnsdid-signed.json delete mode 100644 test/fixtures/v3/dnsdid-wrapped.json delete mode 100644 test/fixtures/v3/dnsdid.json delete mode 100644 test/fixtures/v3/documentStore-invalid-issued.json delete mode 100644 test/fixtures/v3/documentStore-issued.json delete mode 100644 test/fixtures/v3/documentStore-revoked.json delete mode 100644 test/fixtures/v3/documentStore-wrapped.json delete mode 100644 test/fixtures/v3/documentStore.json delete mode 100644 test/fixtures/v3/documents.ts delete mode 100644 test/fixtures/v3/tokenRegistry-invalid-issued.json delete mode 100644 test/fixtures/v3/tokenRegistry-issued.json delete mode 100644 test/fixtures/v3/tokenRegistry-wrapped.json delete mode 100644 test/fixtures/v3/tokenRegistry.json diff --git a/index.ts b/index.ts index 23c1317..6e5d4f2 100644 --- a/index.ts +++ b/index.ts @@ -1,6 +1,6 @@ import { ethers } from 'ethers' import { verify } from './src/verify' -import { dnsTxtDocStore } from './test/fixtures/v2/wrapped/dns-txt-doc-store' +import { dnsTxtDocStore } from './test/fixtures/v2/dns-txt-doc-store' import util from 'util' // verify(documentGoerliValidWithToken, { network: 'goerli' }).then((err) => // console.log(err) diff --git a/package-lock.json b/package-lock.json index 340297d..c609d1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,8 +20,8 @@ }, "devDependencies": { "@commitlint/config-conventional": "^16.0.0", - "@typescript-eslint/eslint-plugin": "^6.20.0", - "@typescript-eslint/parser": "^6.20.0", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", "commitizen": "^4.3.0", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.56.0", @@ -2178,22 +2178,22 @@ "peer": true }, "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz", + "integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.20.0.tgz", - "integrity": "sha512-fTwGQUnjhoYHeSF6m5pWNkzmDDdsKELYrOBxhjMrofPqCkoC2k3B2wvGHFxa1CTIqkEn88nlW1HVMztjo2K8Hg==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.20.0", - "@typescript-eslint/type-utils": "6.20.0", - "@typescript-eslint/utils": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -2219,15 +2219,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.20.0.tgz", - "integrity": "sha512-bYerPDF/H5v6V76MdMYhjwmwgMA+jlPVqjSDq2cRqMi8bP5sR3Z+RLOiOMad3nsnmDVmn2gAFCyNgh/dIrfP/w==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.20.0", - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/typescript-estree": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", "debug": "^4.3.4" }, "engines": { @@ -2247,13 +2247,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.20.0.tgz", - "integrity": "sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0" + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2264,13 +2264,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.20.0.tgz", - "integrity": "sha512-qnSobiJQb1F5JjN0YDRPHruQTrX7ICsmltXhkV536mp4idGAYrIyr47zF/JmkJtEcAVnIz4gUYJ7gOZa6SmN4g==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.20.0", - "@typescript-eslint/utils": "6.20.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -2291,9 +2291,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.20.0.tgz", - "integrity": "sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2304,13 +2304,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.20.0.tgz", - "integrity": "sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2332,17 +2332,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.20.0.tgz", - "integrity": "sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.20.0", - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", "semver": "^7.5.4" }, "engines": { @@ -2357,12 +2357,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.20.0.tgz", - "integrity": "sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/types": "6.21.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { diff --git a/package.json b/package.json index 2097731..52c0711 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,8 @@ "scripts": { "test:prep:blockchain": "ganache --wallet.mnemonic \"indicate swing place chair flight used hammer soon photo region volume shuffle\" -i 1337", "test:prep:contracts": "node test/prep/setup-contracts.mjs", + "test:prep": "run-s test:prep:contracts test", + "test:concurrently": "run-p test:prep:blockchain test:prep", "test": "vitest --run", "test:ci": "vitest --run --coverage", "build": "npm run clean && npm run build:cjs && npm run build:esm && npm run build:type", @@ -25,8 +27,8 @@ "license": "ISC", "devDependencies": { "@commitlint/config-conventional": "^16.0.0", - "@typescript-eslint/eslint-plugin": "^6.20.0", - "@typescript-eslint/parser": "^6.20.0", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", "commitizen": "^4.3.0", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.56.0", diff --git a/src/greet/greet.spec.ts b/src/greet/greet.spec.ts deleted file mode 100644 index cd46e57..0000000 --- a/src/greet/greet.spec.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { greet } from '.' - -describe('Greet', () => { - const testPerson = { name: 'john' } - it('should return the greet string for person ', () => { - expect(greet(testPerson)).equal('hello john!') - }) -}) diff --git a/src/greet/index.ts b/src/greet/index.ts deleted file mode 100644 index ec39c3e..0000000 --- a/src/greet/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type Person = { - name: string -} - -export const greet = (person: Person) => { - return `hello ${person.name}!` -} diff --git a/src/verify/index.ts b/src/verify/index.ts index ada856a..f1ebd58 100644 --- a/src/verify/index.ts +++ b/src/verify/index.ts @@ -13,7 +13,6 @@ import { interpretFragments } from '@tradetrust-tt/tradetrust-utils' const verificationBuilder = (builderOptions: VerificationBuilderOptions) => { return originalVerificationBuilder( [...openAttestationVerifiers, openAttestationDidIdentityProof], - // [...openAttestationVerifiers], builderOptions ) } diff --git a/src/verify/verfiy.dns-txt.v2.integration.test.ts b/src/verify/verfiy.v2.dns-txt-doc-store.integration.test.ts similarity index 99% rename from src/verify/verfiy.dns-txt.v2.integration.test.ts rename to src/verify/verfiy.v2.dns-txt-doc-store.integration.test.ts index 341a298..992cf39 100644 --- a/src/verify/verfiy.dns-txt.v2.integration.test.ts +++ b/src/verify/verfiy.v2.dns-txt-doc-store.integration.test.ts @@ -6,7 +6,7 @@ import { dnsTxtDocStoreIncorrectDNS, dnsTxtDocStoreIncorrectDocumentStore, dnsTxtDocStoreObfuscated, -} from '../../test/fixtures/v2/wrapped/dns-txt-doc-store' +} from '../../test/fixtures/v2/dns-txt-doc-store' import { describe, it, expect } from 'vitest' import { verify, isValid } from '.' import { ethers } from 'ethers' diff --git a/src/verify/verify.dns-did.v2.integration.test.ts b/src/verify/verify.v2.dns-did.integration.test.ts similarity index 98% rename from src/verify/verify.dns-did.v2.integration.test.ts rename to src/verify/verify.v2.dns-did.integration.test.ts index 2991339..d18c99e 100644 --- a/src/verify/verify.dns-did.v2.integration.test.ts +++ b/src/verify/verify.v2.dns-did.integration.test.ts @@ -3,7 +3,7 @@ import { dnsDidSignedAndTampered, dnsDidUnSigned, dnsDidSigned, -} from '../../test/fixtures/v2/wrapped/dns-did' +} from '../../test/fixtures/v2/dns-did' import { describe, it, expect } from 'vitest' import { isValid, verify } from '.' import { ethers } from 'ethers' @@ -14,7 +14,7 @@ const localProvider = new ethers.providers.JsonRpcProvider( ) describe('verify(integration) dns-txt with dns:did', () => { - it('should return in-valid fragments for signed document', async () => { + it('should return valid fragments for signed document', async () => { const fragments = await verify(dnsDidSigned, { provider: localProvider, }) @@ -284,7 +284,7 @@ describe('verify(integration) dns-txt with dns:did', () => { expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) expect(isValid(fragments)).toStrictEqual(false) }) - it('should return in-valid fragments for signed document with invalid provider', async () => { + it('should return in-valid fragments for empty document', async () => { const fragments = await verify( {}, { diff --git a/src/verify/verify.v2.dns-txt-token-reg.integration.test.ts b/src/verify/verify.v2.dns-txt-token-reg.integration.test.ts new file mode 100644 index 0000000..37a8e5e --- /dev/null +++ b/src/verify/verify.v2.dns-txt-token-reg.integration.test.ts @@ -0,0 +1,577 @@ +// @ts-nocheck +import { + dnsTxtTokenRegMinted, + dnsTxttokenRegNotMinted, + dnsTxtTokenRegTampered, + dnsTxtTokenRegIncorrectDNS, + dnsTxtTokenRegIncorrectTokenReg, +} from '../../test/fixtures/v2/dns-txt-token-reg' +import { describe, it, expect } from 'vitest' +import { verify, isValid } from '.' +import { ethers } from 'ethers' +import util from 'util' + +const localProvider = new ethers.providers.JsonRpcProvider( + 'http://127.0.0.1:8545' +) + +describe('verify(integration) dns-txt with token-registry', () => { + it('should return valid fragments for document issued correctly with DNS-TXT on the token registry', async () => { + const fragments = await verify(dnsTxtTokenRegMinted, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "data": { + "details": [ + { + "address": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + "minted": true, + }, + ], + "mintedOnAll": true, + }, + "name": "OpenAttestationEthereumTokenRegistryStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example.tradetrust.io", + "status": "VALID", + "value": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(true) + }) + it('should return in-valid fragments for document, but not minted on the token registry', async () => { + const fragments = await verify(dnsTxttokenRegNotMinted, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "data": { + "details": [ + { + "address": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + "minted": false, + "reason": { + "code": 1, + "codeString": "DOCUMENT_NOT_MINTED", + "message": "Document has not been issued under token registry", + }, + }, + ], + "mintedOnAll": false, + }, + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 1, + "codeString": "DOCUMENT_NOT_MINTED", + "message": "Document has not been issued under token registry", + }, + "status": "INVALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example.tradetrust.io", + "status": "VALID", + "value": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(false) + }) + it('should return in-valid fragments for tampered document with DNS-TXT', async () => { + const fragments = await verify(dnsTxtTokenRegTampered, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": false, + "name": "OpenAttestationHash", + "reason": { + "code": 0, + "codeString": "DOCUMENT_TAMPERED", + "message": "Document has been tampered with", + }, + "status": "INVALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "data": { + "details": [ + { + "address": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + "minted": true, + }, + ], + "mintedOnAll": true, + }, + "name": "OpenAttestationEthereumTokenRegistryStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example.tradetrust.io", + "status": "VALID", + "value": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(false) + }) + + it('should return in-valid fragments for document successfully minted with DNS-TXT, but the issuer dns identity is not valid', async () => { + const fragments = await verify(dnsTxtTokenRegIncorrectDNS, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "data": { + "details": [ + { + "address": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + "minted": true, + }, + ], + "mintedOnAll": true, + }, + "name": "OpenAttestationEthereumTokenRegistryStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example123.tradetrust.io", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + }, + "status": "INVALID", + "value": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + }, + "status": "INVALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) + expect(isValid(fragments)).toStrictEqual(false) + }) + + it('should return in-valid fragments for document successfully minted with DNS-TXT, but the token registry is not correct', async () => { + const fragments = await verify(dnsTxtTokenRegIncorrectTokenReg, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "data": { + "details": [ + { + "address": "0x1Fb613a88534E2939518f4ffBFE65F5969b491FF", + "minted": false, + "reason": { + "code": 1, + "codeString": "DOCUMENT_NOT_MINTED", + "message": "Invalid contract arguments", + }, + }, + ], + "mintedOnAll": false, + }, + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 1, + "codeString": "DOCUMENT_NOT_MINTED", + "message": "Invalid contract arguments", + }, + "status": "INVALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": [ + { + "location": "example.tradetrust.io", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x1Fb613a88534E2939518f4ffBFE65F5969b491FF", + }, + "status": "INVALID", + "value": "0x1Fb613a88534E2939518f4ffBFE65F5969b491FF", + }, + ], + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x1Fb613a88534E2939518f4ffBFE65F5969b491FF", + }, + "status": "INVALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) + expect(isValid(fragments)).toStrictEqual(false) + }) + it('should return in-valid fragments for empty document', async () => { + const fragments = await verify( + {}, + { + provider: localProvider, + } + ) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "name": "OpenAttestationHash", + "reason": { + "code": 2, + "codeString": "SKIPPED", + "message": "Document does not have merkle root, target hash or data.", + }, + "status": "SKIPPED", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 2, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(false) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) + expect(isValid(fragments)).toStrictEqual(false) + }) +}) diff --git a/src/verify/verify.v3.dns-did.integration.test.ts b/src/verify/verify.v3.dns-did.integration.test.ts new file mode 100644 index 0000000..33fb14f --- /dev/null +++ b/src/verify/verify.v3.dns-did.integration.test.ts @@ -0,0 +1,275 @@ +// @ts-nocheck +import { + dnsDidSignedAndTampered, + dnsDidUnSigned, + dnsDidSigned, +} from '../../test/fixtures/v3/dns-did' +import { describe, it, expect } from 'vitest' +import { isValid, verify } from '.' +import { ethers } from 'ethers' +import util from 'util' + +const localProvider = new ethers.providers.JsonRpcProvider( + 'http://127.0.0.1:8545' +) + +describe('verify(integration) dns-txt with dns:did', () => { + it('should return valid fragments for signed document', async () => { + const fragments = await verify(dnsDidSigned, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": { + "did": "did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7", + "issued": true, + }, + "revocation": { + "revoked": false, + }, + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationDidSignedDocumentStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 2, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "data": { + "key": "did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7#controller", + "location": "example.tradetrust.io", + "status": "VALID", + }, + "name": "OpenAttestationDnsDidIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(true) + }) + it('should return in-valid fragments for unsigned document', async () => { + const fragments = await verify(dnsDidUnSigned, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 2, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) + expect(isValid(fragments)).toStrictEqual(false) + }) + it('should return in-valid fragments for signed but tampared document', async () => { + const fragments = await verify(dnsDidSignedAndTampered, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": false, + "name": "OpenAttestationHash", + "reason": { + "code": 0, + "codeString": "DOCUMENT_TAMPERED", + "message": "Document has been tampered with", + }, + "status": "INVALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": { + "did": "did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7", + "issued": true, + }, + "revocation": { + "revoked": false, + }, + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationDidSignedDocumentStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 2, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "data": { + "key": "did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7#controller", + "location": "example.tradetrust.io", + "status": "VALID", + }, + "name": "OpenAttestationDnsDidIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(false) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(false) + }) +}) diff --git a/src/verify/verify.v3.dns-txt-doc-store.integration.test.ts b/src/verify/verify.v3.dns-txt-doc-store.integration.test.ts new file mode 100644 index 0000000..f127b93 --- /dev/null +++ b/src/verify/verify.v3.dns-txt-doc-store.integration.test.ts @@ -0,0 +1,505 @@ +// @ts-nocheck +import { + dnsTxtDocStore, + dnsTxtDocStoreTampered, + dnsTxtDocStoreRevoked, + dnsTxtDocStoreIncorrectDNS, + dnsTxtDocStoreIncorrectDocumentStore, + dnsTxtDocStoreObfuscated, +} from '../../test/fixtures/v3/dns-txt-doc-store' +import { describe, it, expect } from 'vitest' +import { verify, isValid } from '.' +import { ethers } from 'ethers' +// import util from 'util' + +const localProvider = new ethers.providers.JsonRpcProvider( + 'http://127.0.0.1:8545' +) + +describe('verify(integration) dns-txt with document store', () => { + it('should return valid fragments for document issued correctly with DNS-TXT and not revoked on a document store', async () => { + const fragments = await verify(dnsTxtDocStore, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + "revocation": { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "revoked": false, + }, + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "identifier": "example.tradetrust.io", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(true) + }) + it('should return in-valid fragments for tampered document with DNS-TXT', async () => { + const fragments = await verify(dnsTxtDocStoreTampered, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": false, + "name": "OpenAttestationHash", + "reason": { + "code": 0, + "codeString": "DOCUMENT_TAMPERED", + "message": "Document has been tampered with", + }, + "status": "INVALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + "revocation": { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "revoked": false, + }, + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "identifier": "example.tradetrust.io", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(false) + }) + it('should return in-valid fragments for document issued correctly with DNS-TXT, but revoked', async () => { + const fragments = await verify(dnsTxtDocStoreRevoked, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + "revocation": { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "reason": { + "code": 5, + "codeString": "DOCUMENT_REVOKED", + "message": "Document 0xeeef582def4ebea8fad684c33f67194f3a922692a3d9b96ca9d90150adf7259c has been revoked under contract 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "revoked": true, + }, + }, + "issuedOnAll": true, + "revokedOnAny": true, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 5, + "codeString": "DOCUMENT_REVOKED", + "message": "Document 0xeeef582def4ebea8fad684c33f67194f3a922692a3d9b96ca9d90150adf7259c has been revoked under contract 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "status": "INVALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "identifier": "example.tradetrust.io", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(false) + }) + it('should return in-valid fragments for document issued correctly with DNS-TXT, but the issuer dns identity is not valid', async () => { + const fragments = await verify(dnsTxtDocStoreIncorrectDNS, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": true, + }, + "revocation": { + "address": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "revoked": false, + }, + }, + "issuedOnAll": true, + "revokedOnAny": false, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "identifier": "example123.tradetrust.io", + "value": "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "status": "INVALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) + expect(isValid(fragments)).toStrictEqual(false) + }) + it('should return in-valid fragments for document issued correctly with DNS-TXT, but the document store identity is not correct', async () => { + const fragments = await verify(dnsTxtDocStoreIncorrectDocumentStore, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "details": { + "issuance": { + "address": "0x99f7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "issued": false, + "reason": { + "code": 1, + "codeString": "DOCUMENT_NOT_ISSUED", + "message": "Bad document store address checksum", + }, + }, + "revocation": { + "address": "0x99f7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + "reason": { + "code": 5, + "codeString": "DOCUMENT_REVOKED", + "message": "Bad document store address checksum", + }, + "revoked": true, + }, + }, + "issuedOnAll": false, + "revokedOnAny": true, + }, + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 5, + "codeString": "DOCUMENT_REVOKED", + "message": "Bad document store address checksum", + }, + "status": "INVALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "identifier": "example.tradetrust.io", + "value": "0x99f7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x99f7E4777a8D1b6EdD5F2d9b8582e2817F0B0953", + }, + "status": "INVALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) + expect(isValid(fragments)).toStrictEqual(false) + }) + it.skip('should return valid fragments for documented with obfuscated fields', async () => { + const fragments = await verify(dnsTxtDocStoreObfuscated, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot() + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(true) + }) +}) diff --git a/test/fixtures/v2/wrapped/dns-did.ts b/test/fixtures/v2/dns-did.ts similarity index 100% rename from test/fixtures/v2/wrapped/dns-did.ts rename to test/fixtures/v2/dns-did.ts diff --git a/test/fixtures/v2/wrapped/dns-txt-doc-store.ts b/test/fixtures/v2/dns-txt-doc-store.ts similarity index 100% rename from test/fixtures/v2/wrapped/dns-txt-doc-store.ts rename to test/fixtures/v2/dns-txt-doc-store.ts diff --git a/test/fixtures/v2/dns-txt-token-reg.ts b/test/fixtures/v2/dns-txt-token-reg.ts new file mode 100644 index 0000000..67d31c5 --- /dev/null +++ b/test/fixtures/v2/dns-txt-token-reg.ts @@ -0,0 +1,178 @@ +import { SchemaId, WrappedDocument, v2 } from '@tradetrust-tt/tradetrust' + +interface CustomDocument extends v2.OpenAttestationDocument { + recipient: { + name: string + } +} + +export const dnsTxtTokenRegIncorrectTokenReg: WrappedDocument = + { + version: SchemaId.v2, + data: { + $template: { + name: 'a4fe54c9-6da2-459a-9fe3-f11d2ecca24f:string:main', + type: '236e2694-c949-428c-b105-bed1a6d68c16:string:EMBEDDED_RENDERER', + url: '387c1469-2c28-4da7-9787-0e1fcfb7b963:string:https://tutorial-renderer.openattestation.com', + }, + recipient: { + name: '1fac4b24-9720-4945-b5b9-2fecacc9e947:string:John Doe', + }, + issuers: [ + { + name: '464bfbbe-9b41-4c63-967c-e90ceea2f43b:string:Demo Issuer', + tokenRegistry: + 'd204a475-42ef-4044-b9cd-ff53f8f3ab45:string:0x1Fb613a88534E2939518f4ffBFE65F5969b491FF', + identityProof: { + type: '581497a4-4d1d-4426-b0e4-199dc29634f9:string:DNS-TXT', + location: + 'bd2a2f65-50f6-42d2-9f0d-387c455f24e7:string:example.tradetrust.io', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '82de42fe0d4dc965546a08f0555a33d66f25192f8121dab54b0a8d213a984a81', + proof: [], + merkleRoot: + '82de42fe0d4dc965546a08f0555a33d66f25192f8121dab54b0a8d213a984a81', + }, + } + +export const dnsTxtTokenRegIncorrectDNS: WrappedDocument = { + version: SchemaId.v2, + data: { + $template: { + name: '795c6391-b05a-455c-96f0-2664faeb0f7b:string:main', + type: '2fb67d3c-fd76-4759-9b5a-ca1c6026a6ef:string:EMBEDDED_RENDERER', + url: '72fc5787-d5fe-4a07-8d62-e8cc0b94060b:string:https://tutorial-renderer.openattestation.com', + }, + recipient: { + name: '7454e768-af43-45aa-9a33-40ccbffc0e54:string:John Doe', + }, + issuers: [ + { + name: 'a202c60d-687b-451f-92b9-8d8f36f78658:string:Demo Issuer', + tokenRegistry: + 'c2c76af8-2914-42b5-9ae2-1064d366d1d6:string:0x9Eb613a88534E2939518f4ffBFE65F5969b491FF', + identityProof: { + type: 'f567358b-7bad-4d38-9aa9-005cefbea1b1:string:DNS-TXT', + location: + 'ad38dca4-07dd-481d-b0e5-ca67dd751450:string:example123.tradetrust.io', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '26a31b2d50a79a6e7966227714bc1e7e2fd31f6bfdf5ac8066a3b9c01046c35b', + proof: [], + merkleRoot: + '26a31b2d50a79a6e7966227714bc1e7e2fd31f6bfdf5ac8066a3b9c01046c35b', + }, +} + +export const dnsTxtTokenRegTampered: WrappedDocument = { + version: SchemaId.v2, + data: { + $template: { + name: '65deecd5-b41f-408c-b2ee-7f2561f32502:string:main', + type: 'a8cdd6cd-e0bd-4b1b-9de3-63c49d66e226:string:EMBEDDED_RENDERER', + url: '060acff7-fca4-4c3d-ac2e-b9d70a031924:string:https://tutorial-renderer.openattestation.com', + }, + recipient: { + name: '24d1e2cf-e245-4fca-b8b4-76f4ad61c7b6:string:John Doe123', + }, + issuers: [ + { + name: '1b949346-fc02-404f-94ff-a3b0a442141c:string:Demo Issuer', + tokenRegistry: + '9c9e8d16-aaa0-40ca-8633-f61e2f2d3b81:string:0x9Eb613a88534E2939518f4ffBFE65F5969b491FF', + identityProof: { + type: 'd1d58014-31af-45cc-a1c2-2b48022a0cb7:string:DNS-TXT', + location: + '195e5963-b6ed-440a-9e31-1f52f41df24f:string:example.tradetrust.io', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '8b59f2f2792f802e15c7ecfc44eb4e5a8da3ce830c1c53faaafbab9de5812bdb', + proof: [], + merkleRoot: + '8b59f2f2792f802e15c7ecfc44eb4e5a8da3ce830c1c53faaafbab9de5812bdb', + }, +} + +export const dnsTxtTokenRegMinted: WrappedDocument = { + version: SchemaId.v2, + data: { + $template: { + name: '65deecd5-b41f-408c-b2ee-7f2561f32502:string:main', + type: 'a8cdd6cd-e0bd-4b1b-9de3-63c49d66e226:string:EMBEDDED_RENDERER', + url: '060acff7-fca4-4c3d-ac2e-b9d70a031924:string:https://tutorial-renderer.openattestation.com', + }, + recipient: { + name: '24d1e2cf-e245-4fca-b8b4-76f4ad61c7b6:string:John Doe', + }, + issuers: [ + { + name: '1b949346-fc02-404f-94ff-a3b0a442141c:string:Demo Issuer', + tokenRegistry: + '9c9e8d16-aaa0-40ca-8633-f61e2f2d3b81:string:0x9Eb613a88534E2939518f4ffBFE65F5969b491FF', + identityProof: { + type: 'd1d58014-31af-45cc-a1c2-2b48022a0cb7:string:DNS-TXT', + location: + '195e5963-b6ed-440a-9e31-1f52f41df24f:string:example.tradetrust.io', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '8b59f2f2792f802e15c7ecfc44eb4e5a8da3ce830c1c53faaafbab9de5812bdb', + proof: [], + merkleRoot: + '8b59f2f2792f802e15c7ecfc44eb4e5a8da3ce830c1c53faaafbab9de5812bdb', + }, +} + +export const dnsTxttokenRegNotMinted: WrappedDocument = { + version: SchemaId.v2, + data: { + $template: { + name: '5c59bd33-5fba-4904-ad73-a6423993a1e3:string:main', + type: 'dbcd76ba-4c5e-43d8-8b0d-47f90c7d7492:string:EMBEDDED_RENDERER', + url: 'e78f3c82-9be6-4c9f-83dc-2817988c17bb:string:https://tutorial-renderer.openattestation.com', + }, + recipient: { + name: 'a5964e36-318e-40aa-b49e-a06131a74730:string:John Doe', + }, + issuers: [ + { + name: '47e0a10d-7b3e-4308-a865-3fae07c164f1:string:Demo Issuer', + tokenRegistry: + '8df433de-fb6b-4d13-afe5-feedc8bf48ef:string:0x9Eb613a88534E2939518f4ffBFE65F5969b491FF', + identityProof: { + type: 'b05dea77-c7ed-40a8-a5b0-7d9315e6d1a6:string:DNS-TXT', + location: + 'b9d5f684-80ba-4cda-bd94-cec907931d09:string:example.tradetrust.io', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '1d24bc3377f39cd66ef196796236ced7eecec87571a857f2c309fd853834837d', + proof: [], + merkleRoot: + '1d24bc3377f39cd66ef196796236ced7eecec87571a857f2c309fd853834837d', + }, +} diff --git a/test/fixtures/v2/wrapped/token-registry.ts b/test/fixtures/v2/wrapped/token-registry.ts deleted file mode 100644 index 6bd2eca..0000000 --- a/test/fixtures/v2/wrapped/token-registry.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { SchemaId, WrappedDocument, v2 } from '@tradetrust-tt/tradetrust' - -interface CustomDocument extends v2.OpenAttestationDocument { - recipient: { - name: string - } -} - -export const tokenRegistryMinted: WrappedDocument = { - version: SchemaId.v2, - data: { - $template: { - name: '65deecd5-b41f-408c-b2ee-7f2561f32502:string:main', - type: 'a8cdd6cd-e0bd-4b1b-9de3-63c49d66e226:string:EMBEDDED_RENDERER', - url: '060acff7-fca4-4c3d-ac2e-b9d70a031924:string:https://tutorial-renderer.openattestation.com', - }, - recipient: { - name: '24d1e2cf-e245-4fca-b8b4-76f4ad61c7b6:string:John Doe', - }, - issuers: [ - { - name: '1b949346-fc02-404f-94ff-a3b0a442141c:string:Demo Issuer', - tokenRegistry: - '9c9e8d16-aaa0-40ca-8633-f61e2f2d3b81:string:0x9Eb613a88534E2939518f4ffBFE65F5969b491FF', - identityProof: { - type: 'd1d58014-31af-45cc-a1c2-2b48022a0cb7:string:DNS-TXT', - location: - '195e5963-b6ed-440a-9e31-1f52f41df24f:string:example.tradetrust.io', - }, - }, - ], - }, - signature: { - type: 'SHA3MerkleProof', - targetHash: - '8b59f2f2792f802e15c7ecfc44eb4e5a8da3ce830c1c53faaafbab9de5812bdb', - proof: [], - merkleRoot: - '8b59f2f2792f802e15c7ecfc44eb4e5a8da3ce830c1c53faaafbab9de5812bdb', - }, -} diff --git a/test/fixtures/v3/did-invalid-signed.json b/test/fixtures/v3/did-invalid-signed.json deleted file mode 100644 index a3613a7..0000000 --- a/test/fixtures/v3/did-invalid-signed.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "revocation": { - "type": "NONE" - } - }, - "identityProof": { - "type": "DNS-DID", - "identifier": "notinuse.tradetrust.io" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "282c368288295711fd79f8515a92a96f6990fe28d7fd9b2449c5b2e2db040cc9", - "proofs": [ - "e45073a232f936935a8448c8fe1bce848fbeba790b0a432222a9262756371dbd", - "2874fccb397ef995dc3b954150cee3c04b55df32cb4ceaefcc2dfcf635274b51", - "090e3bdeeee7fd456a893139b40438a4d931402843085b58a0dca03b3ae78e1d" - ], - "merkleRoot": "dc34b7bc4e707c77327db76536625c81c2a6777934df566b261bd8ec3f24f8c4", - "salts": "W3sidmFsdWUiOiJiN2M5MzFlNGY1ZGVkYjI5NGNlNTkxZDFlNzg1MmM5NDIzZmQ5ODYzMDcyYmRhNmM4MDE3Njg5ZDQwYmI4YjVlIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiN2EwMGUyYjUxYThhMGM3ODdmZjBmYWY2YmNjZjg2NjU3MDJjOTJiOGFiM2U4ZjkwMDBlNGY3ZThiODc2MGM1YyIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiIzMGZhMmIyODBkMjg1YjM2ZDFmZmZhNjA5Y2RlMmQ4OWRlOWZmZmVkOWU2M2Y4YTJmNjcwZjJmNjYxMjQ5MGJiIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6ImNhMjNhMGE4Mjk1NjEzOTU4OGZjMzY2ZGYzMzE0ODcwYWNiZjg2MjA0ZTg0Mzg2Mjc5NGE5YzQzZWIwODU0YWEiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiMzdmMWY3YjU4NTZlMDczYzY0Mjc4ODdmYTkyNmU1ZTU3ODY1N2NkODU3MzQ3ZTk5M2E4MjcxMWMyNmZjMGQ1YiIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidmFsdWUiOiI1MDQ1NjAwYTliZGQyNTEzYzczOGJjZjk0YjIxYzY2ZDU1OTI5MzM5N2RiZDA4ZmU5ZDliOWM2NDU2NTc0ODA3IiwicGF0aCI6InJlZmVyZW5jZSJ9LHsidm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LnR5cGUifSx7InZhbHVlIjoiOTE3ZTkzZTFmYTIxYmQ3MGU2YWYzMDM1NDM3ZjY1YzA3NjM0MTY1NTc1NDg2MzMwNzA0MDQwOTFmY2UwNTcxYSIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiNjQxOTQ5YTlmZWJkYWY5YzhmODFlNmVmMGMwMjI2YzE2NTlhM2I0ZDA1MzQwMzY2MmE3MjE3OWE0ZDVjMDBkYSIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiNjY0MjA0ZThjMGZhMDBmOTg3MjdmZmQ0MzVhZjRiYTdhZTgxNDJlZmUwYmQ0MTRhODcwZWRmNDRjY2FiMjUxZCIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJiMzZiYjEwM2IxNzczZmQxODVmYjg4NTEzOTMyYTQxYWEyNjgxN2Q3MDQ1OGYyYzdkYmMwN2M5NjllZDMzNmNjIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6ImU3OTBkYWI1YzQ1ZTcyYTg1MmNkYWZjZDA5ODE3YmNmYTcyYjdkYWE4MzgyMjRjZDFiNDUzMzMxZDIxODVhNTIiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - }, - "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x9fc61bfdf30553d7e2ecd77fbd190c44bb2f3192760ebc08eb32fa3d2c15626b3af3577c0abcfa0877e656380be9eceb4e2a665e5ad9324eaeddb7d90ae3b5311c" - } -} diff --git a/test/fixtures/v3/did-ocsp-revocation-signed.json b/test/fixtures/v3/did-ocsp-revocation-signed.json deleted file mode 100644 index 785914b..0000000 --- a/test/fixtures/v3/did-ocsp-revocation-signed.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { "id": "https://example.com", "type": "OpenAttestationIssuer", "name": "DEMO STORE" }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { "type": "3", "effectiveDate": "2010-01-01T19:23:24Z" }, - { "type": "3A", "effectiveDate": "2010-01-01T19:23:24Z" } - ] - }, - "openAttestationMetadata": { - "template": { "name": "CUSTOM_TEMPLATE", "type": "EMBEDDED_RENDERER", "url": "https://localhost:3000/renderer" }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "revocation": { "type": "OCSP_RESPONDER", "location": "https://ocsp.example.com" } - }, - "identityProof": { "type": "DNS-DID", "identifier": "demo-tradetrust.openattestation.com" } - }, - "attachments": [{ "fileName": "sample.pdf", "mimeType": "application/pdf", "data": "BASE64_ENCODED_FILE" }], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "69e1a174ea67e1c3119639f713f8a7348bbda54fdce60903621398cc2fea4d40", - "proofs": [], - "merkleRoot": "69e1a174ea67e1c3119639f713f8a7348bbda54fdce60903621398cc2fea4d40", - "salts": "W3sidmFsdWUiOiI5YzA2ZjZkZTg5M2YzYmE2ZWFmZmRlNjYzYmI5N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ThiMjRmOGEiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEuaWRlbnRpdHlQcm9vZi50eXBlIn0seyJ2YWx1ZSI6IjNhMTRkNzgwZTFmMjY4YTYyZTljNThhMDg0Y2I5YTBmNzE1MTI4MjUzMDIwOGIwZWQ2ZDNjOGUxYmI4M2U5MTEiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEuaWRlbnRpdHlQcm9vZi5pZGVudGlmaWVyIn0seyJ2YWx1ZSI6IjkxZTg3ZWRkNjQzMTA3MzlhMDFkYmE0ZmMwMDVkYmIwNWQyZGNhMDY1NDlmZDJiMDg2YTUyYzAyZDM0N2QzYWUiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZmlsZU5hbWUifSx7InZhbHVlIjoiOWU2MWRlNWQwMzg5YTI3YjAyMTQ4MTM3ZjA0MWYxMzZjMDU5N2VkNTQ0NzczNDM1NDA3ZmVmMTk2OWU5MTllMiIsInBhdGgiOiJhdHRhY2htZW50c1swXS5taW1lVHlwZSJ9LHsidmFsdWUiOiI5MzJjZDQ5Njg0MmUyZGQxOTI0YmYxZWJkNzdlMTRhMTI5ZDcwOGVlODFiMTk4YmVkOTc4OGQ2M2E4ODUxNzEzIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLmRhdGEifV0=", - "privacy": { "obfuscated": [] }, - "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x3390dff497f8524a089c97449c82a30956c18ec7a8d88d18d75bd2204797838818bf6d4feb8d729642df5933715c5ffaf09f59a150cadc82ab6fd051b8b066ae1b" - } -} diff --git a/test/fixtures/v3/did-revocation-store-signed-no-location.json b/test/fixtures/v3/did-revocation-store-signed-no-location.json deleted file mode 100644 index 6f63bd7..0000000 --- a/test/fixtures/v3/did-revocation-store-signed-no-location.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "revocation": { - "type": "REVOCATION_STORE" - } - }, - "identityProof": { - "type": "DID", - "identifier": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "7cf1daad349d5d0b7a9c0e1dbc2d1480ef6230f0d3ea1d8b59d7d5c6d78f5d6b", - "proofs": [ - "a019a62edd807c4907f859cef02b49a373a25515bcefbcc0668d90e148b6f476", - "2ed4c88f935d280c3c3e7883a9db0e8080990f690f4bb281eff25c66f2147d0e", - "94c07ddcc4a2ade59e3120dce9f19f0f4ad80a58943555f4b51af4668b1c1d62" - ], - "merkleRoot": "f43045b0c57072a044e810b798e32b8c1de1d0d0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mM2Q3ZGI2MmVkZmQ0ZTc2NGRjNGQ5ODdiOTljNmQyZjk0NTliNTM1ZiIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiZTJhNjZkZDdjNTE1YTVjZWM1MzNmZGU2ZjM1YTI5YTdmMzNkM2Q1ZGVmNTVlZmExMDQ4YmMzZDA0MGQ0NDhlMyIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiI1ZTk2NzNiNWE0ZmJkNzg2N2I5OWRmMDBlZTcyNDZmOTQ0NjVhYjViNjliZmFhMmIwMmZmOWI0ODdkYmJhYmExIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6Ijk2ODRmNmNmMTZkMDUyZTgyMDIzNmRhZDQ1MmNkYWU5NjAwNGZhYzk5YWFlMDQ2MjVjNWJkNjhkOWMxZGEzNzQiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - }, - "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x4a054aaf881da5130a3b19160a7f0ce1afef1fe093c83be438c8c40b0a04ace5142f3d48a23c8ce7c32fabe04fc69e6fd4c94cf3ceb4adb4f3da5fa937208d4e1c" - } -} diff --git a/test/fixtures/v3/did-revocation-store-signed-not-revoked.json b/test/fixtures/v3/did-revocation-store-signed-not-revoked.json deleted file mode 100644 index b260925..0000000 --- a/test/fixtures/v3/did-revocation-store-signed-not-revoked.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "revocation": { - "type": "REVOCATION_STORE", - "location": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" - } - }, - "identityProof": { - "type": "DID", - "identifier": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "a019a62edd807c4907f859cef02b49a373a25515bcefbcc0668d90e148b6f476", - "proofs": [ - "7cf1daad349d5d0b7a9c0e1dbc2d1480ef6230f0d3ea1d8b59d7d5c6d78f5d6b", - "2ed4c88f935d280c3c3e7883a9db0e8080990f690f4bb281eff25c66f2147d0e", - "94c07ddcc4a2ade59e3120dce9f19f0f4ad80a58943555f4b51af4668b1c1d62" - ], - "merkleRoot": "f43045b0c57072a044e810b798e32b8c1de1d0d0c5774d55c8eed1f3fdec6438", - "salts": "W3sidmFsdWUiOiJjZDcyMTAwYzhjZDU3MzZlMmRiNGIwODg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giLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEuaWRlbnRpdHlQcm9vZi50eXBlIn0seyJ2YWx1ZSI6IjNlYjMxNDgzYjQzMmI5ZjA2ODRhNmJhZjY2Y2ZmOTZmYWZjM2ViOTQ0MWZmYjc4MjlmMjI2NmQyMjk0Yzc3YjkiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEuaWRlbnRpdHlQcm9vZi5pZGVudGlmaWVyIn0seyJ2YWx1ZSI6IjhhNGViNWVmYzcyZjA1MTJjYTNhYzVjODlhMTVmNTU2ZDBhOTg3ZGUzYTg3YzA1YWM1MDc5ODIwNGU5MGM3MGYiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZmlsZU5hbWUifSx7InZhbHVlIjoiNWQ0ZTAwZmMwNWQzOGYxZTI0OTM5NDM3Y2MxOGFiODZkZjRjYzZkZDM3YTUyMjVkN2NkYTFhYzgyOWU1NmE1MCIsInBhdGgiOiJhdHRhY2htZW50c1swXS5taW1lVHlwZSJ9LHsidmFsdWUiOiJiMDgzNDFhNmU2ZmE3ZmJlMjRmYzJlOGE0ZjZhZTg4ZGU4MTc2NzA1NDMxYTcyZGY5MjA2OWQ1YzZhYmYyNGI3IiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLmRhdGEifV0=", - "privacy": { - "obfuscated": [] - }, - "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x4a054aaf881da5130a3b19160a7f0ce1afef1fe093c83be438c8c40b0a04ace5142f3d48a23c8ce7c32fabe04fc69e6fd4c94cf3ceb4adb4f3da5fa937208d4e1c" - } -} diff --git a/test/fixtures/v3/did-revocation-store-signed-revoked.json b/test/fixtures/v3/did-revocation-store-signed-revoked.json deleted file mode 100644 index 19da77e..0000000 --- a/test/fixtures/v3/did-revocation-store-signed-revoked.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "revocation": { - "type": "REVOCATION_STORE", - "location": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" - } - }, - "identityProof": { - "type": "DID", - "identifier": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "a1c633145bc0f37105fe510d335376c1919a6cf51030628877288bdee5541c22", - "proofs": [ - "82f51d6eb620e4264dff0ac2b9d99a965a88ff51e46192bb4808ea969ee67402", - "c3d7c5908f25eba67baf7f607932f1924acdb7a6cf04ad5408dba251bf0a47bc", - "94c07ddcc4a2ade59e3120dce9f19f0f4ad80a58943555f4b51af4668b1c1d62" - ], - "merk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9uIn0seyJ2YWx1ZSI6ImZlNDI0NjllMzYzYTllNjRjMWIzZmM0ZmY3NjFiZGM4YjU1MTBhYjNiMzQ1MTI0MzMxMGI0ZTJlMjFmNjlkZjUiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEuaWRlbnRpdHlQcm9vZi50eXBlIn0seyJ2YWx1ZSI6IjYyMjliYWY3Zjg4YjNiYzRkNTEwNmFlMzhjZjEwZmZjNjdlZGY4YTQ2ZGMzZGJiZDcyZTQ2MjJjZTAwMmQ2OTMiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEuaWRlbnRpdHlQcm9vZi5pZGVudGlmaWVyIn0seyJ2YWx1ZSI6ImZjOTAzYzUzNzBjNmY4Y2UzNjIyMTU0ODM5NGU5NjcwYjk3NDYyNjQyMTk2OTIzYzk3OWRiMjhhNTBjZWEzNDAiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZmlsZU5hbWUifSx7InZhbHVlIjoiMzAyNzcyMjM5N2U4NzVhZWRkZDZlYjA1MTk5YmM0OTk2OTk0ODE2OGMzMTE3OTMzMGQzZDUyOWFkNTAzOWIwOSIsInBhdGgiOiJhdHRhY2htZW50c1swXS5taW1lVHlwZSJ9LHsidmFsdWUiOiJjNjVhM2VhNTlkZDVlNWVkM2U0MjI1MTgxNTZmNWRkMTRlNjYzZDVmYzBhZmIxOTExYTgwMjRkN2VjMGZmNDBlIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLmRhdGEifV0=", - "privacy": { - "obfuscated": [] - }, - "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x4a054aaf881da5130a3b19160a7f0ce1afef1fe093c83be438c8c40b0a04ace5142f3d48a23c8ce7c32fabe04fc69e6fd4c94cf3ceb4adb4f3da5fa937208d4e1c" - } -} diff --git a/test/fixtures/v3/did-signed.json b/test/fixtures/v3/did-signed.json deleted file mode 100644 index b05d155..0000000 --- a/test/fixtures/v3/did-signed.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "revocation": { - "type": "NONE" - } - }, - "identityProof": { - "type": "DID", - "identifier": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "82f51d6eb620e4264dff0ac2b9d99a965a88ff51e46192bb4808ea969ee67402", - "proofs": [ - "a1c633145bc0f37105fe510d335376c1919a6cf51030628877288bdee5541c22", - "c3d7c5908f25eba67baf7f607932f1924acdb7a6cf04ad5408dba251bf0a47bc", - "94c07ddcc4a2ade59e3120dce9f19f0f4ad80a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29mLnR5cGUifSx7InZhbHVlIjoiOTdlZmE5MjdlMTVmMGFlYmIxNmEyOWY3NjM2YTVlZmRjYmNhYWU5YzdhM2MwMGFmZDczZmM3MDUzMzNhMjZmOCIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiZTUzYWQ0ODk1Mjg3YTExZjE1MzRiNDRmNDI5ZDgyOTlkZGFmOTkzMTNjZGE1MGE2ZTAyMTE0ZTc2Yjg0NGY4ZSIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiIxNDU0MGY2ZGViMDBjOGI2OTc3MmE4ZTljNzU1OGU0MTgxMGI1Y2FmYTQzNGQ1NWFjMTIxZTk3MmE1NDY0MDMzIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6IjNiZTUyODM3ZjMwNzcyNDYzZjY1NmM4ZDQ3ZGM1ZWRiZjcyMmY4ZDQ5ZWFiZTI0NWVjZGM2ZWJhODIxNzFjYTAiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - }, - "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x4a054aaf881da5130a3b19160a7f0ce1afef1fe093c83be438c8c40b0a04ace5142f3d48a23c8ce7c32fabe04fc69e6fd4c94cf3ceb4adb4f3da5fa937208d4e1c" - } -} diff --git a/test/fixtures/v3/did-wrapped.json b/test/fixtures/v3/did-wrapped.json deleted file mode 100644 index 36c227b..0000000 --- a/test/fixtures/v3/did-wrapped.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "revocation": { - "type": "NONE" - } - }, - "identityProof": { - "type": "DID", - "identifier": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "94c07ddcc4a2ade59e3120dce9f19f0f4ad80a58943555f4b51af4668b1c1d62", - "proofs": ["20f010efd1c689ce87ba19bb0eeb641c3c5d6281d2ee427139bad0e1e5e7f239"], - "merkleRoot": "f43045b0c57072a044e810b798e32b8c1de1d0d0c5774d55c8eed1f3fdec6438", - "salts": "W3sidmFsdWUiOiJmNGY2YTEyZjZmZjRlZjZmYTgxNTQ1MGM5OGI3NDk2NGI4NzI3ZGRiZDQ0MDIzZDk1MTcyMTlkNzFjYzdkYzg1IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiYTVmOGYwOTFkNzE5MTE4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M1Zjg0NWYxNjRkMWFmODEzZjMyZmI4NWFmMmFlOSIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiI0MTQzMzczZmUyMmY4Y2ViOWI0MjUyMjdkZGVjYjAxNWU3OTUwODIwOTAyNGUzYjQxZjJiOTE0NjlmNDg2NzkxIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6IjQxYzFmOWNiYWEzMmEzMDk3MzZlZTQzOWZkMmNiYmZlN2Y1OGU5YjZjMDk5NDBlZGFjNDhlZjYzMDAyNzkzZWQiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - } - } -} diff --git a/test/fixtures/v3/did.json b/test/fixtures/v3/did.json deleted file mode 100644 index 16ad263..0000000 --- a/test/fixtures/v3/did.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": [ - "VerifiableCredential", - "DrivingLicenceCredential", - "OpenAttestationCredential" - ], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - "revocation": { - "type": "NONE" - } - }, - "identityProof": { - "type": "DID", - "identifier": "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ] -} diff --git a/test/fixtures/v3/dns-did.ts b/test/fixtures/v3/dns-did.ts new file mode 100644 index 0000000..951e2e4 --- /dev/null +++ b/test/fixtures/v3/dns-did.ts @@ -0,0 +1,219 @@ +import { SchemaId, WrappedDocument, v2 } from '@tradetrust-tt/tradetrust' + +interface CustomDocument extends v2.OpenAttestationDocument { + recipient: { + name: string + } +} + +export const dnsDidSigned: WrappedDocument = { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', + }, + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, + proof: { + type: 'OpenAttestationProofMethod', + method: 'DID', + value: 'did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7', + revocation: { + type: 'NONE', + }, + }, + identityProof: { + type: 'DNS-DID', + identifier: 'example.tradetrust.io', + }, + }, + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + '7e5a3f03f8f4b06314689ec944748e60c97689ef734d75583577d6f647b9747d', + proofs: [], + merkleRoot: + '7e5a3f03f8f4b06314689ec944748e60c97689ef734d75583577d6f647b9747d', + salts: 'W3sidmFsdWUiOiJhNWI4ZDE5NGM1MjIxMzJjNDgwZTY3ZmM0YmYyZDQzMmU2NWQ0YjlmZmUxMWEwNjlmMjNlYWQ1OTdkMzJjMDRmIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMjk2ZmZhYTZiM2E5ZTRmZWU0ZjViMGU0NDA0ZDk5N2Q2MGRlY2YxMmZiZmViMDIyMjMwNTEzZGZiMDVjZGE3OSIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI3YjUxMjYyZjcyNDExNDVkNDhkODI2NDJiMWUwMjlkYTdkNTZmNzkwNDU5NWQ1Nzg1M2UyMmQ2MDUwYmQyY2RjIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6IjNlZDhiZmVkNjkxZjg4MWMwZWNmOGNhZjJhYzA0ZGJjYzgzODFiOGIyNmU3YWZkMDg2MTZlNzA2Y2M1ZjZlNzUiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiMWVhMDUxYTlmZDIyNzFhMDBkMWFkZjM2Zjc1ZTFkOWE1M2UyYjcwYTY0ZTc0NjNmYWRlMDhlYjY5NmRmZWFmMCIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidmFsdWUiOiI0MmUxYjIzMTU2ZDNkYWE3Zjc1MTFkYjI1MDY5YjkxYjMwNzhiMjEwNWY1MmFmMTA0N2QwMjRjMzgzZjlkNzg5IiwicGF0aCI6InJlZmVyZW5jZSJ9LHsidmFsdWUiOiI3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7InZhbHVlIjoiYWNmODhjZTFhZjhiNTg4MmFkOTlkNDAwZDJmM2UzY2MzYzAxMmJkOWY3OGFlYmY2YTNjYzNiMGFhMzYwYjAyMiIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiNWRjNmNkYzBjMGJmMmI0OTMzYzQxNjk2ZmIzOWUzNzlkN2YxMWI0NjFkNDc0OTc0ZDY2NWI5MDBhZGJjNWEyZCIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifV0=', + privacy: { + obfuscated: [], + }, + key: 'did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7#controller', + signature: + '0x7d43a79c4dc1da3300457883bd2d5e3f181f1a19742984cfb0b191412793984f3fa83d9f5d3a800b4bd9403a0c35f87415da0d19daa23f3b2d05b8f425085f821c', + }, +} +export const dnsDidUnSigned: WrappedDocument = { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', + }, + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, + proof: { + type: 'OpenAttestationProofMethod', + method: 'DID', + value: 'did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7', + revocation: { + type: 'NONE', + }, + }, + identityProof: { + type: 'DNS-DID', + identifier: 'example.tradetrust.io', + }, + }, + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + '7e5a3f03f8f4b06314689ec944748e60c97689ef734d75583577d6f647b9747d', + proofs: [], + merkleRoot: + '7e5a3f03f8f4b06314689ec944748e60c97689ef734d75583577d6f647b9747d', + salts: 'W3sidmFsdWUiOiJhNWI4ZDE5NGM1MjIxMzJjNDgwZTY3ZmM0YmYyZDQzMmU2NWQ0YjlmZmUxMWEwNjlmMjNlYWQ1OTdkMzJjMDRmIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMjk2ZmZhYTZiM2E5ZTRmZWU0ZjViMGU0NDA0ZDk5N2Q2MGRlY2YxMmZiZmViMDIyMjMwNTEzZGZiMDVjZGE3OSIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI3YjUxMjYyZjcyNDExNDVkNDhkODI2NDJiMWUwMjlkYTdkNTZmNzkwNDU5NWQ1Nzg1M2UyMmQ2MDUwYmQyY2RjIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6IjNlZDhiZmVkNjkxZjg4MWMwZWNmOGNhZjJhYzA0ZGJjYzgzODFiOGIyNmU3YWZkMDg2MTZlNzA2Y2M1ZjZlNzUiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiMWVhMDUxYTlmZDIyNzFhMDBkMWFkZjM2Zjc1ZTFkOWE1M2UyYjcwYTY0ZTc0NjNmYWRlMDhlYjY5NmRmZWFmMCIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidmFsdWUiOiI0MmUxYjIzMTU2ZDNkYWE3Zjc1MTFkYjI1M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ZGZkNzg2NDJjNTEwNiIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5wcm9vZi5yZXZvY2F0aW9uLnR5cGUifSx7InZhbHVlIjoiYWNmODhjZTFhZjhiNTg4MmFkOTlkNDAwZDJmM2UzY2MzYzAxMmJkOWY3OGFlYmY2YTNjYzNiMGFhMzYwYjAyMiIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiNWRjNmNkYzBjMGJmMmI0OTMzYzQxNjk2ZmIzOWUzNzlkN2YxMWI0NjFkNDc0OTc0ZDY2NWI5MDBhZGJjNWEyZCIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifV0=', + privacy: { + obfuscated: [], + }, + }, +} + +export const dnsDidSignedAndTampered: WrappedDocument = { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'TAMPERED_SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', + }, + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, + proof: { + type: 'OpenAttestationProofMethod', + method: 'DID', + value: 'did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7', + revocation: { + type: 'NONE', + }, + }, + identityProof: { + type: 'DNS-DID', + identifier: 'example.tradetrust.io', + }, + }, + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + '7e5a3f03f8f4b06314689ec944748e60c97689ef734d75583577d6f647b9747d', + proofs: [], + merkleRoot: + '7e5a3f03f8f4b06314689ec944748e60c97689ef734d75583577d6f647b9747d', + salts: 'W3sidmFsdWUiOiJhNWI4ZDE5NGM1MjIxMzJjNDgwZTY3ZmM0YmYyZDQzMmU2NWQ0YjlmZmUxMWEwNjlmMjNlYWQ1OTdkMzJjMDRmIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMjk2ZmZhYTZiM2E5ZTRmZWU0ZjViMGU0NDA0ZDk5N2Q2MGRlY2YxMmZiZmViMDIyMjMwNTEzZGZiMDVjZGE3OSIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI3YjUxMjYyZjcyNDExNDVkNDhkODI2NDJiMWUwMjlkYTdkNTZmNzkwNDU5NWQ1Nzg1M2UyMmQ2MDUwYmQyY2RjIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6IjNlZDhiZmVkNjkxZjg4MWMwZWNmOGNhZjJhYzA0ZGJjYzgzODFiOGIyNmU3YWZkMDg2MTZlNzA2Y2M1ZjZlNzUiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiMWVhMDUxYTlmZDIyNzFhMDBkMWFkZjM2Zjc1ZTFkOWE1M2UyYjcwYTY0ZTc0NjNmYWRlMDhlYjY5NmRmZWFmMCIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidmFsdWUiOiI0MmUxYjIzMTU2ZDNkYWE3Zjc1MTFkYjI1MDY5YjkxYjMwNzhiMjEwNWY1MmFmMTA0N2Q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uQXR0ZXN0YXRpb25NZXRhZGF0YS5wcm9vZi5yZXZvY2F0aW9uLnR5cGUifSx7InZhbHVlIjoiYWNmODhjZTFhZjhiNTg4MmFkOTlkNDAwZDJmM2UzY2MzYzAxMmJkOWY3OGFlYmY2YTNjYzNiMGFhMzYwYjAyMiIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiNWRjNmNkYzBjMGJmMmI0OTMzYzQxNjk2ZmIzOWUzNzlkN2YxMWI0NjFkNDc0OTc0ZDY2NWI5MDBhZGJjNWEyZCIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifV0=', + privacy: { + obfuscated: [], + }, + key: 'did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7#controller', + signature: + '0x7d43a79c4dc1da3300457883bd2d5e3f181f1a19742984cfb0b191412793984f3fa83d9f5d3a800b4bd9403a0c35f87415da0d19daa23f3b2d05b8f425085f821c', + }, +} diff --git a/test/fixtures/v3/dns-txt-doc-store.ts b/test/fixtures/v3/dns-txt-doc-store.ts new file mode 100644 index 0000000..8b30384 --- /dev/null +++ b/test/fixtures/v3/dns-txt-doc-store.ts @@ -0,0 +1,412 @@ +import { SchemaId, WrappedDocument, v2 } from '@tradetrust-tt/tradetrust' + +interface CustomDocument extends v2.OpenAttestationDocument { + recipient: { + name: string + } +} + +interface CustomDocumentObfuscated extends v2.OpenAttestationDocument {} + +export const dnsTxtDocStore: WrappedDocument = { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', + }, + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, + proof: { + type: 'OpenAttestationProofMethod', + method: 'DOCUMENT_STORE', + value: '0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', + }, + identityProof: { + type: 'DNS-TXT', + identifier: 'example.tradetrust.io', + }, + }, + attachments: [ + { + fileName: 'sample.pdf', + mimeType: 'application/pdf', + data: 'BASE64_ENCODED_FILE', + }, + ], + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + '660e07e2defb55f04d6715448ac4f9c5718c8115c50ebd8931be15ed61ae8580', + proofs: [], + merkleRoot: + '660e07e2defb55f04d6715448ac4f9c5718c8115c50ebd8931be15ed61ae8580', + salts: 'W3sidmFsdWUiOiI0YmQ0MGZjZjliMGRjNzU3YjViMWU4MDhlNmEwMGQ3NWQ4NjZmYzg0ODYzYTA3YjRkYTllNGU4NjQ5MThiMjY3IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMDk4ZDk0ODZlNjZiMTQ4MDk5ZDQ2ZTI2NGQ3N2E0NjRjZDcwNjA3M2MwYTg2Yzk0NDlkNmIyMWYxYmRiZjFkZSIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI3OWZkMDU0YjhjYzMwM2M3NWMzZDAxN2QzNTRhYzJjOGQyNjI1YjViNTdjZjM0OGJjMDVhODMwZ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privacy: { + obfuscated: [], + }, + }, +} + +export const dnsTxtDocStoreTampered: WrappedDocument = { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'TAMPERED_SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', + }, + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, + proof: { + type: 'OpenAttestationProofMethod', + method: 'DOCUMENT_STORE', + value: '0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', + }, + identityProof: { + type: 'DNS-TXT', + identifier: 'example.tradetrust.io', + }, + }, + attachments: [ + { + fileName: 'sample.pdf', + mimeType: 'application/pdf', + data: 'BASE64_ENCODED_FILE', + }, + ], + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + '660e07e2defb55f04d6715448ac4f9c5718c8115c50ebd8931be15ed61ae8580', + proofs: [], + merkleRoot: + '660e07e2defb55f04d6715448ac4f9c5718c8115c50ebd8931be15ed61ae8580', + salts: 'W3sidmFsdWUiOiI0YmQ0MGZjZjliMGRjNzU3YjViMWU4MDhlNmEwMGQ3NWQ4NjZmYzg0ODYzYTA3YjRkYT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TBmYzk3MGM0MGI3ZjcyNjYzNWRmZDMyYzI1Yjk1NjhjODlmZTE3MjQwYWMxYzNhIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6ImRjYWVkYTNmMzg0MjYyNzc1MWU5ZGJlZDExNWFkNWQ4ZmYyOTZhYWFjYWZmNzhmNTQxNTJmNjc1MzhkYzgyZDEiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==', + privacy: { + obfuscated: [], + }, + }, +} + +export const dnsTxtDocStoreRevoked: WrappedDocument = { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', + }, + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, + proof: { + type: 'OpenAttestationProofMethod', + method: 'DOCUMENT_STORE', + value: '0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', + }, + identityProof: { + type: 'DNS-TXT', + identifier: 'example.tradetrust.io', + }, + }, + attachments: [ + { + fileName: 'sample.pdf', + mimeType: 'application/pdf', + data: 'BASE64_ENCODED_FILE', + }, + ], + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + 'eeef582def4ebea8fad684c33f67194f3a922692a3d9b96ca9d90150adf7259c', + proofs: [], + merkleRoot: + 'eeef582def4ebea8fad684c33f67194f3a922692a3d9b96ca9d90150adf7259c', + salts: 'W3sidmFsdWUiOiI0ZTk0NWY3ODhiMzUxZjVjMmQ3MjNmOTE0NzBmMTBkZmRmYjM3ZjI4MDMyYTQzMzQ2YTA5ZWE4MzdmOGM4Y2UwIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiZTU0MDM1YzEyNWFlMDBjMmE4YjE0N2EwYzg1NWIzZDRkNjI1OGU2YWVhY2E5YjI2YWE2OGQ0YzhjZmQ5MmY3NCIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI2NGNmMzIzM2MxNTE4NmQxNTA3ODkzYWY0ZThlYzc3OTQzNDExZjFlNjE5YTU1ZTA1YjllNzE1OGMwYjdmMWNjIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6ImY4Yzg3MjQxMjBkZjNkODYyOWM5YzFmZjZiNzRjYjlmOWRiNmE4NWQ3ZDY5ZWY5OTFkYzIwNzc5OGNkOThkMjYiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiNGEwZDZjOGRlODU5MGUyNDRiYzU5NGEwMzQwNmMwYjRiMzhmNjkzYzQyNjJmMzc1Mzg5NzM3NGU1NDM2OGVkNyIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidmFsdWUiOiI5MjBjNjhjNmU2N2NiZWQ5YWQzMzFmNWQzMmJkM2MyMDM3NzNiMmRiYWIyYzU0Y2QxZjM1MmZmZjA5NTQ2MGU2IiwicGF0aCI6InJlZmVyZW5jZSJ9LHsidmFsdWUiOiJiZmRiNzE5NDY3NjhhNzc0MTZkYzdhYmVlZGYzYWYxN2QwYjUxYjQ1ZmYyZDVkYTIxOD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ZjMWRiZDg4MmM3ZSIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiNmQzMzhmZDU4YWY3ZjJkZDMxNWY4NzA2ODFkM2VhY2RlZmVhNWRlOTEwNDc2ODdiYjlkZTEwZTU1ZDQ0YjYxNyIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJjNTZmN2UyZTg4NTRkMjQ5NTNkNWU4OTAzZjcxNjY4M2FkMmZhNzVkMDE4MTRkNzA0OGU0NmNkNTRhYWNiZTZmIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6IjFjMmZhZmQ4MGMxNzJjYmNjM2M2ZDFmNWI1OTVmYmY4MjE2YmEwOWM5ODVlMTliNmU1ZTE3MzAzMGE2MGE2NTYiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==', + privacy: { + obfuscated: [], + }, + }, +} + +export const dnsTxtDocStoreIncorrectDNS: WrappedDocument = { + version: 'https://schema.openattestation.com/3.0/schema.json', + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', + }, + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, + proof: { + type: 'OpenAttestationProofMethod', + method: 'DOCUMENT_STORE', + value: '0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', + }, + identityProof: { + type: 'DNS-TXT', + identifier: 'example123.tradetrust.io', + }, + }, + attachments: [ + { + fileName: 'sample.pdf', + mimeType: 'application/pdf', + data: 'BASE64_ENCODED_FILE', + }, + ], + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + '3ef17c1a3b5a05395340c7ba30c41fc1a73f3091585fade6401a42eb684944a8', + proofs: [], + merkleRoot: + '3ef17c1a3b5a05395340c7ba30c41fc1a73f3091585fade6401a42eb684944a8', + salts: 'W3sidmFsdWUiOiI0ZmQ4Yzg4MmI4N2E4YWMyYWU2MjZiZjFmNzlmYTQ5NzQ5NTAzYTRmNTg3MzhhMGFhZTlkMmRmMTNmMjFlNTExIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiYWM1ZmVjNjgzMzZiY2ZiNDk5Y2MzNzIxZmU4ZWRjZThkNzY2ZjdmYTc4NDllMGFiZDgxMGJlYTc3YmY3ZjJiOCIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI1YzRiMDQzNTcwNjUxZDc4N2NjNjcxNDE0ZTY5ZGZkZGU0MjA3NjNhY2IwYzQxYzEwZjIxMzgxYjc4YzVhZmQxIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6ImZkMzQ4ZmY5ZjNiMDkwNWQxNjM3ZjQ4MTcyMDMxZmI3ZmM1N2U1MDkzMDQ4YjBlNzVkZmJmOGExZTFhMDRjNzgiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiZTQxNzA5ZTFiYTg5N2I1MWEy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oIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEucHJvb2YudmFsdWUifSx7InZhbHVlIjoiZTBhYmExYWU4ZThhMGNjZTU4MDllNDI0MjQ4YjE0ZTExYTdkN2QzOTEwYjI5ZjA3NjNmNzc3MzM5NDFiMDM5MSIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiNzUxOWQ0YzcyMTlhMjZjYzM5M2I3NzAzZjIzYjhhZjkzZjI1OTg1N2I1YjdiMjIwODMyMmU1YmQ5MDk0M2MzMiIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiODkyZTNjNDdmNTcxNTc3OTY4YWI2NTdjYzAzN2Q2ZjRkZjAxZmQ5NzdkMWMwM2JkMzM5OGVlZmYyZDU4N2I2OCIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiIxMWM4ZGVkNDhmOTAxNjZmZTY5MTZhY2EyMTQ3NjcxOGNlN2M0OTA3MGE0NjBjMTJkOTIwZTdiZDU5MjE5OGE4IiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6IjhmMGUyNWI1ODgyMzJjNDhmNDU3ZmQ3M2RlNDE1MGZlMTQxMGU4ODQzMzdiMzc4MWM1NzI5Mjc4NDBjZGIzODkiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==', + privacy: { + obfuscated: [], + }, + }, +} + +export const dnsTxtDocStoreObfuscated: WrappedDocument = + { + version: SchemaId.v2, + data: { + $template: { + name: '456f5ada-b199-4012-b359-ad689d3a5df6:string:main', + type: 'a8b58b42-cd8c-4da5-ad83-fc0a71e342d0:string:EMBEDDED_RENDERER', + url: '92c32eb4-5119-4707-8c43-a4a4411d62ca:string:https://tutorial-renderer.openattestation.com', + }, + issuers: [ + { + name: 'ea308a68-db59-422f-8da3-a37788f0fcd1:string:Demo Issuer', + documentStore: + 'af1be992-cf0e-477d-b5f2-a847c12289dd:string:0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', + identityProof: { + type: '5947b4b6-0d4e-4bef-9d50-5aee88f3783b:string:DNS-TXT', + location: + '5e0eba02-56ae-46a1-9c99-4008578cbe96:string:example.tradetrust.io', + }, + }, + ], + }, + signature: { + type: 'SHA3MerkleProof', + targetHash: + '56a72ab0a30bef3d6fb767d16f66a854a21624739a773b590a2381d68eea9468', + proof: [], + merkleRoot: + '56a72ab0a30bef3d6fb767d16f66a854a21624739a773b590a2381d68eea9468', + }, + privacy: { + obfuscatedData: [ + '8c5c965edb2e14df766ad1e77822428d2cbf2d2d761f7c36a5801deaa971fe83', + ], + }, + } + +export const dnsTxtDocStoreIncorrectDocumentStore: WrappedDocument = + { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', + }, + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, + proof: { + type: 'OpenAttestationProofMethod', + method: 'DOCUMENT_STORE', + value: '0x99f7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', + }, + identityProof: { + type: 'DNS-TXT', + identifier: 'example.tradetrust.io', + }, + }, + attachments: [ + { + fileName: 'sample.pdf', + mimeType: 'application/pdf', + data: 'BASE64_ENCODED_FILE', + }, + ], + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + 'f039e1328ad4a21e7d58d6dab1caea228238bee71080b1364bb6f1097c39b407', + proofs: [], + merkleRoot: + 'f039e1328ad4a21e7d58d6dab1caea228238bee71080b1364bb6f1097c39b407', + salts: 'W3sidmFsdWUiOiJhODAzNGZlOTA0MjNmMDAwMDdlMGMxNzA5MTg0ZjY2NWI0NDcwZTEwNDk0OGFiMzhlOTkzNGNlNTkwOWYwZmQ2IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMGY4N2IzMDcwZGU1YzY5YTU4OTgzMmQ2NDFlZTc1OWE1MzBiMGM3MWU2ZDQ1NzExY2YxZTVlNzUzNGZiMDA0ZiIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiIwZDI4NTAyNjE5ZmViZTQ5NTc4YTViNmEzN2JlYzk1MTU3OWVmY2FhYmUwM2ViZjY0YmY1YzkzYTZiNmM1ZTNkIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6Ijg1OTFmZGQwMTdmOGMwMTQyNGIxYTkzOTAxZjAzNjdiNDRjYmU3ODljNzRjYTk4YzFhZjAwMzNlODc3MmExOWQiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiOGRjZjc4ZDQyZDNmMTQ4YzY1NThiZWM4ODZjNDIzZmJhODg0YThmN2NhOGFjZWRkMmY5YjViMGJhN2E3M2JiYSIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidmFsdWUiOiIzMjI1YjZlZWE1M2VhZGNhNmEzZGZhZmNlO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Q5NmFmZTU2MiIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiN2M2YTNkZTNlNjdmNGNiMWNjMGRhYzlmZDczYzdmYzFmMzM3NDlmMWM3YTZiM2E1YmQzOWNkZDdhOWZlMTQ4MSIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiOTI1NzUxNDNmMmI2NzhkZjRmYmY3MjAzZTY4MzkxOGUwNGFlODgwYTk1ZTc2MGU4ZmExMDBlNzU2YzEwNWMwMSIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJlMmVhYzE4YjFkNTY2NTU2Yjk2MmE4N2ViMmNlM2NmOWJmNmMwNDE1NzExOTJhOGZjN2Q5OWZhMmE4M2VjYTViIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6Ijk4Zjk1MWM5NThlYmRiNmYzZWMyN2VkMDg1NDE0ZGIzZjhhZWFhM2M0Zjk0M2FmNzBhZDY5ZDE1ZmQxMTNmMDAiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==', + privacy: { + obfuscated: [], + }, + }, + } diff --git a/test/fixtures/v3/dnsdid-invalid-signed.json b/test/fixtures/v3/dnsdid-invalid-signed.json deleted file mode 100644 index 84b06f3..0000000 --- a/test/fixtures/v3/dnsdid-invalid-signed.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "revocation": { - "type": "NONE" - } - }, - "identityProof": { - "type": "DNS-DID", - "identifier": "notinuse.tradetrust.io" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "e45073a232f936935a8448c8fe1bce848fbeba790b0a432222a9262756371dbd", - "proofs": [ - "282c368288295711fd79f8515a92a96f6990fe28d7fd9b2449c5b2e2db040cc9", - "2874fccb397ef995dc3b954150cee3c04b55df32cb4ceaefcc2dfcf635274b51", - "090e3bdeeee7fd456a893139b40438a4d931402843085b58a0dca03b3ae78e1d" - ], - "merkleRoot": "dc34b7bc4e707c77327db76536625c81c2a6777934df566b261bd8ec3f24f8c4", - "salts": "W3sidmFsdWUiOiIyZGE3NDAwMTk4MDRmYjlkZDJlODExZTdlYTFkNGZmNGVhNzA5YzI0YTU5MmRjYjljMzM5OGE1YTJhZGM5MDBkIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMjkwNTY0OTlhM2Q4YjU4YzJhMDFkY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MzZlODAwNmFjNGRiYmMxMjAxZmVlZjgyMDU1M2IxMDVhNyIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiIwMmUwOTZhMGFjNjVlNmNjMjYwMDc4NjIzN2JmOGE4ZWQ1Y2ZlYmZmOWExMmUxYmI0NTgwNzdiNGUxZDRiMTliIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6IjY4YzdhZDcyNWM0M2ViOTJjNjkzODVkYjM4YTA4YTFhYzI2ZjIzOTE4M2Y3ODcwNWZjNGUxZmQ3YWFlNTRmMzEiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - }, - "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x9fc61bfdf30553d7e2ecd77fbd190c44bb2f3192760ebc08eb32fa3d2c15626b3af3577c0abcfa0877e656380be9eceb4e2a665e5ad9324eaeddb7d90ae3b5311c" - } -} diff --git a/test/fixtures/v3/dnsdid-revocation-store-signed-not-revoked.json b/test/fixtures/v3/dnsdid-revocation-store-signed-not-revoked.json deleted file mode 100644 index 1b7442c..0000000 --- a/test/fixtures/v3/dnsdid-revocation-store-signed-not-revoked.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "revocation": { - "type": "REVOCATION_STORE", - "location": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" - } - }, - "identityProof": { - "type": "DNS-DID", - "identifier": "demo-tradetrust.openattestation.com" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "8a7d064dfb2a4c5b4a5ecc2d3348c4d5987bda83bd31af68e43addc806a50465", - "proofs": [ - "9deebec8d85c16a3a12daa021a842552d9fd2303e09e5984381c5f66d023ff06", - "d5f2aeef5316066073d69433ab24e45d780feb5694ab392a3b94e2f0ff7bdf86", - "090e3bdeeee7fd456a893139b40438a4d931402843085b58a0dca03b3ae78e1d" - ], - "merkleRoot": "dc34b7bc4e707c77327db76536625c81c2a6777934df566b261bd8ec3f24f8c4", - "salts": "W3sidmFsdWUiOiI3YTEzODA3OWJhMmI3NDE1OWIyY2Y5NTQ2OTRhMDdhZTkxYWQ2Yzc3NWZjODdlNGNhY2RkMTZhYmMzMDIzYTNhIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiZDMxMzllMmVmZjg1OGU3MDc2NGE3YmU5MTMyYmE2OTRkMzQzNmRjYmU5NmEwYzBlMzJkM2FmZDE4MDY0YjIwMSIsInBhdGgiOiJAY29udGV4dFswXSJ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aW9uTWV0YWRhdGEuaWRlbnRpdHlQcm9vZi5pZGVudGlmaWVyIn0seyJ2YWx1ZSI6ImE3NzBlOGIwODVhM2RiZWU0MTdlMmYyNDExMTEwODcwM2Y4NmYxNGFkODExZmRhZGIyZjdiZTdjYjk0NjVkZWQiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZmlsZU5hbWUifSx7InZhbHVlIjoiNTc1NmM5MjEyYzRmZWJlNTk2NjdlMWY1MGVkZGM5YjhkYWI1ZmNkNTg2MWFmODgyNzU1N2VhN2Y5Y2JhNzA5NiIsInBhdGgiOiJhdHRhY2htZW50c1swXS5taW1lVHlwZSJ9LHsidmFsdWUiOiIyOTNhNTc0Nzc3MWRmMGIxZjE3NzFmMjBkNTliZDNkYjQzOWU3YmQyYjkyYTdiMTYzYWU2MzNmOTYzYTU5MzUxIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLmRhdGEifV0=", - "privacy": { - "obfuscated": [] - }, - "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x9fc61bfdf30553d7e2ecd77fbd190c44bb2f3192760ebc08eb32fa3d2c15626b3af3577c0abcfa0877e656380be9eceb4e2a665e5ad9324eaeddb7d90ae3b5311c" - } -} diff --git a/test/fixtures/v3/dnsdid-revocation-store-signed-revoked.json b/test/fixtures/v3/dnsdid-revocation-store-signed-revoked.json deleted file mode 100644 index 44c74bc..0000000 --- a/test/fixtures/v3/dnsdid-revocation-store-signed-revoked.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "revocation": { - "type": "REVOCATION_STORE", - "location": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" - } - }, - "identityProof": { - "type": "DNS-DID", - "identifier": "demo-tradetrust.openattestation.com" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "9deebec8d85c16a3a12daa021a842552d9fd2303e09e5984381c5f66d023ff06", - "proofs": [ - "8a7d064dfb2a4c5b4a5ecc2d3348c4d5987bda83bd31af68e43addc806a50465", - "d5f2aeef5316066073d69433ab24e45d780feb5694ab392a3b94e2f0ff7bdf86", - "090e3bdeeee7fd456a893139b40438a4d931402843085b58a0dca03b3ae78e1d" - ], - "merkleRoot": "dc34b7bc4e707c77327db76536625c81c2a6777934df566b261bd8ec3f24f8c4", - "salts": "W3sidmFsdWUiOiJjYTA3ZjdlNjA1YTFkZDFiMTNjNDk3NTIzZTc1MjBlOTI4YWYzZGMzZTc4NTIzMjM1MDZhOTU4YjMxZDg5YzRlIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiZjYxNGVjYmJhMGY4ZDljYmJl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k1M2FmODE0ZjViNGJlMjBiZmViMzkxYTlkZTQiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEuaWRlbnRpdHlQcm9vZi5pZGVudGlmaWVyIn0seyJ2YWx1ZSI6IjhhMzcwZWRhNzk4MzI1YmU1MTViMGMyOGNiZTdhMTcyYmY5ZGY2NjZjNzJkMjllMTUyYmFmMTM0MzI4YzE1YzkiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZmlsZU5hbWUifSx7InZhbHVlIjoiM2QwZTU0N2MzOTE1M2U1NjNjNDM2Y2FiMDRjMjY4ODgyMDhkZTc1ODI2NWZkNDVkYmY2YjVlY2I0YjRlYTJlMCIsInBhdGgiOiJhdHRhY2htZW50c1swXS5taW1lVHlwZSJ9LHsidmFsdWUiOiI2NWUzNTJjZjQzZTUxNzRmNTBmMWMyMTliNzI2ZDRjNDJkY2E5NTkwYWEwNWY5YTBhZDcxOTUxYThmZGMyYzUyIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLmRhdGEifV0=", - "privacy": { - "obfuscated": [] - }, - "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x9fc61bfdf30553d7e2ecd77fbd190c44bb2f3192760ebc08eb32fa3d2c15626b3af3577c0abcfa0877e656380be9eceb4e2a665e5ad9324eaeddb7d90ae3b5311c" - } -} diff --git a/test/fixtures/v3/dnsdid-signed.json b/test/fixtures/v3/dnsdid-signed.json deleted file mode 100644 index 0337a1f..0000000 --- a/test/fixtures/v3/dnsdid-signed.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "revocation": { - "type": "NONE" - } - }, - "identityProof": { - "type": "DNS-DID", - "identifier": "demo-tradetrust.openattestation.com" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "d876067507c616c42a5c32a42bc37754403533246c04445678f024d73f18b745", - "proofs": [ - "239cf91faee989c730299cc1683b9211a36547107625d26a06f8ad5323d5e406", - "bed332534ffb2cfcc40a5c2c71141dbda5c21f114085f783a437cc0f2d5a86c3" - ], - "merkleRoot": "dc34b7bc4e707c77327db76536625c81c2a6777934df566b261bd8ec3f24f8c4", - "salts": "W3sidmFsdWUiOiJkMTc5NjYyZDI5NTBkMmQ2ZTgxMzY5OWUzYWM3MzRjMGYyNDI5ZGRjZTk5NGY3OTQ2ZjFkYTIzM2FmNTg1ZjBkIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMTQ5NjE3ZjVkODI1ZDFjNmEzYWRjZjM4M2QyYmQ1Mzk4ZGVlNGE1OGE3NTk0NzA0MGQ5OWVkOGJmNDg4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sInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJiOTFkNjRjM2FlOTY2M2MyOTIzZGY5OTU4NjQ3N2RiNDJjZGQxMjVhODIwYmNlODViNjZlMDg2MzdlN2I1MmIwIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6IjVkZmMxMGJiZjU2NmZiYzM3ZTk2NTQ4MDFjODA0NTQ4ZjFmNTAzM2FlN2YzYTc3YTA2YTVhMmEzNGNiMzgxM2YiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - }, - "key": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", - "signature": "0x9fc61bfdf30553d7e2ecd77fbd190c44bb2f3192760ebc08eb32fa3d2c15626b3af3577c0abcfa0877e656380be9eceb4e2a665e5ad9324eaeddb7d90ae3b5311c" - } -} diff --git a/test/fixtures/v3/dnsdid-wrapped.json b/test/fixtures/v3/dnsdid-wrapped.json deleted file mode 100644 index f67a457..0000000 --- a/test/fixtures/v3/dnsdid-wrapped.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", - "revocation": { - "type": "NONE" - } - }, - "identityProof": { - "type": "DNS-DID", - "identifier": "demo-tradetrust.openattestation.com" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "239cf91faee989c730299cc1683b9211a36547107625d26a06f8ad5323d5e406", - "proofs": [ - "d876067507c616c42a5c32a42bc37754403533246c04445678f024d73f18b745", - "bed332534ffb2cfcc40a5c2c71141dbda5c21f114085f783a437cc0f2d5a86c3" - ], - "merkleRoot": "dc34b7bc4e707c77327db76536625c81c2a6777934df566b261bd8ec3f24f8c4", - "salts": "W3sidmFsdWUiOiI2NzEyZjg0YmU1ODljOWI0MGE4OTBmMTlkZGZkYjc2MmM4NTI5MTY3ZDRhYTg4ZDEzYTgwNDNjNjM4ODAwOWI1IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiNTYzY2JmZmU4ODgyNjY1ZDY1MjAwZDQyZWIxNjgwMzNlNDk0NzgyZDIwNWQxMWJmNDE5ZDE2MDlhN2VmMzkyNCIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiIwMDVhNjM4ODI4MTI1Y2UwZjU2ODA4ZTk0MTFjYjEzOTViMDIxMTZiMTU1ZjFkZmI2MGU4MDA5ZTZmNTRiNGFjIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6IjMxZjMzYjIxOGMzZGIzODdlNDg3YTdiYWJ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1OGE2NDllNzIyNmZkMGUxOWY2MTM0NjU4ODU5MGM0ZmUwNDMxMGVkNmJmY2E2ODY1MzAiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - } - } -} diff --git a/test/fixtures/v3/dnsdid.json b/test/fixtures/v3/dnsdid.json deleted file mode 100644 index 985928e..0000000 --- a/test/fixtures/v3/dnsdid.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": [ - "VerifiableCredential", - "DrivingLicenceCredential", - "OpenAttestationCredential" - ], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DID", - "value": "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - "revocation": { - "type": "NONE" - } - }, - "identityProof": { - "type": "DNS-DID", - "identifier": "example.tradetrust.io" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ] -} diff --git a/test/fixtures/v3/documentStore-invalid-issued.json b/test/fixtures/v3/documentStore-invalid-issued.json deleted file mode 100644 index 6328c42..0000000 --- a/test/fixtures/v3/documentStore-invalid-issued.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DOCUMENT_STORE", - "value": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" - }, - "identityProof": { - "type": "DNS-TXT", - "identifier": "notinuse.tradetrust.io" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "62d647b87b9be3653b644709d33536e1e31f2ff5bf25a33dc3ced1e5e313079f", - "proofs": [], - "merkleRoot": "62d647b87b9be3653b644709d33536e1e31f2ff5bf25a33dc3ced1e5e313079f", - "salts": "W3sidmFsdWUiOiJjZjg1ZjBkNTVhNTU3MjUwOWVhND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sInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJhMjQ4MDg3MTQxMGM3NWU4MWQ3ZmZmMWYyYmIyYzRiODBkZTc2OTU0NjUzNGNjMTVkOWE1MmZiYzM2N2UyN2EzIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6Ijg2YjBlNzA2YjJjMTA5YTQ3YWU4OTdhNzQyNmNmMTUyODMzMWZhYzYwY2MxYTdlYzMwNzhlMTlkMGU2N2YyNWYiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - } - } -} diff --git a/test/fixtures/v3/documentStore-issued.json b/test/fixtures/v3/documentStore-issued.json deleted file mode 100644 index 6475bbc..0000000 --- a/test/fixtures/v3/documentStore-issued.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DOCUMENT_STORE", - "value": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" - }, - "identityProof": { - "type": "DNS-TXT", - "identifier": "demo-tradetrust.openattestation.com" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "5ed3579c3fe686973ca50100b4be6751e012ea079ad7d01cde5faff9a59cc68e", - "proofs": [], - "merkleRoot": "5ed3579c3fe686973ca50100b4be6751e012ea079ad7d01cde5faff9a59cc68e", - "salts": "W3sidmFsdWUiOiJlZDA5Y2Q4NDYxNTgzNzRmZWExMjJlYmJjMjI5YTRiN2YzMjNiMTE4MDNlNmU2MzE3Y2U0MWQwY2YxYTJjYTgxIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiOThlMWJjN2I0ODVkNzMyZDUxYzI3NmZmZWNmZmRiYmY4OTYzZmM2NjkxYTBjNjAwNDU2ZjllMzRmYTNlNmU4OSIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiIyNGQ0NTFiM2MwOTM5MjFlNjFiOWE4OTcwNzJiMzQ3YjEwN2NhMWRmZDc5NDU4ZmY4YWY4N2NmODdkOTNkNDc2IiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6ImQzOWRiZWU5ZDMyMGVkYzZjMjA0YjNkZjE0ZGMzYmRmZGM5MWVhZjZlOGVhZmE3MDg1OWM0ZDlmZDcxMTU1ZGIiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiOTEyZGFiZGNlOWEzNmZmNGMwYzk3MTdhNzcwNDEwMDU2YzFhNDE4ODg3MTQ4NDZhODA1MmQwZTI1M2M4MDUyNSIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidmFsdWUiOiJmNWU1MjM4ZjYw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NDI1MGU5NjlmYjFjMDg0OTIyNjE1MmRiMzlhOWI3ODIwYiIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiMzhkNGY3NGQyNGVjNDkyM2U5OTBhMjM3ODI3MGIxNGMxMjNmNzcwYzM0N2EzZjNkNzQ3YjM1ZGU3NmM5NDYwZSIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiYTAzZmQ4YTMzNWFjYTc2ZDA2MzIwMWVmODkyYzk5ZjFhOTk3OTIzZjJlNzRjYzkxN2NmMGMxNWYwODg1MzI1NiIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJlZDIwYzkyNTM3MzRhOTIyYmQ5ZGVhMjlhMmNmNWIzZTU4OTZkZmFjODJhM2RhOGU1ZTA5MjdiNmY3NjE4NDBlIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6ImZhNjI5Mjc5OWI2ZWU2OWI1NjRjMWYxNGQ5ZDY5MTEwMjkxYWMxMzFkYjg5ZmYzNmQ4ODIzN2IyZDNlMTFiMDkiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - } - } -} diff --git a/test/fixtures/v3/documentStore-revoked.json b/test/fixtures/v3/documentStore-revoked.json deleted file mode 100644 index c395f31..0000000 --- a/test/fixtures/v3/documentStore-revoked.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DOCUMENT_STORE", - "value": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" - }, - "identityProof": { - "type": "DNS-TXT", - "identifier": "demo-tradetrust.openattestation.com" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "c04f10d1ce474c1495f018f6507b776b4876f37b292d50af859e8ac6f568fcb9", - "proofs": [], - "merkleRoot": "c04f10d1ce474c1495f018f6507b776b4876f37b292d50af859e8ac6f568fcb9", - "salts": "W3sidmFsdWUiOiI2NmViZDUxZTFiYTVjYzg2OWFjYmU5YmFiZWI5ZDk4MDViY2ExMWE5Mjg5YzU3YmJjZDk3YTFlNjc1ZjNhOGU2IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiOWFkZDE1NDM0ZmQ4ZjQ3MmU2OWZmMGY1ZWU0MzNjNDRmMjQ0NDVhNGFiYWMyOTUwM2Q3NGI3N2I0NzFmYmQyZiIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI1ZWJ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DJjNjgyMzJhNGRjNzA0Y2RiMWFhZGFmY2Y1YWViNjAiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - } - } -} diff --git a/test/fixtures/v3/documentStore-wrapped.json b/test/fixtures/v3/documentStore-wrapped.json deleted file mode 100644 index 91bf810..0000000 --- a/test/fixtures/v3/documentStore-wrapped.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DOCUMENT_STORE", - "value": "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD" - }, - "identityProof": { - "type": "DNS-TXT", - "identifier": "demo-tradetrust.openattestation.com" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "1547783535718aeb881131fe12df6983232a8091ab221b13115a16445120f52a", - "proofs": [], - "merkleRoot": "1547783535718aeb881131fe12df6983232a8091ab221b13115a16445120f52a", - "salts": "W3sidmFsdWUiOiI2MTIxNTlhYWIzZWVmODFlZWE2NmM1OWUxZjkyYzVhMTNhZGYxNzUzNDJkYjMxNjk5ZTcwYjIwY2JiMWVmZTljIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMTZhOTMzNzVkMzk1ZDA0YmI1ZDQ5MTE4MGJhZjVjNTYwMzFhMGQ4M2QyMWM3ZDAzNzNmY2ZiNWQxZWUyOGU2OCIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI2MTBjMjE2YjI2NDkzMDRjZjAwMTlhYzU1NTYzYjYzZjNjMWVjM2M0OGI2ODhiNTgzNWEzYTY2YzAzZTM3YmUwIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6ImE1YmJkZWM0YWExNDNkZTU2MDVkMmMwNDc5NzA1MzVjM2IwYWJlMDAyYjkyYTFlNTBlNWVkZjliYjRmMjM3MDEiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiNmQwZmI4YzBkYjA5N2VlMWVlZDllNzIxMmRkMWFlNjI1NTZiYjA4NzNiYTQ5MGYyZmM5M2I5Y2Q2Yzk2YjU0OCIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidmFsdWUiOiI5Mjg3ODUzMDhiMmYxMjcwYjJlOWYzYzU3NWJmYTJiODZmYzg0NDY3YTM2YjhhNDAyMjgyNjQ1ZTdhNzRjNTRjIiwicGF0aCI6InJlZmVyZW5jZSJ9LHsidmFsdWUiOiJiOTk3YzAzNmY5OGQ3YWVkNThkMjBhZTliZTU4NjRlNTZkNjgyMTFmZDAzZGZiMzA4NjcwMmVmZWRkYWI5MjZlIiwicGF0aCI6Im5hbWUifSx7InZhbHVlIjoiMDEyMGIzNWEwM2VmMzJmYzViYTA2M2F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LmlkZW50aWZpZXIifSx7InZhbHVlIjoiYTc5YWUxZDk0YTRlMzZlODc4ZTU3ZWJiY2ZkNjdmMTlhNWUxNmZkMjQ0MDNkMzJkNDYwMzZjNmRhYWM0MTg0ZCIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJmMDdmYjczMzNmMmMzZjEwMDRlYWQxZDcyZTA1MzAyMmI5NmNmM2M3MTM0ZGI2ZDIxMWMxY2IxMWM2MjViMTUzIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6ImMzZGJjMTU1ZmRjNmYyYjRiMTM5ZmNmYWZlODM5MzljNTlhNzFhNDJhODcyOTc5ZWJmYTQzNjVlNDQ5OGYyZjUiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - } - } -} diff --git a/test/fixtures/v3/documentStore.json b/test/fixtures/v3/documentStore.json deleted file mode 100644 index 3451c48..0000000 --- a/test/fixtures/v3/documentStore.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": [ - "VerifiableCredential", - "DrivingLicenceCredential", - "OpenAttestationCredential" - ], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "DOCUMENT_STORE", - "value": "0x8bA63EAB43342AAc3AdBB4B827b68Cf4aAE5Caca" - }, - "identityProof": { - "type": "DNS-TXT", - "identifier": "example.tradetrust.io" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ] -} diff --git a/test/fixtures/v3/documents.ts b/test/fixtures/v3/documents.ts deleted file mode 100644 index 3210503..0000000 --- a/test/fixtures/v3/documents.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { v3 } from "@tradetrust-tt/tradetrust"; - -export const baseDnsDidDocument: v3.OpenAttestationDocument = { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json", - ], - reference: "SERIAL_NUMBER_123", - name: "Republic of Singapore Driving Licence", - issuanceDate: "2010-01-01T19:23:24Z", - validFrom: "2010-01-01T19:23:24Z", - issuer: { - id: "https://example.com", - name: "DEMO STORE", - }, - type: ["VerifiableCredential", "DrivingLicenceCredential"], - credentialSubject: { - id: "did:example:SERIAL_NUMBER_123", - class: [ - { - type: "3", - effectiveDate: "2010-01-01T19:23:24Z", - }, - { - type: "3A", - effectiveDate: "2010-01-01T19:23:24Z", - }, - ], - }, - openAttestationMetadata: { - template: { - name: "CUSTOM_TEMPLATE", - type: v3.TemplateType.EmbeddedRenderer, - url: "https://localhost:3000/renderer", - }, - proof: { - type: v3.ProofType.OpenAttestationProofMethod, - method: v3.Method.Did, - value: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - revocation: { - type: v3.RevocationType.None, - }, - }, - identityProof: { - type: v3.IdentityProofType.DNSDid, - identifier: "example.tradetrust.io", - }, - }, - attachments: [ - { - fileName: "sample.pdf", - mimeType: "application/pdf", - data: "BASE64_ENCODED_FILE", - }, - ], -}; - -export const baseDidDocument: v3.OpenAttestationDocument = { - ...baseDnsDidDocument, - openAttestationMetadata: { - ...baseDnsDidDocument.openAttestationMetadata, - identityProof: { - type: v3.IdentityProofType.Did, - identifier: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", - }, - }, -}; - -export const baseDocumentStoreDocument: v3.OpenAttestationDocument = { - ...baseDnsDidDocument, - openAttestationMetadata: { - ...baseDnsDidDocument.openAttestationMetadata, - proof: { - type: v3.ProofType.OpenAttestationProofMethod, - method: v3.Method.DocumentStore, - value: "0x8bA63EAB43342AAc3AdBB4B827b68Cf4aAE5Caca", - }, - identityProof: { - type: v3.IdentityProofType.DNSTxt, - identifier: "example.tradetrust.io", - }, - }, -}; - -export const baseTokenRegistryDocument: v3.OpenAttestationDocument = { - ...baseDnsDidDocument, - openAttestationMetadata: { - ...baseDnsDidDocument.openAttestationMetadata, - proof: { - type: v3.ProofType.OpenAttestationProofMethod, - method: v3.Method.TokenRegistry, - value: "0x13249BA1Ec6B957Eb35D34D7b9fE5D91dF225B5B", - }, - identityProof: { - type: v3.IdentityProofType.DNSTxt, - identifier: "example.tradetrust.io", - }, - }, -}; diff --git a/test/fixtures/v3/tokenRegistry-invalid-issued.json b/test/fixtures/v3/tokenRegistry-invalid-issued.json deleted file mode 100644 index 01c7480..0000000 --- a/test/fixtures/v3/tokenRegistry-invalid-issued.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "TOKEN_REGISTRY", - "value": "0x921dC7cEF00155ac3A33f04DA7395324d7809757" - }, - "identityProof": { - "type": "DNS-TXT", - "identifier": "notinuse.tradetrust.io" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "edfc79a4234884b58f3e4fcceedce6ad080da3b819562cce05564dfe5c830d93", - "proofs": [], - "merkleRoot": "edfc79a4234884b58f3e4fcceedce6ad080da3b819562cce05564dfe5c830d93", - "salts": "W3sidmFsdWUiOiI2N2ZjYjY0MjdhZjNmYTY3YmNiZDU1MzA0ZmQ2OTI2OGZmODhhZDY1Mjk2ODMzM2I0NDczYTY1YjA3YzAzZjRkIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiNmIxNDBiYmQwMTk2Y2Q3YTJjMzg0NGI0M2UwNTQ1ZGIwMmE0MDE2ZjI0MmQyZTQxYzY0N2Y2MzUzNDk4YmM1YiIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiJkOTliMDA2NWQ3MDBmZGQ0NzFmNWUzNGY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GE0OTQ1Mjg3YzkyNzdmNjExYjc5MTYiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - } - } -} diff --git a/test/fixtures/v3/tokenRegistry-issued.json b/test/fixtures/v3/tokenRegistry-issued.json deleted file mode 100644 index 9257a6d..0000000 --- a/test/fixtures/v3/tokenRegistry-issued.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "TOKEN_REGISTRY", - "value": "0x921dC7cEF00155ac3A33f04DA7395324d7809757" - }, - "identityProof": { - "type": "DNS-TXT", - "identifier": "demo-tradetrust.openattestation.com" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "a00f351a0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R0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiMjkwOWM5MGNkMzJhZDBmNmRiMDAzNTEwMWNjYTY1MDgxYTVlYzJmMTQyODY3Y2Q2YWQyMzQwODliOTA5NzlmZCIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJlZWEyNDMxODliM2YyZDYxNjIyYWM2ZDQ4NjcyNDg0ODg5YzcwYWI0MjMxMDFkZjFjYWNmZTk2ZmRhZDAzMjA0IiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6IjliZTZmZTY4ZTQ0MzUwNDMwZWIxMDhmZTM3NTE4NGQzMmQzM2I4OWM5YjM4YmUxMzhmYmQwMmMyM2RhMTVmNjAiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - } - } -} diff --git a/test/fixtures/v3/tokenRegistry-wrapped.json b/test/fixtures/v3/tokenRegistry-wrapped.json deleted file mode 100644 index ad787cf..0000000 --- a/test/fixtures/v3/tokenRegistry-wrapped.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "version": "https://schema.openattestation.com/3.0/schema.json", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "TOKEN_REGISTRY", - "value": "0x921dC7cEF00155ac3A33f04DA7395324d7809757" - }, - "identityProof": { - "type": "DNS-TXT", - "identifier": "demo-tradetrust.openattestation.com" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "89286ff7f7526fc46a2b7e4302e6e0953501685ab7a5db07224625ba46b74bcd", - "proofs": [], - "merkleRoot": "89286ff7f7526fc46a2b7e4302e6e0953501685ab7a5db07224625ba46b74bcd", - "salts": "W3sidmFsdWUiOiI2MDZlYzQ4ZDk1ODdlMzVkMDI3MjQ4YmI4YjU5M2YyZTQyODI0NzZiODNhNzgxMzA3OTFmOGVmZDYzYWM2Zjg1IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiZDUwMWYzMjM0NDhlMjA4ZTc3N2QzMDFhODIyYzQ1MWQzNTkzNDViN2RhNTkyMjhhM2VhYWM0N2JjZDk4YjUwMSIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiJiOWI1YzUzMDA3ODc4OGEwYjdmNmJjMTQzOTY4MjEzOTYzMzM5MWVhYmYxMGRmNWZmNjNkNDI4NTQ4ZGQ2ZGNkIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6IjI5ZTZiMTQ5MDY0OTZiOTUxZmU4YTkxODJiMmFjODdmNjgzOWMwZDk0YTZlODUzNzliYzQ1N2IzMzYyNmMyNWYiLCJwYXRoIjoiQGNvbnRle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1ZjFhZGMzZjdiN2FjNWI2OTkxMWRmZGJmNjVjMmEzMWY1OWFlMGNhNDEiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEucHJvb2YudmFsdWUifSx7InZhbHVlIjoiMjY0MWZlOTlkZDMwZTVmMGI0OWY3YjQ5ZWFhZmZkNTExZTk4ZjM1MWE2MGJkYjAyYTRkNjU4Y2I4MThlYTkwMiIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiNDBlYjNkNjIxMmIxNzI1YmI3ZmVhM2VlYzBkNjc5M2FkYmJlZTNkNjJiMGQyMmNlZjk4ZjA2NWZhMTM5NTA1NyIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifSx7InZhbHVlIjoiNzM4OTY1MjRiZDFlOGY3M2FlMWVkMGVjM2E0OWIwODA2OTE1ODQ3MWMyNmQ1YjY1MDNkMzNhZGIzNGNjM2ViMyIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiI3OTM1ZmFjNGFiMzRjMjczMjU2NWM1ZTUxZTY1MThkM2Y2MzY4NWNhMjgxMmQzYTYxNDYzZGJkODA0ZDU0ODEwIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6ImRhYTVlM2JjZDFmYTUyMzBkOTIxYzViNjYxYzUxODk4MGNhOTM1OTk5ZmE0ZGYzNmI3OTg2ZGVmY2RhMjhlOWIiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==", - "privacy": { - "obfuscated": [] - } - } -} diff --git a/test/fixtures/v3/tokenRegistry.json b/test/fixtures/v3/tokenRegistry.json deleted file mode 100644 index 793196a..0000000 --- a/test/fixtures/v3/tokenRegistry.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json", - "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json", - "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json" - ], - "reference": "SERIAL_NUMBER_123", - "name": "Republic of Singapore Driving Licence", - "issuanceDate": "2010-01-01T19:23:24Z", - "validFrom": "2010-01-01T19:23:24Z", - "issuer": { - "id": "https://example.com", - "type": "OpenAttestationIssuer", - "name": "DEMO STORE" - }, - "type": ["VerifiableCredential", "DrivingLicenceCredential", "OpenAttestationCredential"], - "credentialSubject": { - "id": "did:example:SERIAL_NUMBER_123", - "class": [ - { - "type": "3", - "effectiveDate": "2010-01-01T19:23:24Z" - }, - { - "type": "3A", - "effectiveDate": "2010-01-01T19:23:24Z" - } - ] - }, - "openAttestationMetadata": { - "template": { - "name": "CUSTOM_TEMPLATE", - "type": "EMBEDDED_RENDERER", - "url": "https://localhost:3000/renderer" - }, - "proof": { - "type": "OpenAttestationProofMethod", - "method": "TOKEN_REGISTRY", - "value": "0x13249BA1Ec6B957Eb35D34D7b9fE5D91dF225B5B" - }, - "identityProof": { - "type": "DNS-TXT", - "identifier": "example.tradetrust.io" - } - }, - "attachments": [ - { - "fileName": "sample.pdf", - "mimeType": "application/pdf", - "data": "BASE64_ENCODED_FILE" - } - ] -} diff --git a/test/prep/setup-contracts.mjs b/test/prep/setup-contracts.mjs index e88a639..574e196 100644 --- a/test/prep/setup-contracts.mjs +++ b/test/prep/setup-contracts.mjs @@ -1,14 +1,14 @@ import shell from 'shelljs' const TT_CLI_PATH = 'tradetrust' -const ACCOUNT = '0xe0A71284EF59483795053266CB796B65E48B5124' +const ACCOUNT_ADDRESS = '0xe0A71284EF59483795053266CB796B65E48B5124' const ACCOUNT_KEY = '0xe82294532bcfcd8e0763ee5cef194f36f00396be59b94fb418f5f8d83140d9a7' // account used to test dns did documents -const ACCOUNT_DNS_DID = '0x391aFf3942857a10958425FebF1fC1938D9F5AE7' -const ACCOUNT_KEY_DNS_DID = - '0x3760fb287bee810607433485cfa3fc665c2d682a1816991dccce645b096ae19a' +// const ACCOUNT_DNS_DID_ADDRESS = '0x391aFf3942857a10958425FebF1fC1938D9F5AE7' +// const ACCOUNT_DNS_DID_KEY = +;('0x3760fb287bee810607433485cfa3fc665c2d682a1816991dccce645b096ae19a') const TOKEN_REGISTRY_ADDRESS = '0x9Eb613a88534E2939518f4ffBFE65F5969b491FF' const DOCUMENT_STORE_ADDRESS = '0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953' const TITLE_ESCROW_FACTORY_ADDRESS = @@ -18,18 +18,31 @@ const TITLE_ESCROW_FACTORY_ADDRESS = // const ISSUER_DNS = 'minhtetoo.lol' const issuedMerkleRootVerifiableDocs = [ + // v2 documents '0x56a72ab0a30bef3d6fb767d16f66a854a21624739a773b590a2381d68eea9468', // issued correctly '0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df', // revoked '0xba891dc3da5db9155ec370bb80f17b8fbe115893feb4337a3e321fd2300ea9b0', // invalid dns '0x1249f84c06bddebc947022569b77f6b30cdc9bff53fda9700ef2a8cc30e7dcc5', // incorrect document store + + // v3 documents + '660e07e2defb55f04d6715448ac4f9c5718c8115c50ebd8931be15ed61ae8580', // issued correctly + 'eeef582def4ebea8fad684c33f67194f3a922692a3d9b96ca9d90150adf7259c', // revoked + '3ef17c1a3b5a05395340c7ba30c41fc1a73f3091585fade6401a42eb684944a8', // invalid dns + 'f039e1328ad4a21e7d58d6dab1caea228238bee71080b1364bb6f1097c39b407', // incorrect document store ] -const mintedMerkleRoot = [ +const mintedMerkleRootTransferrableRecord = [ + // v2 documents '0x8b59f2f2792f802e15c7ecfc44eb4e5a8da3ce830c1c53faaafbab9de5812bdb', // issued correctly + '26a31b2d50a79a6e7966227714bc1e7e2fd31f6bfdf5ac8066a3b9c01046c35b', // incorrect dns + '0x82de42fe0d4dc965546a08f0555a33d66f25192f8121dab54b0a8d213a984a81', //incorrect token reg + + // v3 documents ] const revokedMerkleRoot = [ - '0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df', + '0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df', // v3 record + 'eeef582def4ebea8fad684c33f67194f3a922692a3d9b96ca9d90150adf7259c', //v3 record ] console.log('\n## Deploying Token Registry ##\n') shell.exec( @@ -60,8 +73,8 @@ revokedMerkleRoot.forEach((ele) => { }) console.log('\n## Minting Documents on Token Registry ##\n') -mintedMerkleRoot.forEach((ele) => { +mintedMerkleRootTransferrableRecord.forEach((ele) => { shell.exec( - `${TT_CLI_PATH} token-registry mint --address ${TOKEN_REGISTRY_ADDRESS} --tokenId ${ele} --beneficiary ${ACCOUNT} --holder ${ACCOUNT} --network local --k ${ACCOUNT_KEY}` + `${TT_CLI_PATH} token-registry mint --address ${TOKEN_REGISTRY_ADDRESS} --tokenId ${ele} --beneficiary ${ACCOUNT_ADDRESS} --holder ${ACCOUNT_ADDRESS} --network local --k ${ACCOUNT_KEY}` ) }) From 49fdd76fc694cde014d500c9ee17087d3bc60961 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Wed, 21 Feb 2024 14:38:05 +0800 Subject: [PATCH 27/34] test: verify dns-txt-token-reg for v3 documents add test to verify on token registry with dns-txt for v3 documents change type hints for fixtures for v3 documents --- .eslintignore | 4 +- .eslintrc.json | 2 +- index.ts | 27 -- src/index.ts | 1 - ...y.v2.dns-txt-doc-store.integration.test.ts | 83 ---- .../verify.v2.dns-did.integration.test.ts | 12 +- ...y.v2.dns-txt-token-reg.integration.test.ts | 88 ---- .../verify.v3.dns-did.integration.test.ts | 2 - ...y.v3.dns-txt-doc-store.integration.test.ts | 2 - ...y.v3.dns-txt-token-reg.integration.test.ts | 454 ++++++++++++++++++ test/fixtures/v2/dns-did.ts | 18 +- test/fixtures/v3/dns-did.ts | 20 +- test/fixtures/v3/dns-txt-doc-store.ts | 259 +++++----- test/fixtures/v3/dns-txt-token-reg.ts | 331 +++++++++++++ test/prep/setup-contracts.mjs | 10 +- 15 files changed, 961 insertions(+), 352 deletions(-) create mode 100644 src/verify/verify.v3.dns-txt-token-reg.integration.test.ts create mode 100644 test/fixtures/v3/dns-txt-token-reg.ts diff --git a/.eslintignore b/.eslintignore index 6bfead1..40f6e36 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,5 @@ node_modules dist -**/__snapshots__/ \ No newline at end of file +**/__snapshots__/ +# **/*.test.ts +# **/*.test.js \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 1df2b56..bc25ac5 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -14,6 +14,6 @@ "rules": { "@typescript-eslint/no-unused-vars": "error", "no-duplicate-imports": "error", - "typescript-eslint/no-explicit-any": "warn" + "@typescript-eslint/no-explicit-any": "warn" } } diff --git a/index.ts b/index.ts index 6e5d4f2..e69de29 100644 --- a/index.ts +++ b/index.ts @@ -1,27 +0,0 @@ -import { ethers } from 'ethers' -import { verify } from './src/verify' -import { dnsTxtDocStore } from './test/fixtures/v2/dns-txt-doc-store' -import util from 'util' -// verify(documentGoerliValidWithToken, { network: 'goerli' }).then((err) => -// console.log(err) -// ) - -// const goerliVerifier = verificationBuilder({ network: 'goerli' }) -// goerliVerifier(documentGoerliValidWithToken).then((val) => { -// console.log({ val }) -// }) - -const localProvider = new ethers.providers.JsonRpcProvider( - 'http://127.0.0.1:8545' -) - -verify(dnsTxtDocStore, { provider: localProvider }).then((val) => { - console.log( - util.inspect(val, { - showHidden: false, - depth: null, - colors: true, - }) - ) - // console.log(val) -}) diff --git a/src/index.ts b/src/index.ts index 7e062e6..14045e4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1 @@ -export * from './greet' export * from './verify' diff --git a/src/verify/verfiy.v2.dns-txt-doc-store.integration.test.ts b/src/verify/verfiy.v2.dns-txt-doc-store.integration.test.ts index 992cf39..68b6dbd 100644 --- a/src/verify/verfiy.v2.dns-txt-doc-store.integration.test.ts +++ b/src/verify/verfiy.v2.dns-txt-doc-store.integration.test.ts @@ -1,4 +1,3 @@ -// @ts-nocheck import { dnsTxtDocStore, dnsTxtDocStoreTampered, @@ -10,7 +9,6 @@ import { import { describe, it, expect } from 'vitest' import { verify, isValid } from '.' import { ethers } from 'ethers' -// import util from 'util' const localProvider = new ethers.providers.JsonRpcProvider( 'http://127.0.0.1:8545' @@ -619,85 +617,4 @@ describe('verify(integration) dns-txt with document store', () => { expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) expect(isValid(fragments)).toStrictEqual(true) }) - it('should return in-valid fragments for empty document', async () => { - const fragments = await verify({}, { provider: localProvider }) - expect(fragments).toMatchInlineSnapshot(` - [ - { - "name": "OpenAttestationHash", - "reason": { - "code": 2, - "codeString": "SKIPPED", - "message": "Document does not have merkle root, target hash or data.", - }, - "status": "SKIPPED", - "type": "DOCUMENT_INTEGRITY", - }, - { - "name": "OpenAttestationEthereumTokenRegistryStatus", - "reason": { - "code": 4, - "codeString": "SKIPPED", - "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "name": "OpenAttestationEthereumDocumentStoreStatus", - "reason": { - "code": 4, - "codeString": "SKIPPED", - "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "name": "OpenAttestationDidSignedDocumentStatus", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not signed by DID directly", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "name": "OpenAttestationDnsTxtIdentityProof", - "reason": { - "code": 2, - "codeString": "SKIPPED", - "message": "Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDnsDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not issued using DNS-DID", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document is not using DID as top level identifier or has not been wrapped", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, - ] - `) - expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(false) - expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) - expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) - expect(isValid(fragments)).toStrictEqual(false) - }) }) diff --git a/src/verify/verify.v2.dns-did.integration.test.ts b/src/verify/verify.v2.dns-did.integration.test.ts index d18c99e..4bd408c 100644 --- a/src/verify/verify.v2.dns-did.integration.test.ts +++ b/src/verify/verify.v2.dns-did.integration.test.ts @@ -1,4 +1,3 @@ -// @ts-nocheck import { dnsDidSignedAndTampered, dnsDidUnSigned, @@ -7,7 +6,7 @@ import { import { describe, it, expect } from 'vitest' import { isValid, verify } from '.' import { ethers } from 'ethers' -import util from 'util' +import { v3 } from '@tradetrust-tt/tradetrust' const localProvider = new ethers.providers.JsonRpcProvider( 'http://127.0.0.1:8545' @@ -285,12 +284,9 @@ describe('verify(integration) dns-txt with dns:did', () => { expect(isValid(fragments)).toStrictEqual(false) }) it('should return in-valid fragments for empty document', async () => { - const fragments = await verify( - {}, - { - provider: localProvider, - } - ) + const fragments = await verify({} as v3.WrappedDocument, { + provider: localProvider, + }) expect(fragments).toMatchInlineSnapshot(` [ { diff --git a/src/verify/verify.v2.dns-txt-token-reg.integration.test.ts b/src/verify/verify.v2.dns-txt-token-reg.integration.test.ts index 37a8e5e..af26793 100644 --- a/src/verify/verify.v2.dns-txt-token-reg.integration.test.ts +++ b/src/verify/verify.v2.dns-txt-token-reg.integration.test.ts @@ -1,4 +1,3 @@ -// @ts-nocheck import { dnsTxtTokenRegMinted, dnsTxttokenRegNotMinted, @@ -9,7 +8,6 @@ import { import { describe, it, expect } from 'vitest' import { verify, isValid } from '.' import { ethers } from 'ethers' -import util from 'util' const localProvider = new ethers.providers.JsonRpcProvider( 'http://127.0.0.1:8545' @@ -488,90 +486,4 @@ describe('verify(integration) dns-txt with token-registry', () => { expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) expect(isValid(fragments)).toStrictEqual(false) }) - it('should return in-valid fragments for empty document', async () => { - const fragments = await verify( - {}, - { - provider: localProvider, - } - ) - expect(fragments).toMatchInlineSnapshot(` - [ - { - "name": "OpenAttestationHash", - "reason": { - "code": 2, - "codeString": "SKIPPED", - "message": "Document does not have merkle root, target hash or data.", - }, - "status": "SKIPPED", - "type": "DOCUMENT_INTEGRITY", - }, - { - "name": "OpenAttestationEthereumTokenRegistryStatus", - "reason": { - "code": 4, - "codeString": "SKIPPED", - "message": "Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "name": "OpenAttestationEthereumDocumentStoreStatus", - "reason": { - "code": 4, - "codeString": "SKIPPED", - "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "name": "OpenAttestationDidSignedDocumentStatus", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not signed by DID directly", - }, - "status": "SKIPPED", - "type": "DOCUMENT_STATUS", - }, - { - "name": "OpenAttestationDnsTxtIdentityProof", - "reason": { - "code": 2, - "codeString": "SKIPPED", - "message": "Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDnsDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document was not issued using DNS-DID", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, - { - "name": "OpenAttestationDidIdentityProof", - "reason": { - "code": 0, - "codeString": "SKIPPED", - "message": "Document is not using DID as top level identifier or has not been wrapped", - }, - "status": "SKIPPED", - "type": "ISSUER_IDENTITY", - }, - ] - `) - expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(false) - expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) - expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) - expect(isValid(fragments)).toStrictEqual(false) - }) }) diff --git a/src/verify/verify.v3.dns-did.integration.test.ts b/src/verify/verify.v3.dns-did.integration.test.ts index 33fb14f..33332ac 100644 --- a/src/verify/verify.v3.dns-did.integration.test.ts +++ b/src/verify/verify.v3.dns-did.integration.test.ts @@ -1,4 +1,3 @@ -// @ts-nocheck import { dnsDidSignedAndTampered, dnsDidUnSigned, @@ -7,7 +6,6 @@ import { import { describe, it, expect } from 'vitest' import { isValid, verify } from '.' import { ethers } from 'ethers' -import util from 'util' const localProvider = new ethers.providers.JsonRpcProvider( 'http://127.0.0.1:8545' diff --git a/src/verify/verify.v3.dns-txt-doc-store.integration.test.ts b/src/verify/verify.v3.dns-txt-doc-store.integration.test.ts index f127b93..69cbdf1 100644 --- a/src/verify/verify.v3.dns-txt-doc-store.integration.test.ts +++ b/src/verify/verify.v3.dns-txt-doc-store.integration.test.ts @@ -1,4 +1,3 @@ -// @ts-nocheck import { dnsTxtDocStore, dnsTxtDocStoreTampered, @@ -10,7 +9,6 @@ import { import { describe, it, expect } from 'vitest' import { verify, isValid } from '.' import { ethers } from 'ethers' -// import util from 'util' const localProvider = new ethers.providers.JsonRpcProvider( 'http://127.0.0.1:8545' diff --git a/src/verify/verify.v3.dns-txt-token-reg.integration.test.ts b/src/verify/verify.v3.dns-txt-token-reg.integration.test.ts new file mode 100644 index 0000000..a0bf838 --- /dev/null +++ b/src/verify/verify.v3.dns-txt-token-reg.integration.test.ts @@ -0,0 +1,454 @@ +import { + dnsTxtTokenRegMinted, + dnsTxttokenRegNotMinted, + dnsTxtTokenRegTampered, + dnsTxtTokenRegIncorrectDNS, + dnsTxtTokenRegIncorrectTokenReg, +} from '../../test/fixtures/v3/dns-txt-token-reg' +import { describe, it, expect } from 'vitest' +import { verify, isValid } from '.' +import { ethers } from 'ethers' + +const localProvider = new ethers.providers.JsonRpcProvider( + 'http://127.0.0.1:8545' +) + +describe('verify(integration) dns-txt with token-registry', () => { + it('should return valid fragments for document issued correctly with DNS-TXT on the token registry', async () => { + const fragments = await verify(dnsTxtTokenRegMinted, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "data": { + "details": { + "address": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + "minted": true, + }, + "mintedOnAll": true, + }, + "name": "OpenAttestationEthereumTokenRegistryStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "identifier": "example.tradetrust.io", + "value": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + }, + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(true) + }) + it('should return in-valid fragments for document, but not minted on the token registry', async () => { + const fragments = await verify(dnsTxttokenRegNotMinted, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "data": { + "details": { + "address": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + "minted": false, + "reason": { + "code": 1, + "codeString": "DOCUMENT_NOT_MINTED", + "message": "Document has not been issued under token registry", + }, + }, + "mintedOnAll": false, + }, + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 1, + "codeString": "DOCUMENT_NOT_MINTED", + "message": "Document has not been issued under token registry", + }, + "status": "INVALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "identifier": "example.tradetrust.io", + "value": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + }, + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(false) + }) + it('should return in-valid fragments for tampered document with DNS-TXT', async () => { + const fragments = await verify(dnsTxtTokenRegTampered, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": false, + "name": "OpenAttestationHash", + "reason": { + "code": 0, + "codeString": "DOCUMENT_TAMPERED", + "message": "Document has been tampered with", + }, + "status": "INVALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "data": { + "details": { + "address": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + "minted": true, + }, + "mintedOnAll": true, + }, + "name": "OpenAttestationEthereumTokenRegistryStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "identifier": "example.tradetrust.io", + "value": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + }, + "name": "OpenAttestationDnsTxtIdentityProof", + "status": "VALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(true) + expect(isValid(fragments)).toStrictEqual(false) + }) + + it('should return in-valid fragments for document successfully minted with DNS-TXT, but the issuer dns identity is not valid', async () => { + const fragments = await verify(dnsTxtTokenRegIncorrectDNS, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "data": { + "details": { + "address": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + "minted": true, + }, + "mintedOnAll": true, + }, + "name": "OpenAttestationEthereumTokenRegistryStatus", + "status": "VALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "identifier": "example123.tradetrust.io", + "value": "0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + }, + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x9Eb613a88534E2939518f4ffBFE65F5969b491FF", + }, + "status": "INVALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(true) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) + expect(isValid(fragments)).toStrictEqual(false) + }) + + it('should return in-valid fragments for document successfully minted with DNS-TXT, but the token registry is not correct', async () => { + const fragments = await verify(dnsTxtTokenRegIncorrectTokenReg, { + provider: localProvider, + }) + expect(fragments).toMatchInlineSnapshot(` + [ + { + "data": true, + "name": "OpenAttestationHash", + "status": "VALID", + "type": "DOCUMENT_INTEGRITY", + }, + { + "data": { + "details": { + "address": "0x88b613a88534E2939518f4ffBFE65F5969b491FF", + "minted": false, + "reason": { + "code": 1, + "codeString": "DOCUMENT_NOT_MINTED", + "message": "Invalid contract arguments", + }, + }, + "mintedOnAll": false, + }, + "name": "OpenAttestationEthereumTokenRegistryStatus", + "reason": { + "code": 1, + "codeString": "DOCUMENT_NOT_MINTED", + "message": "Invalid contract arguments", + }, + "status": "INVALID", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationEthereumDocumentStoreStatus", + "reason": { + "code": 4, + "codeString": "SKIPPED", + "message": "Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "name": "OpenAttestationDidSignedDocumentStatus", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not signed by DID directly", + }, + "status": "SKIPPED", + "type": "DOCUMENT_STATUS", + }, + { + "data": { + "identifier": "example.tradetrust.io", + "value": "0x88b613a88534E2939518f4ffBFE65F5969b491FF", + }, + "name": "OpenAttestationDnsTxtIdentityProof", + "reason": { + "code": 4, + "codeString": "MATCHING_RECORD_NOT_FOUND", + "message": "Matching DNS record not found for 0x88b613a88534E2939518f4ffBFE65F5969b491FF", + }, + "status": "INVALID", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDnsDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document was not issued using DNS-DID", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + { + "name": "OpenAttestationDidIdentityProof", + "reason": { + "code": 0, + "codeString": "SKIPPED", + "message": "Document is not using DID as top level identifier or has not been wrapped", + }, + "status": "SKIPPED", + "type": "ISSUER_IDENTITY", + }, + ] + `) + expect(isValid(fragments, ['DOCUMENT_INTEGRITY'])).toStrictEqual(true) + expect(isValid(fragments, ['DOCUMENT_STATUS'])).toStrictEqual(false) + expect(isValid(fragments, ['ISSUER_IDENTITY'])).toStrictEqual(false) + expect(isValid(fragments)).toStrictEqual(false) + }) +}) diff --git a/test/fixtures/v2/dns-did.ts b/test/fixtures/v2/dns-did.ts index 06cd15a..71b5000 100644 --- a/test/fixtures/v2/dns-did.ts +++ b/test/fixtures/v2/dns-did.ts @@ -1,4 +1,10 @@ -import { SchemaId, WrappedDocument, v2 } from '@tradetrust-tt/tradetrust' +import { + SchemaId, + SignedWrappedDocument, + WrappedDocument, + v2, +} from '@tradetrust-tt/tradetrust' +import { RevocationType } from '@tradetrust-tt/tradetrust/dist/types/__generated__/schema.2.0' interface CustomDocument extends v2.OpenAttestationDocument { recipient: { @@ -6,7 +12,7 @@ interface CustomDocument extends v2.OpenAttestationDocument { } } -export const dnsDidSigned: WrappedDocument = { +export const dnsDidSigned: SignedWrappedDocument = { version: SchemaId.v2, data: { recipient: { @@ -22,7 +28,7 @@ export const dnsDidSigned: WrappedDocument = { id: '41393850-42d7-4555-be18-c422c25faccb:string:did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7', name: 'd21dd4c4-493a-44ac-ba6c-4ccca772d0cc:string:Demo Issuer', revocation: { - type: '79404e49-d587-4438-b6a2-b799cc306e3b:string:NONE', + type: '79404e49-d587-4438-b6a2-b799cc306e3b:string:NONE' as v2.RevocationType, }, identityProof: { type: 'abbb99fa-98cb-42d0-bc3f-4500623146ad:string:DNS-DID', @@ -69,7 +75,7 @@ export const dnsDidUnSigned: WrappedDocument = { id: '41393850-42d7-4555-be18-c422c25faccb:string:did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7', name: 'd21dd4c4-493a-44ac-ba6c-4ccca772d0cc:string:Demo Issuer', revocation: { - type: '79404e49-d587-4438-b6a2-b799cc306e3b:string:NONE', + type: '79404e49-d587-4438-b6a2-b799cc306e3b:string:NONE' as RevocationType, }, identityProof: { type: 'abbb99fa-98cb-42d0-bc3f-4500623146ad:string:DNS-DID', @@ -90,7 +96,7 @@ export const dnsDidUnSigned: WrappedDocument = { }, } -export const dnsDidSignedAndTampered: WrappedDocument = { +export const dnsDidSignedAndTampered: SignedWrappedDocument = { version: SchemaId.v2, data: { recipient: { @@ -106,7 +112,7 @@ export const dnsDidSignedAndTampered: WrappedDocument = { id: '41393850-42d7-4555-be18-c422c25faccb:string:did:ethr:0x391aFf3942857a10958425FebF1fC1938D9F5AE7', name: 'd21dd4c4-493a-44ac-ba6c-4ccca772d0cc:string:Demo Issuer', revocation: { - type: '79404e49-d587-4438-b6a2-b799cc306e3b:string:NONE', + type: '79404e49-d587-4438-b6a2-b799cc306e3b:string:NONE' as v2.RevocationType, }, identityProof: { type: 'abbb99fa-98cb-42d0-bc3f-4500623146ad:string:DNS-DID', diff --git a/test/fixtures/v3/dns-did.ts b/test/fixtures/v3/dns-did.ts index 951e2e4..3757918 100644 --- a/test/fixtures/v3/dns-did.ts +++ b/test/fixtures/v3/dns-did.ts @@ -1,12 +1,6 @@ -import { SchemaId, WrappedDocument, v2 } from '@tradetrust-tt/tradetrust' +import { SchemaId, v3 } from '@tradetrust-tt/tradetrust' -interface CustomDocument extends v2.OpenAttestationDocument { - recipient: { - name: string - } -} - -export const dnsDidSigned: WrappedDocument = { +export const dnsDidSigned = { version: SchemaId.v3, '@context': [ 'https://www.w3.org/2018/credentials/v1', @@ -76,8 +70,8 @@ export const dnsDidSigned: WrappedDocument = { signature: '0x7d43a79c4dc1da3300457883bd2d5e3f181f1a19742984cfb0b191412793984f3fa83d9f5d3a800b4bd9403a0c35f87415da0d19daa23f3b2d05b8f425085f821c', }, -} -export const dnsDidUnSigned: WrappedDocument = { +} as v3.WrappedDocument +export const dnsDidUnSigned = { version: SchemaId.v3, '@context': [ 'https://www.w3.org/2018/credentials/v1', @@ -144,9 +138,9 @@ export const dnsDidUnSigned: WrappedDocument = { obfuscated: [], }, }, -} +} as v3.WrappedDocument -export const dnsDidSignedAndTampered: WrappedDocument = { +export const dnsDidSignedAndTampered = { version: SchemaId.v3, '@context': [ 'https://www.w3.org/2018/credentials/v1', @@ -216,4 +210,4 @@ export const dnsDidSignedAndTampered: WrappedDocument = { signature: '0x7d43a79c4dc1da3300457883bd2d5e3f181f1a19742984cfb0b191412793984f3fa83d9f5d3a800b4bd9403a0c35f87415da0d19daa23f3b2d05b8f425085f821c', }, -} +} as v3.WrappedDocument diff --git a/test/fixtures/v3/dns-txt-doc-store.ts b/test/fixtures/v3/dns-txt-doc-store.ts index 8b30384..6c27252 100644 --- a/test/fixtures/v3/dns-txt-doc-store.ts +++ b/test/fixtures/v3/dns-txt-doc-store.ts @@ -1,14 +1,6 @@ -import { SchemaId, WrappedDocument, v2 } from '@tradetrust-tt/tradetrust' +import { SchemaId, v3 } from '@tradetrust-tt/tradetrust' -interface CustomDocument extends v2.OpenAttestationDocument { - recipient: { - name: string - } -} - -interface CustomDocumentObfuscated extends v2.OpenAttestationDocument {} - -export const dnsTxtDocStore: WrappedDocument = { +export const dnsTxtDocStore = { version: SchemaId.v3, '@context': [ 'https://www.w3.org/2018/credentials/v1', @@ -79,9 +71,9 @@ export const dnsTxtDocStore: WrappedDocument = { obfuscated: [], }, }, -} +} as v3.WrappedDocument -export const dnsTxtDocStoreTampered: WrappedDocument = { +export const dnsTxtDocStoreTampered = { version: SchemaId.v3, '@context': [ 'https://www.w3.org/2018/credentials/v1', @@ -152,9 +144,9 @@ export const dnsTxtDocStoreTampered: WrappedDocument = { obfuscated: [], }, }, -} +} as v3.WrappedDocument -export const dnsTxtDocStoreRevoked: WrappedDocument = { +export const dnsTxtDocStoreRevoked = { version: SchemaId.v3, '@context': [ 'https://www.w3.org/2018/credentials/v1', @@ -225,10 +217,10 @@ export const dnsTxtDocStoreRevoked: WrappedDocument = { obfuscated: [], }, }, -} +} as v3.WrappedDocument -export const dnsTxtDocStoreIncorrectDNS: WrappedDocument = { - version: 'https://schema.openattestation.com/3.0/schema.json', +export const dnsTxtDocStoreIncorrectDNS = { + version: SchemaId.v3, '@context': [ 'https://www.w3.org/2018/credentials/v1', 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', @@ -298,115 +290,150 @@ export const dnsTxtDocStoreIncorrectDNS: WrappedDocument = { obfuscated: [], }, }, -} +} as v3.WrappedDocument -export const dnsTxtDocStoreObfuscated: WrappedDocument = - { - version: SchemaId.v2, - data: { - $template: { - name: '456f5ada-b199-4012-b359-ad689d3a5df6:string:main', - type: 'a8b58b42-cd8c-4da5-ad83-fc0a71e342d0:string:EMBEDDED_RENDERER', - url: '92c32eb4-5119-4707-8c43-a4a4411d62ca:string:https://tutorial-renderer.openattestation.com', +export const dnsTxtDocStoreObfuscated = { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', }, - issuers: [ - { - name: 'ea308a68-db59-422f-8da3-a37788f0fcd1:string:Demo Issuer', - documentStore: - 'af1be992-cf0e-477d-b5f2-a847c12289dd:string:0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', - identityProof: { - type: '5947b4b6-0d4e-4bef-9d50-5aee88f3783b:string:DNS-TXT', - location: - '5e0eba02-56ae-46a1-9c99-4008578cbe96:string:example.tradetrust.io', - }, - }, - ], + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', }, - signature: { - type: 'SHA3MerkleProof', - targetHash: - '56a72ab0a30bef3d6fb767d16f66a854a21624739a773b590a2381d68eea9468', - proof: [], - merkleRoot: - '56a72ab0a30bef3d6fb767d16f66a854a21624739a773b590a2381d68eea9468', + proof: { + type: 'OpenAttestationProofMethod', + method: 'DOCUMENT_STORE', + value: '0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', }, - privacy: { - obfuscatedData: [ - '8c5c965edb2e14df766ad1e77822428d2cbf2d2d761f7c36a5801deaa971fe83', - ], + identityProof: { + type: 'DNS-TXT', + identifier: 'example.tradetrust.io', }, - } - -export const dnsTxtDocStoreIncorrectDocumentStore: WrappedDocument = - { - version: SchemaId.v3, - '@context': [ - 'https://www.w3.org/2018/credentials/v1', - 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', - 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', - 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', - ], - reference: 'SERIAL_NUMBER_123', - name: 'Republic of Singapore Driving Licence', - issuanceDate: '2010-01-01T19:23:24Z', - validFrom: '2010-01-01T19:23:24Z', - issuer: { - id: 'https://example.com', - type: 'OpenAttestationIssuer', - name: 'DEMO STORE', + }, + attachments: [ + { + fileName: 'sample.pdf', + mimeType: 'application/pdf', + data: 'BASE64_ENCODED_FILE', }, - type: [ - 'VerifiableCredential', - 'DrivingLicenceCredential', - 'OpenAttestationCredential', - ], - credentialSubject: { - id: 'did:example:SERIAL_NUMBER_123', - class: [ - { - type: '3', - effectiveDate: '2010-01-01T19:23:24Z', - }, - { - type: '3A', - effectiveDate: '2010-01-01T19:23:24Z', - }, - ], + ], + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + '660e07e2defb55f04d6715448ac4f9c5718c8115c50ebd8931be15ed61ae8580', + proofs: [], + merkleRoot: + '660e07e2defb55f04d6715448ac4f9c5718c8115c50ebd8931be15ed61ae8580', + salts: 'W3sidmFsdWUiOiI0YmQ0MGZjZjliMGRjNzU3YjViMWU4MDhlNmEwMGQ3NWQ4NjZmYzg0ODYzYTA3YjRkYTllNGU4NjQ5MThiMjY3IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMDk4ZDk0ODZlNjZiMTQ4MDk5ZDQ2ZTI2NGQ3N2E0NjRjZDcwNjA3M2MwYTg2Yzk0NDlkNmIyMWYxYmRiZjFkZSIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI3OWZkMDU0YjhjYzMwM2M3NWMzZDAxN2QzNTRhYzJjOGQyNjI1YjViNTdjZj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GF0YSJ9XQ==', + privacy: { + obfuscated: [], }, - openAttestationMetadata: { - template: { - name: 'CUSTOM_TEMPLATE', - type: 'EMBEDDED_RENDERER', - url: 'https://localhost:3000/renderer', - }, - proof: { - type: 'OpenAttestationProofMethod', - method: 'DOCUMENT_STORE', - value: '0x99f7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', - }, - identityProof: { - type: 'DNS-TXT', - identifier: 'example.tradetrust.io', + }, +} as v3.WrappedDocument + +export const dnsTxtDocStoreIncorrectDocumentStore = { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', }, - }, - attachments: [ { - fileName: 'sample.pdf', - mimeType: 'application/pdf', - data: 'BASE64_ENCODED_FILE', + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', }, ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, proof: { - type: 'OpenAttestationMerkleProofSignature2018', - proofPurpose: 'assertionMethod', - targetHash: - 'f039e1328ad4a21e7d58d6dab1caea228238bee71080b1364bb6f1097c39b407', - proofs: [], - merkleRoot: - 'f039e1328ad4a21e7d58d6dab1caea228238bee71080b1364bb6f1097c39b407', - salts: 'W3sidmFs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wMSIsInBhdGgiOiJhdHRhY2htZW50c1swXS5maWxlTmFtZSJ9LHsidmFsdWUiOiJlMmVhYzE4YjFkNTY2NTU2Yjk2MmE4N2ViMmNlM2NmOWJmNmMwNDE1NzExOTJhOGZjN2Q5OWZhMmE4M2VjYTViIiwicGF0aCI6ImF0dGFjaG1lbnRzWzBdLm1pbWVUeXBlIn0seyJ2YWx1ZSI6Ijk4Zjk1MWM5NThlYmRiNmYzZWMyN2VkMDg1NDE0ZGIzZjhhZWFhM2M0Zjk0M2FmNzBhZDY5ZDE1ZmQxMTNmMDAiLCJwYXRoIjoiYXR0YWNobWVudHNbMF0uZGF0YSJ9XQ==', - privacy: { - obfuscated: [], - }, + type: 'OpenAttestationProofMethod', + method: 'DOCUMENT_STORE', + value: '0x99f7E4777a8D1b6EdD5F2d9b8582e2817F0B0953', + }, + identityProof: { + type: 'DNS-TXT', + identifier: 'example.tradetrust.io', + }, + }, + attachments: [ + { + fileName: 'sample.pdf', + mimeType: 'application/pdf', + data: 'BASE64_ENCODED_FILE', }, - } + ], + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + 'f039e1328ad4a21e7d58d6dab1caea228238bee71080b1364bb6f1097c39b407', + proofs: [], + merkleRoot: + 'f039e1328ad4a21e7d58d6dab1caea228238bee71080b1364bb6f1097c39b407', + salts: 'W3sidmFsdWUiOiJhODAzNGZlOTA0MjNmMDAwMDdlMGMxNzA5MTg0ZjY2NWI0NDcwZTEwNDk0OGFiMzhlOTkzNGNlNTkwOWYwZmQ2IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMGY4N2IzMDcwZGU1YzY5YTU4OTgzMmQ2NDFlZTc1OWE1MzBiMGM3MWU2ZDQ1NzExY2YxZTVlNzUzNGZiMDA0ZiIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiIwZDI4NTAyNjE5ZmViZTQ5NTc4YTViNmEzN2JlYzk1MTU3OWVmY2FhYm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WNobWVudHNbMF0uZGF0YSJ9XQ==', + privacy: { + obfuscated: [], + }, + }, +} as v3.WrappedDocument diff --git a/test/fixtures/v3/dns-txt-token-reg.ts b/test/fixtures/v3/dns-txt-token-reg.ts new file mode 100644 index 0000000..8c4ff40 --- /dev/null +++ b/test/fixtures/v3/dns-txt-token-reg.ts @@ -0,0 +1,331 @@ +import { SchemaId, v3 } from '@tradetrust-tt/tradetrust' + +export const dnsTxtTokenRegIncorrectTokenReg = { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', + }, + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, + proof: { + type: 'OpenAttestationProofMethod', + method: 'TOKEN_REGISTRY', + value: '0x88b613a88534E2939518f4ffBFE65F5969b491FF', + }, + identityProof: { + type: 'DNS-TXT', + identifier: 'example.tradetrust.io', + }, + }, + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + 'f5a2421f4d1bc7081766f025c1f84eb1730837e1d797695942e15920e438498c', + proofs: [], + merkleRoot: + 'f5a2421f4d1bc7081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egIncorrectDNS = { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', + }, + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, + proof: { + type: 'OpenAttestationProofMethod', + method: 'TOKEN_REGISTRY', + value: '0x9Eb613a88534E2939518f4ffBFE65F5969b491FF', + }, + identityProof: { + type: 'DNS-TXT', + identifier: 'example123.tradetrust.io', + }, + }, + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + '3b11827925e0ceb00d4fb7dc8aac83ada4009e70315e8f64a75b75c361318a4f', + proofs: [], + merkleRoot: + '3b11827925e0ceb00d4fb7dc8aac83ada4009e70315e8f64a75b75c361318a4f', + salts: 'W3sidmFsdWUiOiJjYjI0ZjRkYmZkOGVmM2IxMjg3ODNmMzI2MDU1YzY1NzRkMmEwYWY5MjBhMDY2MDAwZjVkN2ZiZDU0M2Q0Y2VmIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiMjg1YmRlMjY2ZWU3NTMwZTRkNDlmYjUyZmJhMWEyYjBhYTEwMTd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iMmNiN2VhYWY3ZTM3ODgyZSIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5wcm9vZi50eXBlIn0seyJ2YWx1ZSI6ImQ2OGMwODJjYzNmOTBlMTc3OTMwZTMyM2Q5MTZkODUzYzZmYjA0ZTg4NTc3Nzc5Mzk4NzA4NjBjNTNhZDQ3YzUiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEucHJvb2YubWV0aG9kIn0seyJ2YWx1ZSI6ImZiYTg1YzQ5MDQwNzkyOTcxMWU5OTM3NDdiZDc3NmY1OTMyOGY4YzE1YjYwOTc2NTlhNjQyOGE4NWFmYTk3NWEiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEucHJvb2YudmFsdWUifSx7InZhbHVlIjoiMTA2ZjRiNTllZWVhOTMwNjMzODBhYTI1ZjA1ZjJjNDYzYzg1OGZmZDM2MGI5ZmQ5NjhkMDM2M2FhMGM1ZTA4YyIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiZWEzODQ5M2NhNGMxZGY5YTMwNGZjMzAzYTYwNTA4ZDkxOGQ5Y2FlOTU0MDNjZWYwNjZjMTYwMzQ4ZTZlYmQyMiIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifV0=', + privacy: { + obfuscated: [], + }, + }, +} as v3.WrappedDocument + +export const dnsTxtTokenRegTampered = { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:TAMPERED_SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', + }, + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, + proof: { + type: 'OpenAttestationProofMethod', + method: 'TOKEN_REGISTRY', + value: '0x9Eb613a88534E2939518f4ffBFE65F5969b491FF', + }, + identityProof: { + type: 'DNS-TXT', + identifier: 'example.tradetrust.io', + }, + }, + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + '9e4f74864999eed515ebc5ff02a4ee21e2cc99d660690864784055b6aeff04af', + proofs: [], + merkleRoot: + '9e4f74864999eed515ebc5ff02a4ee21e2cc99d660690864784055b6aeff04af', + salts: 'W3sidmFsdWUiOiIxYWRlMWM2NGUyMGQwM2NhNmU3NmM4NDFkOTc2Y2ExZTk5MGMzNThhYzFjYTdjYmE1ZGMyYmNiZjc1OTg1NmY3IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiOTA4YmQwY2U4ZGM4ZjNmYzhjNmM0MjhkNjlhMWFmNWUzMWQzNWJkOTZmYjNhYThiYWYxZTM1MmM3NTZmMGEzYSIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI1YTI1ZWJmM2QyODRkMmZlODMyNWRhOTc5MTM2Y2FjNDFjYmYxZDA5OWQyNGU5MzRmMDgyZWM0NmZiM2E1MDU5IiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6IjE1NDliYmIwMGY5OTg3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W9uTWV0YWRhdGEucHJvb2YubWV0aG9kIn0seyJ2YWx1ZSI6ImE4ZjQ3ZGI0YTRjODU4NGY5NGJhYzk0MTVmM2I3OGQyOTNjOGU1NTEzMjZjNTFlMDllOGY3OTQ3OGY2MWExZTkiLCJwYXRoIjoib3BlbkF0dGVzdGF0aW9uTWV0YWRhdGEucHJvb2YudmFsdWUifSx7InZhbHVlIjoiOGM2NmRkMjBlMmY0YTE3NWExNGE1YWU1ODZhMjY4YTYwMTZhN2YyMjUxZGRhODJiZTY2ZWI0YThhYzhhOTliYiIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiMGYzNWUwZjEzYWQ5OGM5NjY3YjQ5MDYwZTljZWJkMDY5ODVjMDM1MmU4Njg2M2JiNDBiYzRhZjM4ZjE2ZTc3NyIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifV0=', + privacy: { + obfuscated: [], + }, + }, +} as v3.WrappedDocument + +export const dnsTxtTokenRegMinted = { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', + }, + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, + proof: { + type: 'OpenAttestationProofMethod', + method: 'TOKEN_REGISTRY', + value: '0x9Eb613a88534E2939518f4ffBFE65F5969b491FF', + }, + identityProof: { + type: 'DNS-TXT', + identifier: 'example.tradetrust.io', + }, + }, + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + '9e4f74864999eed515ebc5ff02a4ee21e2cc99d660690864784055b6aeff04af', + proofs: [], + merkleRoot: + '9e4f74864999eed515ebc5ff02a4ee21e2cc99d660690864784055b6aeff04af', + salts: 'W3sidmFsdWUiOiIxYWRlMWM2NGUyMGQwM2NhNmU3NmM4NDFkOTc2Y2ExZTk5MGMzNThhYzFjYTdjYmE1ZGMyYmNiZjc1OTg1NmY3IiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiOTA4YmQwY2U4ZGM4ZjNmYzhjNmM0MjhkNjlhMWFmNWUzMWQzNWJkOTZmYjNhYThiYWYxZTM1MmM3NTZmMGEzYSIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI1YTI1ZWJmM2QyODRkMmZlODMyNWRhOTc5MTM2Y2FjNDFjYmYxZDA5OWQyNGU5MzRmMDgyZWM0NmZiM2E1MDU5IiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6IjE1NDliYmIwMGY5OTg3ZThmMjIxNTYzMzU2NWJkMDExY2RjOWFmZTZjMGVjZjVjZjczMWNiZmFhODZkZTNlMGMiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiYTJkNzc4MzQxZGMxZGViMzNlMzVlNmVlNzYwNDg0OGFjOTI5NmQyYjA3NTVlYzA1YmQ0NGE5YmQ5YzMxYWRlYSIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidmFsdWUiO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YWU1ODZhMjY4YTYwMTZhN2YyMjUxZGRhODJiZTY2ZWI0YThhYzhhOTliYiIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLnR5cGUifSx7InZhbHVlIjoiMGYzNWUwZjEzYWQ5OGM5NjY3YjQ5MDYwZTljZWJkMDY5ODVjMDM1MmU4Njg2M2JiNDBiYzRhZjM4ZjE2ZTc3NyIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifV0=', + privacy: { + obfuscated: [], + }, + }, +} as v3.WrappedDocument + +export const dnsTxttokenRegNotMinted = { + version: SchemaId.v3, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json', + 'https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json', + ], + reference: 'SERIAL_NUMBER_123', + name: 'Republic of Singapore Driving Licence', + issuanceDate: '2010-01-01T19:23:24Z', + validFrom: '2010-01-01T19:23:24Z', + issuer: { + id: 'https://example.com', + type: 'OpenAttestationIssuer', + name: 'DEMO STORE', + }, + type: [ + 'VerifiableCredential', + 'DrivingLicenceCredential', + 'OpenAttestationCredential', + ], + credentialSubject: { + id: 'did:example:SERIAL_NUMBER_123', + class: [ + { + type: '3', + effectiveDate: '2010-01-01T19:23:24Z', + }, + { + type: '3A', + effectiveDate: '2010-01-01T19:23:24Z', + }, + ], + }, + openAttestationMetadata: { + template: { + name: 'CUSTOM_TEMPLATE', + type: 'EMBEDDED_RENDERER', + url: 'https://localhost:3000/renderer', + }, + proof: { + type: 'OpenAttestationProofMethod', + method: 'TOKEN_REGISTRY', + value: '0x9Eb613a88534E2939518f4ffBFE65F5969b491FF', + }, + identityProof: { + type: 'DNS-TXT', + identifier: 'example.tradetrust.io', + }, + }, + proof: { + type: 'OpenAttestationMerkleProofSignature2018', + proofPurpose: 'assertionMethod', + targetHash: + '65918f0fd52db1c2f81f3b57c13c9198e5c525ef7c95ab40889ea8464f4e6470', + proofs: [], + merkleRoot: + '65918f0fd52db1c2f81f3b57c13c9198e5c525ef7c95ab40889ea8464f4e6470', + salts: 'W3sidmFsdWUiOiJjOTFlYjY4ZDU1YWZmNTZlYzdjOGZmNjcxYjE3MjcxYjE3M2EwNmQwZmI5NGZlOGE3ZmEyYmM0YjA4ZDliYjlkIiwicGF0aCI6InZlcnNpb24ifSx7InZhbHVlIjoiZTI2NzI4NDJjZjJiMWVkODI0YTg4ZGUyYTJjZGE5MWUyZDI0MTRkNDA1YTcyY2E1NmIyODAyN2Y4YTVmYTkzZiIsInBhdGgiOiJAY29udGV4dFswXSJ9LHsidmFsdWUiOiI4YjlkY2E3ODAzNjM0NTE1ZmMyN2E4YTc0N2VhNTZkYTgyMjAwNmE2OGIzMTE3YjUyYjM2YjhhMThjMmY0OTZjIiwicGF0aCI6IkBjb250ZXh0WzFdIn0seyJ2YWx1ZSI6IjQwMTU3OTM1ZjljMjhhZGVhZGQwMWU1MWVkMjcwZWUzMTM4MTA4ZWIzZTJhMzQxZjFkMmIzZGQyNjg5MGRkMDkiLCJwYXRoIjoiQGNvbnRleHRbMl0ifSx7InZhbHVlIjoiOTA5ZGQ4MWFjNmM2YzYzNjhiMDhjOTZmZDEyZGNiOTlmYWI2NTVmYmM1ODJiZWRkYjhiNTc0MDM3M2JmOGM3MyIsInBhdGgiOiJAY29udGV4dFszXSJ9LHsidmFsdWUiOiI0NGJiMGNmOTk1YWFjY2ZjODA1ZGE2NDgzZGQzNzhjY2ZjZTNiNzU5YzhiNjIyMTYyNGNiZjE3Mjg4OTI0NTllIiwicGF0aCI6InJlZmVyZW5jZSJ9LHsidmFsdWUiOiJkNjBmZjdhYjVjNTJlOTk4ZmQ4YTJkOWIyYWU3MzY2ZjdjOGU4OGQ3MDEzMWI2YmNhNGU5NmEzNjRlZmM5Mz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EzN2E2NzNlZTMxNGM0YyIsInBhdGgiOiJvcGVuQXR0ZXN0YXRpb25NZXRhZGF0YS5pZGVudGl0eVByb29mLmlkZW50aWZpZXIifV0=', + privacy: { + obfuscated: [], + }, + }, +} as v3.WrappedDocument diff --git a/test/prep/setup-contracts.mjs b/test/prep/setup-contracts.mjs index 574e196..6732f90 100644 --- a/test/prep/setup-contracts.mjs +++ b/test/prep/setup-contracts.mjs @@ -5,8 +5,7 @@ const ACCOUNT_ADDRESS = '0xe0A71284EF59483795053266CB796B65E48B5124' const ACCOUNT_KEY = '0xe82294532bcfcd8e0763ee5cef194f36f00396be59b94fb418f5f8d83140d9a7' -// account used to test dns did documents -// const ACCOUNT_DNS_DID_ADDRESS = '0x391aFf3942857a10958425FebF1fC1938D9F5AE7' +// const ACCOUNT_DNS_DID_ADDRESS = '0x391aFf3942857a10958425FebF1fC1938D9F5AE7' // const ACCOUNT_DNS_DID_KEY = ;('0x3760fb287bee810607433485cfa3fc665c2d682a1816991dccce645b096ae19a') const TOKEN_REGISTRY_ADDRESS = '0x9Eb613a88534E2939518f4ffBFE65F5969b491FF' @@ -38,9 +37,12 @@ const mintedMerkleRootTransferrableRecord = [ '0x82de42fe0d4dc965546a08f0555a33d66f25192f8121dab54b0a8d213a984a81', //incorrect token reg // v3 documents + '9e4f74864999eed515ebc5ff02a4ee21e2cc99d660690864784055b6aeff04af', // issued correctly + '3b11827925e0ceb00d4fb7dc8aac83ada4009e70315e8f64a75b75c361318a4f', // incorrect dns + 'f5a2421f4d1bc7081766f025c1f84eb1730837e1d797695942e15920e438498c', // incorrect token reg ] -const revokedMerkleRoot = [ +const revokedMerkleRootVerifiableDocs = [ '0x8db570494b2beeea4e6431f2f7abda199f676ae50c2a7bb4a0d0c548da0952df', // v3 record 'eeef582def4ebea8fad684c33f67194f3a922692a3d9b96ca9d90150adf7259c', //v3 record ] @@ -66,7 +68,7 @@ issuedMerkleRootVerifiableDocs.forEach((ele) => { }) console.log('\n## Revoking Documents on Document Store ##\n') -revokedMerkleRoot.forEach((ele) => { +revokedMerkleRootVerifiableDocs.forEach((ele) => { shell.exec( `${TT_CLI_PATH} document-store revoke --address ${DOCUMENT_STORE_ADDRESS} --hash ${ele} --network local --k ${ACCOUNT_KEY}` ) From 005c7e7cf486e51331a7381e3b9c957885b6794b Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Wed, 21 Feb 2024 17:10:15 +0800 Subject: [PATCH 28/34] ci: run tests --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 09b8370..9ec785c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: with: node-version: 18.x - run: npm ci - - run: npm run test:ci + - run: npm run test:concurrently test-build: name: Test Build From ebea287f4f23b869404520ba38c809660a602868 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Wed, 21 Feb 2024 18:07:37 +0800 Subject: [PATCH 29/34] feat: migrate interpretFragments function from tradetrust-utils --- package.json | 5 +- src/constants/VerificationErrorMessages.ts | 89 ++ src/index.ts | 3 +- src/utils/fragments.test.ts | 197 ++++ src/utils/fragments.ts | 78 ++ src/utils/index.ts | 1 + ...y.v2.dns-txt-doc-store.integration.test.ts | 4 +- src/verify/{index.ts => verify.ts} | 3 +- .../verify.v2.dns-did.integration.test.ts | 4 +- ...y.v2.dns-txt-token-reg.integration.test.ts | 4 +- .../verify.v3.dns-did.integration.test.ts | 4 +- ...y.v3.dns-txt-doc-store.integration.test.ts | 4 +- ...y.v3.dns-txt-token-reg.integration.test.ts | 4 +- .../verify/fragments/verifier-response.ts | 994 ++++++++++++++++++ test/fixtures/{ => verify}/v2/dns-did.ts | 0 .../{ => verify}/v2/dns-txt-doc-store.ts | 0 .../{ => verify}/v2/dns-txt-token-reg.ts | 0 test/fixtures/{ => verify}/v3/dns-did.ts | 0 .../{ => verify}/v3/dns-txt-doc-store.ts | 0 .../{ => verify}/v3/dns-txt-token-reg.ts | 0 20 files changed, 1378 insertions(+), 16 deletions(-) create mode 100644 src/constants/VerificationErrorMessages.ts create mode 100644 src/utils/fragments.test.ts create mode 100644 src/utils/fragments.ts create mode 100644 src/utils/index.ts rename src/verify/{index.ts => verify.ts} (83%) create mode 100644 test/fixtures/verify/fragments/verifier-response.ts rename test/fixtures/{ => verify}/v2/dns-did.ts (100%) rename test/fixtures/{ => verify}/v2/dns-txt-doc-store.ts (100%) rename test/fixtures/{ => verify}/v2/dns-txt-token-reg.ts (100%) rename test/fixtures/{ => verify}/v3/dns-did.ts (100%) rename test/fixtures/{ => verify}/v3/dns-txt-doc-store.ts (100%) rename test/fixtures/{ => verify}/v3/dns-txt-token-reg.ts (100%) diff --git a/package.json b/package.json index 52c0711..4ab15e8 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "test:prep:contracts": "node test/prep/setup-contracts.mjs", "test:prep": "run-s test:prep:contracts test", "test:concurrently": "run-p test:prep:blockchain test:prep", - "test": "vitest --run", + "test": "npx vitest --reporter=basic", "test:ci": "vitest --run --coverage", "build": "npm run clean && npm run build:cjs && npm run build:esm && npm run build:type", "build:cjs": "tsc --module commonjs --outDir dist/cjs", @@ -58,5 +58,8 @@ "commitizen": { "path": "./node_modules/cz-conventional-changelog" } + }, + "optionalDependencies": { + "fsevents": "^2.3.2" } } diff --git a/src/constants/VerificationErrorMessages.ts b/src/constants/VerificationErrorMessages.ts new file mode 100644 index 0000000..fc8aaec --- /dev/null +++ b/src/constants/VerificationErrorMessages.ts @@ -0,0 +1,89 @@ +export const TYPES = { + REVOKED: 'REVOKED', + ISSUED: 'ISSUED', + HASH: 'HASH', + IDENTITY: 'IDENTITY', + INVALID: 'INVALID', + ADDRESS_INVALID: 'ADDRESS_INVALID', + NETWORK_INVALID: 'NETWORK_INVALID', + CONTRACT_NOT_FOUND: 'CONTRACT_NOT_FOUND', + INVALID_ARGUMENT: 'INVALID_ARGUMENT', + SERVER_ERROR: 'SERVER_ERROR', + ETHERS_UNHANDLED_ERROR: 'ETHERS_UNHANDLED_ERROR', + CLIENT_NETWORK_ERROR: 'CLIENT_NETWORK_ERROR', +} + +export const MESSAGES = { + [TYPES.REVOKED]: { + failureTitle: 'Document revoked', + successTitle: 'Document has not been revoked', + failureMessage: + 'This document has been revoked by the issuing authority. Please contact them for more details.', + }, + [TYPES.ISSUED]: { + failureTitle: 'Document not issued', + successTitle: 'Document has been issued', + failureMessage: + 'This document cannot be found. Please contact your issuing authority for help or issue the document before trying again.', + }, + [TYPES.HASH]: { + failureTitle: 'Document has been tampered with', + successTitle: 'Document has not been tampered with', + failureMessage: + 'The contents of this document are inaccurate and have been tampered with.', + }, + [TYPES.IDENTITY]: { + failureTitle: 'Document issuer identity is invalid', + successTitle: 'Document issuer has been identified', + failureMessage: 'This document was issued by an invalid issuer.', + }, + [TYPES.INVALID]: { + failureTitle: 'Document is invalid', + successTitle: '', + failureMessage: + 'This document is not valid. Please upload a valid document.', + }, + [TYPES.ADDRESS_INVALID]: { + failureTitle: 'Document store or Token registry address is invalid', + successTitle: '', + failureMessage: + 'Please inform the issuer of this document that they have misconfigured their Document store or Token registry address.', + }, + [TYPES.NETWORK_INVALID]: { + failureTitle: "Document's network field is invalid", + successTitle: '', + failureMessage: + 'This document has an invalid network field. Please contact your issuing authority for help or re-issue the document with a valid network field before trying again.', + }, + [TYPES.CONTRACT_NOT_FOUND]: { + failureTitle: + 'Document store or Token registry address cannot be found', + successTitle: '', + failureMessage: + 'Please inform the issuer of this document that they have misconfigured their Document store or Token registry address.', + }, + [TYPES.INVALID_ARGUMENT]: { + failureTitle: "Document's merkle root is invalid", + successTitle: '', + failureMessage: + 'Please inform the issuer of this document that the merkle root is invalid, or it may have been tampered with.', + }, + [TYPES.SERVER_ERROR]: { + failureTitle: 'Unable to connect to the Ethereum network', + successTitle: '', + failureMessage: + 'We are unable to connect to the Ethereum network, please try again later. If this issue persists, contact us using the feedback link below.', + }, + [TYPES.ETHERS_UNHANDLED_ERROR]: { + failureTitle: "Whoops! It's not you, it's us", + successTitle: '', + failureMessage: + 'We encountered an internal error and cannot determine the cause, please try again later. If this issue persists, contact us using the feedback link below.', + }, + [TYPES.CLIENT_NETWORK_ERROR]: { + failureTitle: + 'Whoops! There seems to be an error verifying the document', + successTitle: '', + failureMessage: 'Please check your network and try again', + }, +} diff --git a/src/index.ts b/src/index.ts index 14045e4..b7188d2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1 +1,2 @@ -export * from './verify' +export * from './verify/verify' +export * from './utils' diff --git a/src/utils/fragments.test.ts b/src/utils/fragments.test.ts new file mode 100644 index 0000000..b63f732 --- /dev/null +++ b/src/utils/fragments.test.ts @@ -0,0 +1,197 @@ +import { VerificationFragment } from '@tradetrust-tt/tt-verify' +import { interpretFragments, errorMessageHandling } from './fragments' +import { describe, it, expect } from 'vitest' +import { + whenDocumentHashInvalidAndNotIssued, + whenDocumentNotIssued, + whenDocumentValidAndIssuedByDns, + whenDocumentValidAndIssuedByDid, + whenDocumentHashInvalid, + whenDocumentIssuedAndRevokedByEthereumDocStore, + whenDocumentRevokedAndIdentifiedByDnsDid, + whenDocumentIssuerIdentityInvalidDnsTxt, + whenDocumentIssuerIdentityInvalidDid, + whenTransferableDocumentVerified, + whenDocumentAddressInvalid, + whenDocumentNotFound, + whenServerError, + whenUnhandledError, +} from '../../test/fixtures/verify/fragments/verifier-response' + +describe('interpretFragments', () => { + it('should interpret whenDocumentHashInvalidAndNotIssued correctly', () => { + expect( + interpretFragments( + whenDocumentHashInvalidAndNotIssued as VerificationFragment[] + ) + ).toEqual({ + hashValid: false, + issuedValid: false, + identityValid: false, + }) + }) + it('should interpret whenDocumentNotIssued correctly', () => { + expect( + interpretFragments(whenDocumentNotIssued as VerificationFragment[]) + ).toEqual({ + hashValid: true, + issuedValid: false, + identityValid: true, + }) + }) + it('should interpret whenDocumentValidAndIssuedByDns correctly', () => { + expect( + interpretFragments( + whenDocumentValidAndIssuedByDns as VerificationFragment[] + ) + ).toEqual({ + hashValid: true, + issuedValid: true, + identityValid: true, + }) + }) + it('should interpret whenDocumentValidAndIssuedByDid correctly', () => { + expect( + interpretFragments( + whenDocumentValidAndIssuedByDid as VerificationFragment[] + ) + ).toEqual({ + hashValid: true, + issuedValid: true, + identityValid: true, + }) + }) + it('should interpret whenDocumentHashInvalid correctly', () => { + expect( + interpretFragments( + whenDocumentHashInvalid as VerificationFragment[] + ) + ).toEqual({ + hashValid: false, + issuedValid: true, + identityValid: true, + }) + }) + it('should interpret whenDocumentIssuedAndRevokedByEthereumDocStore correctly', () => { + expect( + interpretFragments( + whenDocumentIssuedAndRevokedByEthereumDocStore as VerificationFragment[] + ) + ).toEqual({ + hashValid: true, + issuedValid: false, + identityValid: true, + }) + }) + it('should interpret whenDocumentRevokedAndIdentifiedByDnsDid correctly', () => { + expect( + interpretFragments( + whenDocumentRevokedAndIdentifiedByDnsDid as VerificationFragment[] + ) + ).toEqual({ + hashValid: true, + issuedValid: false, + identityValid: true, + }) + }) + it('should interpret whenDocumentIssuerIdentityInvalidDnsTxt correctly', () => { + expect( + interpretFragments( + whenDocumentIssuerIdentityInvalidDnsTxt as VerificationFragment[] + ) + ).toEqual({ + hashValid: true, + issuedValid: true, + identityValid: false, + }) + }) + it('should interpret whenDocumentIssuerIdentityInvalidDid correctly', () => { + expect( + interpretFragments( + whenDocumentIssuerIdentityInvalidDid as VerificationFragment[] + ) + ).toEqual({ + hashValid: true, + issuedValid: true, + identityValid: false, + }) + }) + it('should interpret whenTransferableDocumentVerified correctly', () => { + expect( + interpretFragments( + whenTransferableDocumentVerified as VerificationFragment[] + ) + ).toEqual({ + hashValid: true, + issuedValid: true, + identityValid: true, + }) + }) +}) + +describe('errorMessageHandling', () => { + it('should return all errors when fragments have multiple errors', () => { + expect( + errorMessageHandling( + whenDocumentHashInvalidAndNotIssued as VerificationFragment[] + ) + ).toStrictEqual(['HASH', 'IDENTITY', 'ISSUED']) + }) + + it('should return hash error when fragments integrity invalid', () => { + expect( + errorMessageHandling( + whenDocumentHashInvalid as VerificationFragment[] + ) + ).toStrictEqual(['HASH']) + }) + + it('should return identity error when fragments identity invalid', () => { + expect( + errorMessageHandling( + whenDocumentIssuerIdentityInvalidDnsTxt as VerificationFragment[] + ) + ).toStrictEqual(['IDENTITY']) + }) + + it('should return revoked error when fragments indicate revoked (issued and revoked with ethereum doc store)', () => { + expect( + errorMessageHandling( + whenDocumentIssuedAndRevokedByEthereumDocStore as VerificationFragment[] + ) + ).toStrictEqual(['REVOKED']) + }) + it('should return revoked error when fragments indicate revoked (identified by DNS-DID but revoked with ethereum doc store)', () => { + expect( + errorMessageHandling( + whenDocumentRevokedAndIdentifiedByDnsDid as VerificationFragment[] + ) + ).toStrictEqual(['REVOKED']) + }) + + it('should return invalid address error when fragments contain invalid address', () => { + expect( + errorMessageHandling( + whenDocumentAddressInvalid as VerificationFragment[] + ) + ).toStrictEqual(['ADDRESS_INVALID']) + }) + + it('should return contract not found error when fragments contain contract not found error message', () => { + expect( + errorMessageHandling(whenDocumentNotFound as VerificationFragment[]) + ).toStrictEqual(['CONTRACT_NOT_FOUND']) + }) + + it('should return server error when fragments contain server error', () => { + expect( + errorMessageHandling(whenServerError as VerificationFragment[]) + ).toStrictEqual(['SERVER_ERROR']) + }) + + it('should return unhandled error when fragments contain an error that was not handled', () => { + expect( + errorMessageHandling(whenUnhandledError as VerificationFragment[]) + ).toStrictEqual(['ETHERS_UNHANDLED_ERROR']) + }) +}) diff --git a/src/utils/fragments.ts b/src/utils/fragments.ts new file mode 100644 index 0000000..0d1c23e --- /dev/null +++ b/src/utils/fragments.ts @@ -0,0 +1,78 @@ +import { + VerificationFragment, + isValid, + utils, + OpenAttestationEthereumDocumentStoreStatusCode, +} from '@tradetrust-tt/tt-verify' +import { TYPES } from '../constants/VerificationErrorMessages' + +interface interpretFragmentsReturnTypes { + hashValid: boolean + issuedValid: boolean + identityValid: boolean +} + +const certificateRevokedOnDidIdentified = ( + fragments: VerificationFragment[] +) => { + const didSignedDocumentStatusFragment = + utils.getOpenAttestationDidSignedDocumentStatusFragment(fragments) + return ( + didSignedDocumentStatusFragment?.reason?.code === + OpenAttestationEthereumDocumentStoreStatusCode.DOCUMENT_REVOKED + ) +} + +export const errorMessageHandling = ( + fragments: VerificationFragment[] +): string[] => { + const { hashValid, issuedValid, identityValid } = + interpretFragments(fragments) + const errors = [] + + if (utils.isDocumentStoreAddressOrTokenRegistryAddressInvalid(fragments)) { + // if the error is because the address is invalid, only return this one + return [TYPES.ADDRESS_INVALID] + } + if (utils.contractNotFound(fragments)) { + // if the error is because the contract cannot be found, only return this one + return [TYPES.CONTRACT_NOT_FOUND] + } + if (utils.serverError(fragments)) { + // if the error is because cannot connect to Ethereum, only return this one + return [TYPES.SERVER_ERROR] + } + + if (!hashValid) errors.push(TYPES.HASH) + if (!identityValid) errors.push(TYPES.IDENTITY) + if (!issuedValid) { + if ( + utils.certificateRevoked(fragments) || + certificateRevokedOnDidIdentified(fragments) + ) + errors.push(TYPES.REVOKED) + else if (utils.invalidArgument(fragments)) { + // this error is caused when the merkle root is wrong, and should always be shown with the DOCUMENT_INTEGRITY error + errors.push(TYPES.INVALID_ARGUMENT) + } else if (utils.certificateNotIssued(fragments)) + errors.push(TYPES.ISSUED) + else if (!hashValid && !identityValid) { + // this error is caused when the document is invalid, only keep this one + return [TYPES.INVALID] + } else { + // if it's some unhandled error that we didn't foresee, only keep this one + return [TYPES.ETHERS_UNHANDLED_ERROR] + } + } + + return errors +} + +export const interpretFragments = ( + fragments: VerificationFragment[] +): interpretFragmentsReturnTypes => { + const hashValid = isValid(fragments, ['DOCUMENT_INTEGRITY']) + const issuedValid = isValid(fragments, ['DOCUMENT_STATUS']) + const identityValid = isValid(fragments, ['ISSUER_IDENTITY']) + return { hashValid, issuedValid, identityValid } +} diff --git a/src/utils/index.ts b/src/utils/index.ts new file mode 100644 index 0000000..c29e81b --- /dev/null +++ b/src/utils/index.ts @@ -0,0 +1 @@ +export * from './fragments' diff --git a/src/verify/verfiy.v2.dns-txt-doc-store.integration.test.ts b/src/verify/verfiy.v2.dns-txt-doc-store.integration.test.ts index 68b6dbd..879dadd 100644 --- a/src/verify/verfiy.v2.dns-txt-doc-store.integration.test.ts +++ b/src/verify/verfiy.v2.dns-txt-doc-store.integration.test.ts @@ -5,9 +5,9 @@ import { dnsTxtDocStoreIncorrectDNS, dnsTxtDocStoreIncorrectDocumentStore, dnsTxtDocStoreObfuscated, -} from '../../test/fixtures/v2/dns-txt-doc-store' +} from '../../test/fixtures/verify/v2/dns-txt-doc-store' import { describe, it, expect } from 'vitest' -import { verify, isValid } from '.' +import { verify, isValid } from './verify' import { ethers } from 'ethers' const localProvider = new ethers.providers.JsonRpcProvider( diff --git a/src/verify/index.ts b/src/verify/verify.ts similarity index 83% rename from src/verify/index.ts rename to src/verify/verify.ts index f1ebd58..f7a215d 100644 --- a/src/verify/index.ts +++ b/src/verify/verify.ts @@ -8,7 +8,6 @@ import { DocumentsToVerify, VerificationBuilderOptions, } from '@tradetrust-tt/tt-verify/dist/types/src/types/core' -import { interpretFragments } from '@tradetrust-tt/tradetrust-utils' const verificationBuilder = (builderOptions: VerificationBuilderOptions) => { return originalVerificationBuilder( @@ -24,4 +23,4 @@ const verify = ( return verificationBuilder(builderOptions)(document) } -export { verificationBuilder, verify, interpretFragments, isValid } +export { verificationBuilder, verify, isValid } diff --git a/src/verify/verify.v2.dns-did.integration.test.ts b/src/verify/verify.v2.dns-did.integration.test.ts index 4bd408c..c59c258 100644 --- a/src/verify/verify.v2.dns-did.integration.test.ts +++ b/src/verify/verify.v2.dns-did.integration.test.ts @@ -2,9 +2,9 @@ import { dnsDidSignedAndTampered, dnsDidUnSigned, dnsDidSigned, -} from '../../test/fixtures/v2/dns-did' +} from '../../test/fixtures/verify/v2/dns-did' import { describe, it, expect } from 'vitest' -import { isValid, verify } from '.' +import { isValid, verify } from './verify' import { ethers } from 'ethers' import { v3 } from '@tradetrust-tt/tradetrust' diff --git a/src/verify/verify.v2.dns-txt-token-reg.integration.test.ts b/src/verify/verify.v2.dns-txt-token-reg.integration.test.ts index af26793..9e6696b 100644 --- a/src/verify/verify.v2.dns-txt-token-reg.integration.test.ts +++ b/src/verify/verify.v2.dns-txt-token-reg.integration.test.ts @@ -4,9 +4,9 @@ import { dnsTxtTokenRegTampered, dnsTxtTokenRegIncorrectDNS, dnsTxtTokenRegIncorrectTokenReg, -} from '../../test/fixtures/v2/dns-txt-token-reg' +} from '../../test/fixtures/verify/v2/dns-txt-token-reg' import { describe, it, expect } from 'vitest' -import { verify, isValid } from '.' +import { verify, isValid } from './verify' import { ethers } from 'ethers' const localProvider = new ethers.providers.JsonRpcProvider( diff --git a/src/verify/verify.v3.dns-did.integration.test.ts b/src/verify/verify.v3.dns-did.integration.test.ts index 33332ac..e06707a 100644 --- a/src/verify/verify.v3.dns-did.integration.test.ts +++ b/src/verify/verify.v3.dns-did.integration.test.ts @@ -2,9 +2,9 @@ import { dnsDidSignedAndTampered, dnsDidUnSigned, dnsDidSigned, -} from '../../test/fixtures/v3/dns-did' +} from '../../test/fixtures/verify/v3/dns-did' import { describe, it, expect } from 'vitest' -import { isValid, verify } from '.' +import { isValid, verify } from './verify' import { ethers } from 'ethers' const localProvider = new ethers.providers.JsonRpcProvider( diff --git a/src/verify/verify.v3.dns-txt-doc-store.integration.test.ts b/src/verify/verify.v3.dns-txt-doc-store.integration.test.ts index 69cbdf1..54adc98 100644 --- a/src/verify/verify.v3.dns-txt-doc-store.integration.test.ts +++ b/src/verify/verify.v3.dns-txt-doc-store.integration.test.ts @@ -5,9 +5,9 @@ import { dnsTxtDocStoreIncorrectDNS, dnsTxtDocStoreIncorrectDocumentStore, dnsTxtDocStoreObfuscated, -} from '../../test/fixtures/v3/dns-txt-doc-store' +} from '../../test/fixtures/verify/v3/dns-txt-doc-store' import { describe, it, expect } from 'vitest' -import { verify, isValid } from '.' +import { verify, isValid } from './verify' import { ethers } from 'ethers' const localProvider = new ethers.providers.JsonRpcProvider( diff --git a/src/verify/verify.v3.dns-txt-token-reg.integration.test.ts b/src/verify/verify.v3.dns-txt-token-reg.integration.test.ts index a0bf838..f77977f 100644 --- a/src/verify/verify.v3.dns-txt-token-reg.integration.test.ts +++ b/src/verify/verify.v3.dns-txt-token-reg.integration.test.ts @@ -4,9 +4,9 @@ import { dnsTxtTokenRegTampered, dnsTxtTokenRegIncorrectDNS, dnsTxtTokenRegIncorrectTokenReg, -} from '../../test/fixtures/v3/dns-txt-token-reg' +} from '../../test/fixtures/verify/v3/dns-txt-token-reg' import { describe, it, expect } from 'vitest' -import { verify, isValid } from '.' +import { verify, isValid } from './verify' import { ethers } from 'ethers' const localProvider = new ethers.providers.JsonRpcProvider( diff --git a/test/fixtures/verify/fragments/verifier-response.ts b/test/fixtures/verify/fragments/verifier-response.ts new file mode 100644 index 0000000..a1b4295 --- /dev/null +++ b/test/fixtures/verify/fragments/verifier-response.ts @@ -0,0 +1,994 @@ +// Verification Responses + +export const whenDocumentHashInvalidAndNotIssued = [ + { + data: false, + reason: { + code: 0, + codeString: "DOCUMENT_TAMPERED", + message: "Certificate has been tampered with", + }, + status: "INVALID", + name: "OpenAttestationHash", + type: "DOCUMENT_INTEGRITY", + }, + { + data: { + details: [ + { + address: "0x20bc9C354A18C8178A713B9BcCFFaC2152b53991", + reason: { + code: 2, + codeString: "CONTRACT_ADDRESS_INVALID", + message: "Contract address 0x20bc9C354A18C8178A713B9BcCFFaC2152b53991 is invalid", + }, + issued: false, + }, + ], + issuedOnAll: false, + }, + reason: { + code: 2, + codeString: "CONTRACT_ADDRESS_INVALID", + message: "Contract address 0x20bc9C354A18C8178A713B9BcCFFaC2152b53991 is invalid", + }, + status: "INVALID", + name: "OpenAttestationEthereumDocumentStoreIssued", + type: "DOCUMENT_STATUS", + }, + { + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + name: "OpenAttestationEthereumTokenRegistryMinted", + status: "SKIPPED", + type: "DOCUMENT_STATUS", + }, + { + name: "OpenAttestationEthereumDocumentStoreStatus", + type: "DOCUMENT_STATUS", + data: { + details: [ + { + address: "0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + issued: false, + reason: { + code: 1, + codeString: "DOCUMENT_NOT_ISSUED", + message: + "Certificate 0xda7a25d51e62bc50e1c7cfa17f7be0e5df3428b96f584e5d021f0cd8da97306d has not been issued under contract 0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + }, + }, + ], + issuedOnAll: false, + }, + reason: { + code: 1, + codeString: "DOCUMENT_NOT_ISSUED", + message: + "Certificate 0xda7a25d51e62bc50e1c7cfa17f7be0e5df3428b96f584e5d021f0cd8da97306d has not been issued under contract 0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + }, + status: "INVALID", + }, + { + reason: { + code: 2, + codeString: "SKIPPED", + message: `Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type`, + }, + status: "SKIPPED", + name: "OpenAttestationDnsTxtIdentityProof", + type: "ISSUER_IDENTITY", + }, + { + reason: { + code: 0, + codeString: "SKIPPED", + message: `Document was not issued using DNS-DID`, + }, + status: "SKIPPED", + name: "OpenAttestationDnsDidIdentityProof", + type: "ISSUER_IDENTITY", + }, + { + reason: { + code: 0, + codeString: "SKIPPED", + message: `Document is not using DID as top level identifier`, + }, + status: "SKIPPED", + name: "OpenAttestationDidIdentityProof", + type: "ISSUER_IDENTITY", + }, +]; + +export const whenDocumentNotIssued = [ + { + name: "OpenAttestationEthereumDocumentStoreStatus", + type: "DOCUMENT_STATUS", + data: { + details: [ + { + address: "0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + issued: false, + reason: { + code: 1, + codeString: "DOCUMENT_NOT_ISSUED", + message: + "Certificate 0xda7a25d51e62bc50e1c7cfa17f7be0e5df3428b96f584e5d021f0cd8da97306d has not been issued under contract 0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + }, + }, + ], + issuedOnAll: false, + }, + reason: { + code: 1, + codeString: "DOCUMENT_NOT_ISSUED", + message: + "Certificate 0xda7a25d51e62bc50e1c7cfa17f7be0e5df3428b96f584e5d021f0cd8da97306d has not been issued under contract 0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + }, + status: "INVALID", + }, + { + data: true, + status: "VALID", + name: "OpenAttestationHash", + type: "DOCUMENT_INTEGRITY", + }, + { + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + name: "OpenAttestationEthereumTokenRegistryMinted", + status: "SKIPPED", + type: "DOCUMENT_STATUS", + }, + { + name: "OpenAttestationDnsTxtIdentityProof", + type: "ISSUER_IDENTITY", + data: [ + { + status: "VALID", + location: "example.tradetrust.io", + value: "0xe59877ac86c0310e9ddaeb627f42fdee5f793fbe", + }, + ], + status: "VALID", + }, +]; + +export const whenDocumentValidAndIssuedByDns = [ + { + data: true, + status: "VALID", + name: "OpenAttestationHash", + type: "DOCUMENT_INTEGRITY", + }, + { + name: "OpenAttestationEthereumDocumentStoreStatus", + type: "DOCUMENT_STATUS", + data: { + issuedOnAll: true, + revokedOnAny: false, + details: { + issuance: [ + { + issued: true, + address: "0xF02F69B0c9F9Fc74110545E20a4A8CE7e0575fb4", + }, + ], + revocation: [ + { + revoked: false, + address: "0xF02F69B0c9F9Fc74110545E20a4A8CE7e0575fb4", + }, + ], + }, + }, + status: "VALID", + }, + { + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + name: "OpenAttestationEthereumTokenRegistryMinted", + status: "SKIPPED", + type: "DOCUMENT_STATUS", + }, + { + name: "OpenAttestationDnsTxtIdentityProof", + type: "ISSUER_IDENTITY", + data: [ + { + status: "VALID", + location: "example.tradetrust.io", + value: "0xe59877ac86c0310e9ddaeb627f42fdee5f793fbe", + }, + ], + status: "VALID", + }, +]; + +export const whenDocumentValidAndIssuedByDid = [ + { + data: true, + status: "VALID", + name: "OpenAttestationHash", + type: "DOCUMENT_INTEGRITY", + }, + { + data: { + details: [ + { + address: "0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + issued: true, + }, + ], + issuedOnAll: true, + }, + status: "VALID", + name: "OpenAttestationEthereumDocumentStoreIssued", + type: "DOCUMENT_STATUS", + }, + { + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + name: "OpenAttestationEthereumTokenRegistryMinted", + status: "SKIPPED", + type: "DOCUMENT_STATUS", + }, + { + data: { + details: [ + { + address: "0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + revoked: false, + }, + ], + revokedOnAny: false, + }, + status: "VALID", + name: "OpenAttestationEthereumDocumentStoreRevoked", + type: "DOCUMENT_STATUS", + }, + { + name: "OpenAttestationDidIdentityProof", + type: "ISSUER_IDENTITY", + data: [ + { + status: "VALID", + did: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89", + }, + ], + status: "VALID", + }, +]; + +export const whenDocumentHashInvalid = [ + ...whenDocumentValidAndIssuedByDns.filter((fragment) => fragment.type !== "DOCUMENT_INTEGRITY"), + { + data: false, + reason: { + code: 0, + codeString: "DOCUMENT_TAMPERED", + message: "Certificate has been tampered with", + }, + status: "INVALID", + name: "OpenAttestationHash", + type: "DOCUMENT_INTEGRITY", + }, +]; + +export const whenDocumentRevokedAndIdentifiedByDnsDid = [ + { + type: "DOCUMENT_INTEGRITY", + name: "OpenAttestationHash", + data: true, + status: "VALID", + }, + { + status: "SKIPPED", + type: "DOCUMENT_STATUS", + name: "OpenAttestationEthereumTokenRegistryStatus", + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + }, + { + status: "SKIPPED", + type: "DOCUMENT_STATUS", + name: "OpenAttestationEthereumDocumentStoreStatus", + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "documentStore" or "certificateStore" property or DOCUMENT_STORE method', + }, + }, + { + name: "OpenAttestationDidSignedDocumentStatus", + type: "DOCUMENT_STATUS", + data: { + issuedOnAll: true, + revokedOnAny: true, + details: { + issuance: [ + { + issued: true, + did: "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733", + }, + ], + revocation: [ + { + revoked: true, + address: "0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", + reason: { + message: + "Document 0x3752f29527952e7ccc6bf4da614d80f2fec9e5bd8b71adf10beb4e6763e6c233 has been revoked under contract 0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", + code: 5, + codeString: "DOCUMENT_REVOKED", + }, + }, + ], + }, + }, + status: "INVALID", + reason: { + message: + "Document 0x3752f29527952e7ccc6bf4da614d80f2fec9e5bd8b71adf10beb4e6763e6c233 has been revoked under contract 0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD", + code: 5, + codeString: "DOCUMENT_REVOKED", + }, + }, + { + status: "SKIPPED", + type: "ISSUER_IDENTITY", + name: "OpenAttestationDnsTxtIdentityProof", + reason: { + code: 2, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "documentStore" / "tokenRegistry" property or doesn\'t use DNS-TXT type', + }, + }, + { + name: "OpenAttestationDnsDidIdentityProof", + type: "ISSUER_IDENTITY", + data: [ + { + location: "demo-tradetrust.openattestation.com", + key: "did:ethr:0x1245e5B64D785b25057f7438F715f4aA5D965733#controller", + status: "VALID", + }, + ], + status: "VALID", + }, +]; + +export const whenDocumentIssuedAndRevokedByEthereumDocStore = [ + { + type: "DOCUMENT_INTEGRITY", + name: "OpenAttestationHash", + data: true, + status: "VALID", + }, + { + status: "SKIPPED", + type: "DOCUMENT_STATUS", + name: "OpenAttestationEthereumTokenRegistryStatus", + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + }, + { + name: "OpenAttestationEthereumDocumentStoreStatus", + type: "DOCUMENT_STATUS", + data: { + issuedOnAll: true, + revokedOnAny: true, + details: { + issuance: [ + { + issued: true, + address: "0xF02F69B0c9F9Fc74110545E20a4A8CE7e0575fb4", + }, + ], + revocation: [ + { + revoked: true, + address: "0xF02F69B0c9F9Fc74110545E20a4A8CE7e0575fb4", + reason: { + message: + "Document 0x1268951303ad546f18d00f26344b1841d4f6a4f432cec898308a3535ba7f9bdd has been revoked under contract 0xF02F69B0c9F9Fc74110545E20a4A8CE7e0575fb4", + code: 5, + codeString: "DOCUMENT_REVOKED", + }, + }, + ], + }, + }, + reason: { + message: + "Document 0x1268951303ad546f18d00f26344b1841d4f6a4f432cec898308a3535ba7f9bdd has been revoked under contract 0xF02F69B0c9F9Fc74110545E20a4A8CE7e0575fb4", + code: 5, + codeString: "DOCUMENT_REVOKED", + }, + status: "INVALID", + }, + { + status: "SKIPPED", + type: "DOCUMENT_STATUS", + name: "OpenAttestationDidSignedDocumentStatus", + reason: { + code: 0, + codeString: "SKIPPED", + message: "Document was not signed by DID directly", + }, + }, + { + name: "OpenAttestationDnsTxtIdentityProof", + type: "ISSUER_IDENTITY", + data: [ + { + status: "VALID", + location: "inc-brown-jaguar.sandbox.fyntech.io", + value: "0xF02F69B0c9F9Fc74110545E20a4A8CE7e0575fb4", + }, + ], + status: "VALID", + }, + { + status: "SKIPPED", + type: "ISSUER_IDENTITY", + name: "OpenAttestationDnsDidIdentityProof", + reason: { + code: 0, + codeString: "SKIPPED", + message: "Document was not issued using DNS-DID", + }, + }, + { + status: "SKIPPED", + type: "ISSUER_IDENTITY", + name: "OpenAttestationDidIdentityProof", + reason: { + code: 0, + codeString: "SKIPPED", + message: "Document is not using DID as top level identifier or has not been wrapped", + }, + }, +]; + +export const whenDocumentIssuerIdentityInvalidDnsTxt = [ + { + data: true, + status: "VALID", + name: "OpenAttestationHash", + type: "DOCUMENT_INTEGRITY", + }, + { + data: { + details: [ + { + address: "0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + issued: true, + }, + ], + issuedOnAll: true, + }, + status: "VALID", + name: "OpenAttestationEthereumDocumentStoreIssued", + type: "DOCUMENT_STATUS", + }, + { + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + name: "OpenAttestationEthereumTokenRegistryMinted", + status: "SKIPPED", + type: "DOCUMENT_STATUS", + }, + { + data: { + details: [ + { + address: "0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + revoked: false, + }, + ], + revokedOnAny: false, + }, + status: "VALID", + name: "OpenAttestationEthereumDocumentStoreRevoked", + type: "DOCUMENT_STATUS", + }, + { + reason: { + code: 2, + codeString: "SKIPPED", + message: `Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type`, + }, + status: "SKIPPED", + name: "OpenAttestationDnsTxtIdentityProof", + type: "ISSUER_IDENTITY", + }, +]; + +export const whenDocumentIssuerIdentityInvalidDid = [ + { + data: true, + status: "VALID", + name: "OpenAttestationHash", + type: "DOCUMENT_INTEGRITY", + }, + { + data: { + details: [ + { + address: "0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + issued: true, + }, + ], + issuedOnAll: true, + }, + status: "VALID", + name: "OpenAttestationEthereumDocumentStoreIssued", + type: "DOCUMENT_STATUS", + }, + { + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + name: "OpenAttestationEthereumTokenRegistryMinted", + status: "SKIPPED", + type: "DOCUMENT_STATUS", + }, + { + data: { + details: [ + { + address: "0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + revoked: false, + }, + ], + revokedOnAny: false, + }, + status: "VALID", + name: "OpenAttestationEthereumDocumentStoreRevoked", + type: "DOCUMENT_STATUS", + }, + { + reason: { + code: 2, + codeString: "SKIPPED", + message: `Document is not using DID as top level identifier`, + }, + status: "SKIPPED", + name: "OpenAttestationDidIdentityProof", + type: "ISSUER_IDENTITY", + }, +]; + +export const whenTransferableDocumentVerified = [ + { type: "DOCUMENT_INTEGRITY", name: "OpenAttestationHash", data: true, status: "VALID" }, + { + status: "SKIPPED", + type: "DOCUMENT_STATUS", + name: "OpenAttestationEthereumDocumentStoreIssued", + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "documentStore" or "certificateStore" property or DOCUMENT_STORE method', + }, + }, + { + name: "OpenAttestationEthereumTokenRegistryMinted", + type: "DOCUMENT_STATUS", + data: { mintedOnAll: true, details: [{ minted: true, address: "0xc3E9eBc6aDA9BA4B4Ce65D71901Cb2307e9670cE" }] }, + status: "VALID", + }, + { + status: "SKIPPED", + type: "DOCUMENT_STATUS", + name: "OpenAttestationEthereumDocumentStoreRevoked", + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "documentStore" or "certificateStore" property or DOCUMENT_STORE method', + }, + }, + { + name: "OpenAttestationDnsTxtIdentityProof", + type: "ISSUER_IDENTITY", + data: [ + { + status: "VALID", + location: "demo-tradetrust.openattestation.com", + value: "0xc3E9eBc6aDA9BA4B4Ce65D71901Cb2307e9670cE", + }, + ], + status: "VALID", + }, +]; + +export const whenDocumentInvalid = [ + { + status: "SKIPPED", + type: "DOCUMENT_INTEGRITY", + name: "OpenAttestationHash", + reason: { + code: 2, + codeString: "SKIPPED", + message: "Document does not have merkle root, target hash or data.", + }, + }, + { + status: "SKIPPED", + type: "DOCUMENT_STATUS", + name: "OpenAttestationEthereumTokenRegistryStatus", + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + }, + { + status: "SKIPPED", + type: "DOCUMENT_STATUS", + name: "OpenAttestationEthereumDocumentStoreStatus", + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "documentStore" or "certificateStore" property or DOCUMENT_STORE method', + }, + }, + { + status: "SKIPPED", + type: "DOCUMENT_STATUS", + name: "OpenAttestationDidSignedDocumentStatus", + reason: { + code: 0, + codeString: "SKIPPED", + message: "Document was not signed by DID directly", + }, + }, + { + status: "SKIPPED", + type: "ISSUER_IDENTITY", + name: "OpenAttestationDnsTxtIdentityProof", + reason: { + code: 2, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "documentStore" / "tokenRegistry" property or doesn\'t use DNS-TXT type', + }, + }, + { + status: "SKIPPED", + type: "ISSUER_IDENTITY", + name: "OpenAttestationDnsDidIdentityProof", + reason: { + code: 0, + codeString: "SKIPPED", + message: "Document was not issued using DNS-DID", + }, + }, + { + status: "SKIPPED", + type: "ISSUER_IDENTITY", + name: "OpenAttestationDidIdentityProof", + reason: { + code: 0, + codeString: "SKIPPED", + message: "Document is not using DID as top level identifier or has not been wrapped", + }, + }, +]; + +export const whenDocumentAddressInvalid = [ + { + type: "DOCUMENT_INTEGRITY", + name: "OpenAttestationHash", + data: true, + status: "VALID", + }, + { + status: "SKIPPED", + type: "DOCUMENT_STATUS", + name: "OpenAttestationEthereumTokenRegistryStatus", + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + }, + { + name: "OpenAttestationEthereumDocumentStoreStatus", + type: "DOCUMENT_STATUS", + data: { + issuedOnAll: true, + revokedOnAny: true, + details: { + issuance: [ + { + issued: true, + address: "0xF02F69B0c9F9Fc74110545E20a4A8CE7e0575fb4", + }, + ], + revocation: [ + { + revoked: true, + address: "0xF02F69B0c9F9Fc74110545E20a4A8CE7e0575fb4", + reason: { + message: "Invalid document store address", + code: 1, + codeString: "DOCUMENT_STORE_ADDRESS_INVALID", + }, + }, + ], + }, + }, + reason: { + code: 1, + codeString: "DOCUMENT_STORE_ADDRESS_INVALID", + message: "Invalid document store address", + }, + status: "INVALID", + }, + { + status: "SKIPPED", + type: "DOCUMENT_STATUS", + name: "OpenAttestationDidSignedDocumentStatus", + reason: { + code: 0, + codeString: "SKIPPED", + message: "Document was not signed by DID directly", + }, + }, + { + name: "OpenAttestationDnsTxtIdentityProof", + type: "ISSUER_IDENTITY", + data: [ + { + status: "VALID", + location: "inc-brown-jaguar.sandbox.fyntech.io", + value: "0xF02F69B0c9F9Fc74110545E20a4A8CE7e0575fb4", + }, + ], + status: "VALID", + }, + { + status: "SKIPPED", + type: "ISSUER_IDENTITY", + name: "OpenAttestationDnsDidIdentityProof", + reason: { + code: 0, + codeString: "SKIPPED", + message: "Document was not issued using DNS-DID", + }, + }, + { + status: "SKIPPED", + type: "ISSUER_IDENTITY", + name: "OpenAttestationDidIdentityProof", + reason: { + code: 0, + codeString: "SKIPPED", + message: "Document is not using DID as top level identifier or has not been wrapped", + }, + }, +]; + +export const whenDocumentNotFound = [ + { + data: true, + status: "VALID", + name: "OpenAttestationHash", + type: "DOCUMENT_INTEGRITY", + }, + { + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + name: "OpenAttestationEthereumTokenRegistryMinted", + status: "SKIPPED", + type: "DOCUMENT_STATUS", + }, + { + data: { + details: [ + { + address: "0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + revoked: false, + }, + ], + revokedOnAny: false, + }, + status: "INVALID", + name: "OpenAttestationEthereumDocumentStoreStatus", + type: "DOCUMENT_STATUS", + reason: { + code: 1, + codeString: "1", + message: "Contract is not found", + }, + }, + { + name: "OpenAttestationDnsTxtIdentityProof", + type: "ISSUER_IDENTITY", + data: [ + { + status: "VALID", + location: "example.tradetrust.io", + value: "0xe59877ac86c0310e9ddaeb627f42fdee5f793fbe", + }, + ], + status: "VALID", + }, +]; + +export const whenInvalidCallArgument = [ + { + data: true, + status: "INVALID", + name: "OpenAttestationHash", + type: "DOCUMENT_INTEGRITY", + }, + { + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + name: "OpenAttestationEthereumTokenRegistryMinted", + status: "SKIPPED", + type: "DOCUMENT_STATUS", + }, + { + data: { + details: [ + { + address: "0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + revoked: false, + }, + ], + revokedOnAny: false, + }, + status: "INVALID", + name: "OpenAttestationEthereumDocumentStoreStatus", + type: "DOCUMENT_STATUS", + reason: { + code: 1, + codeString: "1", + message: "Invalid call arguments", + }, + }, + { + name: "OpenAttestationDnsTxtIdentityProof", + type: "ISSUER_IDENTITY", + data: [ + { + status: "VALID", + location: "example.tradetrust.io", + value: "0xe59877ac86c0310e9ddaeb627f42fdee5f793fbe", + }, + ], + status: "VALID", + }, +]; + +export const whenServerError = [ + { + data: true, + status: "VALID", + name: "OpenAttestationHash", + type: "DOCUMENT_INTEGRITY", + }, + { + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + name: "OpenAttestationEthereumTokenRegistryMinted", + status: "SKIPPED", + type: "DOCUMENT_STATUS", + }, + { + data: { + details: [ + { + address: "0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + revoked: false, + }, + ], + revokedOnAny: false, + }, + status: "INVALID", + name: "OpenAttestationEthereumDocumentStoreStatus", + type: "DOCUMENT_STATUS", + reason: { + code: 500, + codeString: "SERVER_ERROR", + message: "Server error", + }, + }, + { + name: "OpenAttestationDnsTxtIdentityProof", + type: "ISSUER_IDENTITY", + data: [ + { + status: "VALID", + location: "example.tradetrust.io", + value: "0xe59877ac86c0310e9ddaeb627f42fdee5f793fbe", + }, + ], + status: "VALID", + }, +]; + +export const whenUnhandledError = [ + { + data: true, + status: "VALID", + name: "OpenAttestationHash", + type: "DOCUMENT_INTEGRITY", + }, + { + reason: { + code: 4, + codeString: "SKIPPED", + message: 'Document issuers doesn\'t have "tokenRegistry" property or TOKEN_REGISTRY method', + }, + name: "OpenAttestationEthereumTokenRegistryMinted", + status: "SKIPPED", + type: "DOCUMENT_STATUS", + }, + { + data: { + details: [ + { + address: "0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", + revoked: false, + }, + ], + revokedOnAny: false, + }, + status: "INVALID", + name: "OpenAttestationEthereumDocumentStoreStatus", + type: "DOCUMENT_STATUS", + reason: { + code: 3, + codeString: "UNHANDLED_ERROR", + message: "Unhandled error", + }, + }, + { + name: "OpenAttestationDnsTxtIdentityProof", + type: "ISSUER_IDENTITY", + data: [ + { + status: "VALID", + location: "example.tradetrust.io", + value: "0xe59877ac86c0310e9ddaeb627f42fdee5f793fbe", + }, + ], + status: "VALID", + }, +]; diff --git a/test/fixtures/v2/dns-did.ts b/test/fixtures/verify/v2/dns-did.ts similarity index 100% rename from test/fixtures/v2/dns-did.ts rename to test/fixtures/verify/v2/dns-did.ts diff --git a/test/fixtures/v2/dns-txt-doc-store.ts b/test/fixtures/verify/v2/dns-txt-doc-store.ts similarity index 100% rename from test/fixtures/v2/dns-txt-doc-store.ts rename to test/fixtures/verify/v2/dns-txt-doc-store.ts diff --git a/test/fixtures/v2/dns-txt-token-reg.ts b/test/fixtures/verify/v2/dns-txt-token-reg.ts similarity index 100% rename from test/fixtures/v2/dns-txt-token-reg.ts rename to test/fixtures/verify/v2/dns-txt-token-reg.ts diff --git a/test/fixtures/v3/dns-did.ts b/test/fixtures/verify/v3/dns-did.ts similarity index 100% rename from test/fixtures/v3/dns-did.ts rename to test/fixtures/verify/v3/dns-did.ts diff --git a/test/fixtures/v3/dns-txt-doc-store.ts b/test/fixtures/verify/v3/dns-txt-doc-store.ts similarity index 100% rename from test/fixtures/v3/dns-txt-doc-store.ts rename to test/fixtures/verify/v3/dns-txt-doc-store.ts diff --git a/test/fixtures/v3/dns-txt-token-reg.ts b/test/fixtures/verify/v3/dns-txt-token-reg.ts similarity index 100% rename from test/fixtures/v3/dns-txt-token-reg.ts rename to test/fixtures/verify/v3/dns-txt-token-reg.ts From d6aeace92f58ee20293551f8f65750c80a158e67 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Wed, 21 Feb 2024 18:33:59 +0800 Subject: [PATCH 30/34] ci: make test blockchain exits after tests hv been executed --- .github/workflows/tests.yml | 2 +- package-lock.json | 1371 ++++++++++++++++++++--------------- package.json | 7 +- 3 files changed, 791 insertions(+), 589 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9ec785c..09b8370 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: with: node-version: 18.x - run: npm ci - - run: npm run test:concurrently + - run: npm run test:ci test-build: name: Test Build diff --git a/package-lock.json b/package-lock.json index c609d1c..8dc3cff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,12 +23,16 @@ "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "commitizen": "^4.3.0", + "concurrently": "^6.2.0", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.56.0", "npm-run-all": "^4.1.5", "prettier": "^3.2.4", "typescript": "^5.3.3", "vitest": "^1.2.2" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -264,6 +268,18 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/runtime": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", + "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/types": { "version": "7.23.9", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz", @@ -295,47 +311,23 @@ } }, "node_modules/@commitlint/config-validator": { - "version": "18.6.0", - "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-18.6.0.tgz", - "integrity": "sha512-Ptfa865arNozlkjxrYG3qt6wT9AlhNUHeuDyKEZiTL/l0ftncFhK/KN0t/EAMV2tec+0Mwxo0FmhbESj/bI+1g==", + "version": "18.6.1", + "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-18.6.1.tgz", + "integrity": "sha512-05uiToBVfPhepcQWE1ZQBR/Io3+tb3gEotZjnI4tTzzPk16NffN6YABgwFQCLmzZefbDcmwWqJWc2XT47q7Znw==", "dev": true, "optional": true, "dependencies": { - "@commitlint/types": "^18.6.0", + "@commitlint/types": "^18.6.1", "ajv": "^8.11.0" }, "engines": { "node": ">=v18" } }, - "node_modules/@commitlint/config-validator/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "optional": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@commitlint/config-validator/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "optional": true - }, "node_modules/@commitlint/execute-rule": { - "version": "18.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-18.4.4.tgz", - "integrity": "sha512-a37Nd3bDQydtg9PCLLWM9ZC+GO7X5i4zJvrggJv5jBhaHsXeQ9ZWdO6ODYR+f0LxBXXNYK3geYXJrCWUCP8JEg==", + "version": "18.6.1", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-18.6.1.tgz", + "integrity": "sha512-7s37a+iWyJiGUeMFF6qBlyZciUkF8odSAnHijbD36YDctLhGKoYltdvuJ/AFfRm6cBLRtRk9cCVPdsEFtt/2rg==", "dev": true, "optional": true, "engines": { @@ -343,16 +335,16 @@ } }, "node_modules/@commitlint/load": { - "version": "18.6.0", - "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-18.6.0.tgz", - "integrity": "sha512-RRssj7TmzT0bowoEKlgwg8uQ7ORXWkw7lYLsZZBMi9aInsJuGNLNWcMxJxRZbwxG3jkCidGUg85WmqJvRjsaDA==", + "version": "18.6.1", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-18.6.1.tgz", + "integrity": "sha512-p26x8734tSXUHoAw0ERIiHyW4RaI4Bj99D8YgUlVV9SedLf8hlWAfyIFhHRIhfPngLlCe0QYOdRKYFt8gy56TA==", "dev": true, "optional": true, "dependencies": { - "@commitlint/config-validator": "^18.6.0", - "@commitlint/execute-rule": "^18.4.4", - "@commitlint/resolve-extends": "^18.6.0", - "@commitlint/types": "^18.6.0", + "@commitlint/config-validator": "^18.6.1", + "@commitlint/execute-rule": "^18.6.1", + "@commitlint/resolve-extends": "^18.6.1", + "@commitlint/types": "^18.6.1", "chalk": "^4.1.0", "cosmiconfig": "^8.3.6", "cosmiconfig-typescript-loader": "^5.0.0", @@ -365,25 +357,15 @@ "node": ">=v18" } }, - "node_modules/@commitlint/load/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "optional": true, - "engines": { - "node": ">=8" - } - }, "node_modules/@commitlint/resolve-extends": { - "version": "18.6.0", - "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-18.6.0.tgz", - "integrity": "sha512-k2Xp+Fxeggki2i90vGrbiLDMefPius3zGSTFFlRAPKce/SWLbZtI+uqE9Mne23mHO5lmcSV8z5m6ziiJwGpOcg==", + "version": "18.6.1", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-18.6.1.tgz", + "integrity": "sha512-ifRAQtHwK+Gj3Bxj/5chhc4L2LIc3s30lpsyW67yyjsETR6ctHAHRu1FSpt0KqahK5xESqoJ92v6XxoDRtjwEQ==", "dev": true, "optional": true, "dependencies": { - "@commitlint/config-validator": "^18.6.0", - "@commitlint/types": "^18.6.0", + "@commitlint/config-validator": "^18.6.1", + "@commitlint/types": "^18.6.1", "import-fresh": "^3.0.0", "lodash.mergewith": "^4.6.2", "resolve-from": "^5.0.0", @@ -393,20 +375,10 @@ "node": ">=v18" } }, - "node_modules/@commitlint/resolve-extends/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "optional": true, - "engines": { - "node": ">=8" - } - }, "node_modules/@commitlint/types": { - "version": "18.6.0", - "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-18.6.0.tgz", - "integrity": "sha512-oavoKLML/eJa2rJeyYSbyGAYzTxQ6voG5oeX3OrxpfrkRWhJfm4ACnhoRf5tgiybx2MZ+EVFqC1Lw3W8/uwpZA==", + "version": "18.6.1", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-18.6.1.tgz", + "integrity": "sha512-gwRLBLra/Dozj2OywopeuHj2ac26gjGkz2cZ+86cTJOdtWfiRRr4+e77ZDAGc6MDWxaWheI+mAV5TLWWRwqrFg==", "dev": true, "optional": true, "dependencies": { @@ -808,6 +780,22 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -818,6 +806,12 @@ "concat-map": "0.0.1" } }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1534,11 +1528,6 @@ "@ethersproject/strings": "^5.7.0" } }, - "node_modules/@govtechsg/document-store": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@govtechsg/document-store/-/document-store-2.6.1.tgz", - "integrity": "sha512-Jr8dGyr8wBXMOSbUURoYfmz9jKiK2ntbjEYyI06pze6jzyiYLZXcepKVyjNk9PC/mLIlDCZgQWmre7ixBZWWjQ==" - }, "node_modules/@govtechsg/jsonld": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@govtechsg/jsonld/-/jsonld-0.1.1.tgz", @@ -1562,17 +1551,6 @@ "node-forge": "1.3.1" } }, - "node_modules/@govtechsg/token-registry": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@govtechsg/token-registry/-/token-registry-4.3.0.tgz", - "integrity": "sha512-KW73mZAz2EoC0gjt9xnu1MJYBuE/ohP18HWXPv/ZRTweaJa7QHrq8PQ9u97UMjvdFz14k7sPAC9ZlNRNaSst3A==", - "dependencies": { - "@typechain/ethers-v5": "~10.0.0" - }, - "peerDependencies": { - "ethers": ">=5.0.8" - } - }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -1661,9 +1639,9 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "engines": { "node": ">=6.0.0" } @@ -1748,9 +1726,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.6.tgz", - "integrity": "sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz", + "integrity": "sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==", "cpu": [ "arm" ], @@ -1760,9 +1738,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.6.tgz", - "integrity": "sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.12.0.tgz", + "integrity": "sha512-OBqcX2BMe6nvjQ0Nyp7cC90cnumt8PXmO7Dp3gfAju/6YwG0Tj74z1vKrfRz7qAv23nBcYM8BCbhrsWqO7PzQQ==", "cpu": [ "arm64" ], @@ -1772,9 +1750,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.6.tgz", - "integrity": "sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.12.0.tgz", + "integrity": "sha512-X64tZd8dRE/QTrBIEs63kaOBG0b5GVEd3ccoLtyf6IdXtHdh8h+I56C2yC3PtC9Ucnv0CpNFJLqKFVgCYe0lOQ==", "cpu": [ "arm64" ], @@ -1784,9 +1762,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.6.tgz", - "integrity": "sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.12.0.tgz", + "integrity": "sha512-cc71KUZoVbUJmGP2cOuiZ9HSOP14AzBAThn3OU+9LcA1+IUqswJyR1cAJj3Mg55HbjZP6OLAIscbQsQLrpgTOg==", "cpu": [ "x64" ], @@ -1796,9 +1774,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.6.tgz", - "integrity": "sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.12.0.tgz", + "integrity": "sha512-a6w/Y3hyyO6GlpKL2xJ4IOh/7d+APaqLYdMf86xnczU3nurFTaVN9s9jOXQg97BE4nYm/7Ga51rjec5nfRdrvA==", "cpu": [ "arm" ], @@ -1808,9 +1786,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.6.tgz", - "integrity": "sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.12.0.tgz", + "integrity": "sha512-0fZBq27b+D7Ar5CQMofVN8sggOVhEtzFUwOwPppQt0k+VR+7UHMZZY4y+64WJ06XOhBTKXtQB/Sv0NwQMXyNAA==", "cpu": [ "arm64" ], @@ -1820,9 +1798,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.6.tgz", - "integrity": "sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.12.0.tgz", + "integrity": "sha512-eTvzUS3hhhlgeAv6bfigekzWZjaEX9xP9HhxB0Dvrdbkk5w/b+1Sxct2ZuDxNJKzsRStSq1EaEkVSEe7A7ipgQ==", "cpu": [ "arm64" ], @@ -1832,9 +1810,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.6.tgz", - "integrity": "sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.12.0.tgz", + "integrity": "sha512-ix+qAB9qmrCRiaO71VFfY8rkiAZJL8zQRXveS27HS+pKdjwUfEhqo2+YF2oI+H/22Xsiski+qqwIBxVewLK7sw==", "cpu": [ "riscv64" ], @@ -1844,9 +1822,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.6.tgz", - "integrity": "sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.12.0.tgz", + "integrity": "sha512-TenQhZVOtw/3qKOPa7d+QgkeM6xY0LtwzR8OplmyL5LrgTWIXpTQg2Q2ycBf8jm+SFW2Wt/DTn1gf7nFp3ssVA==", "cpu": [ "x64" ], @@ -1856,9 +1834,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.6.tgz", - "integrity": "sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.12.0.tgz", + "integrity": "sha512-LfFdRhNnW0zdMvdCb5FNuWlls2WbbSridJvxOvYWgSBOYZtgBfW9UGNJG//rwMqTX1xQE9BAodvMH9tAusKDUw==", "cpu": [ "x64" ], @@ -1868,9 +1846,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.6.tgz", - "integrity": "sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.12.0.tgz", + "integrity": "sha512-JPDxovheWNp6d7AHCgsUlkuCKvtu3RB55iNEkaQcf0ttsDU/JZF+iQnYcQJSk/7PtT4mjjVG8N1kpwnI9SLYaw==", "cpu": [ "arm64" ], @@ -1880,9 +1858,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.6.tgz", - "integrity": "sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.12.0.tgz", + "integrity": "sha512-fjtuvMWRGJn1oZacG8IPnzIV6GF2/XG+h71FKn76OYFqySXInJtseAqdprVTDTyqPxQOG9Exak5/E9Z3+EJ8ZA==", "cpu": [ "ia32" ], @@ -1892,9 +1870,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.6.tgz", - "integrity": "sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.0.tgz", + "integrity": "sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg==", "cpu": [ "x64" ], @@ -1942,9 +1920,9 @@ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" }, "node_modules/@snyk/protect": { - "version": "1.1280.0", - "resolved": "https://registry.npmjs.org/@snyk/protect/-/protect-1.1280.0.tgz", - "integrity": "sha512-huyztYdA2UzgEG4JGlJBDs8mnQyHisXbH6Onv58nrIjFa2mPhsZx2l0/Ey6HKOKva+ZlpMYM3hz4+iboIlXfNw==", + "version": "1.1280.1", + "resolved": "https://registry.npmjs.org/@snyk/protect/-/protect-1.1280.1.tgz", + "integrity": "sha512-4PyEQMRVqwLYZlfqhfztbMAyBl7M6Wj89XsySSjSdzUEYSr0ZTYOFQo8OUTf0xmfdPU56xnIGeIOv9qgSgZbBg==", "bin": { "snyk-protect": "bin/snyk-protect" }, @@ -1953,13 +1931,16 @@ } }, "node_modules/@tradetrust-tt/dnsprove": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/@tradetrust-tt/dnsprove/-/dnsprove-2.9.0.tgz", - "integrity": "sha512-cFhspKvCdoeYS9UqOTEQgD+tS8YRscPnOZNAqodxQMtgjSJx9DvXF9uGS8lXt/ZpfTR0ublGGiDOPsezagt0IQ==", + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/dnsprove/-/dnsprove-2.10.1.tgz", + "integrity": "sha512-C3ytoN0byLGHAMvm+rs0ErcDRAStk8o5NVUlGR8syLa/MQoXjdhMubEQo/vndytqhxipjNgKGvD0cF4G6ZTsYQ==", "dependencies": { - "axios": "^0.21.1", + "axios": "^1.6.3", "debug": "^4.3.1", "runtypes": "^6.3.0" + }, + "engines": { + "node": "18.x" } }, "node_modules/@tradetrust-tt/document-store": { @@ -2000,9 +1981,9 @@ } }, "node_modules/@tradetrust-tt/tradetrust-cli": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust-cli/-/tradetrust-cli-2.17.1.tgz", - "integrity": "sha512-sv5+N7JLgmsSDzbzcRXvt8dyEdB9p2+NEpgbHnmusWTDGFj6oKjko82ZlCG/DCH0QFGcNNBq0AdOmyqxECqX1g==", + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust-cli/-/tradetrust-cli-2.17.2.tgz", + "integrity": "sha512-Yia/liqm+5gEThuHXZRvAn0DG0MjVFipf8JHIQ/YJLWSJNhKXWwkwGMiK/BagyXdnigHn/vuPfcy11ATHvwsDA==", "dependencies": { "@govtechsg/oa-encryption": "^1.3.3", "@snyk/protect": "^1.1196.0", @@ -2030,30 +2011,10 @@ "tt": "dist/cjs/index.js" } }, - "node_modules/@tradetrust-tt/tradetrust-cli/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@tradetrust-tt/tradetrust-cli/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/@tradetrust-tt/tradetrust-config": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust-config/-/tradetrust-config-1.10.0.tgz", - "integrity": "sha512-20X62HTF9+EUNbuv73wiObNGaPwPRdhiOLTUyDgliKSMTLOmrU4MRiyp1tyyNulDvWqJ9rh380mzgWrb8zmN+Q==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust-config/-/tradetrust-config-1.11.0.tgz", + "integrity": "sha512-5daAix7FREEKMIUC40AQvLZ2Bx/khjPjFTqiC9J2owxnuVZKETvz9O7DVPlH19Xp+JV/S6wgEJCLtjwkTHme4Q==", "dependencies": { "ajv": "^8.12.0", "ajv-formats": "^2.1.1", @@ -2061,73 +2022,41 @@ "typedoc": "^0.25.4" } }, - "node_modules/@tradetrust-tt/tradetrust-config/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@tradetrust-tt/tradetrust-config/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/@tradetrust-tt/tradetrust-utils": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust-utils/-/tradetrust-utils-1.9.1.tgz", - "integrity": "sha512-ZHOHV/REi/qgZ0eLfqy1kCjl1HhACQvfbk8dU1KyUSUusBb7WdLzoyi2HX6MPtM1EHNCDlPJvn+UrLEWBlKniw==", - "dependencies": { - "@tradetrust-tt/tt-verify": "^8.4.0" - } - }, - "node_modules/@tradetrust-tt/tradetrust/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust-utils/-/tradetrust-utils-1.10.0.tgz", + "integrity": "sha512-Nh5DxGb0dMO58yw2AXEyOe2sz8Xkj2psQxRH2PWPuHmUyltZdPTZjOva2DktHfewDkaJx4rzLoGuGaMZhUGJtA==", "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "@tradetrust-tt/tt-verify": "^8.6.0" } }, - "node_modules/@tradetrust-tt/tradetrust/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/@tradetrust-tt/tt-verify": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@tradetrust-tt/tt-verify/-/tt-verify-8.4.0.tgz", - "integrity": "sha512-+Cg7kUJ+csnhsc9YWjSQQkmhIR7EpDTz4gy+AwyYSuQ2ie+2A4SL/AWkwVz8zHZxBXXgqySM65pI37fQJuEq4g==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/tt-verify/-/tt-verify-8.7.0.tgz", + "integrity": "sha512-9hMwQ1ByYP4BSpD++oMaS0emI7DKfV/vpoB9P1nTRUWv95EKk+K8Y6+L4DRc3jphRtaS5Ky/w52/51dEZMq7fA==", "dependencies": { - "@govtechsg/document-store": "^2.2.3", - "@govtechsg/token-registry": "^4.1.7", - "@tradetrust-tt/dnsprove": "^2.7.0", + "@tradetrust-tt/dnsprove": "^2.10.1", + "@tradetrust-tt/document-store": "^3.1.0", + "@tradetrust-tt/token-registry": "^4.6.0", "@tradetrust-tt/tradetrust": "^6.9.0", - "axios": "^0.21.4", + "axios": "^1.6.2", "debug": "^4.3.1", - "did-resolver": "^3.1.0", - "ethers": "^5.1.4", - "ethr-did-resolver": "^4.3.3", + "did-resolver": "^4.1.0", + "ethers": "^5.7.2", + "ethr-did-resolver": "^8.1.2", "node-cache": "^5.1.2", "runtypes": "^6.3.0", - "web-did-resolver": "^2.0.4" + "web-did-resolver": "^2.0.27" + }, + "engines": { + "node": "18.x" } }, + "node_modules/@tradetrust-tt/tt-verify/node_modules/@tradetrust-tt/document-store": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/document-store/-/document-store-3.1.0.tgz", + "integrity": "sha512-iqE37xFc/m/uvg6+eUPeMfwbAiQfQp73S5oxxbnlsmObxBFwv1HW+6AuOOSgkTeaFXtWvebw2lGnOR4czwDMlg==" + }, "node_modules/@typechain/ethers-v5": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-10.0.0.tgz", @@ -2162,9 +2091,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.16", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", - "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", + "version": "20.11.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz", + "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==", "optional": true, "peer": true, "dependencies": { @@ -2380,9 +2309,9 @@ "dev": true }, "node_modules/@vitest/coverage-v8": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-1.2.2.tgz", - "integrity": "sha512-IHyKnDz18SFclIEEAHb9Y4Uxx0sPKC2VO1kdDCs1BF6Ip4S8rQprs971zIsooLUn7Afs71GRxWMWpkCGZpRMhw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-1.3.1.tgz", + "integrity": "sha512-UuBnkSJUNE9rdHjDCPyJ4fYuMkoMtnghes1XohYa4At0MS3OQSAo97FrbwSLRshYsXThMZy1+ybD/byK5llyIg==", "dependencies": { "@ampproject/remapping": "^2.2.1", "@bcoe/v8-coverage": "^0.2.3", @@ -2402,16 +2331,16 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "vitest": "^1.0.0" + "vitest": "1.3.1" } }, "node_modules/@vitest/expect": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.2.2.tgz", - "integrity": "sha512-3jpcdPAD7LwHUUiT2pZTj2U82I2Tcgg2oVPvKxhn6mDI2On6tfvPQTjAI4628GUGDZrCm4Zna9iQHm5cEexOAg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.3.1.tgz", + "integrity": "sha512-xofQFwIzfdmLLlHa6ag0dPV8YsnKOCP1KdAeVVh34vSjN2dcUiXYCD9htu/9eM7t8Xln4v03U9HLxLpPlsXdZw==", "dependencies": { - "@vitest/spy": "1.2.2", - "@vitest/utils": "1.2.2", + "@vitest/spy": "1.3.1", + "@vitest/utils": "1.3.1", "chai": "^4.3.10" }, "funding": { @@ -2419,11 +2348,11 @@ } }, "node_modules/@vitest/runner": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.2.2.tgz", - "integrity": "sha512-JctG7QZ4LSDXr5CsUweFgcpEvrcxOV1Gft7uHrvkQ+fsAVylmWQvnaAr/HDp3LAH1fztGMQZugIheTWjaGzYIg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.3.1.tgz", + "integrity": "sha512-5FzF9c3jG/z5bgCnjr8j9LNq/9OxV2uEBAITOXfoe3rdZJTdO7jzThth7FXv/6b+kdY65tpRQB7WaKhNZwX+Kg==", "dependencies": { - "@vitest/utils": "1.2.2", + "@vitest/utils": "1.3.1", "p-limit": "^5.0.0", "pathe": "^1.1.1" }, @@ -2457,9 +2386,9 @@ } }, "node_modules/@vitest/snapshot": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.2.2.tgz", - "integrity": "sha512-SmGY4saEw1+bwE1th6S/cZmPxz/Q4JWsl7LvbQIky2tKE35US4gd0Mjzqfr84/4OD0tikGWaWdMja/nWL5NIPA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.3.1.tgz", + "integrity": "sha512-EF++BZbt6RZmOlE3SuTPu/NfwBF6q4ABS37HHXzs2LUVPBLx2QoY/K0fKpRChSo8eLiuxcbCVfqKgx/dplCDuQ==", "dependencies": { "magic-string": "^0.30.5", "pathe": "^1.1.1", @@ -2470,9 +2399,9 @@ } }, "node_modules/@vitest/spy": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.2.2.tgz", - "integrity": "sha512-k9Gcahssw8d7X3pSLq3e3XEu/0L78mUkCjivUqCQeXJm9clfXR/Td8+AP+VC1O6fKPIDLcHDTAmBOINVuv6+7g==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.3.1.tgz", + "integrity": "sha512-xAcW+S099ylC9VLU7eZfdT9myV67Nor9w9zhf0mGCYJSO+zM2839tOeROTdikOi/8Qeusffvxb/MyBSOja1Uig==", "dependencies": { "tinyspy": "^2.2.0" }, @@ -2481,9 +2410,9 @@ } }, "node_modules/@vitest/utils": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.2.2.tgz", - "integrity": "sha512-WKITBHLsBHlpjnDQahr+XK6RE7MiAsgrIkr0pGhQ9ygoxBfUeG0lUG5iLlzqjmKSlBv3+j5EGsriBzh+C3Tq9g==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.3.1.tgz", + "integrity": "sha512-d3Waie/299qqRyHTm2DjADeTaNdNSVsnwHPWrs20JMpjh6eiVq7ggggweO8rc4arhf6rRkWuHKwvxGvejUXZZQ==", "dependencies": { "diff-sequences": "^29.6.3", "estree-walker": "^3.0.3", @@ -2528,14 +2457,13 @@ "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==" }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dependencies": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" }, "funding": { @@ -2559,26 +2487,6 @@ } } }, - "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -2723,6 +2631,11 @@ "node": "*" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "node_modules/at-least-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", @@ -2733,9 +2646,12 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.6.tgz", - "integrity": "sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -2744,9 +2660,9 @@ } }, "node_modules/aws-sdk": { - "version": "2.1560.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1560.0.tgz", - "integrity": "sha512-nakTZHytnhKWZpwu9d1crqjoegBRG+j1/rflsVnckXxoIwlKM0D/v/NIe+BJmRnCA2aCdwuMx3dtkgLz/AB6VA==", + "version": "2.1562.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1562.0.tgz", + "integrity": "sha512-HsdlDRfVamH4tv+M+d0lnEYdtx+yEpqWA4T2XuJCjtV5JjjHDUQTKm+9C+EoTxLWtuw+SYSVWyuclwETv6CmHQ==", "dependencies": { "buffer": "4.9.2", "events": "1.1.1", @@ -2763,30 +2679,6 @@ "node": ">= 10.0.0" } }, - "node_modules/aws-sdk/node_modules/buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "node_modules/aws-sdk/node_modules/ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" - }, - "node_modules/aws-sdk/node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/aws-sdk/node_modules/uuid": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", @@ -2796,11 +2688,13 @@ } }, "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dependencies": { - "follow-redirects": "^1.14.0" + "follow-redirects": "^1.15.4", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "node_modules/balanced-match": { @@ -2842,6 +2736,29 @@ "readable-stream": "^3.4.0" } }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "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.1.13" + } + }, "node_modules/bn.js": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", @@ -2873,26 +2790,13 @@ "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" }, "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" } }, "node_modules/cac": { @@ -3035,10 +2939,26 @@ "node": ">=12" } }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", "engines": { "node": ">=0.8" } @@ -3059,6 +2979,17 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/command-line-args": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", @@ -3208,6 +3139,64 @@ "node": ">= 12" } }, + "node_modules/commitizen/node_modules/inquirer": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", + "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/commitizen/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/commitizen/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "node_modules/commitizen/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/compare-func": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", @@ -3223,6 +3212,98 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, + "node_modules/concurrently": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz", + "integrity": "sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "rxjs": "^6.6.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^16.2.0" + }, + "bin": { + "concurrently": "bin/concurrently.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/concurrently/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/concurrently/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/conventional-changelog-conventionalcommits": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz", @@ -3405,6 +3486,22 @@ "node": ">=4" } }, + "node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -3464,6 +3561,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/defaults/node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -3497,6 +3602,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", @@ -3516,9 +3629,9 @@ } }, "node_modules/did-resolver": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-3.2.2.tgz", - "integrity": "sha512-Eeo2F524VM5N3W4GwglZrnul2y6TLTwMQP3In62JdG34NZoqihYyOZLk+5wUW8sSgvIYIcJM8Dlt3xsdKZZ3tg==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-4.1.0.tgz", + "integrity": "sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA==" }, "node_modules/diff-sequences": { "version": "29.6.3", @@ -3671,14 +3784,14 @@ } }, "node_modules/es-set-tostringtag": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.2", - "has-tostringtag": "^1.0.0", - "hasown": "^2.0.0" + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -3841,6 +3954,22 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -3851,17 +3980,11 @@ "concat-map": "0.0.1" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", @@ -4041,27 +4164,23 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==" }, - "node_modules/ethr-did-registry": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/ethr-did-registry/-/ethr-did-registry-0.0.3.tgz", - "integrity": "sha512-4BPvMGkxAK9vTduCq6D5b8ZqjteD2cvDIPPriXP6nnmPhWKFSxypo+AFvyQ0omJGa0cGTR+dkdI/8jiF7U/qaw==" - }, "node_modules/ethr-did-resolver": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/ethr-did-resolver/-/ethr-did-resolver-4.3.5.tgz", - "integrity": "sha512-BQO7PQwuqqczK+4AWQhys/sgegDVIFr6+lSoSYXlIbG0oRH0l7PkSuf7VEFKclEJ3JlJ1t9kjDIdj7Ba7euTJg==", - "dependencies": { - "@ethersproject/abi": "^5.1.0", - "@ethersproject/abstract-signer": "^5.1.0", - "@ethersproject/address": "^5.1.0", - "@ethersproject/basex": "^5.1.0", - "@ethersproject/bignumber": "^5.1.0", - "@ethersproject/contracts": "^5.1.0", - "@ethersproject/providers": "^5.1.0", - "@ethersproject/transactions": "^5.1.0", - "did-resolver": "^3.1.0", - "ethr-did-registry": "^0.0.3", - "querystring": "^0.2.1" + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/ethr-did-resolver/-/ethr-did-resolver-8.1.2.tgz", + "integrity": "sha512-dnbE3GItE1YHp/eavR11KbGDi8Il01H9GeH+wKgoSgE95pKBZufHyHYce/EK2k8VOmj6MJf8u/TIpPvxjCbK+A==", + "dependencies": { + "@ethersproject/abi": "^5.6.3", + "@ethersproject/abstract-signer": "^5.6.2", + "@ethersproject/address": "^5.6.1", + "@ethersproject/basex": "^5.6.1", + "@ethersproject/bignumber": "^5.6.2", + "@ethersproject/bytes": "^5.6.1", + "@ethersproject/contracts": "^5.6.2", + "@ethersproject/keccak256": "^5.6.1", + "@ethersproject/providers": "^5.6.8", + "@ethersproject/signing-key": "^5.6.2", + "@ethersproject/transactions": "^5.6.2", + "did-resolver": "^4.0.1" } }, "node_modules/events": { @@ -4094,6 +4213,42 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/execa/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/expand-tilde": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", @@ -4140,6 +4295,18 @@ "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -4153,9 +4320,9 @@ "dev": true }, "node_modules/fastq": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.0.tgz", - "integrity": "sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -4289,9 +4456,9 @@ } }, "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.0.tgz", + "integrity": "sha512-noqGuLw158+DuD9UPRKHpJ2hGxpFyDlYYrfM0mWt4XhT4n0lwzTLh70Tkdyy4kyTmyTT9Bv7bWAJqw7cgkEXDg==", "dev": true }, "node_modules/follow-redirects": { @@ -4321,6 +4488,19 @@ "is-callable": "^1.1.3" } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -4348,7 +4528,8 @@ "hasInstallScript": true, "optional": true, "os": [ - "darwin" + "darwin", + "linux" ], "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" @@ -8333,15 +8514,15 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/glob/node_modules/brace-expansion": { @@ -8520,9 +8701,9 @@ } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "engines": { "node": ">= 0.4" }, @@ -8628,23 +8809,9 @@ } }, "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" }, "node_modules/ignore": { "version": "5.3.1", @@ -8671,6 +8838,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -8701,9 +8877,9 @@ "dev": true }, "node_modules/inquirer": { - "version": "8.2.5", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", - "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", "dependencies": { "ansi-escapes": "^4.2.1", "chalk": "^4.1.1", @@ -8719,12 +8895,25 @@ "string-width": "^4.1.0", "strip-ansi": "^6.0.0", "through": "^2.3.6", - "wrap-ansi": "^7.0.0" + "wrap-ansi": "^6.0.1" }, "engines": { "node": ">=12.0.0" } }, + "node_modules/inquirer/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/inquirer/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/internal-slot": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", @@ -8984,12 +9173,15 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9133,9 +9325,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -9210,10 +9402,9 @@ "optional": 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", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -9432,9 +9623,9 @@ "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==" }, "node_modules/magic-string": { - "version": "0.30.6", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.6.tgz", - "integrity": "sha512-n62qCLbPjNjyo+owKtveQxZFZTBm+Ms6YoGD23Wew6Vw337PElFNifQpknPruVRQV57kVShPnLGo9vWxVhpPvA==", + "version": "0.30.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz", + "integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==", "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" }, @@ -9524,15 +9715,31 @@ "node": ">=8.6" } }, - "node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { - "node": ">=12" + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" } }, "node_modules/minimalistic-assert": { @@ -9640,14 +9847,6 @@ "node": ">= 8.0.0" } }, - "node_modules/node-cache/node_modules/clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "engines": { - "node": ">=0.8" - } - }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -9969,14 +10168,14 @@ } }, "node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dependencies": { - "mimic-fn": "^4.0.0" + "mimic-fn": "^2.1.0" }, "engines": { - "node": ">=12" + "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -10271,10 +10470,18 @@ "pathe": "^1.1.0" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { - "version": "8.4.33", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", - "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", + "version": "8.4.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", + "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", "funding": [ { "type": "opencollective", @@ -10308,9 +10515,9 @@ } }, "node_modules/prettier": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz", - "integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -10346,6 +10553,11 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -10365,9 +10577,9 @@ } }, "node_modules/querystring": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", - "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", "engines": { "node": ">=0.4.x" @@ -10476,6 +10688,12 @@ "node": ">=6" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", @@ -10540,12 +10758,13 @@ } }, "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, + "optional": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/resolve-global": { @@ -10573,33 +10792,6 @@ "node": ">=8" } }, - "node_modules/restore-cursor/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/restore-cursor/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/restore-cursor/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -10626,9 +10818,9 @@ } }, "node_modules/rollup": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.6.tgz", - "integrity": "sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.0.tgz", + "integrity": "sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q==", "dependencies": { "@types/estree": "1.0.5" }, @@ -10640,19 +10832,19 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.6", - "@rollup/rollup-android-arm64": "4.9.6", - "@rollup/rollup-darwin-arm64": "4.9.6", - "@rollup/rollup-darwin-x64": "4.9.6", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.6", - "@rollup/rollup-linux-arm64-gnu": "4.9.6", - "@rollup/rollup-linux-arm64-musl": "4.9.6", - "@rollup/rollup-linux-riscv64-gnu": "4.9.6", - "@rollup/rollup-linux-x64-gnu": "4.9.6", - "@rollup/rollup-linux-x64-musl": "4.9.6", - "@rollup/rollup-win32-arm64-msvc": "4.9.6", - "@rollup/rollup-win32-ia32-msvc": "4.9.6", - "@rollup/rollup-win32-x64-msvc": "4.9.6", + "@rollup/rollup-android-arm-eabi": "4.12.0", + "@rollup/rollup-android-arm64": "4.12.0", + "@rollup/rollup-darwin-arm64": "4.12.0", + "@rollup/rollup-darwin-x64": "4.12.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.12.0", + "@rollup/rollup-linux-arm64-gnu": "4.12.0", + "@rollup/rollup-linux-arm64-musl": "4.12.0", + "@rollup/rollup-linux-riscv64-gnu": "4.12.0", + "@rollup/rollup-linux-x64-gnu": "4.12.0", + "@rollup/rollup-linux-x64-musl": "4.12.0", + "@rollup/rollup-win32-arm64-msvc": "4.12.0", + "@rollup/rollup-win32-ia32-msvc": "4.12.0", + "@rollup/rollup-win32-x64-msvc": "4.12.0", "fsevents": "~2.3.2" } }, @@ -10693,11 +10885,15 @@ "integrity": "sha512-3TLdfFX8YHNFOhwHrSJza6uxVBmBrEjnNQlNXvXCdItS0Pdskfg5vVXUTWIN+Y23QR09jWpSl99UHkA83m4uWA==" }, "node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, "dependencies": { - "tslib": "^2.1.0" + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" } }, "node_modules/safe-array-concat": { @@ -10776,9 +10972,9 @@ "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -10806,14 +11002,15 @@ } }, "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "dependencies": { - "define-data-property": "^1.0.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -10903,15 +11100,9 @@ "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==" }, "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "node_modules/signale": { "version": "1.4.0", @@ -11026,6 +11217,12 @@ "node": ">=0.10.0" } }, + "node_modules/spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", + "dev": true + }, "node_modules/spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", @@ -11213,16 +11410,21 @@ } }, "node_modules/strip-literal": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz", - "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.0.0.tgz", + "integrity": "sha512-f9vHgsCWBq2ugHAkGMiiYY+AYG0D/cbloKKg0nhaaaSNsujdGIpVXCNsrJpCKr5M0f4aI31mr13UjY6GAuXCKA==", "dependencies": { - "acorn": "^8.10.0" + "js-tokens": "^8.0.2" }, "funding": { "url": "https://github.com/sponsors/antfu" } }, + "node_modules/strip-literal/node_modules/js-tokens": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-8.0.3.tgz", + "integrity": "sha512-UfJMcSJc+SEXEl9lH/VLHSZbThQyLpw1vLO1Lb+j4RWDvG3N2f7yj3PVQA3cmkTBNldJ9eFnM+xEXxHIXrYiJw==" + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -11336,9 +11538,9 @@ } }, "node_modules/tinyspy": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.0.tgz", - "integrity": "sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", + "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", "engines": { "node": ">=14.0.0" } @@ -11379,13 +11581,22 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, "node_modules/ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.1.tgz", + "integrity": "sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==", "dev": true, "engines": { - "node": ">=16.13.0" + "node": ">=16" }, "peerDependencies": { "typescript": ">=4.2.0" @@ -11415,9 +11626,10 @@ } }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true }, "node_modules/type-check": { "version": "0.4.0", @@ -11565,12 +11777,12 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.1.tgz", - "integrity": "sha512-RSqu1UEuSlrBhHTWC8O9FnPjOduNs4M7rJ4pRKoEjtx1zUNOPN2sSXHLDX+Y2WPbHIxbvg4JFo2DNAEfPIKWoQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.6", + "call-bind": "^1.0.7", "es-errors": "^1.3.0", "is-typed-array": "^1.1.13" }, @@ -11579,15 +11791,16 @@ } }, "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -11597,16 +11810,16 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.1.tgz", - "integrity": "sha512-tcqKMrTRXjqvHN9S3553NPCaGL0VPgFI92lXszmrE8DMhiDPLBYLlvo8Uu4WZAAX/aGqp/T1sbA4ph8EWjDF9Q==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.6", + "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-proto": "^1.0.1", + "has-proto": "^1.0.3", "is-typed-array": "^1.1.13" }, "engines": { @@ -11617,14 +11830,20 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.5.tgz", + "integrity": "sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11672,9 +11891,9 @@ } }, "node_modules/ufo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz", - "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.4.0.tgz", + "integrity": "sha512-Hhy+BhRBleFjpJ2vchUNN40qgkh0366FWJGqVLYBHev0vpHTrXSA0ryT+74UiW6KWsldNurQMKGqCm1M2zBciQ==" }, "node_modules/unbox-primitive": { "version": "1.0.2", @@ -11729,15 +11948,6 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" }, - "node_modules/url/node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/utf8": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", @@ -11800,12 +12010,12 @@ } }, "node_modules/vite": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz", - "integrity": "sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.3.tgz", + "integrity": "sha512-UfmUD36DKkqhi/F75RrxvPpry+9+tTkrXfMNZD+SboZqBCMsxKtO52XeGzzuh7ioz+Eo/SYDBbdb0Z7vgcDJew==", "dependencies": { "esbuild": "^0.19.3", - "postcss": "^8.4.32", + "postcss": "^8.4.35", "rollup": "^4.2.0" }, "bin": { @@ -11854,9 +12064,9 @@ } }, "node_modules/vite-node": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.2.2.tgz", - "integrity": "sha512-1as4rDTgVWJO3n1uHmUYqq7nsFgINQ9u+mRcXpjeOMJUmviqNKjcZB7UfRZrlM7MjYXMKpuWp5oGkjaFLnjawg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.3.1.tgz", + "integrity": "sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==", "dependencies": { "cac": "^6.7.14", "debug": "^4.3.4", @@ -11875,17 +12085,16 @@ } }, "node_modules/vitest": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.2.2.tgz", - "integrity": "sha512-d5Ouvrnms3GD9USIK36KG8OZ5bEvKEkITFtnGv56HFaSlbItJuYr7hv2Lkn903+AvRAgSixiamozUVfORUekjw==", - "dependencies": { - "@vitest/expect": "1.2.2", - "@vitest/runner": "1.2.2", - "@vitest/snapshot": "1.2.2", - "@vitest/spy": "1.2.2", - "@vitest/utils": "1.2.2", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.3.1.tgz", + "integrity": "sha512-/1QJqXs8YbCrfv/GPQ05wAZf2eakUPLPa18vkJAKE7RXOKfVHqMZZ1WlTjiwl6Gcn65M5vpNUB6EFLnEdRdEXQ==", + "dependencies": { + "@vitest/expect": "1.3.1", + "@vitest/runner": "1.3.1", + "@vitest/snapshot": "1.3.1", + "@vitest/spy": "1.3.1", + "@vitest/utils": "1.3.1", "acorn-walk": "^8.3.2", - "cac": "^6.7.14", "chai": "^4.3.10", "debug": "^4.3.4", "execa": "^8.0.1", @@ -11894,11 +12103,11 @@ "pathe": "^1.1.1", "picocolors": "^1.0.0", "std-env": "^3.5.0", - "strip-literal": "^1.3.0", + "strip-literal": "^2.0.0", "tinybench": "^2.5.1", "tinypool": "^0.8.2", "vite": "^5.0.0", - "vite-node": "1.2.2", + "vite-node": "1.3.1", "why-is-node-running": "^2.2.2" }, "bin": { @@ -11913,8 +12122,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "^1.0.0", - "@vitest/ui": "^1.0.0", + "@vitest/browser": "1.3.1", + "@vitest/ui": "1.3.1", "happy-dom": "*", "jsdom": "*" }, @@ -11974,11 +12183,6 @@ "node-fetch": "^2.6.12" } }, - "node_modules/web-did-resolver/node_modules/did-resolver": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-4.1.0.tgz", - "integrity": "sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA==" - }, "node_modules/web3-utils": { "version": "1.10.4", "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", @@ -12106,19 +12310,16 @@ } }, "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=8" } }, "node_modules/wrappy": { diff --git a/package.json b/package.json index 4ab15e8..ff98caf 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,9 @@ "test:prep:blockchain": "ganache --wallet.mnemonic \"indicate swing place chair flight used hammer soon photo region volume shuffle\" -i 1337", "test:prep:contracts": "node test/prep/setup-contracts.mjs", "test:prep": "run-s test:prep:contracts test", - "test:concurrently": "run-p test:prep:blockchain test:prep", - "test": "npx vitest --reporter=basic", - "test:ci": "vitest --run --coverage", + "test:concurrently": "concurrently -k -s first \"npm:test:prep:blockchain\" \"npm:test:prep\"", + "test": "npx vitest --run", + "test:ci": "concurrently -k -s first \"npm:test:prep:blockchain\" \"npm:test:prep\"", "build": "npm run clean && npm run build:cjs && npm run build:esm && npm run build:type", "build:cjs": "tsc --module commonjs --outDir dist/cjs", "build:esm": "tsc --module es2015 --outDir dist/esm", @@ -26,6 +26,7 @@ "author": "tradetrust", "license": "ISC", "devDependencies": { + "concurrently": "^6.2.0", "@commitlint/config-conventional": "^16.0.0", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", From 255f9d5ff424e806042fb1dfe7fceb64fb4a6cbf Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Wed, 21 Feb 2024 18:46:57 +0800 Subject: [PATCH 31/34] ci: trigger build --- README.md | 79 ++++++++++++++++++++++++++++++++++------------- package-lock.json | 1 + 2 files changed, 58 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index e071c6a..10547bd 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,72 @@ -## TradeTrust Core +# TradeTrust Core -Unified interface for interacting with TradeTrust's various services. +Unified interface for interacting with TradeTrust's various services. This libraru contains a set of modules. -## Getting Started +| Plugin | Description | +| ------ | ------------------------------------------------------ | +| Verify | Verify TradeTrust wrapped document | +| Utils | Provide utility methods for TradeTrust functionalities | -To get started with this project, clone the repository and install the dependencies: +## Installation -### install +```sh +npm i @tradetrust-tt/tradetrust-core +``` -Building the Project -You can build the project using the following command: -`npm i` +## Verify -#### build +This module that allows you to verify wrapped document programmatically. A verification happens on a wrapped document, and use `isValid` method to answer some questions: -This will generate the necessary files in the dist directory. -`npm run build` +- Has the document been tampered with ? +- Is the issuance state of the document valid ? +- Is the document issuer identity valid ? (see [identity proof](https://docs.tradetrust.io/docs/topics/verifying-documents/issuer-identity)) -#### Running Tests +Document can be either [verifiable document](https://docs.tradetrust.io/docs/tutorial/verifiable-documents/overview) or [transferrable record](https://docs.tradetrust.io/docs/tutorial/transferable-records/overview) which follows [TradeTrust document schema](https://docs.tradetrust.io/docs/topics/introduction/tradetrust-document-schema/) -To run the tests, use the following command: -`npm run test` +```ts +// verify document on testnet +import { verify, isValid } from '@tradetrust-tt/tradetrust-core/verify' +let document = { + // your tradetrust document +} +const fragments = await verify(document, { + network: 'sepolia', +}) +console.log(isValid(fragments)) +``` -#### Linting +```ts +// verify document using your own blockchain provider +import { ethers } from 'ethers' +// Replace YOUR_RPC_URL with your actual JSON-RPC URL +const rpcUrl = 'YOUR_RPC_URL' +const provider = new ethers.providers.JsonRpcProvider(rpcUrl) +let document = { + // your tradetrust document +} +const fragments = await verify(document, { provider }) +console.log(isValid(fragments)) +``` -To lint the project, use the following command: -`npm run lint` +## Utils -#### lint fix +This module provide utilities method that supports the shared functionalities for other TradeTrust modules. -To automatically fix linting errors, use the following command: -`npm run lint-fix` +#### InterceptFragments -#### Contributing +InterceptFragments allows you to extract out the verified results from the fragments. -We welcome contributions to the TradeTrust Core project. Please feel free to submit a pull request or open an issue. +```ts +import {interpretFragments} from '@tradetrust-tt/tradetrust-core/verify`; + +const fragments = await verify(document, { + network: 'sepolia', +}); + +const {hasValid, issuedValid, identityValid} = interpretFragments(fragments); +console.log({hasValid, issuedValid, identityValid}); +``` + +## Contributing + +We welcome contributions to the TradeTrust core library. Please feel free to submit a pull request or open an issue. diff --git a/package-lock.json b/package-lock.json index 8dc3cff..07cad81 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6232,6 +6232,7 @@ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "extraneous": true, "os": [ + "linux", "darwin" ], "engines": { From 0c69f6384d78d5c170f7c02c5117f73e9b824b79 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Thu, 22 Feb 2024 15:07:26 +0800 Subject: [PATCH 32/34] docs: link modules heading --- README.md | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 10547bd..b739151 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # TradeTrust Core -Unified interface for interacting with TradeTrust's various services. This libraru contains a set of modules. +Unified interface for interacting with TradeTrust's various services. This library contains a set of modules. -| Plugin | Description | -| ------ | ------------------------------------------------------ | -| Verify | Verify TradeTrust wrapped document | -| Utils | Provide utility methods for TradeTrust functionalities | +| Module | Description | +| ----------------- | ------------------------------------------------------ | +| [Verify](#verify) | Verify TradeTrust issued document | +| [Utils](#utils) | Provide utility methods for TradeTrust functionalities | ## Installation @@ -15,7 +15,7 @@ npm i @tradetrust-tt/tradetrust-core ## Verify -This module that allows you to verify wrapped document programmatically. A verification happens on a wrapped document, and use `isValid` method to answer some questions: +`verify` allows you to verify issued document programmatically. After verification, use `isValid` method to answer some questions: - Has the document been tampered with ? - Is the issuance state of the document valid ? @@ -24,23 +24,30 @@ This module that allows you to verify wrapped document programmatically. A verif Document can be either [verifiable document](https://docs.tradetrust.io/docs/tutorial/verifiable-documents/overview) or [transferrable record](https://docs.tradetrust.io/docs/tutorial/transferable-records/overview) which follows [TradeTrust document schema](https://docs.tradetrust.io/docs/topics/introduction/tradetrust-document-schema/) ```ts -// verify document on testnet +// verify document using network name import { verify, isValid } from '@tradetrust-tt/tradetrust-core/verify' let document = { // your tradetrust document } const fragments = await verify(document, { - network: 'sepolia', + network: 'sepolia', // can also provide other networks such as mainnet }) console.log(isValid(fragments)) ``` ```ts -// verify document using your own blockchain provider +// verify document using provider import { ethers } from 'ethers' -// Replace YOUR_RPC_URL with your actual JSON-RPC URL -const rpcUrl = 'YOUR_RPC_URL' -const provider = new ethers.providers.JsonRpcProvider(rpcUrl) +import { utils } from '@tradetrust-tt/tt-verify' + +const providerOptions = { + // modify your provider options accordingly + network: 'sepolia', + providerType: 'infura', + apiKey: 'abdfddsfe23232', +} +const provider = utils.generateProvider(providerOptions) + let document = { // your tradetrust document } @@ -48,16 +55,18 @@ const fragments = await verify(document, { provider }) console.log(isValid(fragments)) ``` +For more information about building provider, visit [tt-verify repository](https://github.com/TradeTrust/tt-verify?tab=readme-ov-file#provider) + ## Utils -This module provide utilities method that supports the shared functionalities for other TradeTrust modules. +This module provides utility methods that supports the shared functionalities for other TradeTrust modules. -#### InterceptFragments +#### InterpretFragments -InterceptFragments allows you to extract out the verified results from the fragments. +`interpretFragments` allows you to extract out the verified results from the fragments. ```ts -import {interpretFragments} from '@tradetrust-tt/tradetrust-core/verify`; +import {interpretFragments} from '@tradetrust-tt/tradetrust-core/utils`; const fragments = await verify(document, { network: 'sepolia', From 75552bc6fe538451f442b31d15cfdd51f6b85565 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Thu, 22 Feb 2024 16:07:34 +0800 Subject: [PATCH 33/34] ci: change branch name to main to setup trigger semantic release --- .github/workflows/release.yml | 3 --- README.md | 2 +- index.ts | 0 package-lock.json | 6 +++--- package.json | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) delete mode 100644 index.ts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a66639b..076e0d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,7 @@ on: push: branches: - - master - main - - beta - - +([0-9])?(.{+([0-9]),x}).x env: NODE_ENV: ci diff --git a/README.md b/README.md index b739151..a5ccb61 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ let document = { // your tradetrust document } const fragments = await verify(document, { - network: 'sepolia', // can also provide other networks such as mainnet + network: 'sepolia', // can also provide other networks such as homestead }) console.log(isValid(fragments)) ``` diff --git a/index.ts b/index.ts deleted file mode 100644 index e69de29..0000000 diff --git a/package-lock.json b/package-lock.json index 07cad81..9abd632 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@tradetrust-tt/tradetrust": "^6.9.0", "@tradetrust-tt/tradetrust-cli": "^2.17.1", "@tradetrust-tt/tradetrust-utils": "^1.9.1", - "@tradetrust-tt/tt-verify": "^8.4.0", + "@tradetrust-tt/tt-verify": "^8.7.0", "@vitest/coverage-v8": "^1.2.2", "ethers": "^5.7.2", "ganache": "^7.5.0", @@ -6232,8 +6232,8 @@ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "extraneous": true, "os": [ - "linux", - "darwin" + "darwin", + "linux" ], "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" diff --git a/package.json b/package.json index ff98caf..6cb000c 100644 --- a/package.json +++ b/package.json @@ -26,11 +26,11 @@ "author": "tradetrust", "license": "ISC", "devDependencies": { - "concurrently": "^6.2.0", "@commitlint/config-conventional": "^16.0.0", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "commitizen": "^4.3.0", + "concurrently": "^6.2.0", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.56.0", "npm-run-all": "^4.1.5", @@ -46,7 +46,7 @@ "@tradetrust-tt/tradetrust": "^6.9.0", "@tradetrust-tt/tradetrust-cli": "^2.17.1", "@tradetrust-tt/tradetrust-utils": "^1.9.1", - "@tradetrust-tt/tt-verify": "^8.4.0", + "@tradetrust-tt/tt-verify": "^8.7.0", "@vitest/coverage-v8": "^1.2.2", "ethers": "^5.7.2", "ganache": "^7.5.0", From 9259d05c87a58f01be6558eb6a950ad795a078e0 Mon Sep 17 00:00:00 2001 From: Min Htet Oo Date: Thu, 2 May 2024 09:56:54 +0800 Subject: [PATCH 34/34] chore: specificy strict node 18 --- .npmrc | 3 +++ .nvmrc | 2 ++ package.json | 3 +++ 3 files changed, 8 insertions(+) create mode 100644 .npmrc create mode 100644 .nvmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..248daf1 --- /dev/null +++ b/.npmrc @@ -0,0 +1,3 @@ +# .npmrc +engine-strict=true + diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..3a3af3d --- /dev/null +++ b/.nvmrc @@ -0,0 +1,2 @@ +lts/hydrogen + diff --git a/package.json b/package.json index 6cb000c..2178a56 100644 --- a/package.json +++ b/package.json @@ -62,5 +62,8 @@ }, "optionalDependencies": { "fsevents": "^2.3.2" + }, + "engines": { + "node": "18.x" } }