From 0b7e95e5e79a9541a0f5c3b937ab6059a72a26c0 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 30 Aug 2023 09:42:37 +0900 Subject: [PATCH 001/235] feat: initial setting --- .github/workflows/create_release.yml | 39 ++++++++++++ .github/workflows/docs.yml | 22 +++++++ .github/workflows/pr_test.yml | 23 +++++++ .github/workflows/pr_test_when_merged.yml | 78 +++++++++++++++++++++++ .github/workflows/send_slack.yml | 53 +++++++++++++++ jest.config.js | 6 ++ package.json | 51 +++++++++++++++ tsconfig.json | 30 +++++++++ 8 files changed, 302 insertions(+) create mode 100644 .github/workflows/create_release.yml create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/pr_test.yml create mode 100644 .github/workflows/pr_test_when_merged.yml create mode 100644 .github/workflows/send_slack.yml create mode 100644 jest.config.js create mode 100644 package.json create mode 100644 tsconfig.json diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml new file mode 100644 index 0000000..6843577 --- /dev/null +++ b/.github/workflows/create_release.yml @@ -0,0 +1,39 @@ +name: Create Release Branch +on: + workflow_dispatch: + inputs: + version: + type: choice + description: Sematic version type of new version + options: + - patch + - minor + - major +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + ref: develop + - name: Git configuration + run: | + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git config --global user.name "${GITHUB_ACTOR}" + - name: Upgrade version + run: | + yarn --no-git-tag-version version --$RELEASE_TYPE + echo "NEW_VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_ENV + env: + RELEASE_TYPE: ${{ github.event.inputs.version }} + - name: Create release branch + run: | + git checkout -b release/${{ env.NEW_VERSION }} + git add "package.json" + git commit -m "Upgrade version to ${{ env.NEW_VERSION }}" + git push origin release/${{ env.NEW_VERSION }} + gh pr create -B main -H release/${{ env.NEW_VERSION }} -d --title 'Upgrade version to ${{ env.NEW_VERSION }}' --body 'Upgrade version to ${{ env.NEW_VERSION }}' + gh pr create -B develop -H release/${{ env.NEW_VERSION }} -d --title 'Release/${{ env.NEW_VERSION }} -> develop' --body 'Upgrade version to ${{ env.NEW_VERSION }}' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..f04d420 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,22 @@ +name: Docs +on: + push: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + with: + fetch-depth: 0 # otherwise, you will failed to push refs to dest repo + - uses: actions/setup-node@v3 + with: + node-version: 14 # typedoc require node version >= 14.14 + - name: Build Docs + run: yarn && yarn docs + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs \ No newline at end of file diff --git a/.github/workflows/pr_test.yml b/.github/workflows/pr_test.yml new file mode 100644 index 0000000..9f5ce75 --- /dev/null +++ b/.github/workflows/pr_test.yml @@ -0,0 +1,23 @@ +name: Test Pipeline for opened PR +on: + pull_request: + branches: [ main, develop ] #put your branches which you want to execute test pipeline + types: [ opened, ready_for_review ] +concurrency: + group: ${{ github.event.pull_request.number }} + cancel-in-progress: true +jobs: + run_test: + runs-on: ubuntu-latest + strategy: + matrix: + node: [ 14, 16 ] + name: Run Test on Node ${{ matrix.node }} + steps: + - uses: actions/checkout@v3 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + - run: yarn install --immutable --immutable-cache --check-cache + - run: yarn test \ No newline at end of file diff --git a/.github/workflows/pr_test_when_merged.yml b/.github/workflows/pr_test_when_merged.yml new file mode 100644 index 0000000..1b4b4d0 --- /dev/null +++ b/.github/workflows/pr_test_when_merged.yml @@ -0,0 +1,78 @@ +name: Test Pipeline for Merged PR +on: + pull_request: + branches: [ main, develop ] + types: [ closed ] +concurrency: + group: ${{ github.event.pull_request.number }} + cancel-in-progress: true +jobs: + run_test: + if: ${{ github.event.pull_request.merged == true }} + runs-on: ubuntu-latest + strategy: + matrix: + node: [ 14, 16 ] + name: Run Test on Node ${{ matrix.node }} + steps: + - uses: actions/checkout@v3 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + - run: yarn install --immutable --immutable-cache --check-cache + - run: yarn test + publish: + needs: [ run_test ] + if: ${{ startsWith(github.head_ref, 'release/') && (github.base_ref == 'main') && (github.event.pull_request.merged == true) }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - name: Install dependencies + run: yarn + - name: Test Success + run: yarn test + - name: Publish package + run: | + yarn + yarn build + yarn publish --access public + echo "NEW_VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_ENV + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} + - name: Push tag + run: | + git tag ${{ env.NEW_VERSION }} + git push --tags + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Notify package published to slack + uses: slackapi/slack-github-action@v1.23.0 + with: + payload: | + { + "text": "Ainize-SDK ${{ env.NEW_VERSION }} is published", + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": "Ainize-SDK Release" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "Version ${{ env.NEW_VERSION }} is published" + } + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK \ No newline at end of file diff --git a/.github/workflows/send_slack.yml b/.github/workflows/send_slack.yml new file mode 100644 index 0000000..8d5bdcc --- /dev/null +++ b/.github/workflows/send_slack.yml @@ -0,0 +1,53 @@ +name: Send Error to Slack +on: + workflow_run: + workflows: [ Test Pipeline for Merged PR ] + types: + - completed +jobs: + on-failure: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'failure' }} + steps: + - uses: actions/checkout@v3 + - name: Get error log + id: error_log + run: | + ERROR_LOG="$(gh run view ${{ github.event.workflow_run.id }} --log-failed | tail -n 7 | rev | cut -f 1 | rev | sed -r 's/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g' | sed -z 's/\n/\\n/g' | sed 's/\t/ /g')" + echo "ERROR_LOG=$ERROR_LOG" >> $GITHUB_OUTPUT + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Notify error to slack + uses: slackapi/slack-github-action@v1.23.0 + with: + payload: | + { + "text": "${{ github.event.workflow.name }} failed", + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": ":rotating_light:PIPELINE FAILED", + "emoji": true + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "${{ github.event.workflow.name }} failed" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*Error log*\n```${{ steps.error_log.outputs.ERROR_LOG }}```\nCheck full logs in ${{ github.event.workflow_run.html_url }}" + } + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK \ No newline at end of file diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..1ac0da1 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,6 @@ +module.exports = { + transform: {'^.+\\.ts?$': 'ts-jest'}, + testEnvironment: 'node', + testRegex: '/test/.*\\.(test|spec)?\\.(ts|tsx)$', + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'] +}; \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..dad9164 --- /dev/null +++ b/package.json @@ -0,0 +1,51 @@ +{ + "name": "@ainize-team/ainizeSDK", + "version": "0.0.1", + "main": "lib/ainize.js", + "scripts": { + "build": "rm -rf ./lib && tsc", + "prepublishOnly": "npm run build", + "test": "jest", + "test_snapshot": "jest --updateSnapshot", + "test_ainize": "jest ainize.test.ts" + }, + "engines": { + "node": ">=18" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ainize-team/ainize-sdk.git" + }, + "keywords": [ + "ainize", + "ainetwork", + "ain", + "TypeScript", + "SDK", + "API" + ], + "author": "AINIZE Team", + "license": "ISC", + "bugs": { + "url": "https://github.com/ainblockchain/ain-js/issues" + }, + "homepage": "https://github.com/ainblockchain/ain-js", + "files": [ + "lib/**/*" + ], + "devDependencies": { + "@types/jest": "^27.4.1", + "jest": "^27.5.1", + "ts-jest": "^27.1.4", + "typedoc": "^0.23.17", + "typedoc-plugin-remove-references": "^0.0.6", + "typedoc-plugin-rename-defaults": "^0.6.4", + "typedoc-theme-hierarchy": "^3.0.0", + "typescript": "^4.6.3" + }, + "dependencies": { + "@ainblockchain/ain-js": "^1.3.5", + "axios": "^0.26.1", + "fast-json-stable-stringify": "^2.1.0" + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..bf2bb7a --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,30 @@ +{ + "compilerOptions": { + "allowUnreachableCode": false, + "allowUnusedLabels": false, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "module": "commonjs", + "noEmitOnError": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "outDir": "./lib", + "pretty": true, + "sourceMap": true, + "strict": true, + "strictNullChecks": true, + "target": "es2016", + }, + "include": [ + "src/**/*" + ], + "typedocOptions": { + "entryPoints": ["./src"], + "entryPointStrategy": "expand", + "out": "docs", + "name": "Ainize-SDK", + "plugin": ["typedoc-plugin-remove-references", "typedoc-plugin-rename-defaults", "typedoc-theme-hierarchy"], + "theme": "hierarchy" + } +} \ No newline at end of file From cfe22c75c7204557cd5ba18af252bfc1f37bcbcf Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 30 Aug 2023 10:08:17 +0900 Subject: [PATCH 002/235] feat: create ainize.ts --- package-lock.json | 6164 +++++++++++++++++++++++++++++++++ package.json | 30 +- src/ainize.ts | 19 + src/handlers/handler.ts | 0 src/middlewares/middleware.ts | 0 src/modules/admin.ts | 0 src/modules/app.ts | 0 src/modules/service.ts | 0 src/modules/wallet.ts | 0 src/types/type.ts | 0 src/utils/util.ts | 0 tsconfig.json | 2 +- yarn.lock | 3630 +++++++++++++++++++ 13 files changed, 9828 insertions(+), 17 deletions(-) create mode 100644 package-lock.json create mode 100644 src/ainize.ts create mode 100644 src/handlers/handler.ts create mode 100644 src/middlewares/middleware.ts create mode 100644 src/modules/admin.ts create mode 100644 src/modules/app.ts create mode 100644 src/modules/service.ts create mode 100644 src/modules/wallet.ts create mode 100644 src/types/type.ts create mode 100644 src/utils/util.ts create mode 100644 yarn.lock diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..37789eb --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6164 @@ +{ + "name": "@ainize-team/ainize-sdk", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@ainize-team/ainize-sdk", + "version": "0.0.1", + "license": "MIT", + "dependencies": { + "@ainblockchain/ain-js": "^1.3.5", + "axios": "^0.26.1", + "express": "^4.18.2", + "fast-json-stable-stringify": "^2.1.0", + "node-cache": "^5.1.2" + }, + "devDependencies": { + "@types/express": "^4.17.17", + "@types/jest": "^27.4.1", + "jest": "^27.5.1", + "ts-jest": "^27.1.4", + "typedoc": "^0.23.17", + "typedoc-plugin-remove-references": "^0.0.6", + "typedoc-plugin-rename-defaults": "^0.6.4", + "typedoc-theme-hierarchy": "^3.0.0", + "typescript": "^4.6.3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@ainblockchain/ain-js": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@ainblockchain/ain-js/-/ain-js-1.6.0.tgz", + "integrity": "sha512-REzTJAf8w2TIsJLH7DhKWJF+kxfgMnCCwzWaeD4rYAv4TeD70PhFmYDrDMuy/qZd5KKMXqMigiU9PLWbiu8a7A==", + "license": "ISC", + "dependencies": { + "@ainblockchain/ain-util": "^1.1.9", + "@types/node": "^12.7.3", + "@types/randombytes": "^2.0.0", + "@types/semver": "^7.3.4", + "axios": "^0.21.4", + "bip39": "^3.0.2", + "browserify-cipher": "^1.0.1", + "eventemitter3": "^4.0.0", + "hdkey": "^1.1.1", + "lodash": "^4.17.20", + "node-seal": "^4.5.7", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "scryptsy": "^2.1.0", + "semver": "^6.3.0", + "url-parse": "^1.4.7", + "uuid": "^3.3.3", + "ws": "^8.2.3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@ainblockchain/ain-js/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "license": "MIT" + }, + "node_modules/@ainblockchain/ain-js/node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, + "node_modules/@ainblockchain/ain-util": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@ainblockchain/ain-util/-/ain-util-1.1.9.tgz", + "integrity": "sha512-u3q0h0zwWk+vzZ6VpBZiagVKJbNw/Dw4LVjBAhOvgPCx/E3jHHQCufIMDGqD4wjeBuHVtTAQyMTv7LRPSZFBGg==", + "license": "MPL-2.0", + "dependencies": { + "bip39": "^3.0.4", + "bn.js": "^4.11.8", + "browserify-cipher": "^1.0.1", + "eccrypto": "^1.1.6", + "fast-json-stable-stringify": "^2.0.0", + "hdkey": "^2.0.1", + "keccak": "^2.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "rlp": "^2.2.2", + "safe-buffer": "^5.1.2", + "scryptsy": "^2.1.0", + "secp256k1": "^3.6.2", + "uuid": "^3.3.3", + "varuint-bitcoin": "^1.1.0" + } + }, + "node_modules/@ainblockchain/ain-util/node_modules/hdkey": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-2.1.0.tgz", + "integrity": "sha512-i9Wzi0Dy49bNS4tXXeGeu0vIcn86xXdPQUpEYg+SO1YiO8HtomjmmRMaRyqL0r59QfcD4PfVbSF3qmsWFwAemA==", + "license": "MIT", + "dependencies": { + "bs58check": "^2.1.2", + "ripemd160": "^2.0.2", + "safe-buffer": "^5.1.1", + "secp256k1": "^4.0.0" + } + }, + "node_modules/@ainblockchain/ain-util/node_modules/hdkey/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, + "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/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.22.13", + "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, + "license": "MIT", + "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, + "license": "MIT", + "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, + "license": "MIT", + "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, + "license": "MIT" + }, + "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, + "license": "MIT", + "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, + "license": "MIT", + "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, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", + "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.11.tgz", + "integrity": "sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.10", + "@babel/generator": "^7.22.10", + "@babel/helper-compilation-targets": "^7.22.10", + "@babel/helper-module-transforms": "^7.22.9", + "@babel/helpers": "^7.22.11", + "@babel/parser": "^7.22.11", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.11", + "@babel/types": "^7.22.11", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", + "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.10", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz", + "integrity": "sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.5", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", + "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", + "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", + "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", + "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", + "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.11.tgz", + "integrity": "sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.11", + "@babel/types": "^7.22.11" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", + "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.5", + "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, + "license": "MIT", + "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, + "license": "MIT", + "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, + "license": "MIT", + "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, + "license": "MIT" + }, + "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, + "license": "MIT", + "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, + "license": "MIT", + "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, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.13.tgz", + "integrity": "sha512-3l6+4YOvc9wx7VlCSw4yQfcBo01ECA8TicQfbnCPuCEpRQrf+gTUyGdxNw+pyTUyywp6JRD1w0YQs9TpBXYlkw==", + "dev": true, + "license": "MIT", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", + "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", + "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz", + "integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.22.10", + "@babel/generator": "^7.22.10", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.22.11", + "@babel/types": "^7.22.11", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", + "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", + "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", + "slash": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/core": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", + "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^27.5.1", + "@jest/reporters": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.8.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^27.5.1", + "jest-config": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-resolve-dependencies": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "jest-watcher": "^27.5.1", + "micromatch": "^4.0.4", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", + "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", + "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "@sinonjs/fake-timers": "^8.0.1", + "@types/node": "*", + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", + "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/types": "^27.5.1", + "expect": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", + "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-haste-map": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "slash": "^3.0.0", + "source-map": "^0.6.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^8.1.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/source-map": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", + "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9", + "source-map": "^0.6.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", + "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", + "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-runtime": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", + "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.1.0", + "@jest/types": "^27.5.1", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-util": "^27.5.1", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", + "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "node_modules/@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", + "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz", + "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "dev": true, + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express": { + "version": "4.17.17", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", + "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", + "dev": true, + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.36", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.36.tgz", + "integrity": "sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==", + "dev": true + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "27.5.2", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz", + "integrity": "sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-matcher-utils": "^27.0.0", + "pretty-format": "^27.0.0" + } + }, + "node_modules/@types/mime": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", + "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.5.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.7.tgz", + "integrity": "sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==", + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, + "node_modules/@types/randombytes": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/randombytes/-/randombytes-2.0.0.tgz", + "integrity": "sha512-bz8PhAVlwN72vqefzxa14DKNT8jK/mV66CSjwdVQM/k3Th3EPKfUtdMniwZgMedQTFuywAsfjnZsg+pEnltaMA==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", + "dev": true + }, + "node_modules/@types/semver": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.1.tgz", + "integrity": "sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==", + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", + "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==", + "dev": true, + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz", + "integrity": "sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==", + "dev": true, + "dependencies": { + "@types/http-errors": "*", + "@types/mime": "*", + "@types/node": "*" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "16.0.5", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz", + "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true, + "license": "MIT" + }, + "node_modules/abab": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-globals": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" + } + }, + "node_modules/acorn-globals/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "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, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "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", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "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==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "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==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/axios": { + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", + "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.14.8" + } + }, + "node_modules/babel-jest": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", + "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^27.5.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", + "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.0.0", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", + "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^27.5.1", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.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==", + "dev": true, + "license": "MIT" + }, + "node_modules/base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bip39": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", + "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", + "license": "ISC", + "dependencies": { + "@noble/hashes": "^1.2.0" + } + }, + "node_modules/bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "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==", + "license": "MIT" + }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "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, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "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==", + "license": "MIT" + }, + "node_modules/browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "dev": true, + "license": "BSD-2-Clause" + }, + "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==", + "license": "MIT", + "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/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==", + "license": "MIT", + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserslist": { + "version": "4.21.10", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", + "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001517", + "electron-to-chromium": "^1.4.477", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.11" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "license": "MIT" + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "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", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001524", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001524.tgz", + "integrity": "sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "dev": true, + "license": "MIT" + }, + "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, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true, + "license": "MIT" + }, + "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, + "license": "MIT", + "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, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true, + "license": "MIT" + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" + }, + "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==", + "license": "MIT", + "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/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==", + "license": "MIT", + "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/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssom": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", + "dev": true, + "license": "MIT" + }, + "node_modules/cssstyle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssom": "~0.3.6" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cssstyle/node_modules/cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true, + "license": "MIT" + }, + "node_modules/data-urls": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", + "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "dev": true, + "license": "MIT" + }, + "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, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/des.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", + "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", + "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/domexception": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "webidl-conversions": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/domexception/node_modules/webidl-conversions": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g==", + "license": "MIT", + "dependencies": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/eccrypto": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/eccrypto/-/eccrypto-1.1.6.tgz", + "integrity": "sha512-d78ivVEzu7Tn0ZphUUaL43+jVPKTMPFGtmgtz1D0LrFn7cY3K8CdrvibuLz2AAkHBLKZtR8DMbB2ukRYFk987A==", + "hasInstallScript": true, + "license": "CC0-1.0", + "dependencies": { + "acorn": "7.1.1", + "elliptic": "6.5.4", + "es6-promise": "4.2.8", + "nan": "2.14.0" + }, + "optionalDependencies": { + "secp256k1": "3.7.1" + } + }, + "node_modules/eccrypto/node_modules/nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "license": "MIT" + }, + "node_modules/eccrypto/node_modules/secp256k1": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", + "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.4.1", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/eccrypto/node_modules/secp256k1/node_modules/nan": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", + "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", + "license": "MIT", + "optional": true + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.4.505", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.505.tgz", + "integrity": "sha512-0A50eL5BCCKdxig2SsCXhpuztnB9PfUgRMojj5tMvt8O54lbwz3t6wNgnpiTRosw5QjlJB7ixhVyeg8daLQwSQ==", + "dev": true, + "license": "ISC" + }, + "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==", + "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/emittery": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", + "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "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, + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "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, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "license": "MIT" + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "license": "MIT" + }, + "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==", + "license": "MIT", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "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" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", + "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "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==", + "license": "MIT" + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "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==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "license": "MIT" + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.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==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "license": "ISC", + "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/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "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, + "license": "ISC" + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "MIT", + "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==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hdkey": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-1.1.2.tgz", + "integrity": "sha512-PTQ4VKu0oRnCrYfLp04iQZ7T2Cxz0UsEXYauk2j8eh6PJXCpbXuCFhOmtIFtbET0i3PMWmHN9J11gU8LEgUljQ==", + "license": "MIT", + "dependencies": { + "bs58check": "^2.1.2", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.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==", + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/html-encoding-sniffer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-encoding": "^1.0.5" + }, + "engines": { + "node": ">=10" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "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==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.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==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "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==", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "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, + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", + "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^27.5.1", + "import-local": "^3.0.2", + "jest-cli": "^27.5.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz", + "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "execa": "^5.0.0", + "throat": "^6.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-circus": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", + "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "expect": "^27.5.1", + "is-generator-fn": "^2.0.0", + "jest-each": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3", + "throat": "^6.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-cli": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz", + "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "prompts": "^2.0.1", + "yargs": "^16.2.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz", + "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.8.0", + "@jest/test-sequencer": "^27.5.1", + "@jest/types": "^27.5.1", + "babel-jest": "^27.5.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.1", + "graceful-fs": "^4.2.9", + "jest-circus": "^27.5.1", + "jest-environment-jsdom": "^27.5.1", + "jest-environment-node": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-jasmine2": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^27.5.1", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", + "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", + "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-each": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz", + "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "jest-get-type": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-environment-jsdom": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", + "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1", + "jsdom": "^16.6.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", + "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", + "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", + "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^27.5.1", + "jest-serializer": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-jasmine2": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", + "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/source-map": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^27.5.1", + "is-generator-fn": "^2.0.0", + "jest-each": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1", + "throat": "^6.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-leak-detector": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", + "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", + "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", + "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^27.5.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^27.5.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-mock": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", + "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "@types/node": "*" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", + "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", + "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", + "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-snapshot": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-runner": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz", + "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^27.5.1", + "@jest/environment": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.8.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^27.5.1", + "jest-environment-jsdom": "^27.5.1", + "jest-environment-node": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-leak-detector": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "source-map-support": "^0.5.6", + "throat": "^6.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz", + "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/globals": "^27.5.1", + "@jest/source-map": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-serializer": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", + "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz", + "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.7.2", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.0.0", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", + "natural-compare": "^1.4.0", + "pretty-format": "^27.5.1", + "semver": "^7.3.2" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-snapshot/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==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-util": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", + "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-validate": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", + "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^27.5.1", + "leven": "^3.1.0", + "pretty-format": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-watcher": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz", + "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "jest-util": "^27.5.1", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/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, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "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, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsdom": { + "version": "16.7.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", + "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "abab": "^2.0.5", + "acorn": "^8.2.4", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.3.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.1", + "domexception": "^2.0.1", + "escodegen": "^2.0.0", + "form-data": "^3.0.0", + "html-encoding-sniffer": "^2.0.1", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.5.0", + "ws": "^7.4.6", + "xml-name-validator": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/jsdom/node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/jsdom/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "dev": true, + "license": "MIT", + "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/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "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, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true, + "license": "MIT" + }, + "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, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/keccak": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", + "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "bindings": "^1.5.0", + "inherits": "^2.0.4", + "nan": "^2.14.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=5.12.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/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==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "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==", + "dev": true, + "license": "ISC" + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "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==", + "dev": true, + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "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==", + "license": "MIT", + "engines": { + "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==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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==", + "license": "ISC" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "license": "MIT" + }, + "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, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/nan": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", + "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "license": "MIT" + }, + "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==", + "license": "MIT", + "dependencies": { + "clone": "2.x" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/node-gyp-build": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", + "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-seal": { + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/node-seal/-/node-seal-4.6.4.tgz", + "integrity": "sha512-ZQU63Ikt9/n9CXueEltszdAxUPHWpfbExcoux6Ktn2W3lxWc7jG2yx3p0ok34LzOgKOfytUSwHCxYmabAm3VPQ==", + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nwsapi": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", + "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "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, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "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, + "license": "MIT", + "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/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true, + "license": "MIT" + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "license": "MIT" + }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "license": "MIT", + "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/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true, + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true, + "license": "MIT" + }, + "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==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "license": "MIT" + }, + "node_modules/resolve": { + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "dev": true, + "license": "MIT", + "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-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==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "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, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.1.tgz", + "integrity": "sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/rlp": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", + "license": "MPL-2.0", + "dependencies": { + "bn.js": "^5.2.0" + }, + "bin": { + "rlp": "bin/rlp" + } + }, + "node_modules/rlp/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==", + "license": "MIT" + }, + "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" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dev": true, + "license": "ISC", + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/scryptsy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", + "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==", + "license": "MIT" + }, + "node_modules/secp256k1": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", + "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.5.2", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/send/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==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "license": "MIT", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "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==", + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "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==", + "dev": true, + "license": "MIT", + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/shiki": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz", + "integrity": "sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g==", + "dev": true, + "license": "MIT", + "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.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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, + "license": "ISC" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "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, + "license": "MIT", + "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", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "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, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true, + "license": "MIT" + }, + "node_modules/terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/throat": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.2.tgz", + "integrity": "sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/tr46": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ts-jest": { + "version": "27.1.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.5.tgz", + "integrity": "sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^27.0.0", + "json5": "2.x", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "20.x" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@types/jest": "^27.0.0", + "babel-jest": ">=27.0.0 <28", + "jest": "^27.0.0", + "typescript": ">=3.8 <5.0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@types/jest": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/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==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "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, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/typedoc": { + "version": "0.23.28", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz", + "integrity": "sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "lunr": "^2.3.9", + "marked": "^4.2.12", + "minimatch": "^7.1.3", + "shiki": "^0.14.1" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 14.14" + }, + "peerDependencies": { + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x" + } + }, + "node_modules/typedoc-plugin-remove-references": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedoc-plugin-remove-references/-/typedoc-plugin-remove-references-0.0.6.tgz", + "integrity": "sha512-QoyHpopznnJbWW/9JT2NHSK+eTmyShkPYebwe5ZnO8aohPLc5okk4puWUDXnNh2Tn7cJU8U3t1tEMO6ghbwE8Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/typedoc-plugin-rename-defaults": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/typedoc-plugin-rename-defaults/-/typedoc-plugin-rename-defaults-0.6.6.tgz", + "integrity": "sha512-8TCDrxMG8cR0IRhMZbxMCXlmQrEwFFH0she4eHsaUGd1TPfrkk8GLO4n2qlSISd66OtT28e17ysiVZPbQnLGMg==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "typedoc": "0.22.x || 0.23.x || 0.24.x || 0.25.x" + } + }, + "node_modules/typedoc-theme-hierarchy": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/typedoc-theme-hierarchy/-/typedoc-theme-hierarchy-3.2.1.tgz", + "integrity": "sha512-Spum9ccW7bc++c8dLFNRh+9hvG+REntLQCNUb74pz28qcuhPOtxOuKteM/4aJbJDjw/9mORXZZYSToMGb+MrYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fs-extra": "^10.0.0" + }, + "peerDependencies": { + "typedoc": "^0.23.6" + } + }, + "node_modules/typedoc/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/typedoc/node_modules/minimatch": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", + "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "license": "MIT", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.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==", + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/v8-to-istanbul": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", + "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 8" + } + }, + "node_modules/varuint-bitcoin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz", + "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.1" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "browser-process-hrtime": "^1.0.0" + } + }, + "node_modules/w3c-xmlserializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "xml-name-validator": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=10.4" + } + }, + "node_modules/whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "0.4.24" + } + }, + "node_modules/whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/whatwg-url": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", + "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.7.0", + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "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, + "license": "MIT", + "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", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "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==", + "license": "MIT", + "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/xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true, + "license": "MIT" + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "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==", + "dev": true, + "license": "ISC" + }, + "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, + "license": "MIT", + "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/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, + "license": "ISC", + "engines": { + "node": ">=10" + } + } + } +} diff --git a/package.json b/package.json index dad9164..14071ce 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,15 @@ { - "name": "@ainize-team/ainizeSDK", + "name": "@ainize-team/ainize-sdk", "version": "0.0.1", "main": "lib/ainize.js", - "scripts": { - "build": "rm -rf ./lib && tsc", - "prepublishOnly": "npm run build", - "test": "jest", - "test_snapshot": "jest --updateSnapshot", - "test_ainize": "jest ainize.test.ts" + "scripts": { + "build": "rm -rf ./dist && tsc", + "dev": "rm -rf ./dist && tsc", + "test": "NODE_ENV=dev jest", + "docs": "yarn build && typedoc --out docs" }, "engines": { - "node": ">=18" + "node": ">=12" }, "repository": { "type": "git", @@ -25,15 +24,12 @@ "API" ], "author": "AINIZE Team", - "license": "ISC", - "bugs": { - "url": "https://github.com/ainblockchain/ain-js/issues" - }, - "homepage": "https://github.com/ainblockchain/ain-js", + "license": "MIT", "files": [ - "lib/**/*" + "/dist" ], - "devDependencies": { + "devDependencies": { + "@types/express": "^4.17.17", "@types/jest": "^27.4.1", "jest": "^27.5.1", "ts-jest": "^27.1.4", @@ -46,6 +42,8 @@ "dependencies": { "@ainblockchain/ain-js": "^1.3.5", "axios": "^0.26.1", - "fast-json-stable-stringify": "^2.1.0" + "express": "^4.18.2", + "fast-json-stable-stringify": "^2.1.0", + "node-cache": "^5.1.2" } } diff --git a/src/ainize.ts b/src/ainize.ts new file mode 100644 index 0000000..e773550 --- /dev/null +++ b/src/ainize.ts @@ -0,0 +1,19 @@ +import { NextFunction, Request, Response } from 'express'; +import Ain from '@ainblockchain/ain-js'; +import * as NodeCache from 'node-cache'; +export default class Ainize { + cache: NodeCache; + ain: Ain; + userAddress: string; + userPrivateKey: string; + constructor(privateKey: string, chainId: 1|0 ) { + const Ain = require('@ainblockchain/ain-js').default + const blockChainEndpoint = chainId === 1 ? 'https://mainnet-api.ainetwork.ai' : 'https://testnet-api.ainetwork.ai'; + this.ain = new Ain(blockChainEndpoint, chainId); + + this.cache = new NodeCache(); + this.userPrivateKey = privateKey; + this.userAddress = this.ain.wallet.addAndSetDefaultAccount(privateKey); + } + +} diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/middlewares/middleware.ts b/src/middlewares/middleware.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/admin.ts b/src/modules/admin.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/app.ts b/src/modules/app.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/service.ts b/src/modules/service.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/types/type.ts b/src/types/type.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/utils/util.ts b/src/utils/util.ts new file mode 100644 index 0000000..e69de29 diff --git a/tsconfig.json b/tsconfig.json index bf2bb7a..4685ac3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,7 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitReturns": true, - "outDir": "./lib", + "outDir": "./dist", "pretty": true, "sourceMap": true, "strict": true, diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..0f12ec5 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,3630 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@ainblockchain/ain-js@^1.3.5": + version "1.6.0" + resolved "https://registry.npmjs.org/@ainblockchain/ain-js/-/ain-js-1.6.0.tgz" + integrity sha512-REzTJAf8w2TIsJLH7DhKWJF+kxfgMnCCwzWaeD4rYAv4TeD70PhFmYDrDMuy/qZd5KKMXqMigiU9PLWbiu8a7A== + dependencies: + "@ainblockchain/ain-util" "^1.1.9" + "@types/node" "^12.7.3" + "@types/randombytes" "^2.0.0" + "@types/semver" "^7.3.4" + axios "^0.21.4" + bip39 "^3.0.2" + browserify-cipher "^1.0.1" + eventemitter3 "^4.0.0" + hdkey "^1.1.1" + lodash "^4.17.20" + node-seal "^4.5.7" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + scryptsy "^2.1.0" + semver "^6.3.0" + url-parse "^1.4.7" + uuid "^3.3.3" + ws "^8.2.3" + +"@ainblockchain/ain-util@^1.1.9": + version "1.1.9" + resolved "https://registry.npmjs.org/@ainblockchain/ain-util/-/ain-util-1.1.9.tgz" + integrity sha512-u3q0h0zwWk+vzZ6VpBZiagVKJbNw/Dw4LVjBAhOvgPCx/E3jHHQCufIMDGqD4wjeBuHVtTAQyMTv7LRPSZFBGg== + dependencies: + bip39 "^3.0.4" + bn.js "^4.11.8" + browserify-cipher "^1.0.1" + eccrypto "^1.1.6" + fast-json-stable-stringify "^2.0.0" + hdkey "^2.0.1" + keccak "^2.0.0" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + rlp "^2.2.2" + safe-buffer "^5.1.2" + scryptsy "^2.1.0" + secp256k1 "^3.6.2" + uuid "^3.3.3" + varuint-bitcoin "^1.1.0" + +"@ampproject/remapping@^2.2.0": + version "2.2.1" + resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz" + integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.10", "@babel/code-frame@^7.22.5": + version "7.22.13" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz" + integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== + dependencies: + "@babel/highlight" "^7.22.13" + chalk "^2.4.2" + +"@babel/compat-data@^7.22.9": + version "7.22.9" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz" + integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== + +"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0", "@babel/core@>=7.0.0-beta.0 <8": + version "7.22.11" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.22.11.tgz" + integrity sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" + "@babel/helper-compilation-targets" "^7.22.10" + "@babel/helper-module-transforms" "^7.22.9" + "@babel/helpers" "^7.22.11" + "@babel/parser" "^7.22.11" + "@babel/template" "^7.22.5" + "@babel/traverse" "^7.22.11" + "@babel/types" "^7.22.11" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@^7.22.10", "@babel/generator@^7.7.2": + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz" + integrity sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A== + dependencies: + "@babel/types" "^7.22.10" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + +"@babel/helper-compilation-targets@^7.22.10": + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz" + integrity sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q== + dependencies: + "@babel/compat-data" "^7.22.9" + "@babel/helper-validator-option" "^7.22.5" + browserslist "^4.21.9" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-environment-visitor@^7.22.5": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz" + integrity sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q== + +"@babel/helper-function-name@^7.22.5": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz" + integrity sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ== + dependencies: + "@babel/template" "^7.22.5" + "@babel/types" "^7.22.5" + +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-module-imports@^7.22.5": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz" + integrity sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-module-transforms@^7.22.9": + version "7.22.9" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz" + integrity sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ== + dependencies: + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-module-imports" "^7.22.5" + "@babel/helper-simple-access" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/helper-validator-identifier" "^7.22.5" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz" + integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== + +"@babel/helper-simple-access@^7.22.5": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz" + integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-string-parser@^7.22.5": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz" + integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== + +"@babel/helper-validator-identifier@^7.22.5": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz" + integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ== + +"@babel/helper-validator-option@^7.22.5": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz" + integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== + +"@babel/helpers@^7.22.11": + version "7.22.11" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.11.tgz" + integrity sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg== + dependencies: + "@babel/template" "^7.22.5" + "@babel/traverse" "^7.22.11" + "@babel/types" "^7.22.11" + +"@babel/highlight@^7.22.13": + version "7.22.13" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz" + integrity sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ== + dependencies: + "@babel/helper-validator-identifier" "^7.22.5" + chalk "^2.4.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.11", "@babel/parser@^7.22.5": + version "7.22.13" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.22.13.tgz" + integrity sha512-3l6+4YOvc9wx7VlCSw4yQfcBo01ECA8TicQfbnCPuCEpRQrf+gTUyGdxNw+pyTUyywp6JRD1w0YQs9TpBXYlkw== + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-bigint@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz" + integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.8.3": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-import-meta@^7.8.3": + version "7.10.4" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz" + integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": + version "7.10.4" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.8.3": + version "7.10.4" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-top-level-await@^7.8.3": + version "7.14.5" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-typescript@^7.7.2": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz" + integrity sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/template@^7.22.5", "@babel/template@^7.3.3": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz" + integrity sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw== + dependencies: + "@babel/code-frame" "^7.22.5" + "@babel/parser" "^7.22.5" + "@babel/types" "^7.22.5" + +"@babel/traverse@^7.22.11", "@babel/traverse@^7.7.2": + version "7.22.11" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz" + integrity sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ== + dependencies: + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-function-name" "^7.22.5" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.22.11" + "@babel/types" "^7.22.11" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.11", "@babel/types@^7.22.5", "@babel/types@^7.3.3": + version "7.22.11" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz" + integrity sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg== + dependencies: + "@babel/helper-string-parser" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.5" + to-fast-properties "^2.0.0" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/schema@^0.1.2": + version "0.1.3" + resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + +"@jest/console@^27.5.1": + version "27.5.1" + resolved "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz" + integrity sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg== + dependencies: + "@jest/types" "^27.5.1" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^27.5.1" + jest-util "^27.5.1" + slash "^3.0.0" + +"@jest/core@^27.5.1": + version "27.5.1" + resolved "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz" + integrity sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ== + dependencies: + "@jest/console" "^27.5.1" + "@jest/reporters" "^27.5.1" + "@jest/test-result" "^27.5.1" + "@jest/transform" "^27.5.1" + "@jest/types" "^27.5.1" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + emittery "^0.8.1" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-changed-files "^27.5.1" + jest-config "^27.5.1" + jest-haste-map "^27.5.1" + jest-message-util "^27.5.1" + jest-regex-util "^27.5.1" + jest-resolve "^27.5.1" + jest-resolve-dependencies "^27.5.1" + jest-runner "^27.5.1" + jest-runtime "^27.5.1" + jest-snapshot "^27.5.1" + jest-util "^27.5.1" + jest-validate "^27.5.1" + jest-watcher "^27.5.1" + micromatch "^4.0.4" + rimraf "^3.0.0" + slash "^3.0.0" + strip-ansi "^6.0.0" + +"@jest/environment@^27.5.1": + version "27.5.1" + resolved "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz" + integrity sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA== + dependencies: + "@jest/fake-timers" "^27.5.1" + "@jest/types" "^27.5.1" + "@types/node" "*" + jest-mock "^27.5.1" + +"@jest/fake-timers@^27.5.1": + version "27.5.1" + resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz" + integrity sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ== + dependencies: + "@jest/types" "^27.5.1" + "@sinonjs/fake-timers" "^8.0.1" + "@types/node" "*" + jest-message-util "^27.5.1" + jest-mock "^27.5.1" + jest-util "^27.5.1" + +"@jest/globals@^27.5.1": + version "27.5.1" + resolved "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz" + integrity sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q== + dependencies: + "@jest/environment" "^27.5.1" + "@jest/types" "^27.5.1" + expect "^27.5.1" + +"@jest/reporters@^27.5.1": + version "27.5.1" + resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz" + integrity sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^27.5.1" + "@jest/test-result" "^27.5.1" + "@jest/transform" "^27.5.1" + "@jest/types" "^27.5.1" + "@types/node" "*" + chalk "^4.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.2" + graceful-fs "^4.2.9" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^5.1.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.1.3" + jest-haste-map "^27.5.1" + jest-resolve "^27.5.1" + jest-util "^27.5.1" + jest-worker "^27.5.1" + slash "^3.0.0" + source-map "^0.6.0" + string-length "^4.0.1" + terminal-link "^2.0.0" + v8-to-istanbul "^8.1.0" + +"@jest/source-map@^27.5.1": + version "27.5.1" + resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz" + integrity sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg== + dependencies: + callsites "^3.0.0" + graceful-fs "^4.2.9" + source-map "^0.6.0" + +"@jest/test-result@^27.5.1": + version "27.5.1" + resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz" + integrity sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag== + dependencies: + "@jest/console" "^27.5.1" + "@jest/types" "^27.5.1" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^27.5.1": + version "27.5.1" + resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz" + integrity sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ== + dependencies: + "@jest/test-result" "^27.5.1" + graceful-fs "^4.2.9" + jest-haste-map "^27.5.1" + jest-runtime "^27.5.1" + +"@jest/transform@^27.5.1": + version "27.5.1" + resolved "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz" + integrity sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw== + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^27.5.1" + babel-plugin-istanbul "^6.1.1" + chalk "^4.0.0" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.2.9" + jest-haste-map "^27.5.1" + jest-regex-util "^27.5.1" + jest-util "^27.5.1" + micromatch "^4.0.4" + pirates "^4.0.4" + slash "^3.0.0" + source-map "^0.6.1" + write-file-atomic "^3.0.0" + +"@jest/types@^27.5.1": + version "27.5.1" + resolved "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz" + integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^16.0.0" + chalk "^4.0.0" + +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": + version "0.3.3" + resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.1.0": + 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== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.4.15" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.19" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@noble/hashes@^1.2.0": + version "1.3.2" + resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz" + integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== + +"@sinonjs/commons@^1.7.0": + version "1.8.6" + resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz" + integrity sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^8.0.1": + version "8.1.0" + resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz" + integrity sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg== + dependencies: + "@sinonjs/commons" "^1.7.0" + +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + +"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": + version "7.20.1" + resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz" + integrity sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw== + dependencies: + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.6.4" + resolved "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz" + integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.1" + resolved "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz" + integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": + version "7.20.1" + resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz" + integrity sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg== + dependencies: + "@babel/types" "^7.20.7" + +"@types/body-parser@*": + version "1.19.2" + resolved "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz" + integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/connect@*": + version "3.4.35" + resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz" + integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== + dependencies: + "@types/node" "*" + +"@types/express-serve-static-core@^4.17.33": + version "4.17.36" + resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.36.tgz" + integrity sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + "@types/send" "*" + +"@types/express@^4.17.17": + version "4.17.17" + resolved "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz" + integrity sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.33" + "@types/qs" "*" + "@types/serve-static" "*" + +"@types/graceful-fs@^4.1.2": + version "4.1.6" + resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz" + integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw== + dependencies: + "@types/node" "*" + +"@types/http-errors@*": + version "2.0.1" + resolved "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz" + integrity sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ== + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": + version "2.0.4" + resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz" + integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== + +"@types/istanbul-lib-report@*": + version "3.0.0" + resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" + integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^3.0.0": + version "3.0.1" + resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz" + integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== + dependencies: + "@types/istanbul-lib-report" "*" + +"@types/jest@^27.0.0", "@types/jest@^27.4.1": + version "27.5.2" + resolved "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz" + integrity sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA== + dependencies: + jest-matcher-utils "^27.0.0" + pretty-format "^27.0.0" + +"@types/mime@*", "@types/mime@^1": + version "1.3.2" + resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz" + integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== + +"@types/node@*": + version "20.5.7" + resolved "https://registry.npmjs.org/@types/node/-/node-20.5.7.tgz" + integrity sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA== + +"@types/node@^12.7.3": + version "12.20.55" + resolved "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz" + integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== + +"@types/prettier@^2.1.5": + version "2.7.3" + resolved "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz" + integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== + +"@types/qs@*": + version "6.9.7" + resolved "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz" + integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== + +"@types/randombytes@^2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@types/randombytes/-/randombytes-2.0.0.tgz" + integrity sha512-bz8PhAVlwN72vqefzxa14DKNT8jK/mV66CSjwdVQM/k3Th3EPKfUtdMniwZgMedQTFuywAsfjnZsg+pEnltaMA== + dependencies: + "@types/node" "*" + +"@types/range-parser@*": + version "1.2.4" + resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz" + integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== + +"@types/semver@^7.3.4": + version "7.5.1" + resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.1.tgz" + integrity sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg== + +"@types/send@*": + version "0.17.1" + resolved "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz" + integrity sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + +"@types/serve-static@*": + version "1.15.2" + resolved "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz" + integrity sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw== + dependencies: + "@types/http-errors" "*" + "@types/mime" "*" + "@types/node" "*" + +"@types/stack-utils@^2.0.0": + version "2.0.1" + resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz" + integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== + +"@types/yargs-parser@*": + version "21.0.0" + resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz" + integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== + +"@types/yargs@^16.0.0": + version "16.0.5" + resolved "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz" + integrity sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ== + dependencies: + "@types/yargs-parser" "*" + +abab@^2.0.3, abab@^2.0.5: + version "2.0.6" + resolved "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== + +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +acorn-globals@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz" + integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== + dependencies: + acorn "^7.1.1" + acorn-walk "^7.1.1" + +acorn-walk@^7.1.1: + version "7.2.0" + resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz" + integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== + +acorn@^7.1.1: + version "7.4.1" + resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== + +acorn@^8.2.4: + version "8.10.0" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + +acorn@7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz" + integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== + +agent-base@6: + version "6.0.2" + resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-sequence-parser@^1.1.0: + version "1.1.1" + resolved "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz" + integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== + +ansi-styles@^3.2.1: + 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" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + +anymatch@^3.0.3: + version "3.1.3" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +axios@^0.21.4: + 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" + +axios@^0.26.1: + version "0.26.1" + resolved "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz" + integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== + dependencies: + follow-redirects "^1.14.8" + +babel-jest@^27.5.1, "babel-jest@>=27.0.0 <28": + version "27.5.1" + resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz" + integrity sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg== + dependencies: + "@jest/transform" "^27.5.1" + "@jest/types" "^27.5.1" + "@types/babel__core" "^7.1.14" + babel-plugin-istanbul "^6.1.1" + babel-preset-jest "^27.5.1" + chalk "^4.0.0" + graceful-fs "^4.2.9" + slash "^3.0.0" + +babel-plugin-istanbul@^6.1.1: + version "6.1.1" + resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz" + integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-instrument "^5.0.4" + test-exclude "^6.0.0" + +babel-plugin-jest-hoist@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz" + integrity sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.0.0" + "@types/babel__traverse" "^7.0.6" + +babel-preset-current-node-syntax@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz" + integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== + dependencies: + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-bigint" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.8.3" + "@babel/plugin-syntax-import-meta" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.8.3" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-top-level-await" "^7.8.3" + +babel-preset-jest@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz" + integrity sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag== + dependencies: + babel-plugin-jest-hoist "^27.5.1" + babel-preset-current-node-syntax "^1.0.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base-x@^3.0.2: + version "3.0.9" + resolved "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz" + integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== + dependencies: + safe-buffer "^5.0.1" + +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bip39@^3.0.2, bip39@^3.0.4: + version "3.1.0" + resolved "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz" + integrity sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A== + dependencies: + "@noble/hashes" "^1.2.0" + +bip66@^1.1.5: + version "1.1.5" + resolved "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz" + integrity sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw== + dependencies: + safe-buffer "^5.0.1" + +bn.js@^4.11.8, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.2.0: + version "5.2.1" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +body-parser@1.20.1: + version "1.20.1" + resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz" + integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== + dependencies: + bytes "3.1.2" + content-type "~1.0.4" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.1" + type-is "~1.6.18" + unpipe "1.0.0" + +brace-expansion@^1.1.7: + 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" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + +browser-process-hrtime@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz" + integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== + +browserify-aes@^1.0.4, browserify-aes@^1.0.6: + version "1.2.0" + resolved "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + 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" + +browserify-cipher@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserslist@^4.21.9, "browserslist@>= 4.21.0": + version "4.21.10" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz" + integrity sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ== + dependencies: + caniuse-lite "^1.0.30001517" + electron-to-chromium "^1.4.477" + node-releases "^2.0.13" + update-browserslist-db "^1.0.11" + +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== + dependencies: + fast-json-stable-stringify "2.x" + +bs58@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== + dependencies: + base-x "^3.0.2" + +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" + integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.2.0: + version "6.3.0" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001517: + version "1.0.30001524" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001524.tgz" + integrity sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA== + +chalk@^2.4.2: + 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" + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +char-regex@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" + integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== + +ci-info@^3.2.0: + version "3.8.0" + resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz" + integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +cjs-module-lexer@^1.0.0: + version "1.2.3" + resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz" + integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +clone@2.x: + version "2.1.2" + resolved "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz" + integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" + integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== + +collect-v8-coverage@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz" + integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== + +color-convert@^1.9.0: + 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" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +combined-stream@^1.0.8: + 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" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-type@~1.0.4: + version "1.0.5" + resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + +convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: + version "1.9.0" + resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz" + integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.4: + version "1.1.7" + resolved "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + 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" + +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +cssom@^0.4.4: + version "0.4.4" + resolved "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz" + integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== + +cssom@~0.3.6: + version "0.3.8" + resolved "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +cssstyle@^2.3.0: + version "2.3.0" + resolved "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz" + integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== + dependencies: + cssom "~0.3.6" + +data-urls@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz" + integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== + dependencies: + abab "^2.0.3" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.0.0" + +debug@^4.1.0, debug@^4.1.1, debug@4: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +decimal.js@^10.2.1: + version "10.4.3" + resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz" + integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== + +dedent@^0.7.0: + version "0.7.0" + resolved "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz" + integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== + +deepmerge@^4.2.2: + version "4.3.1" + resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +des.js@^1.0.0: + version "1.1.0" + resolved "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz" + integrity sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +detect-newline@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" + integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== + +diff-sequences@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz" + integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== + +domexception@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz" + integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== + dependencies: + webidl-conversions "^5.0.0" + +drbg.js@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz" + integrity sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g== + dependencies: + browserify-aes "^1.0.6" + create-hash "^1.1.2" + create-hmac "^1.1.4" + +eccrypto@^1.1.6: + version "1.1.6" + resolved "https://registry.npmjs.org/eccrypto/-/eccrypto-1.1.6.tgz" + integrity sha512-d78ivVEzu7Tn0ZphUUaL43+jVPKTMPFGtmgtz1D0LrFn7cY3K8CdrvibuLz2AAkHBLKZtR8DMbB2ukRYFk987A== + dependencies: + acorn "7.1.1" + elliptic "6.5.4" + es6-promise "4.2.8" + nan "2.14.0" + optionalDependencies: + secp256k1 "3.7.1" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +electron-to-chromium@^1.4.477: + version "1.4.505" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.505.tgz" + integrity sha512-0A50eL5BCCKdxig2SsCXhpuztnB9PfUgRMojj5tMvt8O54lbwz3t6wNgnpiTRosw5QjlJB7ixhVyeg8daLQwSQ== + +elliptic@^6.4.1, elliptic@^6.5.2, elliptic@^6.5.4, elliptic@6.5.4: + 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" + +emittery@^0.8.1: + version "0.8.1" + resolved "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz" + integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es6-promise@4.2.8: + version "4.2.8" + resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +escodegen@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz" + integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionalDependencies: + source-map "~0.6.1" + +esprima@^4.0.0, esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + +eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + 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" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== + +expect@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz" + integrity sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw== + dependencies: + "@jest/types" "^27.5.1" + jest-get-type "^27.5.1" + jest-matcher-utils "^27.5.1" + jest-message-util "^27.5.1" + +express@^4.18.2: + version "4.18.2" + resolved "https://registry.npmjs.org/express/-/express-4.18.2.tgz" + integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.1" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.5.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.2.0" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.7" + qs "6.11.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.18.0" + serve-static "1.15.0" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0, fast-json-stable-stringify@2.x: + 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== + +fb-watchman@^2.0.0: + version "2.0.2" + resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz" + integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== + dependencies: + bser "2.1.1" + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +follow-redirects@^1.14.0, follow-redirects@^1.14.8: + version "1.15.2" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + +fs-extra@^10.0.0: + version "10.1.0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@^2.3.2: + version "2.3.3" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2: + version "1.2.1" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz" + integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-proto "^1.0.1" + has-symbols "^1.0.3" + +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: + 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" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.9: + 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== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-proto@^1.0.1: + 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== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@^1.0.0, hash.js@^1.0.3: + 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" + +hdkey@^1.1.1: + version "1.1.2" + resolved "https://registry.npmjs.org/hdkey/-/hdkey-1.1.2.tgz" + integrity sha512-PTQ4VKu0oRnCrYfLp04iQZ7T2Cxz0UsEXYauk2j8eh6PJXCpbXuCFhOmtIFtbET0i3PMWmHN9J11gU8LEgUljQ== + dependencies: + bs58check "^2.1.2" + safe-buffer "^5.1.1" + secp256k1 "^3.0.1" + +hdkey@^2.0.1: + version "2.1.0" + resolved "https://registry.npmjs.org/hdkey/-/hdkey-2.1.0.tgz" + integrity sha512-i9Wzi0Dy49bNS4tXXeGeu0vIcn86xXdPQUpEYg+SO1YiO8HtomjmmRMaRyqL0r59QfcD4PfVbSF3qmsWFwAemA== + dependencies: + bs58check "^2.1.2" + ripemd160 "^2.0.2" + safe-buffer "^5.1.1" + secp256k1 "^4.0.0" + +hmac-drbg@^1.0.1: + 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" + +html-encoding-sniffer@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz" + integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== + dependencies: + whatwg-encoding "^1.0.5" + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +http-proxy-agent@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +iconv-lite@0.4.24: + 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" + +import-local@^3.0.2: + version "3.1.0" + resolved "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@2, inherits@2.0.4: + version "2.0.4" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-core-module@^2.13.0: + version "2.13.0" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== + dependencies: + has "^1.0.3" + +is-fullwidth-code-point@^3.0.0: + 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== + +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-potential-custom-element-name@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-typedarray@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" + integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz" + integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== + +istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: + version "5.2.1" + resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz" + integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^6.3.0" + +istanbul-lib-report@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^4.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" + integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" + +istanbul-reports@^3.1.3: + version "3.1.6" + resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz" + integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +jest-changed-files@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz" + integrity sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw== + dependencies: + "@jest/types" "^27.5.1" + execa "^5.0.0" + throat "^6.0.1" + +jest-circus@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz" + integrity sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw== + dependencies: + "@jest/environment" "^27.5.1" + "@jest/test-result" "^27.5.1" + "@jest/types" "^27.5.1" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + dedent "^0.7.0" + expect "^27.5.1" + is-generator-fn "^2.0.0" + jest-each "^27.5.1" + jest-matcher-utils "^27.5.1" + jest-message-util "^27.5.1" + jest-runtime "^27.5.1" + jest-snapshot "^27.5.1" + jest-util "^27.5.1" + pretty-format "^27.5.1" + slash "^3.0.0" + stack-utils "^2.0.3" + throat "^6.0.1" + +jest-cli@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz" + integrity sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw== + dependencies: + "@jest/core" "^27.5.1" + "@jest/test-result" "^27.5.1" + "@jest/types" "^27.5.1" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + import-local "^3.0.2" + jest-config "^27.5.1" + jest-util "^27.5.1" + jest-validate "^27.5.1" + prompts "^2.0.1" + yargs "^16.2.0" + +jest-config@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz" + integrity sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA== + dependencies: + "@babel/core" "^7.8.0" + "@jest/test-sequencer" "^27.5.1" + "@jest/types" "^27.5.1" + babel-jest "^27.5.1" + chalk "^4.0.0" + ci-info "^3.2.0" + deepmerge "^4.2.2" + glob "^7.1.1" + graceful-fs "^4.2.9" + jest-circus "^27.5.1" + jest-environment-jsdom "^27.5.1" + jest-environment-node "^27.5.1" + jest-get-type "^27.5.1" + jest-jasmine2 "^27.5.1" + jest-regex-util "^27.5.1" + jest-resolve "^27.5.1" + jest-runner "^27.5.1" + jest-util "^27.5.1" + jest-validate "^27.5.1" + micromatch "^4.0.4" + parse-json "^5.2.0" + pretty-format "^27.5.1" + slash "^3.0.0" + strip-json-comments "^3.1.1" + +jest-diff@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz" + integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== + dependencies: + chalk "^4.0.0" + diff-sequences "^27.5.1" + jest-get-type "^27.5.1" + pretty-format "^27.5.1" + +jest-docblock@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz" + integrity sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ== + dependencies: + detect-newline "^3.0.0" + +jest-each@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz" + integrity sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ== + dependencies: + "@jest/types" "^27.5.1" + chalk "^4.0.0" + jest-get-type "^27.5.1" + jest-util "^27.5.1" + pretty-format "^27.5.1" + +jest-environment-jsdom@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz" + integrity sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw== + dependencies: + "@jest/environment" "^27.5.1" + "@jest/fake-timers" "^27.5.1" + "@jest/types" "^27.5.1" + "@types/node" "*" + jest-mock "^27.5.1" + jest-util "^27.5.1" + jsdom "^16.6.0" + +jest-environment-node@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz" + integrity sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw== + dependencies: + "@jest/environment" "^27.5.1" + "@jest/fake-timers" "^27.5.1" + "@jest/types" "^27.5.1" + "@types/node" "*" + jest-mock "^27.5.1" + jest-util "^27.5.1" + +jest-get-type@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz" + integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== + +jest-haste-map@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz" + integrity sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng== + dependencies: + "@jest/types" "^27.5.1" + "@types/graceful-fs" "^4.1.2" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.9" + jest-regex-util "^27.5.1" + jest-serializer "^27.5.1" + jest-util "^27.5.1" + jest-worker "^27.5.1" + micromatch "^4.0.4" + walker "^1.0.7" + optionalDependencies: + fsevents "^2.3.2" + +jest-jasmine2@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz" + integrity sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ== + dependencies: + "@jest/environment" "^27.5.1" + "@jest/source-map" "^27.5.1" + "@jest/test-result" "^27.5.1" + "@jest/types" "^27.5.1" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + expect "^27.5.1" + is-generator-fn "^2.0.0" + jest-each "^27.5.1" + jest-matcher-utils "^27.5.1" + jest-message-util "^27.5.1" + jest-runtime "^27.5.1" + jest-snapshot "^27.5.1" + jest-util "^27.5.1" + pretty-format "^27.5.1" + throat "^6.0.1" + +jest-leak-detector@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz" + integrity sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ== + dependencies: + jest-get-type "^27.5.1" + pretty-format "^27.5.1" + +jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz" + integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== + dependencies: + chalk "^4.0.0" + jest-diff "^27.5.1" + jest-get-type "^27.5.1" + pretty-format "^27.5.1" + +jest-message-util@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz" + integrity sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g== + dependencies: + "@babel/code-frame" "^7.12.13" + "@jest/types" "^27.5.1" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.9" + micromatch "^4.0.4" + pretty-format "^27.5.1" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-mock@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz" + integrity sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og== + dependencies: + "@jest/types" "^27.5.1" + "@types/node" "*" + +jest-pnp-resolver@^1.2.2: + version "1.2.3" + resolved "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz" + integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== + +jest-regex-util@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz" + integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== + +jest-resolve-dependencies@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz" + integrity sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg== + dependencies: + "@jest/types" "^27.5.1" + jest-regex-util "^27.5.1" + jest-snapshot "^27.5.1" + +jest-resolve@*, jest-resolve@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz" + integrity sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw== + dependencies: + "@jest/types" "^27.5.1" + chalk "^4.0.0" + graceful-fs "^4.2.9" + jest-haste-map "^27.5.1" + jest-pnp-resolver "^1.2.2" + jest-util "^27.5.1" + jest-validate "^27.5.1" + resolve "^1.20.0" + resolve.exports "^1.1.0" + slash "^3.0.0" + +jest-runner@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz" + integrity sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ== + dependencies: + "@jest/console" "^27.5.1" + "@jest/environment" "^27.5.1" + "@jest/test-result" "^27.5.1" + "@jest/transform" "^27.5.1" + "@jest/types" "^27.5.1" + "@types/node" "*" + chalk "^4.0.0" + emittery "^0.8.1" + graceful-fs "^4.2.9" + jest-docblock "^27.5.1" + jest-environment-jsdom "^27.5.1" + jest-environment-node "^27.5.1" + jest-haste-map "^27.5.1" + jest-leak-detector "^27.5.1" + jest-message-util "^27.5.1" + jest-resolve "^27.5.1" + jest-runtime "^27.5.1" + jest-util "^27.5.1" + jest-worker "^27.5.1" + source-map-support "^0.5.6" + throat "^6.0.1" + +jest-runtime@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz" + integrity sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A== + dependencies: + "@jest/environment" "^27.5.1" + "@jest/fake-timers" "^27.5.1" + "@jest/globals" "^27.5.1" + "@jest/source-map" "^27.5.1" + "@jest/test-result" "^27.5.1" + "@jest/transform" "^27.5.1" + "@jest/types" "^27.5.1" + chalk "^4.0.0" + cjs-module-lexer "^1.0.0" + collect-v8-coverage "^1.0.0" + execa "^5.0.0" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-haste-map "^27.5.1" + jest-message-util "^27.5.1" + jest-mock "^27.5.1" + jest-regex-util "^27.5.1" + jest-resolve "^27.5.1" + jest-snapshot "^27.5.1" + jest-util "^27.5.1" + slash "^3.0.0" + strip-bom "^4.0.0" + +jest-serializer@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz" + integrity sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w== + dependencies: + "@types/node" "*" + graceful-fs "^4.2.9" + +jest-snapshot@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz" + integrity sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA== + dependencies: + "@babel/core" "^7.7.2" + "@babel/generator" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/traverse" "^7.7.2" + "@babel/types" "^7.0.0" + "@jest/transform" "^27.5.1" + "@jest/types" "^27.5.1" + "@types/babel__traverse" "^7.0.4" + "@types/prettier" "^2.1.5" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^27.5.1" + graceful-fs "^4.2.9" + jest-diff "^27.5.1" + jest-get-type "^27.5.1" + jest-haste-map "^27.5.1" + jest-matcher-utils "^27.5.1" + jest-message-util "^27.5.1" + jest-util "^27.5.1" + natural-compare "^1.4.0" + pretty-format "^27.5.1" + semver "^7.3.2" + +jest-util@^27.0.0, jest-util@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz" + integrity sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw== + dependencies: + "@jest/types" "^27.5.1" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" + +jest-validate@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz" + integrity sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ== + dependencies: + "@jest/types" "^27.5.1" + camelcase "^6.2.0" + chalk "^4.0.0" + jest-get-type "^27.5.1" + leven "^3.1.0" + pretty-format "^27.5.1" + +jest-watcher@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz" + integrity sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw== + dependencies: + "@jest/test-result" "^27.5.1" + "@jest/types" "^27.5.1" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + jest-util "^27.5.1" + string-length "^4.0.1" + +jest-worker@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz" + integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +jest@^27.0.0, jest@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz" + integrity sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ== + dependencies: + "@jest/core" "^27.5.1" + import-local "^3.0.2" + jest-cli "^27.5.1" + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsdom@^16.6.0: + version "16.7.0" + resolved "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz" + integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== + dependencies: + abab "^2.0.5" + acorn "^8.2.4" + acorn-globals "^6.0.0" + cssom "^0.4.4" + cssstyle "^2.3.0" + data-urls "^2.0.0" + decimal.js "^10.2.1" + domexception "^2.0.1" + escodegen "^2.0.0" + form-data "^3.0.0" + html-encoding-sniffer "^2.0.1" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.0" + parse5 "6.0.1" + saxes "^5.0.1" + symbol-tree "^3.2.4" + tough-cookie "^4.0.0" + w3c-hr-time "^1.0.2" + w3c-xmlserializer "^2.0.0" + webidl-conversions "^6.1.0" + whatwg-encoding "^1.0.5" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.5.0" + ws "^7.4.6" + xml-name-validator "^3.0.0" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-parse-even-better-errors@^2.3.0: + 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== + +json5@^2.2.3, json5@2.x: + version "2.2.3" + resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +jsonc-parser@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz" + integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +keccak@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz" + integrity sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q== + dependencies: + bindings "^1.5.0" + inherits "^2.0.4" + nan "^2.14.0" + safe-buffer "^5.2.0" + +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +lodash.memoize@4.x: + version "4.1.2" + resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz" + integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== + +lodash@^4.17.20, lodash@^4.7.0: + version "4.17.21" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +lunr@^2.3.9: + version "2.3.9" + resolved "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz" + integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== + +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + +make-error@1.x: + version "1.3.6" + resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +makeerror@1.0.12: + version "1.0.12" + resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz" + integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== + dependencies: + tmpl "1.0.5" + +marked@^4.2.12: + version "4.3.0" + resolved "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz" + integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12, mime-types@~2.1.24, mime-types@~2.1.34: + 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" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + +minimatch@^3.0.4, minimatch@^3.1.1: + 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" + +minimatch@^7.1.3: + version "7.4.6" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz" + integrity sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw== + dependencies: + brace-expansion "^2.0.1" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nan@^2.14.0: + version "2.17.0" + resolved "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz" + integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== + +nan@2.14.0: + version "2.14.0" + resolved "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz" + integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + +node-cache@^5.1.2: + 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" + +node-gyp-build@^4.2.0: + version "4.6.1" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz" + integrity sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ== + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" + integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== + +node-releases@^2.0.13: + version "2.0.13" + resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz" + integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== + +node-seal@^4.5.7: + version "4.6.4" + resolved "https://registry.npmjs.org/node-seal/-/node-seal-4.6.4.tgz" + integrity sha512-ZQU63Ikt9/n9CXueEltszdAxUPHWpfbExcoux6Ktn2W3lxWc7jG2yx3p0ok34LzOgKOfytUSwHCxYmabAm3VPQ== + +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +nwsapi@^2.2.0: + version "2.2.7" + resolved "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz" + integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ== + +object-inspect@^1.9.0: + version "1.12.3" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^5.1.2: + 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" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parse-json@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + 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" + +parse5@6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== + +pbkdf2@^3.0.17: + version "3.1.2" + resolved "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + 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" + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pirates@^4.0.4: + version "4.0.6" + resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + +pkg-dir@^4.2.0: + 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== + dependencies: + find-up "^4.0.0" + +pretty-format@^27.0.0, pretty-format@^27.5.1: + version "27.5.1" + resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz" + integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== + dependencies: + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^17.0.1" + +prompts@^2.0.1: + version "2.4.2" + resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +psl@^1.1.33: + version "1.9.0" + resolved "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz" + integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== + +punycode@^2.1.1: + version "2.3.0" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + +qs@6.11.0: + version "6.11.0" + resolved "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + +randombytes@^2.1.0: + 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" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.1: + version "2.5.1" + resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +react-is@^17.0.1: + version "17.0.2" + resolved "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz" + integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== + +readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +require-directory@^2.1.1: + 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== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + +resolve-cwd@^3.0.0: + 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== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve.exports@^1.1.0: + version "1.1.1" + resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.1.tgz" + integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ== + +resolve@^1.20.0: + version "1.22.4" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz" + integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +rimraf@^3.0.0: + version "3.0.2" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.2.2: + version "2.2.7" + resolved "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz" + integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== + dependencies: + bn.js "^5.2.0" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0, safe-buffer@5.2.1: + version "5.2.1" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +saxes@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz" + integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== + dependencies: + xmlchars "^2.2.0" + +scryptsy@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz" + integrity sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w== + +secp256k1@^3.0.1, secp256k1@^3.6.2: + version "3.8.0" + resolved "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz" + integrity sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw== + dependencies: + bindings "^1.5.0" + bip66 "^1.1.5" + bn.js "^4.11.8" + create-hash "^1.2.0" + drbg.js "^1.0.1" + elliptic "^6.5.2" + nan "^2.14.0" + safe-buffer "^5.1.2" + +secp256k1@^4.0.0: + version "4.0.3" + resolved "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz" + integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== + dependencies: + elliptic "^6.5.4" + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +secp256k1@3.7.1: + version "3.7.1" + resolved "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz" + integrity sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g== + dependencies: + bindings "^1.5.0" + bip66 "^1.1.5" + bn.js "^4.11.8" + create-hash "^1.2.0" + drbg.js "^1.0.1" + elliptic "^6.4.1" + nan "^2.14.0" + safe-buffer "^5.1.2" + +semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.3.2: + version "7.5.4" + 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" + +semver@^7.5.3: + version "7.5.4" + 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" + +semver@7.x: + version "7.5.4" + 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" + +send@0.18.0: + version "0.18.0" + resolved "https://registry.npmjs.org/send/-/send-0.18.0.tgz" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.18.0" + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shebang-command@^2.0.0: + 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" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +shiki@^0.14.1: + version "0.14.3" + resolved "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz" + integrity sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g== + dependencies: + ansi-sequence-parser "^1.1.0" + jsonc-parser "^3.2.0" + vscode-oniguruma "^1.7.0" + vscode-textmate "^8.0.0" + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^3.0.2, signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +source-map-support@^0.5.6: + 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== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@^0.7.3: + version "0.7.4" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz" + integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +stack-utils@^2.0.3: + version "2.0.6" + resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== + dependencies: + escape-string-regexp "^2.0.0" + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +string_decoder@^1.1.1: + 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== + dependencies: + safe-buffer "~5.2.0" + +string-length@^4.0.1: + version "4.0.2" + resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" + integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== + dependencies: + char-regex "^1.0.2" + strip-ansi "^6.0.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-json-comments@^3.1.1: + 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== + +supports-color@^5.3.0: + 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" + +supports-color@^7.0.0, supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-hyperlinks@^2.0.0: + version "2.3.0" + resolved "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz" + integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== + dependencies: + has-flag "^4.0.0" + supports-color "^7.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + 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== + +symbol-tree@^3.2.4: + version "3.2.4" + resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + +terminal-link@^2.0.0: + version "2.1.1" + resolved "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz" + integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== + dependencies: + ansi-escapes "^4.2.1" + supports-hyperlinks "^2.0.0" + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +throat@^6.0.1: + version "6.0.2" + resolved "https://registry.npmjs.org/throat/-/throat-6.0.2.tgz" + integrity sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ== + +tmpl@1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== + +to-regex-range@^5.0.1: + 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== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +tough-cookie@^4.0.0: + version "4.1.3" + resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz" + integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + +tr46@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz" + integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== + dependencies: + punycode "^2.1.1" + +ts-jest@^27.1.4: + version "27.1.5" + resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.5.tgz" + integrity sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA== + dependencies: + bs-logger "0.x" + fast-json-stable-stringify "2.x" + jest-util "^27.0.0" + json5 "2.x" + lodash.memoize "4.x" + make-error "1.x" + semver "7.x" + yargs-parser "20.x" + +type-detect@4.0.8: + version "4.0.8" + resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.21.3: + 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== + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typedoc-plugin-remove-references@^0.0.6: + version "0.0.6" + resolved "https://registry.npmjs.org/typedoc-plugin-remove-references/-/typedoc-plugin-remove-references-0.0.6.tgz" + integrity sha512-QoyHpopznnJbWW/9JT2NHSK+eTmyShkPYebwe5ZnO8aohPLc5okk4puWUDXnNh2Tn7cJU8U3t1tEMO6ghbwE8Q== + +typedoc-plugin-rename-defaults@^0.6.4: + version "0.6.6" + resolved "https://registry.npmjs.org/typedoc-plugin-rename-defaults/-/typedoc-plugin-rename-defaults-0.6.6.tgz" + integrity sha512-8TCDrxMG8cR0IRhMZbxMCXlmQrEwFFH0she4eHsaUGd1TPfrkk8GLO4n2qlSISd66OtT28e17ysiVZPbQnLGMg== + +typedoc-theme-hierarchy@^3.0.0: + version "3.2.1" + resolved "https://registry.npmjs.org/typedoc-theme-hierarchy/-/typedoc-theme-hierarchy-3.2.1.tgz" + integrity sha512-Spum9ccW7bc++c8dLFNRh+9hvG+REntLQCNUb74pz28qcuhPOtxOuKteM/4aJbJDjw/9mORXZZYSToMGb+MrYw== + dependencies: + fs-extra "^10.0.0" + +typedoc@^0.23.17, typedoc@^0.23.6, "typedoc@0.22.x || 0.23.x || 0.24.x || 0.25.x": + version "0.23.28" + resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz" + integrity sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w== + dependencies: + lunr "^2.3.9" + marked "^4.2.12" + minimatch "^7.1.3" + shiki "^0.14.1" + +typescript@^4.6.3, "typescript@>=3.8 <5.0", "typescript@4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x": + version "4.9.5" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +unpipe@~1.0.0, unpipe@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +update-browserslist-db@^1.0.11: + version "1.0.11" + resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz" + integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + +url-parse@^1.4.7, url-parse@^1.5.3: + version "1.5.10" + resolved "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + +uuid@^3.3.3: + version "3.4.0" + resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +v8-to-istanbul@^8.1.0: + version "8.1.1" + resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz" + integrity sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^1.6.0" + source-map "^0.7.3" + +varuint-bitcoin@^1.1.0: + version "1.1.2" + resolved "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz" + integrity sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw== + dependencies: + safe-buffer "^5.1.1" + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +vscode-oniguruma@^1.7.0: + version "1.7.0" + resolved "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz" + integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== + +vscode-textmate@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz" + integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== + +w3c-hr-time@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz" + integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== + dependencies: + browser-process-hrtime "^1.0.0" + +w3c-xmlserializer@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz" + integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== + dependencies: + xml-name-validator "^3.0.0" + +walker@^1.0.7: + version "1.0.8" + resolved "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz" + integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== + dependencies: + makeerror "1.0.12" + +webidl-conversions@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz" + integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== + +webidl-conversions@^6.1.0: + version "6.1.0" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz" + integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== + +whatwg-encoding@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz" + integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== + dependencies: + iconv-lite "0.4.24" + +whatwg-mimetype@^2.3.0: + version "2.3.0" + resolved "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz" + integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== + +whatwg-url@^8.0.0, whatwg-url@^8.5.0: + version "8.7.0" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz" + integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== + dependencies: + lodash "^4.7.0" + tr46 "^2.1.0" + webidl-conversions "^6.1.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wrap-ansi@^7.0.0: + 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" + +wrappy@1: + version "1.0.2" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +write-file-atomic@^3.0.0: + version "3.0.3" + resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz" + integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== + dependencies: + imurmurhash "^0.1.4" + is-typedarray "^1.0.0" + signal-exit "^3.0.2" + typedarray-to-buffer "^3.1.5" + +ws@^7.4.6: + version "7.5.9" + resolved "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== + +ws@^8.2.3: + version "8.13.0" + resolved "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz" + integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== + +xml-name-validator@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz" + integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== + +xmlchars@^2.2.0: + version "2.2.0" + resolved "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz" + integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@^20.2.2, yargs-parser@20.x: + version "20.2.9" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + 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" From 99541d6caf4c2cd43c87a384eb643e77eec43a84 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 30 Aug 2023 10:18:25 +0900 Subject: [PATCH 003/235] fix: delete node 14 --- .github/workflows/pr_test.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_test.yml b/.github/workflows/pr_test.yml index 9f5ce75..88a9d72 100644 --- a/.github/workflows/pr_test.yml +++ b/.github/workflows/pr_test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [ 14, 16 ] + node: [ 16 ] name: Run Test on Node ${{ matrix.node }} steps: - uses: actions/checkout@v3 diff --git a/package.json b/package.json index 14071ce..ca92523 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "docs": "yarn build && typedoc --out docs" }, "engines": { - "node": ">=12" + "node": ">=16" }, "repository": { "type": "git", From e24779745c6eb80cfe011669b5c994559e040145 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 30 Aug 2023 16:06:42 +0900 Subject: [PATCH 004/235] fix: delete node 14 --- .github/workflows/pr_test_when_merged.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_test_when_merged.yml b/.github/workflows/pr_test_when_merged.yml index 1b4b4d0..ae6e43c 100644 --- a/.github/workflows/pr_test_when_merged.yml +++ b/.github/workflows/pr_test_when_merged.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [ 14, 16 ] + node: [ 16 ] name: Run Test on Node ${{ matrix.node }} steps: - uses: actions/checkout@v3 From 7792f6f7e5d911f7110570ed5683a706c41cfb62 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 30 Aug 2023 16:17:36 +0900 Subject: [PATCH 005/235] refactor: add skil test with no test --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ca92523..e9d423e 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "build": "rm -rf ./dist && tsc", "dev": "rm -rf ./dist && tsc", - "test": "NODE_ENV=dev jest", + "test": "NODE_ENV=dev jest --passWithNoTests", "docs": "yarn build && typedoc --out docs" }, "engines": { From 7e1ba31b899ce29c82d1748c9af8555ea83d166f Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 30 Aug 2023 17:17:33 +0900 Subject: [PATCH 006/235] feat: add draft app module --- src/modules/app.ts | 177 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) diff --git a/src/modules/app.ts b/src/modules/app.ts index e69de29..578302e 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -0,0 +1,177 @@ +import Ain from '@ainblockchain/ain-js' +import { SetMultiOperation, SetOperation, TransactionBody } from '@ainblockchain/ain-js/lib/types'; + +// FIXME(yoojin): move to constant. +const defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { + const rootRef = `/apps/${appName}`; + return { + root: { + ref: rootRef, + value: { + '.rule': { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true" + } + } + }, + deposit: { + ref: `${rootRef}/deposit/$userAddress/$transferKey`, + value: { + '.rule': { + write: "data === null && util.isNumber(newData) && getValue(`/transfer/` + $userAddress + `/` + getValue(`/apps/" + `${appName}` + "/billingConfig/depositAddress`) + `/` + $transferKey + `/value`) === newData" + } + } + }, + balance: { + ref: `${rootRef}/balance/$userAddress/balance`, + value: { + '.rule': { + write: "(util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true) && util.isNumber(newData)" + } + } + }, + balanceHistory: { + ref: `${rootRef}/balance/$userAddress/history/$timestamp_and_type`, + value: { + '.rule': { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.amount) && (newData.type === 'DEPOSIT' || newData.type === 'USAGE')" + } + } + }, + request: { + ref: `${rootRef}/usage/$userAddress/$requestKey/request`, + value: { + '.rule': { + write: + "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`)" + } + } + }, + response: { + ref: `${rootRef}/usage/$userAddress/$requestKey/response`, + value: { + '.rule': { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.status)" + } + }, + }, + } +} + +// FIXME(yoojin): move to types. +// NOTE(yoojin): temporary type. service url may be changed to array? +interface TriggerFunctionUrlMap { + deposit: string, + service: string, +} + + +export default class App { + private ain: Ain; + constructor( + ain: Ain + ) { + this.ain = ain; + } + + async create(appName: string, urls: TriggerFunctionUrlMap) { + const createAppOp = this.buildCreateAppOp(appName); + const setRulesOp = this.buildSetDefaoultAppRulesOps(appName); + const setFunctionsOp = this.buildSetDefaultFunctionsOp(appName, urls); + + const txBody = this.buildTxBody([createAppOp, ...setRulesOp, ...setFunctionsOp]); + + return await this.signAndSendTransaction(txBody); + } + + private buildCreateAppOp(appName: string): SetOperation { + const ref = `/manage_app/${appName}/create/${Date.now()}`; + const adminAccount = this.ain.wallet.defaultAccount!; + if (adminAccount && adminAccount.address) { + // FIXME(yoojin): change Error to Custom error when it added. + throw new Error('You need to enter your private key when initialize sdk.'); + } + const value = { + admin: { + [adminAccount.address]: true, + } + } + + return this.buildSetValueOp(ref, value); + } + + private buildSetDefaoultAppRulesOps(appName: string): SetOperation[] { + const defaultRules = defaultAppRules(appName); + const ruleOps: SetOperation[] = []; + for (const rule of Object.values(defaultRules)) { + const { ref, value } = rule; + const ruleOp = this.buildSetRuleOp(ref, value); + ruleOps.push(ruleOp); + } + return ruleOps; + } + + private buildSetDefaultFunctionsOp(appName: string, urls: TriggerFunctionUrlMap): SetOperation[] { + const depositFunctionId = "deposit-trigger"; + const depositFunctionVal = { + ".function": { + [depositFunctionId]: { + function_type: "REST", + function_url: urls.deposit, + function_id: depositFunctionId, + } + } + } + const depositFunction = this.buildSetFunctionOp(appName, depositFunctionVal); + + const serviceFunctionId = "service-trigger"; + const serviceFunctionVal = { + ".function": { + [serviceFunctionId]: { + function_type: "REST", + function_url: urls.service, + function_id: serviceFunctionId, + } + } + } + const serviceFunction = this.buildSetFunctionOp(appName, serviceFunctionVal); + + return [depositFunction, serviceFunction]; + } + + signAndSendTransaction(txBody: TransactionBody) { + return this.ain.sendTransaction(txBody); + } + + private buildTxBody(operation: SetOperation | SetOperation[]): TransactionBody { + return { + operation: Array.isArray(operation) ? { + type: "SET", + op_list: operation + } : operation, + gas_price: 500, + timestamp: Date.now(), + nonce: -1 + } + } + private buildSetValueOp(ref: string, value: object): SetOperation { + return { + type: "SET_VALUE", + ref, + value, + } + } + private buildSetRuleOp(ref: string, value: object): SetOperation { + return { + type: "SET_RULE", + ref, + value, + } + } + private buildSetFunctionOp(ref: string, value: object): SetOperation { + return { + type: "SET_FUNCTION", + ref, + value, + } + } +} \ No newline at end of file From f698c431baa7844e91c3fe42717105e01078296e Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 30 Aug 2023 17:52:48 +0900 Subject: [PATCH 007/235] fix: typo --- src/modules/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 578302e..1559609 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -75,7 +75,7 @@ export default class App { async create(appName: string, urls: TriggerFunctionUrlMap) { const createAppOp = this.buildCreateAppOp(appName); - const setRulesOp = this.buildSetDefaoultAppRulesOps(appName); + const setRulesOp = this.buildSetDefaultAppRulesOps(appName); const setFunctionsOp = this.buildSetDefaultFunctionsOp(appName, urls); const txBody = this.buildTxBody([createAppOp, ...setRulesOp, ...setFunctionsOp]); @@ -99,7 +99,7 @@ export default class App { return this.buildSetValueOp(ref, value); } - private buildSetDefaoultAppRulesOps(appName: string): SetOperation[] { + private buildSetDefaultAppRulesOps(appName: string): SetOperation[] { const defaultRules = defaultAppRules(appName); const ruleOps: SetOperation[] = []; for (const rule of Object.values(defaultRules)) { From 61a9ef5ba7cc6812dee80329530173ee8472fc33 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 30 Aug 2023 17:56:31 +0900 Subject: [PATCH 008/235] fix: add async await --- src/modules/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 1559609..857fb99 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -138,8 +138,8 @@ export default class App { return [depositFunction, serviceFunction]; } - signAndSendTransaction(txBody: TransactionBody) { - return this.ain.sendTransaction(txBody); + async signAndSendTransaction(txBody: TransactionBody) { + return await this.ain.sendTransaction(txBody); } private buildTxBody(operation: SetOperation | SetOperation[]): TransactionBody { From 9e0e5e2fd0c7ada78359629cfa985b4800066a33 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 30 Aug 2023 18:46:48 +0900 Subject: [PATCH 009/235] fix: build default function with const --- src/modules/app.ts | 57 +++++++++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 857fb99..abd3048 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -57,6 +57,28 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu } } +const defaultAppFunctions = (appName: string) => { + const rootRef = `/apps/${appName}` + return { + deposit: (url: string) => { + return { + ref: `${rootRef}/deposit/$userAddress/$transferKey`, + function_type: "REST", + function_id: "deposit-trigger", + function_url: url, + } + }, + service: (url: string) => { + return { + ref: `${rootRef}/${appName}/usage/$userAddress/$requestKey/request`, + function_type: "REST", + function_id: "service-trigger", + function_url: url, + } + } + } +} + // FIXME(yoojin): move to types. // NOTE(yoojin): temporary type. service url may be changed to array? interface TriggerFunctionUrlMap { @@ -111,31 +133,24 @@ export default class App { } private buildSetDefaultFunctionsOp(appName: string, urls: TriggerFunctionUrlMap): SetOperation[] { - const depositFunctionId = "deposit-trigger"; - const depositFunctionVal = { - ".function": { - [depositFunctionId]: { - function_type: "REST", - function_url: urls.deposit, - function_id: depositFunctionId, - } - } - } - const depositFunction = this.buildSetFunctionOp(appName, depositFunctionVal); - - const serviceFunctionId = "service-trigger"; - const serviceFunctionVal = { - ".function": { - [serviceFunctionId]: { - function_type: "REST", - function_url: urls.service, - function_id: serviceFunctionId, + const defaultFunctions = defaultAppFunctions(appName); + const functions: SetOperation[] = []; + for (const [type, func] of Object.entries(defaultFunctions)) { + const { ref, function_type, function_url, function_id } = func(type); + const value = { + ".function": { + [function_id]: { + function_type, + function_url, + function_id, + } } } + const funcOp = this.buildSetFunctionOp(ref, value); + functions.push(funcOp); } - const serviceFunction = this.buildSetFunctionOp(appName, serviceFunctionVal); - return [depositFunction, serviceFunction]; + return functions; } async signAndSendTransaction(txBody: TransactionBody) { From f592b406f1985fc8f0537af7be95e8029264f153 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 31 Aug 2023 09:15:11 +0900 Subject: [PATCH 010/235] fix: function name --- src/modules/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index abd3048..5220458 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -98,7 +98,7 @@ export default class App { async create(appName: string, urls: TriggerFunctionUrlMap) { const createAppOp = this.buildCreateAppOp(appName); const setRulesOp = this.buildSetDefaultAppRulesOps(appName); - const setFunctionsOp = this.buildSetDefaultFunctionsOp(appName, urls); + const setFunctionsOp = this.buildSetDefaultFunctionsOps(appName, urls); const txBody = this.buildTxBody([createAppOp, ...setRulesOp, ...setFunctionsOp]); @@ -132,7 +132,7 @@ export default class App { return ruleOps; } - private buildSetDefaultFunctionsOp(appName: string, urls: TriggerFunctionUrlMap): SetOperation[] { + private buildSetDefaultFunctionsOps(appName: string, urls: TriggerFunctionUrlMap): SetOperation[] { const defaultFunctions = defaultAppFunctions(appName); const functions: SetOperation[] = []; for (const [type, func] of Object.entries(defaultFunctions)) { From 540511f8c742976ddf6c23710476f39c4b347092 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 31 Aug 2023 14:44:16 +0900 Subject: [PATCH 011/235] fix: service path of rule and function --- src/modules/app.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 5220458..4fb5381 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -38,7 +38,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu } }, request: { - ref: `${rootRef}/usage/$userAddress/$requestKey/request`, + ref: `${rootRef}/service/$serviceName/$userAddress/$requestKey/request`, value: { '.rule': { write: @@ -47,7 +47,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu } }, response: { - ref: `${rootRef}/usage/$userAddress/$requestKey/response`, + ref: `${rootRef}/service/$serviceName/$userAddress/$requestKey/response`, value: { '.rule': { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.status)" @@ -70,7 +70,7 @@ const defaultAppFunctions = (appName: string) => { }, service: (url: string) => { return { - ref: `${rootRef}/${appName}/usage/$userAddress/$requestKey/request`, + ref: `${rootRef}/${appName}/service/$serviceName/$userAddress/$requestKey/request`, function_type: "REST", function_id: "service-trigger", function_url: url, From b3c7722f8ad93c22e1b7cba566cad60a5c5ac2e7 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 31 Aug 2023 18:26:00 +0900 Subject: [PATCH 012/235] fix: remove default op build functions --- src/modules/app.ts | 67 +++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 36 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 4fb5381..06205c1 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -63,17 +63,17 @@ const defaultAppFunctions = (appName: string) => { deposit: (url: string) => { return { ref: `${rootRef}/deposit/$userAddress/$transferKey`, - function_type: "REST", - function_id: "deposit-trigger", - function_url: url, + functionType: "REST", + functionId: "deposit-trigger", + functionUrl: url, } }, service: (url: string) => { return { ref: `${rootRef}/${appName}/service/$serviceName/$userAddress/$requestKey/request`, - function_type: "REST", - function_id: "service-trigger", - function_url: url, + functionType: "REST", + functionId: "service-trigger", + functionUrl: url, } } } @@ -97,10 +97,25 @@ export default class App { async create(appName: string, urls: TriggerFunctionUrlMap) { const createAppOp = this.buildCreateAppOp(appName); - const setRulesOp = this.buildSetDefaultAppRulesOps(appName); - const setFunctionsOp = this.buildSetDefaultFunctionsOps(appName, urls); - const txBody = this.buildTxBody([createAppOp, ...setRulesOp, ...setFunctionsOp]); + const defaultRules = defaultAppRules(appName); + const setRuleOps: SetOperation[] = []; + for (const rule of Object.values(defaultRules)) { + const { ref, value } = rule; + const ruleOp = this.buildSetRuleOp(ref, value); + setRuleOps.push(ruleOp); + } + + const defaultFunctions = defaultAppFunctions(appName); + const setFunctionOps: SetOperation[] = []; + for (const func of Object.values(defaultFunctions)) { + const { ref, functionId, functionType, functionUrl } = func(appName); + const value = this.buildSetFunctionValue(functionId, functionType, functionUrl); + const funcOp = this.buildSetFunctionOp(ref, value); + setFunctionOps.push(funcOp); + } + + const txBody = this.buildTxBody([createAppOp, ...setRuleOps, ...setFunctionOps]); return await this.signAndSendTransaction(txBody); } @@ -121,36 +136,16 @@ export default class App { return this.buildSetValueOp(ref, value); } - private buildSetDefaultAppRulesOps(appName: string): SetOperation[] { - const defaultRules = defaultAppRules(appName); - const ruleOps: SetOperation[] = []; - for (const rule of Object.values(defaultRules)) { - const { ref, value } = rule; - const ruleOp = this.buildSetRuleOp(ref, value); - ruleOps.push(ruleOp); - } - return ruleOps; - } - - private buildSetDefaultFunctionsOps(appName: string, urls: TriggerFunctionUrlMap): SetOperation[] { - const defaultFunctions = defaultAppFunctions(appName); - const functions: SetOperation[] = []; - for (const [type, func] of Object.entries(defaultFunctions)) { - const { ref, function_type, function_url, function_id } = func(type); - const value = { - ".function": { - [function_id]: { - function_type, - function_url, - function_id, - } + buildSetFunctionValue(functionType: string, functionId: string, functionUrl: string) { + return { + ".function": { + [functionId]: { + function_type: functionType, + function_url: functionUrl, + function_id: functionId, } } - const funcOp = this.buildSetFunctionOp(ref, value); - functions.push(funcOp); } - - return functions; } async signAndSendTransaction(txBody: TransactionBody) { From 20d4156beadb6d1eb4c28ca965cbda651d2a7d1a Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 1 Sep 2023 09:23:44 +0900 Subject: [PATCH 013/235] feat: handler --- src/ainize.ts | 9 +++-- src/constants.ts | 3 ++ src/handlers/handler.ts | 64 +++++++++++++++++++++++++++++++++++ src/middlewares/middleware.ts | 24 +++++++++++++ 4 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 src/constants.ts diff --git a/src/ainize.ts b/src/ainize.ts index e773550..1ac4c8c 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -1,17 +1,22 @@ import { NextFunction, Request, Response } from 'express'; import Ain from '@ainblockchain/ain-js'; import * as NodeCache from 'node-cache'; +import Middleware from './middlewares/middleware'; +import { getBlockChainEndpoint } from './constants'; export default class Ainize { cache: NodeCache; ain: Ain; userAddress: string; + middleware: Middleware; userPrivateKey: string; + constructor(privateKey: string, chainId: 1|0 ) { const Ain = require('@ainblockchain/ain-js').default - const blockChainEndpoint = chainId === 1 ? 'https://mainnet-api.ainetwork.ai' : 'https://testnet-api.ainetwork.ai'; + const blockChainEndpoint = getBlockChainEndpoint(chainId); this.ain = new Ain(blockChainEndpoint, chainId); - this.cache = new NodeCache(); + this.middleware = new Middleware(this); + this.userPrivateKey = privateKey; this.userAddress = this.ain.wallet.addAndSetDefaultAccount(privateKey); } diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 0000000..673d29e --- /dev/null +++ b/src/constants.ts @@ -0,0 +1,3 @@ +export const getBlockChainEndpoint = (chainId:number) =>{ + return chainId === 1 ? 'https://mainnet-api.ainetwork.ai' : 'https://testnet-api.ainetwork.ai' +} \ No newline at end of file diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index e69de29..e7c38a2 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -0,0 +1,64 @@ +import { Request, Response, NextFunction } from "express"; +import Ainize from "../ainize"; +import NodeCache = require("node-cache"); +import Ain from "@ainblockchain/ain-js"; + +export default class Handler { + cache: NodeCache; + isConnected: boolean = false; + subscribeTable:any = {}; + ain: Ain; + constructor(ainize: Ainize) { + this.cache = ainize.cache; + this.ain = ainize.ain; + this.connect(); + } + private async connect() { + await this.ain.em.connect({ + handshakeTimeout: 30000, // Timeout in milliseconds for the web socket handshake request. + heartbeatIntervalMs: 16000, + }, this.disconnectedCallback); + this.isConnected = true; + }; + private disconnectedCallback() { + this.isConnected = false; + this.connect(); + } + + async subscribe(requester:string, appName: string, serviceName: string, callback: (valueChangedEvent: any) => any) { + const filterId = await this.ain.em.subscribe( + 'VALUE_CHANGED', + { + path: `/apps/${appName}/service/${serviceName}/${requester}/$timestamp/response`, + event_source: 'USER', + }, + (valueChangedEvent) => { + callback(valueChangedEvent); + }, + (err) => { + throw new err(err); + }, + ); + this.subscribeTable[requester][appName][serviceName] = filterId; + } + + getSubscribeList(requester?: string) { + if(!requester) return this.subscribeTable; + return this.subscribeTable[requester]; + } + + unsubscribe(requester:string, appName: string, serviceName: string) { + if(this.subscribeTable[requester][appName][serviceName] === null) return; + this.ain.em.unsubscribe( + this.subscribeTable[requester][appName][serviceName], + (err)=>{ + if (err) { + throw new err(err); + } else { + this.subscribeTable[requester][appName][serviceName] = null; + return true; + } + }); + } + +} \ No newline at end of file diff --git a/src/middlewares/middleware.ts b/src/middlewares/middleware.ts index e69de29..e48b0df 100644 --- a/src/middlewares/middleware.ts +++ b/src/middlewares/middleware.ts @@ -0,0 +1,24 @@ +import { Request, Response, NextFunction } from "express"; +import Ainize from "../ainize"; +import NodeCache = require("node-cache"); + +export default class Middleware { + cache: NodeCache; + constructor(ainize: Ainize) { + this.cache = ainize.cache; + } + + triggerDuplicateFilter = (req: Request, res: Response, next: NextFunction) => { + if(req.body.fid === undefined){ + next(); + } + const txHash = req.body.transaction.hash; + if (this.cache.get(txHash) && this.cache.get(txHash) !== 'error') { + res.send('duplicated'); + return; + } + // if request is first request, set cache + this.cache.set(txHash, "in_progress", 500); + next(); + } +} \ No newline at end of file From d61e0080dd6c6f830a3b87025f4084337af58790 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 1 Sep 2023 10:49:29 +0900 Subject: [PATCH 014/235] feat: subscirbe,unsubscribe,getSubscribeList --- package.json | 3 ++- src/ainize.ts | 9 ++++++++- src/constants.ts | 2 +- src/handlers/handler.ts | 28 +++++++++++++++++++++++----- 4 files changed, 34 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index e9d423e..2495f4c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "name": "@ainize-team/ainize-sdk", "version": "0.0.1", - "main": "lib/ainize.js", + "main": "dist/ainize.js", + "types": "dist/ainize.d.ts", "scripts": { "build": "rm -rf ./dist && tsc", "dev": "rm -rf ./dist && tsc", diff --git a/src/ainize.ts b/src/ainize.ts index 1ac4c8c..622d09d 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -3,22 +3,29 @@ import Ain from '@ainblockchain/ain-js'; import * as NodeCache from 'node-cache'; import Middleware from './middlewares/middleware'; import { getBlockChainEndpoint } from './constants'; +import Handler from './handlers/handler'; export default class Ainize { cache: NodeCache; ain: Ain; userAddress: string; middleware: Middleware; + handler: Handler; userPrivateKey: string; - + constructor(privateKey: string, chainId: 1|0 ) { const Ain = require('@ainblockchain/ain-js').default const blockChainEndpoint = getBlockChainEndpoint(chainId); this.ain = new Ain(blockChainEndpoint, chainId); this.cache = new NodeCache(); this.middleware = new Middleware(this); + this.handler = new Handler(this); this.userPrivateKey = privateKey; this.userAddress = this.ain.wallet.addAndSetDefaultAccount(privateKey); } + test() { + console.log('test'); + } + } diff --git a/src/constants.ts b/src/constants.ts index 673d29e..c1a3977 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,3 +1,3 @@ export const getBlockChainEndpoint = (chainId:number) =>{ - return chainId === 1 ? 'https://mainnet-api.ainetwork.ai' : 'https://testnet-api.ainetwork.ai' + return chainId === 1 ? 'https://mainnet-event.ainetwork.ai' : 'https://testnet-event.ainetwork.ai' } \ No newline at end of file diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index e7c38a2..a38903f 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -11,9 +11,8 @@ export default class Handler { constructor(ainize: Ainize) { this.cache = ainize.cache; this.ain = ainize.ain; - this.connect(); } - private async connect() { + async connect() { await this.ain.em.connect({ handshakeTimeout: 30000, // Timeout in milliseconds for the web socket handshake request. heartbeatIntervalMs: 16000, @@ -26,6 +25,9 @@ export default class Handler { } async subscribe(requester:string, appName: string, serviceName: string, callback: (valueChangedEvent: any) => any) { + if(this.checkSubscribeTableExists(requester, appName, serviceName)){ + throw new Error('Already subscribed'); + } const filterId = await this.ain.em.subscribe( 'VALUE_CHANGED', { @@ -36,11 +38,25 @@ export default class Handler { callback(valueChangedEvent); }, (err) => { - throw new err(err); + throw new Error(err.message); }, ); + this.createSubscribeTableIfNotExists(requester, appName, serviceName); this.subscribeTable[requester][appName][serviceName] = filterId; } + + private checkSubscribeTableExists(requester:string, appName:string, serviceName: string) { + if(!this.subscribeTable[requester]) return false; + if(!this.subscribeTable[requester][appName]) return false; + if(!this.subscribeTable[requester][appName][serviceName]) return false; + return true; + } + + private createSubscribeTableIfNotExists(requester:string, appName: string, serviceName: string) { + if(!this.subscribeTable[requester]) this.subscribeTable[requester] = {}; + if(!this.subscribeTable[requester][appName]) this.subscribeTable[requester][appName] = {}; + if(!this.subscribeTable[requester][appName][serviceName]) this.subscribeTable[requester][appName][serviceName] = null; + } getSubscribeList(requester?: string) { if(!requester) return this.subscribeTable; @@ -48,12 +64,14 @@ export default class Handler { } unsubscribe(requester:string, appName: string, serviceName: string) { - if(this.subscribeTable[requester][appName][serviceName] === null) return; + if(!this.checkSubscribeTableExists(requester, appName, serviceName)) { + throw new Error('Not subscribed'); + } this.ain.em.unsubscribe( this.subscribeTable[requester][appName][serviceName], (err)=>{ if (err) { - throw new err(err); + throw new Error(err.message); } else { this.subscribeTable[requester][appName][serviceName] = null; return true; From 32abc724030974bbc105a5665b118fc428c0a947 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 1 Sep 2023 11:01:07 +0900 Subject: [PATCH 015/235] feat: add util --- src/ainize.ts | 4 ++++ src/handlers/handler.ts | 5 ++++- src/utils/util.ts | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/ainize.ts b/src/ainize.ts index 622d09d..4cc4ad0 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -4,12 +4,14 @@ import * as NodeCache from 'node-cache'; import Middleware from './middlewares/middleware'; import { getBlockChainEndpoint } from './constants'; import Handler from './handlers/handler'; +import Util from './utils/util'; export default class Ainize { cache: NodeCache; ain: Ain; userAddress: string; middleware: Middleware; handler: Handler; + util: Util; userPrivateKey: string; constructor(privateKey: string, chainId: 1|0 ) { @@ -17,9 +19,11 @@ export default class Ainize { const blockChainEndpoint = getBlockChainEndpoint(chainId); this.ain = new Ain(blockChainEndpoint, chainId); this.cache = new NodeCache(); + this.util = new Util(); this.middleware = new Middleware(this); this.handler = new Handler(this); + this.userPrivateKey = privateKey; this.userAddress = this.ain.wallet.addAndSetDefaultAccount(privateKey); } diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index a38903f..a73b43b 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -2,15 +2,18 @@ import { Request, Response, NextFunction } from "express"; import Ainize from "../ainize"; import NodeCache = require("node-cache"); import Ain from "@ainblockchain/ain-js"; +import Util from "../utils/util"; export default class Handler { cache: NodeCache; isConnected: boolean = false; subscribeTable:any = {}; + util: Util; ain: Ain; constructor(ainize: Ainize) { this.cache = ainize.cache; this.ain = ainize.ain; + this.util = ainize.util; } async connect() { await this.ain.em.connect({ @@ -31,7 +34,7 @@ export default class Handler { const filterId = await this.ain.em.subscribe( 'VALUE_CHANGED', { - path: `/apps/${appName}/service/${serviceName}/${requester}/$timestamp/response`, + path: this.util.toReponsePath(requester, appName, serviceName), event_source: 'USER', }, (valueChangedEvent) => { diff --git a/src/utils/util.ts b/src/utils/util.ts index e69de29..b21a631 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -0,0 +1,8 @@ +export default class Util { + constructor() {} + + toReponsePath(requester:string, appName: string, serviceName: string, timestamp?: number){ + const timestampStr = timestamp ? timestamp.toString() : '$timestamp'; + return `/apps/${appName}/service/${serviceName}/${requester}/${timestampStr}/response`; + } +} \ No newline at end of file From 0d77c5022e5750aa4baca3ef32ce6025fde3fc72 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 1 Sep 2023 11:05:00 +0900 Subject: [PATCH 016/235] refactor: util to const --- src/ainize.ts | 3 --- src/constants.ts | 5 +++++ src/handlers/handler.ts | 6 ++---- src/utils/util.ts | 8 -------- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index 4cc4ad0..1574cef 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -4,14 +4,12 @@ import * as NodeCache from 'node-cache'; import Middleware from './middlewares/middleware'; import { getBlockChainEndpoint } from './constants'; import Handler from './handlers/handler'; -import Util from './utils/util'; export default class Ainize { cache: NodeCache; ain: Ain; userAddress: string; middleware: Middleware; handler: Handler; - util: Util; userPrivateKey: string; constructor(privateKey: string, chainId: 1|0 ) { @@ -19,7 +17,6 @@ export default class Ainize { const blockChainEndpoint = getBlockChainEndpoint(chainId); this.ain = new Ain(blockChainEndpoint, chainId); this.cache = new NodeCache(); - this.util = new Util(); this.middleware = new Middleware(this); this.handler = new Handler(this); diff --git a/src/constants.ts b/src/constants.ts index c1a3977..3f3fccf 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,3 +1,8 @@ export const getBlockChainEndpoint = (chainId:number) =>{ return chainId === 1 ? 'https://mainnet-event.ainetwork.ai' : 'https://testnet-event.ainetwork.ai' +} + +export const toResponsePath = (requester:string, appName: string, serviceName: string, timestamp?: number)=> { + const timestampStr = timestamp ? timestamp.toString() : '$timestamp'; + return `/apps/${appName}/service/${serviceName}/${requester}/${timestampStr}/response`; } \ No newline at end of file diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index a73b43b..b3c0739 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -2,18 +2,16 @@ import { Request, Response, NextFunction } from "express"; import Ainize from "../ainize"; import NodeCache = require("node-cache"); import Ain from "@ainblockchain/ain-js"; -import Util from "../utils/util"; +import { toResponsePath } from "../constants"; export default class Handler { cache: NodeCache; isConnected: boolean = false; subscribeTable:any = {}; - util: Util; ain: Ain; constructor(ainize: Ainize) { this.cache = ainize.cache; this.ain = ainize.ain; - this.util = ainize.util; } async connect() { await this.ain.em.connect({ @@ -34,7 +32,7 @@ export default class Handler { const filterId = await this.ain.em.subscribe( 'VALUE_CHANGED', { - path: this.util.toReponsePath(requester, appName, serviceName), + path: toResponsePath(requester, appName, serviceName), event_source: 'USER', }, (valueChangedEvent) => { diff --git a/src/utils/util.ts b/src/utils/util.ts index b21a631..e69de29 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -1,8 +0,0 @@ -export default class Util { - constructor() {} - - toReponsePath(requester:string, appName: string, serviceName: string, timestamp?: number){ - const timestampStr = timestamp ? timestamp.toString() : '$timestamp'; - return `/apps/${appName}/service/${serviceName}/${requester}/${timestampStr}/response`; - } -} \ No newline at end of file From 8fb7f815a4be69d583d0d83f7551938b4523bb29 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 1 Sep 2023 12:46:44 +0900 Subject: [PATCH 017/235] refactor: timeout const --- src/constants.ts | 6 +++++- src/handlers/handler.ts | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 3f3fccf..d54ca5c 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -5,4 +5,8 @@ export const getBlockChainEndpoint = (chainId:number) =>{ export const toResponsePath = (requester:string, appName: string, serviceName: string, timestamp?: number)=> { const timestampStr = timestamp ? timestamp.toString() : '$timestamp'; return `/apps/${appName}/service/${serviceName}/${requester}/${timestampStr}/response`; -} \ No newline at end of file +} + +export const SECOND = 1000; +export const HANDLER_TIMEOUT = 30 * SECOND; +export const HANDLER_HEARBEAT_INTERVAL = 15 * SECOND; \ No newline at end of file diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index b3c0739..5d54918 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -2,7 +2,7 @@ import { Request, Response, NextFunction } from "express"; import Ainize from "../ainize"; import NodeCache = require("node-cache"); import Ain from "@ainblockchain/ain-js"; -import { toResponsePath } from "../constants"; +import { HANDLER_HEARBEAT_INTERVAL, HANDLER_TIMEOUT, toResponsePath } from "../constants"; export default class Handler { cache: NodeCache; @@ -15,8 +15,8 @@ export default class Handler { } async connect() { await this.ain.em.connect({ - handshakeTimeout: 30000, // Timeout in milliseconds for the web socket handshake request. - heartbeatIntervalMs: 16000, + handshakeTimeout: HANDLER_TIMEOUT, // Timeout in milliseconds for the web socket handshake request. + heartbeatIntervalMs: HANDLER_HEARBEAT_INTERVAL, }, this.disconnectedCallback); this.isConnected = true; }; From 11ce6fda95c6da7635e0a41cc8810af5f13953a8 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 1 Sep 2023 12:54:14 +0900 Subject: [PATCH 018/235] refactor: lodash --- package-lock.json | 10 ++- package.json | 2 + src/handlers/handler.ts | 16 ++--- yarn.lock | 147 +++++++++++++++++++--------------------- 4 files changed, 85 insertions(+), 90 deletions(-) diff --git a/package-lock.json b/package-lock.json index 37789eb..24bb72e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,11 +13,13 @@ "axios": "^0.26.1", "express": "^4.18.2", "fast-json-stable-stringify": "^2.1.0", + "lodash": "^4.17.21", "node-cache": "^5.1.2" }, "devDependencies": { "@types/express": "^4.17.17", "@types/jest": "^27.4.1", + "@types/lodash": "^4.14.197", "jest": "^27.5.1", "ts-jest": "^27.1.4", "typedoc": "^0.23.17", @@ -27,7 +29,7 @@ "typescript": "^4.6.3" }, "engines": { - "node": ">=12" + "node": ">=16" } }, "node_modules/@ainblockchain/ain-js": { @@ -1337,6 +1339,12 @@ "pretty-format": "^27.0.0" } }, + "node_modules/@types/lodash": { + "version": "4.14.197", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.197.tgz", + "integrity": "sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g==", + "dev": true + }, "node_modules/@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", diff --git a/package.json b/package.json index 2495f4c..a0804b7 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "devDependencies": { "@types/express": "^4.17.17", "@types/jest": "^27.4.1", + "@types/lodash": "^4.14.197", "jest": "^27.5.1", "ts-jest": "^27.1.4", "typedoc": "^0.23.17", @@ -45,6 +46,7 @@ "axios": "^0.26.1", "express": "^4.18.2", "fast-json-stable-stringify": "^2.1.0", + "lodash": "^4.17.21", "node-cache": "^5.1.2" } } diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 5d54918..507d262 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -1,4 +1,4 @@ -import { Request, Response, NextFunction } from "express"; +const _ = require('lodash'); import Ainize from "../ainize"; import NodeCache = require("node-cache"); import Ain from "@ainblockchain/ain-js"; @@ -42,21 +42,15 @@ export default class Handler { throw new Error(err.message); }, ); - this.createSubscribeTableIfNotExists(requester, appName, serviceName); - this.subscribeTable[requester][appName][serviceName] = filterId; + this.addToSubscribeTable(requester, appName, serviceName, filterId); } private checkSubscribeTableExists(requester:string, appName:string, serviceName: string) { - if(!this.subscribeTable[requester]) return false; - if(!this.subscribeTable[requester][appName]) return false; - if(!this.subscribeTable[requester][appName][serviceName]) return false; - return true; + return _.has(this.subscribeTable, [requester, appName, serviceName]); } - private createSubscribeTableIfNotExists(requester:string, appName: string, serviceName: string) { - if(!this.subscribeTable[requester]) this.subscribeTable[requester] = {}; - if(!this.subscribeTable[requester][appName]) this.subscribeTable[requester][appName] = {}; - if(!this.subscribeTable[requester][appName][serviceName]) this.subscribeTable[requester][appName][serviceName] = null; + private addToSubscribeTable(requester:string, appName: string, serviceName: string, filterId: string) { + _.set(this.subscribeTable, [requester, appName, serviceName], {}); } getSubscribeList(requester?: string) { diff --git a/yarn.lock b/yarn.lock index 0f12ec5..414e102 100644 --- a/yarn.lock +++ b/yarn.lock @@ -68,7 +68,7 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz" integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== -"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0", "@babel/core@>=7.0.0-beta.0 <8": +"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": version "7.22.11" resolved "https://registry.npmjs.org/@babel/core/-/core-7.22.11.tgz" integrity sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ== @@ -675,7 +675,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^27.0.0", "@types/jest@^27.4.1": +"@types/jest@^27.4.1": version "27.5.2" resolved "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz" integrity sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA== @@ -683,6 +683,11 @@ jest-matcher-utils "^27.0.0" pretty-format "^27.0.0" +"@types/lodash@^4.14.197": + version "4.14.197" + resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.197.tgz" + integrity sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g== + "@types/mime@*", "@types/mime@^1": version "1.3.2" resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz" @@ -785,6 +790,11 @@ acorn-walk@^7.1.1: resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== +acorn@7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz" + integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== + acorn@^7.1.1: version "7.4.1" resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz" @@ -795,11 +805,6 @@ acorn@^8.2.4: resolved "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== -acorn@7.1.1: - version "7.1.1" - resolved "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz" - integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== - agent-base@6: version "6.0.2" resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" @@ -882,7 +887,7 @@ axios@^0.26.1: dependencies: follow-redirects "^1.14.8" -babel-jest@^27.5.1, "babel-jest@>=27.0.0 <28": +babel-jest@^27.5.1: version "27.5.1" resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz" integrity sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg== @@ -1067,7 +1072,7 @@ browserify-des@^1.0.0: inherits "^2.0.1" safe-buffer "^5.1.2" -browserslist@^4.21.9, "browserslist@>= 4.21.0": +browserslist@^4.21.9: version "4.21.10" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz" integrity sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ== @@ -1228,16 +1233,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - color-name@1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" @@ -1335,13 +1340,6 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" -debug@^4.1.0, debug@^4.1.1, debug@4: - version "4.3.4" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - debug@2.6.9: version "2.6.9" resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" @@ -1349,6 +1347,13 @@ debug@2.6.9: dependencies: ms "2.0.0" +debug@4, debug@^4.1.0, debug@^4.1.1: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + decimal.js@^10.2.1: version "10.4.3" resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz" @@ -1435,7 +1440,7 @@ electron-to-chromium@^1.4.477: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.505.tgz" integrity sha512-0A50eL5BCCKdxig2SsCXhpuztnB9PfUgRMojj5tMvt8O54lbwz3t6wNgnpiTRosw5QjlJB7ixhVyeg8daLQwSQ== -elliptic@^6.4.1, elliptic@^6.5.2, elliptic@^6.5.4, elliptic@6.5.4: +elliptic@6.5.4, elliptic@^6.4.1, elliptic@^6.5.2, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -1606,7 +1611,7 @@ express@^4.18.2: utils-merge "1.0.1" vary "~1.1.2" -fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0, fast-json-stable-stringify@2.x: +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: 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== @@ -1896,7 +1901,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@2, inherits@2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -2238,7 +2243,7 @@ jest-resolve-dependencies@^27.5.1: jest-regex-util "^27.5.1" jest-snapshot "^27.5.1" -jest-resolve@*, jest-resolve@^27.5.1: +jest-resolve@^27.5.1: version "27.5.1" resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz" integrity sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw== @@ -2391,7 +2396,7 @@ jest-worker@^27.5.1: merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^27.0.0, jest@^27.5.1: +jest@^27.5.1: version "27.5.1" resolved "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz" integrity sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ== @@ -2456,7 +2461,7 @@ json-parse-even-better-errors@^2.3.0: 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== -json5@^2.2.3, json5@2.x: +json5@2.x, json5@^2.2.3: version "2.2.3" resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -2512,7 +2517,7 @@ lodash.memoize@4.x: resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== -lodash@^4.17.20, lodash@^4.7.0: +lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0: version "4.17.21" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -2658,16 +2663,16 @@ ms@2.1.3: resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -nan@^2.14.0: - version "2.17.0" - resolved "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz" - integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== - nan@2.14.0: version "2.14.0" resolved "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz" integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== +nan@^2.14.0: + version "2.17.0" + resolved "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz" + integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" @@ -2991,7 +2996,7 @@ rlp@^2.2.2: dependencies: bn.js "^5.2.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0, safe-buffer@5.2.1: +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -3013,6 +3018,20 @@ scryptsy@^2.1.0: resolved "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz" integrity sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w== +secp256k1@3.7.1: + version "3.7.1" + resolved "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz" + integrity sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g== + dependencies: + bindings "^1.5.0" + bip66 "^1.1.5" + bn.js "^4.11.8" + create-hash "^1.2.0" + drbg.js "^1.0.1" + elliptic "^6.4.1" + nan "^2.14.0" + safe-buffer "^5.1.2" + secp256k1@^3.0.1, secp256k1@^3.6.2: version "3.8.0" resolved "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz" @@ -3036,45 +3055,17 @@ secp256k1@^4.0.0: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" -secp256k1@3.7.1: - version "3.7.1" - resolved "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz" - integrity sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g== - dependencies: - bindings "^1.5.0" - bip66 "^1.1.5" - bn.js "^4.11.8" - create-hash "^1.2.0" - drbg.js "^1.0.1" - elliptic "^6.4.1" - nan "^2.14.0" - safe-buffer "^5.1.2" - -semver@^6.3.0, semver@^6.3.1: - version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^7.3.2: - version "7.5.4" - 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" - -semver@^7.5.3: +semver@7.x, semver@^7.3.2, semver@^7.5.3: version "7.5.4" 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" -semver@7.x: - version "7.5.4" - 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" +semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== send@0.18.0: version "0.18.0" @@ -3199,13 +3190,6 @@ statuses@2.0.1: resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -string_decoder@^1.1.1: - 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== - dependencies: - safe-buffer "~5.2.0" - string-length@^4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" @@ -3223,6 +3207,13 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string_decoder@^1.1.1: + 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== + dependencies: + safe-buffer "~5.2.0" + strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" @@ -3401,7 +3392,7 @@ typedoc-theme-hierarchy@^3.0.0: dependencies: fs-extra "^10.0.0" -typedoc@^0.23.17, typedoc@^0.23.6, "typedoc@0.22.x || 0.23.x || 0.24.x || 0.25.x": +typedoc@^0.23.17: version "0.23.28" resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz" integrity sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w== @@ -3411,7 +3402,7 @@ typedoc@^0.23.17, typedoc@^0.23.6, "typedoc@0.22.x || 0.23.x || 0.24.x || 0.25.x minimatch "^7.1.3" shiki "^0.14.1" -typescript@^4.6.3, "typescript@>=3.8 <5.0", "typescript@4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x": +typescript@^4.6.3: version "4.9.5" resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== @@ -3426,7 +3417,7 @@ universalify@^2.0.0: resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -unpipe@~1.0.0, unpipe@1.0.0: +unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -3611,7 +3602,7 @@ yallist@^4.0.0: resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@^20.2.2, yargs-parser@20.x: +yargs-parser@20.x, yargs-parser@^20.2.2: version "20.2.9" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== From e3848d41b7367c24ecf243c7516484c791963ffe Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 31 Aug 2023 10:52:34 +0900 Subject: [PATCH 019/235] feat: add module_base --- src/modules/admin.ts | 5 +++++ src/modules/app.ts | 17 +++-------------- src/modules/moduleBase.ts | 15 +++++++++++++++ src/modules/service.ts | 5 +++++ src/modules/wallet.ts | 5 +++++ 5 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 src/modules/moduleBase.ts diff --git a/src/modules/admin.ts b/src/modules/admin.ts index e69de29..e4c3eee 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -0,0 +1,5 @@ +import ModuleBase from "./moduleBase"; + +export default class Admin extends ModuleBase { + +} \ No newline at end of file diff --git a/src/modules/app.ts b/src/modules/app.ts index 06205c1..db3a9a1 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -1,5 +1,6 @@ import Ain from '@ainblockchain/ain-js' import { SetMultiOperation, SetOperation, TransactionBody } from '@ainblockchain/ain-js/lib/types'; +import ModuleBase from './moduleBase'; // FIXME(yoojin): move to constant. const defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { @@ -86,15 +87,7 @@ interface TriggerFunctionUrlMap { service: string, } - -export default class App { - private ain: Ain; - constructor( - ain: Ain - ) { - this.ain = ain; - } - +export default class App extends ModuleBase { async create(appName: string, urls: TriggerFunctionUrlMap) { const createAppOp = this.buildCreateAppOp(appName); @@ -117,7 +110,7 @@ export default class App { const txBody = this.buildTxBody([createAppOp, ...setRuleOps, ...setFunctionOps]); - return await this.signAndSendTransaction(txBody); + return await this.sendTransaction(txBody); } private buildCreateAppOp(appName: string): SetOperation { @@ -148,10 +141,6 @@ export default class App { } } - async signAndSendTransaction(txBody: TransactionBody) { - return await this.ain.sendTransaction(txBody); - } - private buildTxBody(operation: SetOperation | SetOperation[]): TransactionBody { return { operation: Array.isArray(operation) ? { diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts new file mode 100644 index 0000000..ebfff07 --- /dev/null +++ b/src/modules/moduleBase.ts @@ -0,0 +1,15 @@ +import Ain from "@ainblockchain/ain-js"; +import { TransactionBody } from "@ainblockchain/ain-js/lib/types"; + + +export default class ModuleBase { + public ain: Ain; + + constructor(ain: Ain) { + this.ain = ain; + } + + async sendTransaction(txBody: TransactionBody) { + return await this.ain.sendTransaction(txBody); + } +} \ No newline at end of file diff --git a/src/modules/service.ts b/src/modules/service.ts index e69de29..4d82bec 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -0,0 +1,5 @@ +import ModuleBase from "./moduleBase"; + +export default class Service extends ModuleBase { + +} \ No newline at end of file diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index e69de29..5df9197 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -0,0 +1,5 @@ +import ModuleBase from "./moduleBase"; + +export default class Wallet extends ModuleBase { + +} \ No newline at end of file From d3d238d1c83066249ec4efb1bb99d5f5c742006d Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 31 Aug 2023 14:05:36 +0900 Subject: [PATCH 020/235] feat: move buildTxBody to base --- src/modules/app.ts | 11 ----------- src/modules/moduleBase.ts | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index db3a9a1..5faf314 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -141,17 +141,6 @@ export default class App extends ModuleBase { } } - private buildTxBody(operation: SetOperation | SetOperation[]): TransactionBody { - return { - operation: Array.isArray(operation) ? { - type: "SET", - op_list: operation - } : operation, - gas_price: 500, - timestamp: Date.now(), - nonce: -1 - } - } private buildSetValueOp(ref: string, value: object): SetOperation { return { type: "SET_VALUE", diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index ebfff07..f160ad9 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -1,5 +1,5 @@ import Ain from "@ainblockchain/ain-js"; -import { TransactionBody } from "@ainblockchain/ain-js/lib/types"; +import { SetOperation, TransactionBody } from "@ainblockchain/ain-js/lib/types"; export default class ModuleBase { @@ -9,7 +9,19 @@ export default class ModuleBase { this.ain = ain; } - async sendTransaction(txBody: TransactionBody) { + protected buildTxBody(operation: SetOperation | SetOperation[]): TransactionBody { + return { + operation: Array.isArray(operation) ? { + type: "SET", + op_list: operation + } : operation, + gas_price: 500, + timestamp: Date.now(), + nonce: -1 + } + } + + protected async sendTransaction(txBody: TransactionBody) { return await this.ain.sendTransaction(txBody); } } \ No newline at end of file From a4ad9fde5abde0abc00578c3997570976d4260bd Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 31 Aug 2023 14:13:38 +0900 Subject: [PATCH 021/235] feat: add deposit --- src/modules/service.ts | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/modules/service.ts b/src/modules/service.ts index 4d82bec..4d7a003 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -1,5 +1,46 @@ +import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import ModuleBase from "./moduleBase"; export default class Service extends ModuleBase { + async deposit(appName: string, amount: number) { + const transferKey = Date.now().toString(); + const depositAddress = await this.getAppDepositAddress(appName); + const transferOp = this.buildTransferOp(depositAddress, amount, transferKey); + const depositOp = this.buildSetDepositOp(appName, transferKey, amount); + const txBody = this.buildTxBody([transferOp, depositOp]); + return await this.sendTransaction(txBody); + } + + private async getAppDepositAddress(appName: string) { + const depositAddrPath = `/apps/${appName}/billingConfig/depositAddress`; + const address = await this.ain.db.ref().getValue(depositAddrPath); + return address; + } + + private buildTransferOp( + to: string, + amount: number, + transferKey?: string + ): SetOperation { + const from = this.ain.wallet.defaultAccount!.address; + return { + type: "SET_VALUE", + ref: `/transfer/${from}/${to}/${transferKey}/value`, + value: amount, + } + } + + private buildSetDepositOp( + appName: string, + transferKey: string, + amount: number + ): SetOperation { + const userAddress = this.ain.wallet.defaultAccount!.address; + return { + type: "SET_VALUE", + ref: `/apps/${appName}/deposit/${userAddress}/${transferKey}`, + value: amount, + } + } } \ No newline at end of file From 981507d63291b63fae4f6fce5375a51df0327374 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 31 Aug 2023 14:42:26 +0900 Subject: [PATCH 022/235] feat: add request --- src/modules/service.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/modules/service.ts b/src/modules/service.ts index 4d7a003..a9d5060 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -12,6 +12,16 @@ export default class Service extends ModuleBase { return await this.sendTransaction(txBody); } + async request(appName: string, serviceName: string, data: any) { + const userAddress = this.ain.wallet.defaultAccount!.address; + const ref = `/apps/${appName}/service/${serviceName}/${userAddress}/request`; + const value = data; + const op = this.buildSetValueOp(ref, value); + const txBody = this.buildTxBody(op); + return await this.sendTransaction(txBody); + } + + private async getAppDepositAddress(appName: string) { const depositAddrPath = `/apps/${appName}/billingConfig/depositAddress`; const address = await this.ain.db.ref().getValue(depositAddrPath); @@ -43,4 +53,12 @@ export default class Service extends ModuleBase { value: amount, } } + + private buildSetValueOp(ref: string, value: object): SetOperation { + return { + type: "SET_VALUE", + ref, + value, + } + } } \ No newline at end of file From dd57f5221fc5904ff07db2fe9e07f0fbea1b841f Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 1 Sep 2023 10:33:26 +0900 Subject: [PATCH 023/235] feat: add functions and skeletons --- src/modules/service.ts | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/modules/service.ts b/src/modules/service.ts index a9d5060..68bb475 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -14,13 +14,41 @@ export default class Service extends ModuleBase { async request(appName: string, serviceName: string, data: any) { const userAddress = this.ain.wallet.defaultAccount!.address; - const ref = `/apps/${appName}/service/${serviceName}/${userAddress}/request`; + const path = `/apps/${appName}/service/${serviceName}/${userAddress}/request`; const value = data; - const op = this.buildSetValueOp(ref, value); + const op = this.buildSetValueOp(path, value); const txBody = this.buildTxBody(op); return await this.sendTransaction(txBody); } + async getCreditBalance(appName: string): Promise { + const userAddress = this.ain.wallet.defaultAccount!.address; + const path = `/apps/${appName}/balance/${userAddress}/balance` + const balance = await this.ain.db.ref().getValue(path); + return balance || 0; + } + + // FIXME(yoojin): add billing config type and change. + async getBillingConfig(appName: string): Promise { + const path = `/apps/${appName}/billingConfig` + const config = await this.ain.db.ref().getValue(path); + return config; + } + + async getAppInfo(appName: string) { + // TODO(yoojin): app info was not added on schema. + } + + async calculateCost(billingConfig: any) { + // TODO(yoojin): add logic. + } + + // TODO(yoojin -> woojae): add handler functions. + subscribe() {} + + unsubscribe() {} + + getSubscribeList() {} private async getAppDepositAddress(appName: string) { const depositAddrPath = `/apps/${appName}/billingConfig/depositAddress`; From 74ab04274577ee1c81494e0cb3e141cac459dc81 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 1 Sep 2023 15:27:28 +0900 Subject: [PATCH 024/235] refactor: unify buildOp functions --- src/modules/app.ts | 35 ++++++----------------------------- src/modules/service.ts | 25 ++++++------------------- src/utils/builder.ts | 9 +++++++++ 3 files changed, 21 insertions(+), 48 deletions(-) create mode 100644 src/utils/builder.ts diff --git a/src/modules/app.ts b/src/modules/app.ts index 5faf314..836fda5 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -1,6 +1,6 @@ -import Ain from '@ainblockchain/ain-js' -import { SetMultiOperation, SetOperation, TransactionBody } from '@ainblockchain/ain-js/lib/types'; -import ModuleBase from './moduleBase'; +import { SetOperation } from "@ainblockchain/ain-js/lib/types"; +import { buildSetOperation } from "../utils/builder"; +import ModuleBase from "./moduleBase"; // FIXME(yoojin): move to constant. const defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { @@ -95,7 +95,7 @@ export default class App extends ModuleBase { const setRuleOps: SetOperation[] = []; for (const rule of Object.values(defaultRules)) { const { ref, value } = rule; - const ruleOp = this.buildSetRuleOp(ref, value); + const ruleOp = buildSetOperation("SET_RULE" , ref, value); setRuleOps.push(ruleOp); } @@ -104,7 +104,7 @@ export default class App extends ModuleBase { for (const func of Object.values(defaultFunctions)) { const { ref, functionId, functionType, functionUrl } = func(appName); const value = this.buildSetFunctionValue(functionId, functionType, functionUrl); - const funcOp = this.buildSetFunctionOp(ref, value); + const funcOp = buildSetOperation("SET_FUNCTION", ref, value); setFunctionOps.push(funcOp); } @@ -125,8 +125,7 @@ export default class App extends ModuleBase { [adminAccount.address]: true, } } - - return this.buildSetValueOp(ref, value); + return buildSetOperation("SET_VALUE", ref, value); } buildSetFunctionValue(functionType: string, functionId: string, functionUrl: string) { @@ -140,26 +139,4 @@ export default class App extends ModuleBase { } } } - - private buildSetValueOp(ref: string, value: object): SetOperation { - return { - type: "SET_VALUE", - ref, - value, - } - } - private buildSetRuleOp(ref: string, value: object): SetOperation { - return { - type: "SET_RULE", - ref, - value, - } - } - private buildSetFunctionOp(ref: string, value: object): SetOperation { - return { - type: "SET_FUNCTION", - ref, - value, - } - } } \ No newline at end of file diff --git a/src/modules/service.ts b/src/modules/service.ts index 68bb475..1691281 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -1,4 +1,5 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; +import { buildSetOperation } from "../utils/builder"; import ModuleBase from "./moduleBase"; export default class Service extends ModuleBase { @@ -16,7 +17,7 @@ export default class Service extends ModuleBase { const userAddress = this.ain.wallet.defaultAccount!.address; const path = `/apps/${appName}/service/${serviceName}/${userAddress}/request`; const value = data; - const op = this.buildSetValueOp(path, value); + const op = buildSetOperation("SET_VALUE", path, value); const txBody = this.buildTxBody(op); return await this.sendTransaction(txBody); } @@ -62,11 +63,8 @@ export default class Service extends ModuleBase { transferKey?: string ): SetOperation { const from = this.ain.wallet.defaultAccount!.address; - return { - type: "SET_VALUE", - ref: `/transfer/${from}/${to}/${transferKey}/value`, - value: amount, - } + const path = `/transfer/${from}/${to}/${transferKey}/value`; + return buildSetOperation("SET_VALUE", path, amount); } private buildSetDepositOp( @@ -75,18 +73,7 @@ export default class Service extends ModuleBase { amount: number ): SetOperation { const userAddress = this.ain.wallet.defaultAccount!.address; - return { - type: "SET_VALUE", - ref: `/apps/${appName}/deposit/${userAddress}/${transferKey}`, - value: amount, - } - } - - private buildSetValueOp(ref: string, value: object): SetOperation { - return { - type: "SET_VALUE", - ref, - value, - } + const path = `/apps/${appName}/deposit/${userAddress}/${transferKey}`; + return buildSetOperation("SET_VALUE", path, amount) } } \ No newline at end of file diff --git a/src/utils/builder.ts b/src/utils/builder.ts new file mode 100644 index 0000000..6adad3f --- /dev/null +++ b/src/utils/builder.ts @@ -0,0 +1,9 @@ +import { SetOperation, SetOperationType } from "@ainblockchain/ain-js/lib/types" + +export const buildSetOperation = (type: SetOperationType,ref: string, value: any): SetOperation => { + return { + type, + ref, + value, + } +} From f4370ec0f166c09c747d07b4dee813dcbef0f93d Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 1 Sep 2023 20:43:18 +0900 Subject: [PATCH 025/235] feat: add paths --- src/constants.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/constants.ts b/src/constants.ts index d54ca5c..a99bb1c 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -7,6 +7,26 @@ export const toResponsePath = (requester:string, appName: string, serviceName: s return `/apps/${appName}/service/${serviceName}/${requester}/${timestampStr}/response`; } +export const Path = { + app: (appName: string): any => { + return { + root: `apps/${appName}`, + balance: `${Path.app(appName).root}/balance`, + balanceOfUser: (userAddress: string) => `${Path.app(appName).balance}/${userAddress}/balance`, + deposit: `${Path.app(appName).root}/deposit`, + depositOfUser: (userAddress: string) => `${Path.app(appName).deposit}/${userAddress}`, + billingConfig: `${Path.app(appName).root}/billingConfig`, + service: (serviceName: string) => `${Path.app(appName).root}/service/${serviceName}`, + userOfService: (serviceName: string, userAddress: string) => + `${Path.app(appName).service(serviceName)}/${userAddress}`, + request: (serviceName: string, userAddress: string, requestKey: string) => + `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/request`, + response: (serviceName: string, userAddress: string, requestKey: string) => + `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/response` + } + } +} + export const SECOND = 1000; export const HANDLER_TIMEOUT = 30 * SECOND; export const HANDLER_HEARBEAT_INTERVAL = 15 * SECOND; \ No newline at end of file From bcd16645dac4b886ff9a95c87a3611fb59340cb4 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 1 Sep 2023 21:02:09 +0900 Subject: [PATCH 026/235] feat: add transfer path --- src/constants.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index a99bb1c..e93fef3 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -2,15 +2,16 @@ export const getBlockChainEndpoint = (chainId:number) =>{ return chainId === 1 ? 'https://mainnet-event.ainetwork.ai' : 'https://testnet-event.ainetwork.ai' } +// TODO(yoojin -> woojae): deprecated? export const toResponsePath = (requester:string, appName: string, serviceName: string, timestamp?: number)=> { const timestampStr = timestamp ? timestamp.toString() : '$timestamp'; return `/apps/${appName}/service/${serviceName}/${requester}/${timestampStr}/response`; } export const Path = { - app: (appName: string): any => { + app: (appName: string) => { return { - root: `apps/${appName}`, + root: `/apps/${appName}`, balance: `${Path.app(appName).root}/balance`, balanceOfUser: (userAddress: string) => `${Path.app(appName).balance}/${userAddress}/balance`, deposit: `${Path.app(appName).root}/deposit`, @@ -24,7 +25,9 @@ export const Path = { response: (serviceName: string, userAddress: string, requestKey: string) => `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/response` } - } + }, + transfer: (from: string, to: string, transferKey: string) => + `/transfer/${from}/${to}/${transferKey}/value`, } export const SECOND = 1000; From df919426ca17d8fced7d686b4403c7efae319a0a Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 1 Sep 2023 21:02:21 +0900 Subject: [PATCH 027/235] feat: apply paths --- src/modules/app.ts | 15 ++++++++------- src/modules/service.ts | 16 ++++++++++------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 836fda5..075777d 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -1,10 +1,11 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; +import { Path } from "../constants"; import { buildSetOperation } from "../utils/builder"; import ModuleBase from "./moduleBase"; // FIXME(yoojin): move to constant. const defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { - const rootRef = `/apps/${appName}`; + const rootRef = Path.app(appName).root; return { root: { ref: rootRef, @@ -15,7 +16,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu } }, deposit: { - ref: `${rootRef}/deposit/$userAddress/$transferKey`, + ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, value: { '.rule': { write: "data === null && util.isNumber(newData) && getValue(`/transfer/` + $userAddress + `/` + getValue(`/apps/" + `${appName}` + "/billingConfig/depositAddress`) + `/` + $transferKey + `/value`) === newData" @@ -23,7 +24,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu } }, balance: { - ref: `${rootRef}/balance/$userAddress/balance`, + ref: Path.app(appName).balanceOfUser("$userAddress"), value: { '.rule': { write: "(util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true) && util.isNumber(newData)" @@ -39,7 +40,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu } }, request: { - ref: `${rootRef}/service/$serviceName/$userAddress/$requestKey/request`, + ref: Path.app(appName).request("$serviceName", "$userAddress", "$requestKey"), value: { '.rule': { write: @@ -48,7 +49,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu } }, response: { - ref: `${rootRef}/service/$serviceName/$userAddress/$requestKey/response`, + ref: Path.app(appName).response("$serviceName", "userAddress", "$requestKey"), value: { '.rule': { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.status)" @@ -63,7 +64,7 @@ const defaultAppFunctions = (appName: string) => { return { deposit: (url: string) => { return { - ref: `${rootRef}/deposit/$userAddress/$transferKey`, + ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, functionType: "REST", functionId: "deposit-trigger", functionUrl: url, @@ -71,7 +72,7 @@ const defaultAppFunctions = (appName: string) => { }, service: (url: string) => { return { - ref: `${rootRef}/${appName}/service/$serviceName/$userAddress/$requestKey/request`, + ref: Path.app(appName).request("$serviceName", "$userAddress", "$requestKey"), functionType: "REST", functionId: "service-trigger", functionUrl: url, diff --git a/src/modules/service.ts b/src/modules/service.ts index 1691281..0e514a8 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -1,5 +1,6 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { buildSetOperation } from "../utils/builder"; +import { Path } from "../constants"; import ModuleBase from "./moduleBase"; export default class Service extends ModuleBase { @@ -15,7 +16,8 @@ export default class Service extends ModuleBase { async request(appName: string, serviceName: string, data: any) { const userAddress = this.ain.wallet.defaultAccount!.address; - const path = `/apps/${appName}/service/${serviceName}/${userAddress}/request`; + const timestamp = Date.now(); + const path = Path.app(appName).request(serviceName, userAddress, timestamp); const value = data; const op = buildSetOperation("SET_VALUE", path, value); const txBody = this.buildTxBody(op); @@ -24,14 +26,14 @@ export default class Service extends ModuleBase { async getCreditBalance(appName: string): Promise { const userAddress = this.ain.wallet.defaultAccount!.address; - const path = `/apps/${appName}/balance/${userAddress}/balance` + const path = Path.app(appName).balanceOfUser(userAddress); const balance = await this.ain.db.ref().getValue(path); return balance || 0; } // FIXME(yoojin): add billing config type and change. async getBillingConfig(appName: string): Promise { - const path = `/apps/${appName}/billingConfig` + const path = Path.app(appName).billingConfig; const config = await this.ain.db.ref().getValue(path); return config; } @@ -52,7 +54,7 @@ export default class Service extends ModuleBase { getSubscribeList() {} private async getAppDepositAddress(appName: string) { - const depositAddrPath = `/apps/${appName}/billingConfig/depositAddress`; + const depositAddrPath = `${Path.app(appName).billingConfig}/depositAddress`; const address = await this.ain.db.ref().getValue(depositAddrPath); return address; } @@ -62,8 +64,10 @@ export default class Service extends ModuleBase { amount: number, transferKey?: string ): SetOperation { + if (!transferKey) + transferKey = Date.now().toString(); const from = this.ain.wallet.defaultAccount!.address; - const path = `/transfer/${from}/${to}/${transferKey}/value`; + const path = Path.transfer(from, to, transferKey); return buildSetOperation("SET_VALUE", path, amount); } @@ -73,7 +77,7 @@ export default class Service extends ModuleBase { amount: number ): SetOperation { const userAddress = this.ain.wallet.defaultAccount!.address; - const path = `/apps/${appName}/deposit/${userAddress}/${transferKey}`; + const path = `${Path.app(appName).depositOfUser(userAddress)}/${transferKey}`; return buildSetOperation("SET_VALUE", path, amount) } } \ No newline at end of file From 1e384d80c9757f1fd544d920b8b86ce40258eaf0 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 4 Sep 2023 10:10:13 +0900 Subject: [PATCH 028/235] wallet --- src/admins/admin.ts | 30 +++++++++++++++++++++++++++++ src/ainize.ts | 10 ++++------ src/constants.ts | 6 +++++- src/modules/wallet.ts | 0 src/wallets/wallet.ts | 45 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 84 insertions(+), 7 deletions(-) create mode 100644 src/admins/admin.ts delete mode 100644 src/modules/wallet.ts create mode 100644 src/wallets/wallet.ts diff --git a/src/admins/admin.ts b/src/admins/admin.ts new file mode 100644 index 0000000..6a1f7b9 --- /dev/null +++ b/src/admins/admin.ts @@ -0,0 +1,30 @@ +import Ainize from "../ainize"; +import Ain from "@ainblockchain/ain-js"; +import { getAppBalancePath } from "../constants"; + +export default class Admin { + + constructor(ainize: Ainize) { + + } + + async deposit(){ + + } + + async response(){ + try{ + const amount = await this.service.calculateAndCheckCost(req); + //DO SOMETHING + const requestData = req.body.value; + const responseData = await callService(requestData); + await ainize.writeResponse(req, responseStatus.SUCCESS, responseData,amount); + }catch(e) { + await ainize.writeResponse(req, responseStatus.FAILED, e, amount); + console.log('error: ',e); + res.send('error'); + } + } + + +} \ No newline at end of file diff --git a/src/ainize.ts b/src/ainize.ts index 1574cef..1d12dd8 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -4,13 +4,13 @@ import * as NodeCache from 'node-cache'; import Middleware from './middlewares/middleware'; import { getBlockChainEndpoint } from './constants'; import Handler from './handlers/handler'; +import Wallet from './wallets/wallet'; export default class Ainize { cache: NodeCache; ain: Ain; - userAddress: string; middleware: Middleware; handler: Handler; - userPrivateKey: string; + wallet: Wallet; constructor(privateKey: string, chainId: 1|0 ) { const Ain = require('@ainblockchain/ain-js').default @@ -19,10 +19,8 @@ export default class Ainize { this.cache = new NodeCache(); this.middleware = new Middleware(this); this.handler = new Handler(this); - - - this.userPrivateKey = privateKey; - this.userAddress = this.ain.wallet.addAndSetDefaultAccount(privateKey); + this.wallet = new Wallet(this,privateKey); + } test() { diff --git a/src/constants.ts b/src/constants.ts index d54ca5c..5a9a660 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -2,11 +2,15 @@ export const getBlockChainEndpoint = (chainId:number) =>{ return chainId === 1 ? 'https://mainnet-event.ainetwork.ai' : 'https://testnet-event.ainetwork.ai' } -export const toResponsePath = (requester:string, appName: string, serviceName: string, timestamp?: number)=> { +export const getResponsePath = (requester:string, appName: string, serviceName: string, timestamp?: number)=> { const timestampStr = timestamp ? timestamp.toString() : '$timestamp'; return `/apps/${appName}/service/${serviceName}/${requester}/${timestampStr}/response`; } +export const getAppBalancePath = (appName: string, address: string) => { + return `/apps/${appName}/balance/${address}`; +} + export const SECOND = 1000; export const HANDLER_TIMEOUT = 30 * SECOND; export const HANDLER_HEARBEAT_INTERVAL = 15 * SECOND; \ No newline at end of file diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/wallets/wallet.ts b/src/wallets/wallet.ts new file mode 100644 index 0000000..30049ce --- /dev/null +++ b/src/wallets/wallet.ts @@ -0,0 +1,45 @@ +import Ainize from "../ainize"; +import Ain from "@ainblockchain/ain-js"; +import { getAppBalancePath } from "../constants"; + +export default class Wallet { + ain: Ain; + defaultUserAddress: string ; + private defaultPrivateKey: string ; + constructor(ainize: Ainize, privateKey: string) { + this.ain = ainize.ain; + this.defaultPrivateKey = privateKey; + this.defaultUserAddress = this.ain.wallet.addAndSetDefaultAccount(privateKey); + } + + setDefaultAccount(privateKey: string) { + this.defaultPrivateKey = privateKey; + this.defaultUserAddress = this.ain.wallet.addAndSetDefaultAccount(privateKey); + return this.defaultUserAddress; + } + + addAccount(privateKey: string) { + return this.ain.wallet.add(privateKey); + } + + getAinBalance(address?: string) { + if(!address) { + address = this.defaultUserAddress; + } + return this.ain.wallet.getBalance(address); + } + + async getAppBalance(appName: string, address?: string) { + if(!address) { + if(!this.defaultUserAddress) { + throw new Error('No default user address'); + } + address = this.defaultUserAddress; + } + const balance = await this.ain.db.ref(getAppBalancePath(appName,address)).getValue(); + return balance || 0; + } + + + +} \ No newline at end of file From c1049c0d8ebcc505393458a86be411cee1c46288 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 4 Sep 2023 10:20:54 +0900 Subject: [PATCH 029/235] fix: --- src/admins/admin.ts | 44 ++++++------- src/handlers/handler.ts | 140 ++++++++++++++++++++-------------------- 2 files changed, 92 insertions(+), 92 deletions(-) diff --git a/src/admins/admin.ts b/src/admins/admin.ts index 6a1f7b9..ae46d97 100644 --- a/src/admins/admin.ts +++ b/src/admins/admin.ts @@ -1,30 +1,30 @@ -import Ainize from "../ainize"; -import Ain from "@ainblockchain/ain-js"; -import { getAppBalancePath } from "../constants"; +// import Ainize from "../ainize"; +// import Ain from "@ainblockchain/ain-js"; +// import { getAppBalancePath } from "../constants"; -export default class Admin { +// export default class Admin { - constructor(ainize: Ainize) { +// constructor(ainize: Ainize) { - } +// } - async deposit(){ +// async deposit(){ - } +// } - async response(){ - try{ - const amount = await this.service.calculateAndCheckCost(req); - //DO SOMETHING - const requestData = req.body.value; - const responseData = await callService(requestData); - await ainize.writeResponse(req, responseStatus.SUCCESS, responseData,amount); - }catch(e) { - await ainize.writeResponse(req, responseStatus.FAILED, e, amount); - console.log('error: ',e); - res.send('error'); - } - } +// async response(){ +// try{ +// const amount = await this.service.calculateAndCheckCost(req); +// //DO SOMETHING +// const requestData = req.body.value; +// const responseData = await callService(requestData); +// await ainize.writeResponse(req, responseStatus.SUCCESS, responseData,amount); +// }catch(e) { +// await ainize.writeResponse(req, responseStatus.FAILED, e, amount); +// console.log('error: ',e); +// res.send('error'); +// } +// } -} \ No newline at end of file +// } \ No newline at end of file diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 9631936..88f481a 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -1,77 +1,77 @@ -// const _ = require('lodash'); -// import Ainize from "../ainize"; -// import NodeCache = require("node-cache"); -// import Ain from "@ainblockchain/ain-js"; -// import { HANDLER_HEARBEAT_INTERVAL, HANDLER_TIMEOUT, getResponsePath } from "../constants"; +const _ = require('lodash'); +import Ainize from "../ainize"; +import NodeCache = require("node-cache"); +import Ain from "@ainblockchain/ain-js"; +import { HANDLER_HEARBEAT_INTERVAL, HANDLER_TIMEOUT, getResponsePath } from "../constants"; -// export default class Handler { -// cache: NodeCache; -// isConnected: boolean = false; -// subscribeTable:any = {}; -// ain: Ain; -// constructor(ainize: Ainize) { -// this.cache = ainize.cache; -// this.ain = ainize.ain; -// } -// async connect() { -// await this.ain.em.connect({ -// handshakeTimeout: HANDLER_TIMEOUT, // Timeout in milliseconds for the web socket handshake request. -// heartbeatIntervalMs: HANDLER_HEARBEAT_INTERVAL, -// }, this.disconnectedCallback); -// this.isConnected = true; -// }; -// private disconnectedCallback() { -// this.isConnected = false; -// this.connect(); -// } +export default class Handler { + cache: NodeCache; + isConnected: boolean = false; + subscribeTable:any = {}; + ain: Ain; + constructor(ainize: Ainize) { + this.cache = ainize.cache; + this.ain = ainize.ain; + } + async connect() { + await this.ain.em.connect({ + handshakeTimeout: HANDLER_TIMEOUT, // Timeout in milliseconds for the web socket handshake request. + heartbeatIntervalMs: HANDLER_HEARBEAT_INTERVAL, + }, this.disconnectedCallback); + this.isConnected = true; + }; + private disconnectedCallback() { + this.isConnected = false; + this.connect(); + } -// async subscribe(requester:string, appName: string, serviceName: string, callback: (valueChangedEvent: any) => any) { -// if(this.checkSubscribeTableExists(requester, appName, serviceName)){ -// throw new Error('Already subscribed'); -// } -// const filterId = await this.ain.em.subscribe( -// 'VALUE_CHANGED', -// { -// path: getResponsePath(requester, appName, serviceName), -// event_source: 'USER', -// }, -// (valueChangedEvent) => { -// callback(valueChangedEvent); -// }, -// (err) => { -// throw new Error(err.message); -// }, -// ); -// this.addToSubscribeTable(requester, appName, serviceName, filterId); -// } + async subscribe(requester:string, appName: string, serviceName: string, callback: (valueChangedEvent: any) => any) { + if(this.checkSubscribeTableExists(requester, appName, serviceName)){ + throw new Error('Already subscribed'); + } + const filterId = await this.ain.em.subscribe( + 'VALUE_CHANGED', + { + path: getResponsePath(requester, appName, serviceName), + event_source: 'USER', + }, + (valueChangedEvent) => { + callback(valueChangedEvent); + }, + (err) => { + throw new Error(err.message); + }, + ); + this.addToSubscribeTable(requester, appName, serviceName, filterId); + } -// private checkSubscribeTableExists(requester:string, appName:string, serviceName: string) { -// return _.has(this.subscribeTable, [requester, appName, serviceName]); -// } + private checkSubscribeTableExists(requester:string, appName:string, serviceName: string) { + return _.has(this.subscribeTable, [requester, appName, serviceName]); + } -// private addToSubscribeTable(requester:string, appName: string, serviceName: string, filterId: string) { -// _.set(this.subscribeTable, [requester, appName, serviceName], {}); -// } + private addToSubscribeTable(requester:string, appName: string, serviceName: string, filterId: string) { + _.set(this.subscribeTable, [requester, appName, serviceName], {}); + } -// getSubscribeList(requester?: string) { -// if(!requester) return this.subscribeTable; -// return this.subscribeTable[requester]; -// } + getSubscribeList(requester?: string) { + if(!requester) return this.subscribeTable; + return this.subscribeTable[requester]; + } -// unsubscribe(requester:string, appName: string, serviceName: string) { -// if(!this.checkSubscribeTableExists(requester, appName, serviceName)) { -// throw new Error('Not subscribed'); -// } -// this.ain.em.unsubscribe( -// this.subscribeTable[requester][appName][serviceName], -// (err)=>{ -// if (err) { -// throw new Error(err.message); -// } else { -// this.subscribeTable[requester][appName][serviceName] = null; -// return true; -// } -// }); -// } + unsubscribe(requester:string, appName: string, serviceName: string) { + if(!this.checkSubscribeTableExists(requester, appName, serviceName)) { + throw new Error('Not subscribed'); + } + this.ain.em.unsubscribe( + this.subscribeTable[requester][appName][serviceName], + (err)=>{ + if (err) { + throw new Error(err.message); + } else { + this.subscribeTable[requester][appName][serviceName] = null; + return true; + } + }); + } -// } \ No newline at end of file +} \ No newline at end of file From 7bc8e24bbadf18bb793b3d8baf3266bd19dd6195 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 4 Sep 2023 10:41:06 +0900 Subject: [PATCH 030/235] fix: space --- src/ainize.ts | 3 +-- src/constants.ts | 6 +++--- src/handlers/handler.ts | 3 ++- src/modules/wallet.ts | 22 ++++++++++++---------- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index d2c468e..d315df5 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -19,8 +19,7 @@ export default class Ainize { this.cache = new NodeCache(); this.middleware = new Middleware(this); this.handler = new Handler(this); - this.wallet = new Wallet(this,privateKey); - + this.wallet = new Wallet(this, privateKey); } test() { diff --git a/src/constants.ts b/src/constants.ts index 48f31ff..eb5c16e 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -2,13 +2,13 @@ export const getBlockChainEndpoint = (chainId:number) =>{ return chainId === 1 ? 'https://mainnet-event.ainetwork.ai' : 'https://testnet-event.ainetwork.ai' } -export const getResponsePath = (requester:string, appName: string, serviceName: string, timestamp?: number)=> { +export const getResponsePath = (requester: string, appName: string, serviceName: string, timestamp?: number)=> { const timestampStr = timestamp ? timestamp.toString() : '$timestamp'; return `/apps/${appName}/service/${serviceName}/${requester}/${timestampStr}/response`; } export const Path = { - app: (appName: string):any => { + app: (appName: string): any => { return { root: `/apps/${appName}`, balance: `${Path.app(appName).root}/balance`, @@ -31,4 +31,4 @@ export const Path = { export const SECOND = 1000; export const HANDLER_TIMEOUT = 30 * SECOND; -export const HANDLER_HEARBEAT_INTERVAL = 15 * SECOND; \ No newline at end of file +export const HANDLER_HEARBEAT_INTERVAL = 15 * SECOND; diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 88f481a..bc32033 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -20,6 +20,7 @@ export default class Handler { }, this.disconnectedCallback); this.isConnected = true; }; + private disconnectedCallback() { this.isConnected = false; this.connect(); @@ -74,4 +75,4 @@ export default class Handler { }); } -} \ No newline at end of file +} diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index 9128e77..1059cd9 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -1,23 +1,25 @@ import Ainize from "../ainize"; import Ain from "@ainblockchain/ain-js"; -import { Path } from "../constants"; import ModuleBase from "./moduleBase"; -export default class Wallet extends ModuleBase{ +export default class Wallet extends ModuleBase { ain: Ain; - defaultUserAddress: string ; - private defaultPrivateKey: string ; constructor(ainize: Ainize, privateKey: string) { super(ainize); this.ain = ainize.ain; - this.defaultPrivateKey = privateKey; - this.defaultUserAddress = this.ain.wallet.addAndSetDefaultAccount(privateKey); + this.ain.wallet.addAndSetDefaultAccount(privateKey); + } + + getDefaultAccount() { + if(!this.ain.wallet.defaultAccount) { + throw new Error('You need to set default account.'); + } + return this.ain.wallet.defaultAccount.address; } setDefaultAccount(privateKey: string) { - this.defaultPrivateKey = privateKey; - this.defaultUserAddress = this.ain.wallet.addAndSetDefaultAccount(privateKey); - return this.defaultUserAddress; + this.ain.wallet.addAndSetDefaultAccount(privateKey); + return this.getDefaultAccount(); } addAccount(privateKey: string) { @@ -26,7 +28,7 @@ export default class Wallet extends ModuleBase{ getAinBalance(address?: string) { if(!address) { - address = this.defaultUserAddress; + address = this.getDefaultAccount(); } return this.ain.wallet.getBalance(address); } From 5a01b2be728b13d8f49167162d339eeb1b5ce238 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 4 Sep 2023 10:48:42 +0900 Subject: [PATCH 031/235] refactor: constant --- src/constants.ts | 14 +++++++++++--- src/handlers/handler.ts | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index eb5c16e..fbd372d 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -19,10 +19,18 @@ export const Path = { service: (serviceName: string) => `${Path.app(appName).root}/service/${serviceName}`, userOfService: (serviceName: string, userAddress: string) => `${Path.app(appName).service(serviceName)}/${userAddress}`, - request: (serviceName: string, userAddress: string, requestKey: string) => - `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/request`, - response: (serviceName: string, userAddress: string, requestKey: string) => + request: (serviceName: string, userAddress: string, requestKey?: string) => { + if(!requestKey) { + requestKey = '$requestKey'; + }; + `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/request` + }, + response: (serviceName: string, userAddress: string, requestKey?: string) => { + if(!requestKey) { + requestKey = '$requestKey'; + } `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/response` + }, } }, transfer: (from: string, to: string, transferKey: string) => diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index bc32033..cfe3679 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -2,7 +2,7 @@ const _ = require('lodash'); import Ainize from "../ainize"; import NodeCache = require("node-cache"); import Ain from "@ainblockchain/ain-js"; -import { HANDLER_HEARBEAT_INTERVAL, HANDLER_TIMEOUT, getResponsePath } from "../constants"; +import { HANDLER_HEARBEAT_INTERVAL, HANDLER_TIMEOUT, Path, getResponsePath } from "../constants"; export default class Handler { cache: NodeCache; @@ -33,7 +33,7 @@ export default class Handler { const filterId = await this.ain.em.subscribe( 'VALUE_CHANGED', { - path: getResponsePath(requester, appName, serviceName), + path: Path.app(appName).response(serviceName,requester,'$requestKey'), event_source: 'USER', }, (valueChangedEvent) => { From c33d989a3dd512230a86f5d1e40c5692e6433436 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 4 Sep 2023 10:49:35 +0900 Subject: [PATCH 032/235] refctor: request --- src/constants.ts | 5 ----- src/handlers/handler.ts | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index fbd372d..56d7bde 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -2,11 +2,6 @@ export const getBlockChainEndpoint = (chainId:number) =>{ return chainId === 1 ? 'https://mainnet-event.ainetwork.ai' : 'https://testnet-event.ainetwork.ai' } -export const getResponsePath = (requester: string, appName: string, serviceName: string, timestamp?: number)=> { - const timestampStr = timestamp ? timestamp.toString() : '$timestamp'; - return `/apps/${appName}/service/${serviceName}/${requester}/${timestampStr}/response`; -} - export const Path = { app: (appName: string): any => { return { diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index cfe3679..c7af669 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -2,7 +2,7 @@ const _ = require('lodash'); import Ainize from "../ainize"; import NodeCache = require("node-cache"); import Ain from "@ainblockchain/ain-js"; -import { HANDLER_HEARBEAT_INTERVAL, HANDLER_TIMEOUT, Path, getResponsePath } from "../constants"; +import { HANDLER_HEARBEAT_INTERVAL, HANDLER_TIMEOUT, Path } from "../constants"; export default class Handler { cache: NodeCache; @@ -33,7 +33,7 @@ export default class Handler { const filterId = await this.ain.em.subscribe( 'VALUE_CHANGED', { - path: Path.app(appName).response(serviceName,requester,'$requestKey'), + path: Path.app(appName).response(serviceName,requester), event_source: 'USER', }, (valueChangedEvent) => { From 91564d57cbc337a127b53322f170cdeab00b78d8 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 4 Sep 2023 10:57:25 +0900 Subject: [PATCH 033/235] refactor: constant --- src/constants.ts | 16 ++++------------ src/handlers/handler.ts | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 56d7bde..2494ce9 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -14,18 +14,10 @@ export const Path = { service: (serviceName: string) => `${Path.app(appName).root}/service/${serviceName}`, userOfService: (serviceName: string, userAddress: string) => `${Path.app(appName).service(serviceName)}/${userAddress}`, - request: (serviceName: string, userAddress: string, requestKey?: string) => { - if(!requestKey) { - requestKey = '$requestKey'; - }; - `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/request` - }, - response: (serviceName: string, userAddress: string, requestKey?: string) => { - if(!requestKey) { - requestKey = '$requestKey'; - } - `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/response` - }, + request: (serviceName: string, userAddress: string, requestKey: string) => + `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/request`, + response: (serviceName: string, userAddress: string, requestKey: string) => + `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/response`, } }, transfer: (from: string, to: string, transferKey: string) => diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index c7af669..0abc8b6 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -33,7 +33,7 @@ export default class Handler { const filterId = await this.ain.em.subscribe( 'VALUE_CHANGED', { - path: Path.app(appName).response(serviceName,requester), + path: Path.app(appName).response(serviceName,requester,'$requestKey'), event_source: 'USER', }, (valueChangedEvent) => { From bc8a8db424913f0d3bea5a595cac9fb3f479d7bb Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 4 Sep 2023 10:57:52 +0900 Subject: [PATCH 034/235] reafactor: space --- src/handlers/handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 0abc8b6..7b54d1c 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -33,7 +33,7 @@ export default class Handler { const filterId = await this.ain.em.subscribe( 'VALUE_CHANGED', { - path: Path.app(appName).response(serviceName,requester,'$requestKey'), + path: Path.app(appName).response(serviceName, requester, '$requestKey'), event_source: 'USER', }, (valueChangedEvent) => { From 15d67c45aa6557326cde250b3f2c39173e013c07 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 4 Sep 2023 11:38:03 +0900 Subject: [PATCH 035/235] feat: add set default billing config --- src/modules/app.ts | 54 +++++++++++++++++++++++++++++++++------------- src/types/type.ts | 12 +++++++++++ 2 files changed, 51 insertions(+), 15 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 7fa0ef0..8f208a6 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -1,5 +1,6 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../constants"; +import { billingConfig, setDefaultFlag } from "../types/type"; import { buildSetOperation } from "../utils/builder"; import ModuleBase from "./moduleBase"; @@ -89,33 +90,57 @@ interface TriggerFunctionUrlMap { } export default class App extends ModuleBase { - async create(appName: string, urls: TriggerFunctionUrlMap) { - const createAppOp = this.buildCreateAppOp(appName); + async create(appName: string, setDefaultFlag?: setDefaultFlag) { + if (!setDefaultFlag) + setDefaultFlag = { triggerFuncton: true, billingConfig: true }; + const setRuleOps: SetOperation[] = []; + const setFunctionOps: SetOperation[] = []; + const setBillingConfigOps: SetOperation[] = [] ; + const createAppOp = this.buildCreateAppOp(appName); const defaultRules = defaultAppRules(appName); - const setRuleOps: SetOperation[] = []; for (const rule of Object.values(defaultRules)) { const { ref, value } = rule; const ruleOp = buildSetOperation("SET_RULE" , ref, value); setRuleOps.push(ruleOp); } - const defaultFunctions = defaultAppFunctions(appName); - const setFunctionOps: SetOperation[] = []; - for (const func of Object.values(defaultFunctions)) { - const { ref, functionId, functionType, functionUrl } = func(appName); - const value = this.buildSetFunctionValue(functionId, functionType, functionUrl); - const funcOp = buildSetOperation("SET_FUNCTION", ref, value); - setFunctionOps.push(funcOp); + if (setDefaultFlag.triggerFuncton) { + const defaultFunctions = defaultAppFunctions(appName); + for (const func of Object.values(defaultFunctions)) { + const { ref, functionId, functionType, functionUrl } = func(appName); + const value = this.buildSetFunctionValue(functionId, functionType, functionUrl); + const funcOp = buildSetOperation("SET_FUNCTION", ref, value); + setFunctionOps.push(funcOp); + } } - const txBody = this.buildTxBody([createAppOp, ...setRuleOps, ...setFunctionOps]); + if (setDefaultFlag.billingConfig) { + // TODO(yoojin): Add billing config default setting. + const defaultConfig: billingConfig = { + depositAddress: this.ain.wallet.defaultAccount!.address, + tokenPerCost: 0, + } + const configOp = this.buildSetBillingConfigOp(appName, defaultConfig); + setBillingConfigOps.push(configOp); + } + const txBody = this.buildTxBody([ + createAppOp, + ...setRuleOps, + ...setFunctionOps, + ...setBillingConfigOps, + ]); return await this.sendTransaction(txBody); } + private buildSetBillingConfigOp(appName: string, config: billingConfig) { + const path = Path.app(appName).billingConfig(); + return buildSetOperation("SET_VALUE", path, config); + } + private buildCreateAppOp(appName: string): SetOperation { - const ref = `/manage_app/${appName}/create/${Date.now()}`; + const path = `/manage_app/${appName}/create/${Date.now()}`; const adminAccount = this.ain.wallet.defaultAccount!; if (adminAccount && adminAccount.address) { // FIXME(yoojin): change Error to Custom error when it added. @@ -126,7 +151,7 @@ export default class App extends ModuleBase { [adminAccount.address]: true, } } - return buildSetOperation("SET_VALUE", ref, value); + return buildSetOperation("SET_VALUE", path, value); } buildSetFunctionValue(functionType: string, functionId: string, functionUrl: string) { @@ -140,5 +165,4 @@ export default class App extends ModuleBase { } } } - -} \ No newline at end of file +} diff --git a/src/types/type.ts b/src/types/type.ts index e69de29..7c8cc9e 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -0,0 +1,12 @@ +export type setDefaultFlag = { + triggerFuncton: boolean, + billingConfig: boolean, +} + +export type billingConfig = { + depositAddress: string, + tokenPerCost: number, + minCost?: number, + maxCost?: number, + responseTimeout?: number, +} \ No newline at end of file From 43ef0918eebba0cd165128c945abc1910f95fa31 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 4 Sep 2023 11:42:11 +0900 Subject: [PATCH 036/235] feat: add public functions of billing config --- src/modules/app.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/modules/app.ts b/src/modules/app.ts index 8f208a6..ef124f3 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -134,6 +134,16 @@ export default class App extends ModuleBase { return await this.sendTransaction(txBody); } + async setBillingConfig(appName: string, config: billingConfig) { + const setConfigOp = this.buildSetBillingConfigOp(appName, config); + const txBody = this.buildTxBody(setConfigOp); + return await this.sendTransaction(txBody); + } + + async getBillingConfig(appName: string): Promise { + return await this.ain.db.ref().getValue(Path.app(appName).billingConfig); + } + private buildSetBillingConfigOp(appName: string, config: billingConfig) { const path = Path.app(appName).billingConfig(); return buildSetOperation("SET_VALUE", path, config); From 32a068f77885dc6d86c52f33f1fc2bf335ca799a Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 4 Sep 2023 11:44:09 +0900 Subject: [PATCH 037/235] fix: remove deprecated vars --- src/modules/app.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index ef124f3..b12d2e9 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -61,7 +61,6 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu } const defaultAppFunctions = (appName: string) => { - const rootRef = `/apps/${appName}` return { deposit: (url: string) => { return { @@ -82,13 +81,6 @@ const defaultAppFunctions = (appName: string) => { } } -// FIXME(yoojin): move to types. -// NOTE(yoojin): temporary type. service url may be changed to array? -interface TriggerFunctionUrlMap { - deposit: string, - service: string, -} - export default class App extends ModuleBase { async create(appName: string, setDefaultFlag?: setDefaultFlag) { if (!setDefaultFlag) @@ -116,7 +108,6 @@ export default class App extends ModuleBase { } if (setDefaultFlag.billingConfig) { - // TODO(yoojin): Add billing config default setting. const defaultConfig: billingConfig = { depositAddress: this.ain.wallet.defaultAccount!.address, tokenPerCost: 0, From e835fce8941eed31d8340e6892a5d58b8c4b00d0 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 4 Sep 2023 11:49:06 +0900 Subject: [PATCH 038/235] style: add space EOF --- src/types/type.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/type.ts b/src/types/type.ts index 7c8cc9e..0ac62b1 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -9,4 +9,4 @@ export type billingConfig = { minCost?: number, maxCost?: number, responseTimeout?: number, -} \ No newline at end of file +} From b308ce46fb1e9f9dda0f3138dd9a027e4cf57405 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 4 Sep 2023 19:28:31 +0900 Subject: [PATCH 039/235] feat: add set rules, functions --- src/modules/app.ts | 44 ++++++++++++++++++++++++++++++++++++++------ src/types/type.ts | 19 +++++++++++++++++++ 2 files changed, 57 insertions(+), 6 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index b12d2e9..b7116a5 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -1,8 +1,9 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../constants"; -import { billingConfig, setDefaultFlag } from "../types/type"; +import { billingConfig, setDefaultFlag, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; import { buildSetOperation } from "../utils/builder"; import ModuleBase from "./moduleBase"; +import { } from "@ainblockchain/ain-js" // FIXME(yoojin): move to constant. const defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { @@ -60,6 +61,8 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu } } + + const defaultAppFunctions = (appName: string) => { return { deposit: (url: string) => { @@ -135,6 +138,35 @@ export default class App extends ModuleBase { return await this.ain.db.ref().getValue(Path.app(appName).billingConfig); } + async setTriggerFunctions(appName: string, functions: setTriggerFunctionParm[]) { + const setFunctionOps: SetOperation[] = []; + for (const func of Object.values(functions)) { + const { ref } = func; + const value = this.buildSetFunctionValue(func); + const op = buildSetOperation("SET_FUNCTION", ref, value); + setFunctionOps.push(op); + } + if (setFunctionOps.length <= 0) { + // TODO(yoojin): Will make TransactionWrapper and catch error in wrapper. I think it will add in moduleBase. + // FIXME(yoojin): error message. + throw new Error ("Please input setTriggerFunctionParams.") + } + const txBody = this.buildTxBody(setFunctionOps) + return await this.sendTransaction(txBody); + } + + async setRules(appName: string, rules: setRuleParam[]) { + const setRuleOps: SetOperation[] = []; + for (const rule of Object.values(rules)) { + const { ref } = rule; + const value = rule.write; + const op = buildSetOperation("SET_RULE", ref, value); + setRuleOps.push(op); + } + const txBody = this.buildTxBody(setRuleOps); + return await this.sendTransaction(txBody); + } + private buildSetBillingConfigOp(appName: string, config: billingConfig) { const path = Path.app(appName).billingConfig(); return buildSetOperation("SET_VALUE", path, config); @@ -155,13 +187,13 @@ export default class App extends ModuleBase { return buildSetOperation("SET_VALUE", path, value); } - buildSetFunctionValue(functionType: string, functionId: string, functionUrl: string) { + buildSetFunctionValue({function_type, function_url, function_id}: triggerFunctionConfig) { return { ".function": { - [functionId]: { - function_type: functionType, - function_url: functionUrl, - function_id: functionId, + [function_id]: { + function_type, + function_url, + function_id, } } } diff --git a/src/types/type.ts b/src/types/type.ts index 0ac62b1..364ee5b 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -3,6 +3,25 @@ export type setDefaultFlag = { billingConfig: boolean, } +// NOTE(yoojin): pls suggest good name. +export type triggerFunctionConfig = { + function_type: string, + function_url: string, + function_id: string, +} + +export type setTriggerFunctionParm = { + ref: string +} & triggerFunctionConfig; + +export type writeRuleConfig = { + write: string, +} + +export type setRuleParam = { + ref: string +} & writeRuleConfig + export type billingConfig = { depositAddress: string, tokenPerCost: number, From 0f5134e847f1046a874cd0429ce1c220a8a7a8a2 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 4 Sep 2023 19:29:59 +0900 Subject: [PATCH 040/235] fix: typo --- src/modules/app.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index b7116a5..7515edc 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -3,7 +3,6 @@ import { Path } from "../constants"; import { billingConfig, setDefaultFlag, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; import { buildSetOperation } from "../utils/builder"; import ModuleBase from "./moduleBase"; -import { } from "@ainblockchain/ain-js" // FIXME(yoojin): move to constant. const defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { From 900e1ba29cecfe91d01e5de930816e622b2570d9 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 4 Sep 2023 19:33:47 +0900 Subject: [PATCH 041/235] style: space and semicolons --- src/modules/app.ts | 8 +++----- src/types/type.ts | 10 +++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 7515edc..69066e3 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -60,8 +60,6 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu } } - - const defaultAppFunctions = (appName: string) => { return { deposit: (url: string) => { @@ -148,9 +146,9 @@ export default class App extends ModuleBase { if (setFunctionOps.length <= 0) { // TODO(yoojin): Will make TransactionWrapper and catch error in wrapper. I think it will add in moduleBase. // FIXME(yoojin): error message. - throw new Error ("Please input setTriggerFunctionParams.") + throw new Error ("Please input setTriggerFunctionParams."); } - const txBody = this.buildTxBody(setFunctionOps) + const txBody = this.buildTxBody(setFunctionOps); return await this.sendTransaction(txBody); } @@ -195,6 +193,6 @@ export default class App extends ModuleBase { function_id, } } - } + }; } } diff --git a/src/types/type.ts b/src/types/type.ts index 364ee5b..d46dbd0 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -1,14 +1,14 @@ export type setDefaultFlag = { triggerFuncton: boolean, billingConfig: boolean, -} +}; // NOTE(yoojin): pls suggest good name. export type triggerFunctionConfig = { function_type: string, function_url: string, function_id: string, -} +}; export type setTriggerFunctionParm = { ref: string @@ -16,11 +16,11 @@ export type setTriggerFunctionParm = { export type writeRuleConfig = { write: string, -} +}; export type setRuleParam = { ref: string -} & writeRuleConfig +} & writeRuleConfig; export type billingConfig = { depositAddress: string, @@ -28,4 +28,4 @@ export type billingConfig = { minCost?: number, maxCost?: number, responseTimeout?: number, -} +}; From b8f92ca2cc672e5288fa564e91d39a618a401696 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 4 Sep 2023 19:35:51 +0900 Subject: [PATCH 042/235] fix: default functions and type --- src/modules/app.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 69066e3..59b4245 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -65,17 +65,17 @@ const defaultAppFunctions = (appName: string) => { deposit: (url: string) => { return { ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, - functionType: "REST", - functionId: "deposit-trigger", - functionUrl: url, + function_type: "REST", + function_id: "deposit-trigger", + function_url: url, } }, service: (url: string) => { return { ref: Path.app(appName).request("$serviceName", "$userAddress", "$requestKey"), - functionType: "REST", - functionId: "service-trigger", - functionUrl: url, + function_type: "REST", + function_id: "service-trigger", + function_url: url, } } } @@ -100,8 +100,8 @@ export default class App extends ModuleBase { if (setDefaultFlag.triggerFuncton) { const defaultFunctions = defaultAppFunctions(appName); for (const func of Object.values(defaultFunctions)) { - const { ref, functionId, functionType, functionUrl } = func(appName); - const value = this.buildSetFunctionValue(functionId, functionType, functionUrl); + const { ref, function_id, function_type, function_url } = func(appName); + const value = this.buildSetFunctionValue({function_id, function_type, function_url}); const funcOp = buildSetOperation("SET_FUNCTION", ref, value); setFunctionOps.push(funcOp); } From 13c6f8ef0613c9ba1b2721d1eee76664a78808a5 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 11:38:41 +0900 Subject: [PATCH 043/235] feat: deposit --- src/ainize.ts | 5 +++- src/modules/app.ts | 6 +++++ src/modules/moduleBase.ts | 11 +++++--- src/modules/service/depositService.ts | 36 +++++++++++++++++++++++++++ src/modules/{ => service}/service.ts | 15 ++++++++--- src/modules/service/useService.ts | 3 +++ src/modules/wallet.ts | 23 ++++++++++++++--- 7 files changed, 88 insertions(+), 11 deletions(-) create mode 100644 src/modules/service/depositService.ts rename src/modules/{ => service}/service.ts (87%) create mode 100644 src/modules/service/useService.ts diff --git a/src/ainize.ts b/src/ainize.ts index d315df5..20a8473 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -5,17 +5,20 @@ import Middleware from './middlewares/middleware'; import { getBlockChainEndpoint } from './constants'; import Handler from './handlers/handler'; import Wallet from './modules/wallet'; +import App from './modules/app'; export default class Ainize { cache: NodeCache; ain: Ain; middleware: Middleware; handler: Handler; wallet: Wallet; + app:App; - constructor(privateKey: string, chainId: 1|0 ) { + constructor(chainId: 1|0, privateKey?: string ) { const Ain = require('@ainblockchain/ain-js').default const blockChainEndpoint = getBlockChainEndpoint(chainId); this.ain = new Ain(blockChainEndpoint, chainId); + this.app = new App(this); this.cache = new NodeCache(); this.middleware = new Middleware(this); this.handler = new Handler(this); diff --git a/src/modules/app.ts b/src/modules/app.ts index 7fa0ef0..5f1504f 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -141,4 +141,10 @@ export default class App extends ModuleBase { } } + private async getDepositAddress(appName: string) { + const billingConfig = await this.ain.db.ref().getValue(Path.app(appName).billingConfig); + const depositAddress = billingConfig.depositAddress; + return depositAddress; + } + } \ No newline at end of file diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index cee9dd8..1a18469 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -1,23 +1,28 @@ import Ain from "@ainblockchain/ain-js"; import { SetOperation, TransactionBody } from "@ainblockchain/ain-js/lib/types"; import Ainize from "../ainize"; +import Wallet from "./wallet"; +import App from "./app"; export default class ModuleBase { public ain: Ain; - + public wallet: Wallet; + public app: App; constructor(ainize: Ainize) { this.ain = ainize.ain; + this.wallet = ainize.wallet; + this.app = ainize.app; } - protected buildTxBody(operation: SetOperation | SetOperation[]): TransactionBody { + protected buildTxBody(operation: SetOperation | SetOperation[], timestamp? : number): TransactionBody { return { operation: Array.isArray(operation) ? { type: "SET", op_list: operation } : operation, gas_price: 500, - timestamp: Date.now(), + timestamp: timestamp? timestamp : Date.now(), nonce: -1 } } diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts new file mode 100644 index 0000000..3008161 --- /dev/null +++ b/src/modules/service/depositService.ts @@ -0,0 +1,36 @@ +import { Path } from "../../constants"; +import { Request } from 'express'; +import moduleBase from "../moduleBase"; +import { SetOperation } from "@ainblockchain/ain-js/lib/types"; + +export default class DepositService extends moduleBase{ + async requestDeposit(appName: string, amount: number, userAddress?: string) { + const transferKey = Date.now(); + userAddress = userAddress ? userAddress : this.wallet.getDefaultAccount(); + const depositAddress = await this.app.getDepositAddress(appName); + + const op_list: SetOperation[] = [ + { + type: 'SET_VALUE', + ref: Path.transfer(userAddress,depositAddress,transferKey.toString()), + value: amount, + }, + { + type: 'SET_VALUE', + ref: `/apps/${appName}/deposit/${userAddress}/${transferKey}`, + value: amount, + } + ] + const txBody = this.buildTxBody(op_list, transferKey); + return this.wallet.sendWithAccount(txBody, userAddress); + } + + async handleDeposit(req: Request) { + const transferKey = req.body.valuePath[4]; + const transferValue = req.body.value; + await this.changeBalance(req,'INC', transferValue); + await this.writeHistory(req, historyType.DEPOSIT, transferValue, transferKey); + } + + +} \ No newline at end of file diff --git a/src/modules/service.ts b/src/modules/service/service.ts similarity index 87% rename from src/modules/service.ts rename to src/modules/service/service.ts index 0e514a8..b94370c 100644 --- a/src/modules/service.ts +++ b/src/modules/service/service.ts @@ -1,9 +1,18 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; -import { buildSetOperation } from "../utils/builder"; -import { Path } from "../constants"; -import ModuleBase from "./moduleBase"; +import { buildSetOperation } from '../../utils/builder'; +import { Path } from "../../constants"; +import ModuleBase from ".././moduleBase"; +import DepositService from "./depositService"; export default class Service extends ModuleBase { + depositService: DepositService; + useService: UseService; + constructor(ainize: Ainize) { + super(ainize); + this.depositService = new DepositService(ainize); + this.useService = new UseService(ainize); + } + async deposit(appName: string, amount: number) { const transferKey = Date.now().toString(); const depositAddress = await this.getAppDepositAddress(appName); diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts new file mode 100644 index 0000000..424bc9b --- /dev/null +++ b/src/modules/service/useService.ts @@ -0,0 +1,3 @@ +export default class UseService { + +} \ No newline at end of file diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index 1059cd9..1f81bea 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -2,12 +2,13 @@ import Ainize from "../ainize"; import Ain from "@ainblockchain/ain-js"; import ModuleBase from "./moduleBase"; -export default class Wallet extends ModuleBase { +export default class Wallet { ain: Ain; - constructor(ainize: Ainize, privateKey: string) { - super(ainize); + constructor(ainize: Ainize, privateKey?: string) { this.ain = ainize.ain; - this.ain.wallet.addAndSetDefaultAccount(privateKey); + if(privateKey){ + this.ain.wallet.addAndSetDefaultAccount(privateKey); + } } getDefaultAccount() { @@ -32,4 +33,18 @@ export default class Wallet extends ModuleBase { } return this.ain.wallet.getBalance(address); } + + + async sendWithAccount(txBody: any, signerAddress?: string) { + if(!signerAddress) { + signerAddress = this.getDefaultAccount(); + } + if(this.ain.wallet.isAdded(signerAddress)){ + throw new Error ('You need to add account'); + } + txBody.address = signerAddress; + return await this.ain.sendTransaction(txBody); + } + + } From 9d0136f7dd4cf86962ed6fa9fae30a60abe82c2d Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 13:45:54 +0900 Subject: [PATCH 044/235] refactor: delete unused code --- src/modules/service/service.ts | 53 ++-------------------------------- 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/src/modules/service/service.ts b/src/modules/service/service.ts index 099e681..0ddad7c 100644 --- a/src/modules/service/service.ts +++ b/src/modules/service/service.ts @@ -15,57 +15,8 @@ export default class Service extends ModuleBase { this.useService = new UseService(ainize); } - async request(appName: string, serviceName: string, data: any) { - const userAddress = this.ain.wallet.defaultAccount!.address; - const timestamp = Date.now(); - const path = Path.app(appName).request(serviceName, userAddress, timestamp); - const value = data; - const op = buildSetOperation("SET_VALUE", path, value); - const txBody = this.buildTxBody(op); - return await this.sendTransaction(txBody); + async requestDeposit(appName: string, amount: number, userAddress?: string) { + return await this.depositService.requestDeposit(appName, amount, userAddress); } - async getCreditBalance(appName: string): Promise { - const userAddress = this.ain.wallet.defaultAccount!.address; - const path = Path.app(appName).balanceOfUser(userAddress); - const balance = await this.ain.db.ref().getValue(path); - return balance || 0; - } - - // FIXME(yoojin): add billing config type and change. - async getBillingConfig(appName: string): Promise { - const path = Path.app(appName).billingConfig; - const config = await this.ain.db.ref().getValue(path); - return config; - } - - async getAppInfo(appName: string) { - // TODO(yoojin): app info was not added on schema. - } - - async calculateCost(billingConfig: any) { - // TODO(yoojin): add logic. - } - - private buildTransferOp( - to: string, - amount: number, - transferKey?: string - ): SetOperation { - if (!transferKey) - transferKey = Date.now().toString(); - const from = this.ain.wallet.defaultAccount!.address; - const path = Path.transfer(from, to, transferKey); - return buildSetOperation("SET_VALUE", path, amount); - } - - private buildSetDepositOp( - appName: string, - transferKey: string, - amount: number - ): SetOperation { - const userAddress = this.ain.wallet.defaultAccount!.address; - const path = `${Path.app(appName).depositOfUser(userAddress)}/${transferKey}`; - return buildSetOperation("SET_VALUE", path, amount) - } } \ No newline at end of file From 241ccf9dada02dc1ec0e639fe947ab2ed9b7103e Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 14:53:57 +0900 Subject: [PATCH 045/235] refactor: indent --- src/modules/service/depositService.ts | 2 +- src/modules/service/serviceBase.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index 1461eb3..34927f9 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -30,7 +30,7 @@ export default class DepositService extends ServiceBase { const transferValue = req.body.value; const appName = req.body.baluePath[1]; const requesterAddress = req.body.auth.addr; - await this.changeBalance(appName, requesterAddress,'INC', transferValue); + await this.changeBalance(appName, requesterAddress, 'INC', transferValue); await this.writeHistory(appName, requesterAddress, HISTORY_TYPE.DEPOSIT, transferValue, transferKey); } diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts index d032e1d..5e50465 100644 --- a/src/modules/service/serviceBase.ts +++ b/src/modules/service/serviceBase.ts @@ -2,7 +2,7 @@ import { HISTORY_TYPE, Path } from "../../constants"; import ModuleBase from "../moduleBase"; import { buildSetOperation } from "../../utils/builder"; -export default class ServiceBase extends ModuleBase{ +export default class ServiceBase extends ModuleBase { protected async getDepositAddress(appName: string) { return (await this.app.getBillingConfig(appName)).depositAddress; @@ -11,7 +11,7 @@ export default class ServiceBase extends ModuleBase{ //ADMIN: need defaultAccount protected async changeBalance(appName: string, requesterAddress: string, type: string, value: number) { const balancePath = Path.app(appName).balanceOfUser(requesterAddress); - if(type === 'INC'){ + if(type === 'INC') { const result = await this.ain.db.ref(balancePath).incrementValue({ value, gas_price: 500, From eb0d2ba506e467b321dc441057ac8839ff70ce7a Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 15:00:32 +0900 Subject: [PATCH 046/235] refactor: func --- src/modules/service/serviceBase.ts | 4 +++- src/modules/service/useService.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts index 5e50465..6a8089b 100644 --- a/src/modules/service/serviceBase.ts +++ b/src/modules/service/serviceBase.ts @@ -37,6 +37,8 @@ export default class ServiceBase extends ModuleBase { transferKey: type === HISTORY_TYPE.DEPOSIT ? key : undefined, requestTimestamp: type === HISTORY_TYPE.USAGE ? key : undefined, }; - await this.sendTransaction(this.buildTxBody(buildSetOperation("SET_VALUE", historyPath,value))); + const wrieHistoryOp = buildSetOperation("SET_VALUE", historyPath,value); + const txBody = this.buildTxBody(wrieHistoryOp); + return await this.sendTransaction(txBody); } } diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index 24d5731..bc5e639 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -1,5 +1,5 @@ import ServiceBase from "./serviceBase"; export default class UseService extends ServiceBase{ - + //TODO(Woojae): write code } \ No newline at end of file From 2b77c5b4e32c24030020a426485ba6efbe5afeb0 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 15:01:38 +0900 Subject: [PATCH 047/235] refactor: move service path --- src/modules/{service => }/service.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename src/modules/{service => }/service.ts (65%) diff --git a/src/modules/service/service.ts b/src/modules/service.ts similarity index 65% rename from src/modules/service/service.ts rename to src/modules/service.ts index 0ddad7c..732267d 100644 --- a/src/modules/service/service.ts +++ b/src/modules/service.ts @@ -1,10 +1,10 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; -import { buildSetOperation } from '../../utils/builder'; -import { Path } from "../../constants"; -import ModuleBase from ".././moduleBase"; -import DepositService from "./depositService"; -import UseService from "./useService"; -import Ainize from "../../ainize"; +import { buildSetOperation } from '../utils/builder'; +import { Path } from "../constants"; +import ModuleBase from "./moduleBase"; +import DepositService from "./service/depositService"; +import UseService from "./service/useService"; +import Ainize from "../ainize"; export default class Service extends ModuleBase { depositService: DepositService; From 16510dc3e07a2bad953811aadbde77653bc5c38b Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 15:03:38 +0900 Subject: [PATCH 048/235] refactor: path --- src/modules/service/depositService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index 34927f9..acccdc1 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -17,7 +17,7 @@ export default class DepositService extends ServiceBase { }, { type: 'SET_VALUE', - ref: `/apps/${appName}/deposit/${userAddress}/${transferKey}`, + ref: `${Path.app(appName).depositOfUser(userAddress)}/${transferKey}`, value: amount, } ] From 14bfc628a529a17a42dff759f27587cc5e32b179 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 15:09:34 +0900 Subject: [PATCH 049/235] refactor: slash --- src/ainize.ts | 2 +- src/constants.ts | 6 +++--- src/handlers/handler.ts | 10 +++++----- src/middlewares/middleware.ts | 4 ++-- src/modules/app.ts | 14 +++++++------- src/modules/service/depositService.ts | 6 +++--- src/modules/service/serviceBase.ts | 4 ++-- src/modules/wallet.ts | 5 ++--- 8 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index 20a8473..3be17f2 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -26,7 +26,7 @@ export default class Ainize { } test() { - console.log('test'); + console.log("test"); } } diff --git a/src/constants.ts b/src/constants.ts index 0e32cdb..00bc5da 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,5 +1,5 @@ export const getBlockChainEndpoint = (chainId:number) =>{ - return chainId === 1 ? 'https://mainnet-event.ainetwork.ai' : 'https://testnet-event.ainetwork.ai' + return chainId === 1 ? "https://mainnet-event.ainetwork.ai" : "https://testnet-event.ainetwork.ai" } export const Path = { @@ -27,8 +27,8 @@ export const Path = { } export const HISTORY_TYPE = { - DEPOSIT: 'DEPOSIT', - USAGE: 'USAGE', + DEPOSIT: "DEPOSIT", + USAGE: "USAGE", } export const SECOND = 1000; diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 7b54d1c..c17429d 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -28,13 +28,13 @@ export default class Handler { async subscribe(requester:string, appName: string, serviceName: string, callback: (valueChangedEvent: any) => any) { if(this.checkSubscribeTableExists(requester, appName, serviceName)){ - throw new Error('Already subscribed'); + throw new Error("Already subscribed"); } const filterId = await this.ain.em.subscribe( - 'VALUE_CHANGED', + "VALUE_CHANGED", { - path: Path.app(appName).response(serviceName, requester, '$requestKey'), - event_source: 'USER', + path: Path.app(appName).response(serviceName, requester, "$requestKey"), + event_source: "USER", }, (valueChangedEvent) => { callback(valueChangedEvent); @@ -61,7 +61,7 @@ export default class Handler { unsubscribe(requester:string, appName: string, serviceName: string) { if(!this.checkSubscribeTableExists(requester, appName, serviceName)) { - throw new Error('Not subscribed'); + throw new Error("Not subscribed"); } this.ain.em.unsubscribe( this.subscribeTable[requester][appName][serviceName], diff --git a/src/middlewares/middleware.ts b/src/middlewares/middleware.ts index e48b0df..7e2495c 100644 --- a/src/middlewares/middleware.ts +++ b/src/middlewares/middleware.ts @@ -13,8 +13,8 @@ export default class Middleware { next(); } const txHash = req.body.transaction.hash; - if (this.cache.get(txHash) && this.cache.get(txHash) !== 'error') { - res.send('duplicated'); + if (this.cache.get(txHash) && this.cache.get(txHash) !== "error") { + res.send("duplicated"); return; } // if request is first request, set cache diff --git a/src/modules/app.ts b/src/modules/app.ts index 4b1c170..28e2746 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -11,7 +11,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu root: { ref: rootRef, value: { - '.rule': { + ".rule": { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true" } } @@ -19,7 +19,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu deposit: { ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, value: { - '.rule': { + ".rule": { write: "data === null && util.isNumber(newData) && getValue(`/transfer/` + $userAddress + `/` + getValue(`/apps/" + `${appName}` + "/billingConfig/depositAddress`) + `/` + $transferKey + `/value`) === newData" } } @@ -27,7 +27,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu balance: { ref: Path.app(appName).balanceOfUser("$userAddress"), value: { - '.rule': { + ".rule": { write: "(util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true) && util.isNumber(newData)" } } @@ -35,7 +35,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu balanceHistory: { ref: `${rootRef}/balance/$userAddress/history/$timestamp_and_type`, value: { - '.rule': { + ".rule": { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.amount) && (newData.type === 'DEPOSIT' || newData.type === 'USAGE')" } } @@ -43,7 +43,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu request: { ref: Path.app(appName).request("$serviceName", "$userAddress", "$requestKey"), value: { - '.rule': { + ".rule": { write: "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`)" } @@ -52,7 +52,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu response: { ref: Path.app(appName).response("$serviceName", "userAddress", "$requestKey"), value: { - '.rule': { + ".rule": { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.status)" } }, @@ -174,7 +174,7 @@ export default class App extends ModuleBase { const adminAccount = this.ain.wallet.defaultAccount!; if (adminAccount && adminAccount.address) { // FIXME(yoojin): change Error to Custom error when it added. - throw new Error('You need to enter your private key when initialize sdk.'); + throw new Error("You need to enter your private key when initialize sdk."); } const value = { admin: { diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index acccdc1..7d14d17 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -11,12 +11,12 @@ export default class DepositService extends ServiceBase { const op_list: SetOperation[] = [ { - type: 'SET_VALUE', + type: "SET_VALUE", ref: Path.transfer(userAddress,depositAddress,transferKey.toString()), value: amount, }, { - type: 'SET_VALUE', + type: "SET_VALUE", ref: `${Path.app(appName).depositOfUser(userAddress)}/${transferKey}`, value: amount, } @@ -30,7 +30,7 @@ export default class DepositService extends ServiceBase { const transferValue = req.body.value; const appName = req.body.baluePath[1]; const requesterAddress = req.body.auth.addr; - await this.changeBalance(appName, requesterAddress, 'INC', transferValue); + await this.changeBalance(appName, requesterAddress, "INC", transferValue); await this.writeHistory(appName, requesterAddress, HISTORY_TYPE.DEPOSIT, transferValue, transferKey); } diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts index 6a8089b..97b43c9 100644 --- a/src/modules/service/serviceBase.ts +++ b/src/modules/service/serviceBase.ts @@ -11,7 +11,7 @@ export default class ServiceBase extends ModuleBase { //ADMIN: need defaultAccount protected async changeBalance(appName: string, requesterAddress: string, type: string, value: number) { const balancePath = Path.app(appName).balanceOfUser(requesterAddress); - if(type === 'INC') { + if(type === "INC") { const result = await this.ain.db.ref(balancePath).incrementValue({ value, gas_price: 500, @@ -30,7 +30,7 @@ export default class ServiceBase extends ModuleBase { //ADMIN: need defaultAccount protected async writeHistory(appName: string, requesterAddress: string, type: string, amount: number, key: string) { - const historyPath = Path.app(appName).historyOfUser(requesterAddress) + '/' + Date.now().toString(); + const historyPath = Path.app(appName).historyOfUser(requesterAddress) + "/" + Date.now().toString(); const value = { type, amount, diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index 1f81bea..a2d1a92 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -1,6 +1,5 @@ import Ainize from "../ainize"; import Ain from "@ainblockchain/ain-js"; -import ModuleBase from "./moduleBase"; export default class Wallet { ain: Ain; @@ -13,7 +12,7 @@ export default class Wallet { getDefaultAccount() { if(!this.ain.wallet.defaultAccount) { - throw new Error('You need to set default account.'); + throw new Error("You need to set default account."); } return this.ain.wallet.defaultAccount.address; } @@ -40,7 +39,7 @@ export default class Wallet { signerAddress = this.getDefaultAccount(); } if(this.ain.wallet.isAdded(signerAddress)){ - throw new Error ('You need to add account'); + throw new Error ("You need to add account"); } txBody.address = signerAddress; return await this.ain.sendTransaction(txBody); From 057fb020982c5979725f73a2d863ac6457ccb645 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 15:11:45 +0900 Subject: [PATCH 050/235] fix: history path --- src/constants.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 00bc5da..3d457ae 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -8,6 +8,7 @@ export const Path = { root: `/apps/${appName}`, balance: `${Path.app(appName).root}/balance`, balanceOfUser: (userAddress: string) => `${Path.app(appName).balance}/${userAddress}/balance`, + historyOfUser: (userAddress: string) => `${Path.app(appName).balance}/${userAddress}/history`, deposit: `${Path.app(appName).root}/deposit`, depositOfUser: (userAddress: string) => `${Path.app(appName).deposit}/${userAddress}`, billingConfig: `${Path.app(appName).root}/billingConfig`, @@ -18,8 +19,6 @@ export const Path = { `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/request`, response: (serviceName: string, userAddress: string, requestKey: string) => `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/response`, - histsory: `${Path.app(appName).root}/history`, - historyOfUser: (userAddress: string) => `${Path.app(appName).histsory}/${userAddress}`, } }, transfer: (from: string, to: string, transferKey: string) => From 3ed818ebcdfd769deef642523d4a9a2c1efeefdb Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 15:14:11 +0900 Subject: [PATCH 051/235] refactor: history_type to enum --- src/constants.ts | 5 ----- src/modules/service/depositService.ts | 3 ++- src/modules/service/serviceBase.ts | 3 ++- src/types/type.ts | 6 ++++++ 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 3d457ae..16b9cb6 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -25,11 +25,6 @@ export const Path = { `/transfer/${from}/${to}/${transferKey}/value`, } -export const HISTORY_TYPE = { - DEPOSIT: "DEPOSIT", - USAGE: "USAGE", -} - export const SECOND = 1000; export const HANDLER_TIMEOUT = 30 * SECOND; export const HANDLER_HEARBEAT_INTERVAL = 15 * SECOND; diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index 7d14d17..479b4e1 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -1,7 +1,8 @@ -import { HISTORY_TYPE, Path } from "../../constants"; +import { Path } from "../../constants"; import { Request } from 'express'; import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import ServiceBase from "./serviceBase"; +import { HISTORY_TYPE } from "../../types/type"; export default class DepositService extends ServiceBase { async requestDeposit(appName: string, amount: number, userAddress?: string) { diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts index 97b43c9..e8256e8 100644 --- a/src/modules/service/serviceBase.ts +++ b/src/modules/service/serviceBase.ts @@ -1,6 +1,7 @@ -import { HISTORY_TYPE, Path } from "../../constants"; +import { Path } from "../../constants"; import ModuleBase from "../moduleBase"; import { buildSetOperation } from "../../utils/builder"; +import { HISTORY_TYPE } from "../../types/type"; export default class ServiceBase extends ModuleBase { diff --git a/src/types/type.ts b/src/types/type.ts index d46dbd0..1a48e91 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -29,3 +29,9 @@ export type billingConfig = { maxCost?: number, responseTimeout?: number, }; + + +export enum HISTORY_TYPE { + DEPOSIT = "DEPOSIT", + USAGE = "USAGE", +} From 5e73d60684f01849ae0565d36b56d2d847c78ebf Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 15:16:55 +0900 Subject: [PATCH 052/235] refactor: rename func --- src/modules/service/depositService.ts | 2 +- src/modules/wallet.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index 479b4e1..6a7525d 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -23,7 +23,7 @@ export default class DepositService extends ServiceBase { } ] const txBody = this.buildTxBody(op_list, transferKey); - return this.wallet.sendWithAccount(txBody, userAddress); + return this.wallet.sendTxWithAddress(txBody, userAddress); } async handleDeposit(req: Request) { diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index a2d1a92..3567320 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -34,7 +34,7 @@ export default class Wallet { } - async sendWithAccount(txBody: any, signerAddress?: string) { + async sendTxWithAddress(txBody: any, signerAddress?: string) { if(!signerAddress) { signerAddress = this.getDefaultAccount(); } From 5e40aff08b48465f5835f570a9d3fd5ca91ef7ab Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 15:19:56 +0900 Subject: [PATCH 053/235] refactor: indent --- src/modules/wallet.ts | 4 +--- src/types/type.ts | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index 3567320..6056854 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -33,17 +33,15 @@ export default class Wallet { return this.ain.wallet.getBalance(address); } - async sendTxWithAddress(txBody: any, signerAddress?: string) { if(!signerAddress) { signerAddress = this.getDefaultAccount(); } - if(this.ain.wallet.isAdded(signerAddress)){ + if(this.ain.wallet.isAdded(signerAddress)) { throw new Error ("You need to add account"); } txBody.address = signerAddress; return await this.ain.sendTransaction(txBody); } - } diff --git a/src/types/type.ts b/src/types/type.ts index 1a48e91..3b3e9dc 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -30,7 +30,6 @@ export type billingConfig = { responseTimeout?: number, }; - export enum HISTORY_TYPE { DEPOSIT = "DEPOSIT", USAGE = "USAGE", From 60be753b57751633b41af7d47155dc9e77452734 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 5 Sep 2023 15:23:56 +0900 Subject: [PATCH 054/235] style: spaces --- src/modules/moduleBase.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index cee9dd8..2b35d6f 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -2,7 +2,6 @@ import Ain from "@ainblockchain/ain-js"; import { SetOperation, TransactionBody } from "@ainblockchain/ain-js/lib/types"; import Ainize from "../ainize"; - export default class ModuleBase { public ain: Ain; @@ -25,4 +24,4 @@ export default class ModuleBase { protected async sendTransaction(txBody: TransactionBody) { return await this.ain.sendTransaction(txBody); } -} \ No newline at end of file +} From a72dcb248bc5fe185900278e935cabcca98c18e3 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 5 Sep 2023 16:05:40 +0900 Subject: [PATCH 055/235] style: match styles. --- src/modules/app.ts | 1 - src/modules/service.ts | 3 +-- src/modules/service/depositService.ts | 37 +++++++++++++-------------- src/modules/service/serviceBase.ts | 10 ++++---- src/modules/wallet.ts | 1 - 5 files changed, 24 insertions(+), 28 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 28e2746..c185a32 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -195,5 +195,4 @@ export default class App extends ModuleBase { } }; } - } diff --git a/src/modules/service.ts b/src/modules/service.ts index 732267d..ccd3b6a 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -18,5 +18,4 @@ export default class Service extends ModuleBase { async requestDeposit(appName: string, amount: number, userAddress?: string) { return await this.depositService.requestDeposit(appName, amount, userAddress); } - -} \ No newline at end of file +} diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index 6a7525d..f0c76d8 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -6,24 +6,24 @@ import { HISTORY_TYPE } from "../../types/type"; export default class DepositService extends ServiceBase { async requestDeposit(appName: string, amount: number, userAddress?: string) { - const transferKey = Date.now(); - userAddress = userAddress ? userAddress : this.wallet.getDefaultAccount(); - const depositAddress = await this.getDepositAddress(appName); + const transferKey = Date.now(); + userAddress = userAddress ? userAddress : this.wallet.getDefaultAccount(); + const depositAddress = await this.getDepositAddress(appName); - const op_list: SetOperation[] = [ - { - type: "SET_VALUE", - ref: Path.transfer(userAddress,depositAddress,transferKey.toString()), - value: amount, - }, - { - type: "SET_VALUE", - ref: `${Path.app(appName).depositOfUser(userAddress)}/${transferKey}`, - value: amount, - } - ] - const txBody = this.buildTxBody(op_list, transferKey); - return this.wallet.sendTxWithAddress(txBody, userAddress); + const op_list: SetOperation[] = [ + { + type: "SET_VALUE", + ref: Path.transfer(userAddress, depositAddress, transferKey.toString()), + value: amount, + }, + { + type: "SET_VALUE", + ref: `${Path.app(appName).depositOfUser(userAddress)}/${transferKey}`, + value: amount, + } + ] + const txBody = this.buildTxBody(op_list, transferKey); + return this.wallet.sendTxWithAddress(txBody, userAddress); } async handleDeposit(req: Request) { @@ -34,5 +34,4 @@ export default class DepositService extends ServiceBase { await this.changeBalance(appName, requesterAddress, "INC", transferValue); await this.writeHistory(appName, requesterAddress, HISTORY_TYPE.DEPOSIT, transferValue, transferKey); } - -} \ No newline at end of file +} diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts index e8256e8..b891b28 100644 --- a/src/modules/service/serviceBase.ts +++ b/src/modules/service/serviceBase.ts @@ -9,7 +9,7 @@ export default class ServiceBase extends ModuleBase { return (await this.app.getBillingConfig(appName)).depositAddress; } - //ADMIN: need defaultAccount + // ADMIN: need defaultAccount protected async changeBalance(appName: string, requesterAddress: string, type: string, value: number) { const balancePath = Path.app(appName).balanceOfUser(requesterAddress); if(type === "INC") { @@ -18,20 +18,20 @@ export default class ServiceBase extends ModuleBase { gas_price: 500, nonce: -1 }); - console.log("incvalue result",result); + console.log("incvalue result", result); }else { const result = await this.ain.db.ref(balancePath).decrementValue({ value, gas_price: 500, nonce: -1 }); - console.log("incvalue result",result); + console.log("incvalue result", result); } } - //ADMIN: need defaultAccount + // ADMIN: need defaultAccount protected async writeHistory(appName: string, requesterAddress: string, type: string, amount: number, key: string) { - const historyPath = Path.app(appName).historyOfUser(requesterAddress) + "/" + Date.now().toString(); + const historyPath = `${Path.app(appName).historyOfUser(requesterAddress)}/${Date.now()}`; const value = { type, amount, diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index 6056854..550b390 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -43,5 +43,4 @@ export default class Wallet { txBody.address = signerAddress; return await this.ain.sendTransaction(txBody); } - } From 91ad02e506de641a20dc076b83ec92651836aae7 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 16:10:37 +0900 Subject: [PATCH 056/235] refactor: base structure --- src/ainize.ts | 11 ++++++++++- src/modules/admin.ts | 16 ++++++++++++++++ src/modules/moduleBase.ts | 4 ---- src/modules/service.ts | 11 ++++------- src/modules/service/serviceBase.ts | 12 +++++++++++- 5 files changed, 41 insertions(+), 13 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index 3be17f2..8654bdb 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -1,4 +1,3 @@ -import { NextFunction, Request, Response } from 'express'; import Ain from '@ainblockchain/ain-js'; import * as NodeCache from 'node-cache'; import Middleware from './middlewares/middleware'; @@ -6,6 +5,10 @@ import { getBlockChainEndpoint } from './constants'; import Handler from './handlers/handler'; import Wallet from './modules/wallet'; import App from './modules/app'; +import DepositService from './modules/service/depositService'; +import UseService from './modules/service/useService'; +import Service from './modules/service'; +import Admin from './modules/admin'; export default class Ainize { cache: NodeCache; ain: Ain; @@ -13,6 +16,8 @@ export default class Ainize { handler: Handler; wallet: Wallet; app:App; + service: Service; + admin: Admin; constructor(chainId: 1|0, privateKey?: string ) { const Ain = require('@ainblockchain/ain-js').default @@ -23,6 +28,10 @@ export default class Ainize { this.middleware = new Middleware(this); this.handler = new Handler(this); this.wallet = new Wallet(this, privateKey); + const depositService = new DepositService(this); + const useService = new UseService(this); + this.service = new Service(this, depositService, useService); + this.admin = new Admin(this, depositService, useService); } test() { diff --git a/src/modules/admin.ts b/src/modules/admin.ts index e4c3eee..b44b1d3 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -1,5 +1,21 @@ +import Ainize from "../ainize"; +import { Request } from "express"; import ModuleBase from "./moduleBase"; +import DepositService from "./service/depositService"; +import UseService from "./service/useService"; export default class Admin extends ModuleBase { + depositService: DepositService; + useService: UseService; + constructor(ainize: Ainize, depositService: DepositService, useService: UseService) { + super(ainize); + this.depositService = depositService; + this.useService = useService; + + } + + async deposit(req: Request) { + return await this.depositService.handleDeposit(req); + } } \ No newline at end of file diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index 1a18469..0f74228 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -7,12 +7,8 @@ import App from "./app"; export default class ModuleBase { public ain: Ain; - public wallet: Wallet; - public app: App; constructor(ainize: Ainize) { this.ain = ainize.ain; - this.wallet = ainize.wallet; - this.app = ainize.app; } protected buildTxBody(operation: SetOperation | SetOperation[], timestamp? : number): TransactionBody { diff --git a/src/modules/service.ts b/src/modules/service.ts index 732267d..a8765ff 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -1,6 +1,3 @@ -import { SetOperation } from "@ainblockchain/ain-js/lib/types"; -import { buildSetOperation } from '../utils/builder'; -import { Path } from "../constants"; import ModuleBase from "./moduleBase"; import DepositService from "./service/depositService"; import UseService from "./service/useService"; @@ -9,13 +6,13 @@ import Ainize from "../ainize"; export default class Service extends ModuleBase { depositService: DepositService; useService: UseService; - constructor(ainize: Ainize) { + constructor(ainize: Ainize,depositService: DepositService, useService: UseService) { super(ainize); - this.depositService = new DepositService(ainize); - this.useService = new UseService(ainize); + this.depositService = depositService; + this.useService = useService; } - async requestDeposit(appName: string, amount: number, userAddress?: string) { + async deposit(appName: string, amount: number, userAddress?: string) { return await this.depositService.requestDeposit(appName, amount, userAddress); } diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts index e8256e8..5f4e26a 100644 --- a/src/modules/service/serviceBase.ts +++ b/src/modules/service/serviceBase.ts @@ -2,9 +2,19 @@ import { Path } from "../../constants"; import ModuleBase from "../moduleBase"; import { buildSetOperation } from "../../utils/builder"; import { HISTORY_TYPE } from "../../types/type"; +import Ainize from "../../ainize"; +import Wallet from "../wallet"; +import App from "../app"; export default class ServiceBase extends ModuleBase { - + app: App; + wallet: Wallet; + constructor(ainize: Ainize) { + super(ainize); + this.app = ainize.app; + this.wallet = ainize.wallet; + } + protected async getDepositAddress(appName: string) { return (await this.app.getBillingConfig(appName)).depositAddress; } From da009fd4770f7958e2654d17ed3acd7f249b1011 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 5 Sep 2023 16:13:46 +0900 Subject: [PATCH 057/235] style: fix --- src/modules/app.ts | 4 ++-- src/modules/moduleBase.ts | 2 +- src/modules/service.ts | 3 --- src/modules/service/serviceBase.ts | 2 +- src/modules/wallet.ts | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index c185a32..dd0688c 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -191,8 +191,8 @@ export default class App extends ModuleBase { function_type, function_url, function_id, - } - } + }, + }, }; } } diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index f24af48..8fc0fa0 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -22,7 +22,7 @@ export default class ModuleBase { } : operation, gas_price: 500, timestamp: timestamp? timestamp : Date.now(), - nonce: -1 + nonce: -1, } } diff --git a/src/modules/service.ts b/src/modules/service.ts index ccd3b6a..21af007 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -1,6 +1,3 @@ -import { SetOperation } from "@ainblockchain/ain-js/lib/types"; -import { buildSetOperation } from '../utils/builder'; -import { Path } from "../constants"; import ModuleBase from "./moduleBase"; import DepositService from "./service/depositService"; import UseService from "./service/useService"; diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts index b891b28..6649249 100644 --- a/src/modules/service/serviceBase.ts +++ b/src/modules/service/serviceBase.ts @@ -38,7 +38,7 @@ export default class ServiceBase extends ModuleBase { transferKey: type === HISTORY_TYPE.DEPOSIT ? key : undefined, requestTimestamp: type === HISTORY_TYPE.USAGE ? key : undefined, }; - const wrieHistoryOp = buildSetOperation("SET_VALUE", historyPath,value); + const wrieHistoryOp = buildSetOperation("SET_VALUE", historyPath, value); const txBody = this.buildTxBody(wrieHistoryOp); return await this.sendTransaction(txBody); } diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index 550b390..4428f02 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -5,13 +5,13 @@ export default class Wallet { ain: Ain; constructor(ainize: Ainize, privateKey?: string) { this.ain = ainize.ain; - if(privateKey){ + if (privateKey) { this.ain.wallet.addAndSetDefaultAccount(privateKey); } } getDefaultAccount() { - if(!this.ain.wallet.defaultAccount) { + if (!this.ain.wallet.defaultAccount) { throw new Error("You need to set default account."); } return this.ain.wallet.defaultAccount.address; From 6c187d5dbaf55f2c3fe9ab11ce69db42a1c0f2bc Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 16:46:36 +0900 Subject: [PATCH 058/235] indent --- src/modules/admin.ts | 3 +-- src/modules/service.ts | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/admin.ts b/src/modules/admin.ts index b44b1d3..ccc2e08 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -11,11 +11,10 @@ export default class Admin extends ModuleBase { super(ainize); this.depositService = depositService; this.useService = useService; - } async deposit(req: Request) { return await this.depositService.handleDeposit(req); } -} \ No newline at end of file +} diff --git a/src/modules/service.ts b/src/modules/service.ts index 02a7b52..3fc277a 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -6,7 +6,7 @@ import Ainize from "../ainize"; export default class Service extends ModuleBase { depositService: DepositService; useService: UseService; - constructor(ainize: Ainize,depositService: DepositService, useService: UseService) { + constructor(ainize: Ainize, depositService: DepositService, useService: UseService) { super(ainize); this.depositService = depositService; this.useService = useService; @@ -15,4 +15,6 @@ export default class Service extends ModuleBase { async deposit(appName: string, amount: number, userAddress?: string) { return await this.depositService.requestDeposit(appName, amount, userAddress); } + } + From 44b0458c7dad4e750e50c83de7b478d056afa2e3 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 17:05:58 +0900 Subject: [PATCH 059/235] refactor: privatE --- src/ainize.ts | 6 +++--- src/handlers/handler.ts | 12 ++++++------ src/middlewares/middleware.ts | 4 ++-- src/modules/admin.ts | 4 ++-- src/modules/service.ts | 4 ++-- src/modules/service/serviceBase.ts | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index 8654bdb..8a11e8e 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -10,7 +10,7 @@ import UseService from './modules/service/useService'; import Service from './modules/service'; import Admin from './modules/admin'; export default class Ainize { - cache: NodeCache; + private cache: NodeCache; ain: Ain; middleware: Middleware; handler: Handler; @@ -25,8 +25,8 @@ export default class Ainize { this.ain = new Ain(blockChainEndpoint, chainId); this.app = new App(this); this.cache = new NodeCache(); - this.middleware = new Middleware(this); - this.handler = new Handler(this); + this.middleware = new Middleware(this.cache); + this.handler = new Handler(this, this.cache); this.wallet = new Wallet(this, privateKey); const depositService = new DepositService(this); const useService = new UseService(this); diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index c17429d..f2802bf 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -3,15 +3,15 @@ import Ainize from "../ainize"; import NodeCache = require("node-cache"); import Ain from "@ainblockchain/ain-js"; import { HANDLER_HEARBEAT_INTERVAL, HANDLER_TIMEOUT, Path } from "../constants"; +import ModuleBase from "../modules/moduleBase"; -export default class Handler { - cache: NodeCache; +export default class Handler extends ModuleBase { + private cache: NodeCache; isConnected: boolean = false; subscribeTable:any = {}; - ain: Ain; - constructor(ainize: Ainize) { - this.cache = ainize.cache; - this.ain = ainize.ain; + constructor(ainize: Ainize, cache: NodeCache) { + super(ainize); + this.cache = cache; } async connect() { await this.ain.em.connect({ diff --git a/src/middlewares/middleware.ts b/src/middlewares/middleware.ts index 7e2495c..bae1d6e 100644 --- a/src/middlewares/middleware.ts +++ b/src/middlewares/middleware.ts @@ -4,8 +4,8 @@ import NodeCache = require("node-cache"); export default class Middleware { cache: NodeCache; - constructor(ainize: Ainize) { - this.cache = ainize.cache; + constructor(cache: NodeCache,) { + this.cache = cache; } triggerDuplicateFilter = (req: Request, res: Response, next: NextFunction) => { diff --git a/src/modules/admin.ts b/src/modules/admin.ts index ccc2e08..ea6f2c8 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -5,8 +5,8 @@ import DepositService from "./service/depositService"; import UseService from "./service/useService"; export default class Admin extends ModuleBase { - depositService: DepositService; - useService: UseService; + private depositService: DepositService; + private useService: UseService; constructor(ainize: Ainize, depositService: DepositService, useService: UseService) { super(ainize); this.depositService = depositService; diff --git a/src/modules/service.ts b/src/modules/service.ts index 3fc277a..e1450f1 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -4,8 +4,8 @@ import UseService from "./service/useService"; import Ainize from "../ainize"; export default class Service extends ModuleBase { - depositService: DepositService; - useService: UseService; + private depositService: DepositService; + private useService: UseService; constructor(ainize: Ainize, depositService: DepositService, useService: UseService) { super(ainize); this.depositService = depositService; diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts index 7927f54..8ed3c90 100644 --- a/src/modules/service/serviceBase.ts +++ b/src/modules/service/serviceBase.ts @@ -7,8 +7,8 @@ import Wallet from "../wallet"; import App from "../app"; export default class ServiceBase extends ModuleBase { - app: App; - wallet: Wallet; + private app: App; + private wallet: Wallet; constructor(ainize: Ainize) { super(ainize); this.app = ainize.app; From e431d7d99cb4d6662557338c1f8747813fad204e Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 17:09:52 +0900 Subject: [PATCH 060/235] refactor: wallet extend moduleBase --- src/modules/wallet.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index 4428f02..36b24f6 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -1,10 +1,9 @@ import Ainize from "../ainize"; -import Ain from "@ainblockchain/ain-js"; +import ModuleBase from "./moduleBase"; -export default class Wallet { - ain: Ain; +export default class Wallet extends ModuleBase{ constructor(ainize: Ainize, privateKey?: string) { - this.ain = ainize.ain; + super(ainize); if (privateKey) { this.ain.wallet.addAndSetDefaultAccount(privateKey); } From a279388ce360eda78cb42e3b3e3bc3b02908ad16 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 5 Sep 2023 17:10:18 +0900 Subject: [PATCH 061/235] feat: add set admin function --- src/modules/app.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index dd0688c..cccb81e 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -164,6 +164,18 @@ export default class App extends ModuleBase { return await this.sendTransaction(txBody); } + async addAdmin(appName: string, userAddress: string) { + const op = this.buildSetAdminOp(appName, userAddress); + const txBody = this.buildTxBody(op); + return await this.sendTransaction(txBody); + } + + async deleteAdmin(appName: string, userAddress: string) { + const op = this.buildSetAdminOp(appName, userAddress, true); + const txBody = this.buildTxBody(op); + return await this.sendTransaction(txBody); + } + private buildSetBillingConfigOp(appName: string, config: billingConfig) { const path = Path.app(appName).billingConfig(); return buildSetOperation("SET_VALUE", path, config); @@ -184,7 +196,7 @@ export default class App extends ModuleBase { return buildSetOperation("SET_VALUE", path, value); } - buildSetFunctionValue({function_type, function_url, function_id}: triggerFunctionConfig) { + private buildSetFunctionValue({function_type, function_url, function_id}: triggerFunctionConfig) { return { ".function": { [function_id]: { @@ -195,4 +207,10 @@ export default class App extends ModuleBase { }, }; } + + private buildSetAdminOp(appName: string, userAddress: string, isRemoveOp?: boolean) { + const path = `/manage_app/${appName}/config/admin/${userAddress}`; + const value = !isRemoveOp ? null : true; + return buildSetOperation("SET_VALUE", path, value); + } } From 3a835eedd2b326969b0ff820ad9949b37e0a3a7b Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 17:11:55 +0900 Subject: [PATCH 062/235] refactor: private to protected --- src/modules/moduleBase.ts | 4 +--- src/modules/service/serviceBase.ts | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index 5ad82cb..58eb601 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -1,11 +1,9 @@ import Ain from "@ainblockchain/ain-js"; import { SetOperation, TransactionBody } from "@ainblockchain/ain-js/lib/types"; import Ainize from "../ainize"; -import Wallet from "./wallet"; -import App from "./app"; export default class ModuleBase { - public ain: Ain; + protected ain: Ain; constructor(ainize: Ainize) { this.ain = ainize.ain; } diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts index 8ed3c90..fb6b8e2 100644 --- a/src/modules/service/serviceBase.ts +++ b/src/modules/service/serviceBase.ts @@ -7,8 +7,8 @@ import Wallet from "../wallet"; import App from "../app"; export default class ServiceBase extends ModuleBase { - private app: App; - private wallet: Wallet; + protected app: App; + protected wallet: Wallet; constructor(ainize: Ainize) { super(ainize); this.app = ainize.app; From 91b226c3d0ccd7d0a8e580ce6833dcaa7c535619 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 17:13:41 +0900 Subject: [PATCH 063/235] fix:handler fitler --- src/handlers/handler.ts | 8 +------- src/middlewares/middleware.ts | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index f2802bf..ad3a945 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -1,18 +1,12 @@ const _ = require('lodash'); import Ainize from "../ainize"; import NodeCache = require("node-cache"); -import Ain from "@ainblockchain/ain-js"; import { HANDLER_HEARBEAT_INTERVAL, HANDLER_TIMEOUT, Path } from "../constants"; import ModuleBase from "../modules/moduleBase"; export default class Handler extends ModuleBase { - private cache: NodeCache; isConnected: boolean = false; subscribeTable:any = {}; - constructor(ainize: Ainize, cache: NodeCache) { - super(ainize); - this.cache = cache; - } async connect() { await this.ain.em.connect({ handshakeTimeout: HANDLER_TIMEOUT, // Timeout in milliseconds for the web socket handshake request. @@ -51,7 +45,7 @@ export default class Handler extends ModuleBase { } private addToSubscribeTable(requester:string, appName: string, serviceName: string, filterId: string) { - _.set(this.subscribeTable, [requester, appName, serviceName], {}); + _.set(this.subscribeTable, [requester, appName], {serviceName:filterId}); } getSubscribeList(requester?: string) { diff --git a/src/middlewares/middleware.ts b/src/middlewares/middleware.ts index bae1d6e..02aeb4a 100644 --- a/src/middlewares/middleware.ts +++ b/src/middlewares/middleware.ts @@ -1,5 +1,4 @@ import { Request, Response, NextFunction } from "express"; -import Ainize from "../ainize"; import NodeCache = require("node-cache"); export default class Middleware { From af781ae5a0e6bba0792df603d778a1f60ad3d1d4 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 17:14:30 +0900 Subject: [PATCH 064/235] refactor: delete unuse import --- src/admins/admin.ts | 30 ------------------------------ src/ainize.ts | 2 +- src/handlers/handler.ts | 2 -- 3 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 src/admins/admin.ts diff --git a/src/admins/admin.ts b/src/admins/admin.ts deleted file mode 100644 index ae46d97..0000000 --- a/src/admins/admin.ts +++ /dev/null @@ -1,30 +0,0 @@ -// import Ainize from "../ainize"; -// import Ain from "@ainblockchain/ain-js"; -// import { getAppBalancePath } from "../constants"; - -// export default class Admin { - -// constructor(ainize: Ainize) { - -// } - -// async deposit(){ - -// } - -// async response(){ -// try{ -// const amount = await this.service.calculateAndCheckCost(req); -// //DO SOMETHING -// const requestData = req.body.value; -// const responseData = await callService(requestData); -// await ainize.writeResponse(req, responseStatus.SUCCESS, responseData,amount); -// }catch(e) { -// await ainize.writeResponse(req, responseStatus.FAILED, e, amount); -// console.log('error: ',e); -// res.send('error'); -// } -// } - - -// } \ No newline at end of file diff --git a/src/ainize.ts b/src/ainize.ts index 8a11e8e..206d9ea 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -26,7 +26,7 @@ export default class Ainize { this.app = new App(this); this.cache = new NodeCache(); this.middleware = new Middleware(this.cache); - this.handler = new Handler(this, this.cache); + this.handler = new Handler(this); this.wallet = new Wallet(this, privateKey); const depositService = new DepositService(this); const useService = new UseService(this); diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index ad3a945..d5c5d5d 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -1,6 +1,4 @@ const _ = require('lodash'); -import Ainize from "../ainize"; -import NodeCache = require("node-cache"); import { HANDLER_HEARBEAT_INTERVAL, HANDLER_TIMEOUT, Path } from "../constants"; import ModuleBase from "../modules/moduleBase"; From 3c2475ccbce1682be80b34ace87642c7a80e1dac Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 17:33:23 +0900 Subject: [PATCH 065/235] refactor: delete space --- src/ainize.ts | 1 - src/handlers/handler.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index 206d9ea..924db98 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -37,5 +37,4 @@ export default class Ainize { test() { console.log("test"); } - } diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index d5c5d5d..76f36b2 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -66,5 +66,4 @@ export default class Handler extends ModuleBase { } }); } - } From c21283b0ced9c5ac79ec2f472236bebd9b17223d Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 17:34:29 +0900 Subject: [PATCH 066/235] refactor: delete space --- src/modules/service.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/modules/service.ts b/src/modules/service.ts index e1450f1..80a2dfc 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -15,6 +15,4 @@ export default class Service extends ModuleBase { async deposit(appName: string, amount: number, userAddress?: string) { return await this.depositService.requestDeposit(appName, amount, userAddress); } - } - From c2b420c41403f99a8021d54eab4788708f6c5f37 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 17:36:44 +0900 Subject: [PATCH 067/235] reafactor: quote to doubleQuote --- src/modules/service/depositService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index f0c76d8..010c782 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -1,5 +1,5 @@ import { Path } from "../../constants"; -import { Request } from 'express'; +import { Request } from "express"; import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import ServiceBase from "./serviceBase"; import { HISTORY_TYPE } from "../../types/type"; From 430cc34eec18926a7de04290ec509e67dfc721fb Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 5 Sep 2023 17:37:34 +0900 Subject: [PATCH 068/235] reafactor: quote to doubleQuote --- src/ainize.ts | 24 ++++++++++++------------ src/handlers/handler.ts | 2 +- src/modules/admin.ts | 1 - 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index 924db98..0f1a068 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -1,14 +1,14 @@ -import Ain from '@ainblockchain/ain-js'; -import * as NodeCache from 'node-cache'; -import Middleware from './middlewares/middleware'; -import { getBlockChainEndpoint } from './constants'; -import Handler from './handlers/handler'; -import Wallet from './modules/wallet'; -import App from './modules/app'; -import DepositService from './modules/service/depositService'; -import UseService from './modules/service/useService'; -import Service from './modules/service'; -import Admin from './modules/admin'; +import Ain from "@ainblockchain/ain-js"; +import * as NodeCache from "node-cache"; +import Middleware from "./middlewares/middleware"; +import { getBlockChainEndpoint } from "./constants"; +import Handler from "./handlers/handler"; +import Wallet from "./modules/wallet"; +import App from "./modules/app"; +import DepositService from "./modules/service/depositService"; +import UseService from "./modules/service/useService"; +import Service from "./modules/service"; +import Admin from "./modules/admin"; export default class Ainize { private cache: NodeCache; ain: Ain; @@ -20,7 +20,7 @@ export default class Ainize { admin: Admin; constructor(chainId: 1|0, privateKey?: string ) { - const Ain = require('@ainblockchain/ain-js').default + const Ain = require("@ainblockchain/ain-js").default const blockChainEndpoint = getBlockChainEndpoint(chainId); this.ain = new Ain(blockChainEndpoint, chainId); this.app = new App(this); diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 76f36b2..3b3010e 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -1,4 +1,4 @@ -const _ = require('lodash'); +const _ = require("lodash"); import { HANDLER_HEARBEAT_INTERVAL, HANDLER_TIMEOUT, Path } from "../constants"; import ModuleBase from "../modules/moduleBase"; diff --git a/src/modules/admin.ts b/src/modules/admin.ts index ea6f2c8..91a8861 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -16,5 +16,4 @@ export default class Admin extends ModuleBase { async deposit(req: Request) { return await this.depositService.handleDeposit(req); } - } From 7bc6e82a6cff252be8c2f32771a533da2c285ca5 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 6 Sep 2023 09:28:57 +0900 Subject: [PATCH 069/235] refactor: delete import --- src/ainize.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ainize.ts b/src/ainize.ts index 0f1a068..53cb3bb 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -20,7 +20,6 @@ export default class Ainize { admin: Admin; constructor(chainId: 1|0, privateKey?: string ) { - const Ain = require("@ainblockchain/ain-js").default const blockChainEndpoint = getBlockChainEndpoint(chainId); this.ain = new Ain(blockChainEndpoint, chainId); this.app = new App(this); From 60d56a1224f64e5c13f6fd00f33cc5ac9e1d1b3f Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 6 Sep 2023 10:41:25 +0900 Subject: [PATCH 070/235] feat: useService --- src/modules/admin.ts | 19 ++++++++++- src/modules/app.ts | 6 +++- src/modules/service.ts | 5 +++ src/modules/service/depositService.ts | 6 +--- src/modules/service/useService.ts | 47 ++++++++++++++++++++++++++- src/types/type.ts | 9 ++++- 6 files changed, 83 insertions(+), 9 deletions(-) diff --git a/src/modules/admin.ts b/src/modules/admin.ts index 91a8861..4da981c 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -3,6 +3,7 @@ import { Request } from "express"; import ModuleBase from "./moduleBase"; import DepositService from "./service/depositService"; import UseService from "./service/useService"; +import { RESPONSE_STATUS } from "../types/type"; export default class Admin extends ModuleBase { private depositService: DepositService; @@ -14,6 +15,22 @@ export default class Admin extends ModuleBase { } async deposit(req: Request) { - return await this.depositService.handleDeposit(req); + const transferKey = req.body.valuePath[4]; + const transferValue = req.body.value; + const appName = req.body.valuePath[1]; + const requesterAddress = req.body.auth.addr; + return await this.depositService.handleDeposit(appName, transferKey, transferValue,requesterAddress); + } + + async checkCostAndBalance(appName: string, prompt: string, userAddress?: string) { + return await this.useService.calculateCostAndCheckBalance(appName, prompt, userAddress); + } + + async writeSuccessResponse(req:Request, amount: number, responseData: string ) { + const appName = req.body.valuePath[1]; + const serviceName = req.body.valuePath[3]; + const requesterAddress = req.body.auth.addr; + const requestKey = req.body.valuePath[6]; + return await this.useService.writeResponse(RESPONSE_STATUS.SUCCESS, appName, serviceName, requesterAddress, requestKey, responseData, amount); } } diff --git a/src/modules/app.ts b/src/modules/app.ts index cccb81e..0488648 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -110,7 +110,7 @@ export default class App extends ModuleBase { if (setDefaultFlag.billingConfig) { const defaultConfig: billingConfig = { depositAddress: this.ain.wallet.defaultAccount!.address, - tokenPerCost: 0, + costPerToken: 0, } const configOp = this.buildSetBillingConfigOp(appName, defaultConfig); setBillingConfigOps.push(configOp); @@ -176,6 +176,10 @@ export default class App extends ModuleBase { return await this.sendTransaction(txBody); } + async getCreditBalance(appName: string, userAddress: string) { + const balancePath = Path.app(appName).balanceOfUser(userAddress); + return await this.ain.db.ref(balancePath).getValue(); + } private buildSetBillingConfigOp(appName: string, config: billingConfig) { const path = Path.app(appName).billingConfig(); return buildSetOperation("SET_VALUE", path, config); diff --git a/src/modules/service.ts b/src/modules/service.ts index 80a2dfc..3c48175 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -15,4 +15,9 @@ export default class Service extends ModuleBase { async deposit(appName: string, amount: number, userAddress?: string) { return await this.depositService.requestDeposit(appName, amount, userAddress); } + + async writeRequest(appName: string, serviceName: string, prompt: string, userAddress?: string) { + await this.useService.calculateCostAndCheckBalance(appName, prompt, userAddress ); + return await this.useService.writeRequest(appName, serviceName, prompt, userAddress); + } } diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index 010c782..0df7154 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -26,11 +26,7 @@ export default class DepositService extends ServiceBase { return this.wallet.sendTxWithAddress(txBody, userAddress); } - async handleDeposit(req: Request) { - const transferKey = req.body.valuePath[4]; - const transferValue = req.body.value; - const appName = req.body.baluePath[1]; - const requesterAddress = req.body.auth.addr; + async handleDeposit(appName: string, transferKey: string ,transferValue: number, requesterAddress: string) { await this.changeBalance(appName, requesterAddress, "INC", transferValue); await this.writeHistory(appName, requesterAddress, HISTORY_TYPE.DEPOSIT, transferValue, transferKey); } diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index bc5e639..e31cdd1 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -1,5 +1,50 @@ +import { Path } from "../../constants"; +import { HISTORY_TYPE, RESPONSE_STATUS } from "../../types/type"; +import { buildSetOperation } from "../../utils/builder"; import ServiceBase from "./serviceBase"; export default class UseService extends ServiceBase{ - //TODO(Woojae): write code + async writeRequest(appName: string, serviceName: string, value: string, requesterAddress?: string) { + const requestKey = Date.now(); + const requestPath = Path.app(appName).request(serviceName, requesterAddress,requestKey); + const requestData = { + prompt: value, + } + this.sendTransaction(this.buildTxBody(buildSetOperation("SET_VALUE", requestPath, requestData))); + return requestKey; + } + + async calculateCostAndCheckBalance(appName: string, value: string, requesterAddress?: string,) { + requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAccount(); + const billingConfig = (await this.app.getBillingConfig(appName)); + //TODO(woojae): calculate cost more accurately + const token = value.split(' ').length; + let amount = token * billingConfig.costPerToken; + if(billingConfig.minCost && amount < billingConfig.minCost) { + amount = billingConfig.minCost; + }else if(billingConfig.maxCost && amount > billingConfig.maxCost) { + amount = billingConfig.maxCost; + } + const balancePath = Path.app(appName).balanceOfUser(requesterAddress); + const balance = await this.app.getCreditBalance(appName, requesterAddress); + if(balance < amount) { + throw new Error("not enough balance"); + } + return amount; + } + + async writeResponse(status: RESPONSE_STATUS, appName: string, serviceName: string, requesterAddress: string, requestKey: string, responseData: string, amount: number) { + const responsePath = Path.app(appName).response(serviceName, requesterAddress, requestKey); + const responseValue = { + status, + data: responseData, + } + const responseOp = buildSetOperation("SET_VALUE", responsePath, responseValue); + const txbody = this.buildTxBody(responseOp); + await this.sendTransaction(txbody); + if(status === RESPONSE_STATUS.SUCCESS){ + await this.changeBalance(appName, requesterAddress, 'DEC', amount); + await this.writeHistory(appName, requesterAddress, HISTORY_TYPE.USAGE, amount , requestKey ); + } + } } \ No newline at end of file diff --git a/src/types/type.ts b/src/types/type.ts index 3b3e9dc..ae511c5 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -1,3 +1,5 @@ +import e = require("express"); + export type setDefaultFlag = { triggerFuncton: boolean, billingConfig: boolean, @@ -24,7 +26,7 @@ export type setRuleParam = { export type billingConfig = { depositAddress: string, - tokenPerCost: number, + costPerToken: number, minCost?: number, maxCost?: number, responseTimeout?: number, @@ -34,3 +36,8 @@ export enum HISTORY_TYPE { DEPOSIT = "DEPOSIT", USAGE = "USAGE", } + +export enum RESPONSE_STATUS { + SUCCESS = "SUCCESS", + FAIL = "FAIL", +} \ No newline at end of file From 6fc13d99b56356e75ff88b2bd5a5c58b24f3298e Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 6 Sep 2023 10:42:13 +0900 Subject: [PATCH 071/235] refactor: delete import --- src/types/type.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/types/type.ts b/src/types/type.ts index ae511c5..18e601a 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -1,5 +1,3 @@ -import e = require("express"); - export type setDefaultFlag = { triggerFuncton: boolean, billingConfig: boolean, From 84b5673bef3996ded0a7c5969740357c362a7bc3 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 6 Sep 2023 10:43:31 +0900 Subject: [PATCH 072/235] refactor: divide --- src/modules/service/useService.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index e31cdd1..2d9d014 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -6,11 +6,13 @@ import ServiceBase from "./serviceBase"; export default class UseService extends ServiceBase{ async writeRequest(appName: string, serviceName: string, value: string, requesterAddress?: string) { const requestKey = Date.now(); - const requestPath = Path.app(appName).request(serviceName, requesterAddress,requestKey); + const requestPath = Path.app(appName).request(serviceName, requesterAddress, requestKey); const requestData = { prompt: value, } - this.sendTransaction(this.buildTxBody(buildSetOperation("SET_VALUE", requestPath, requestData))); + const requestOp = buildSetOperation("SET_VALUE", requestPath, requestData); + const txBody = this.buildTxBody(requestOp); + this.sendTransaction(txBody); return requestKey; } From 05e178f8a792b0c99215ccc02d6153e5c0319cd7 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 6 Sep 2023 10:47:27 +0900 Subject: [PATCH 073/235] refactor: indent --- src/modules/service.ts | 2 +- src/modules/service/useService.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/service.ts b/src/modules/service.ts index 3c48175..2332110 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -17,7 +17,7 @@ export default class Service extends ModuleBase { } async writeRequest(appName: string, serviceName: string, prompt: string, userAddress?: string) { - await this.useService.calculateCostAndCheckBalance(appName, prompt, userAddress ); + await this.useService.calculateCostAndCheckBalance(appName, prompt, userAddress); return await this.useService.writeRequest(appName, serviceName, prompt, userAddress); } } diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index 2d9d014..852da0d 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -12,13 +12,13 @@ export default class UseService extends ServiceBase{ } const requestOp = buildSetOperation("SET_VALUE", requestPath, requestData); const txBody = this.buildTxBody(requestOp); - this.sendTransaction(txBody); + await this.sendTransaction(txBody); return requestKey; } - async calculateCostAndCheckBalance(appName: string, value: string, requesterAddress?: string,) { + async calculateCostAndCheckBalance(appName: string, value: string, requesterAddress?: string) { requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAccount(); - const billingConfig = (await this.app.getBillingConfig(appName)); + const billingConfig = await this.app.getBillingConfig(appName); //TODO(woojae): calculate cost more accurately const token = value.split(' ').length; let amount = token * billingConfig.costPerToken; @@ -44,9 +44,9 @@ export default class UseService extends ServiceBase{ const responseOp = buildSetOperation("SET_VALUE", responsePath, responseValue); const txbody = this.buildTxBody(responseOp); await this.sendTransaction(txbody); - if(status === RESPONSE_STATUS.SUCCESS){ + if(status === RESPONSE_STATUS.SUCCESS) { await this.changeBalance(appName, requesterAddress, 'DEC', amount); - await this.writeHistory(appName, requesterAddress, HISTORY_TYPE.USAGE, amount , requestKey ); + await this.writeHistory(appName, requesterAddress, HISTORY_TYPE.USAGE, amount , requestKey); } } } \ No newline at end of file From df86742ef462f503ee15df51658db23215c16c6d Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 6 Sep 2023 11:00:52 +0900 Subject: [PATCH 074/235] refactor: indent --- src/modules/service/useService.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index 852da0d..5d63efa 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -19,17 +19,17 @@ export default class UseService extends ServiceBase{ async calculateCostAndCheckBalance(appName: string, value: string, requesterAddress?: string) { requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAccount(); const billingConfig = await this.app.getBillingConfig(appName); - //TODO(woojae): calculate cost more accurately + // TODO(woojae): calculate cost more accurately const token = value.split(' ').length; let amount = token * billingConfig.costPerToken; - if(billingConfig.minCost && amount < billingConfig.minCost) { + if (billingConfig.minCost && amount < billingConfig.minCost) { amount = billingConfig.minCost; - }else if(billingConfig.maxCost && amount > billingConfig.maxCost) { + }else if (billingConfig.maxCost && amount > billingConfig.maxCost) { amount = billingConfig.maxCost; } const balancePath = Path.app(appName).balanceOfUser(requesterAddress); const balance = await this.app.getCreditBalance(appName, requesterAddress); - if(balance < amount) { + if (balance < amount) { throw new Error("not enough balance"); } return amount; @@ -44,9 +44,9 @@ export default class UseService extends ServiceBase{ const responseOp = buildSetOperation("SET_VALUE", responsePath, responseValue); const txbody = this.buildTxBody(responseOp); await this.sendTransaction(txbody); - if(status === RESPONSE_STATUS.SUCCESS) { + if (status === RESPONSE_STATUS.SUCCESS) { await this.changeBalance(appName, requesterAddress, 'DEC', amount); - await this.writeHistory(appName, requesterAddress, HISTORY_TYPE.USAGE, amount , requestKey); + await this.writeHistory(appName, requesterAddress, HISTORY_TYPE.USAGE, amount, requestKey); } } } \ No newline at end of file From bfa70d13389107626406f10de00d047aca4c32d1 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 6 Sep 2023 11:01:25 +0900 Subject: [PATCH 075/235] refactor: indent --- src/handlers/handler.ts | 6 +++--- src/middlewares/middleware.ts | 2 +- src/modules/app.ts | 2 +- src/modules/service/depositService.ts | 2 +- src/modules/service/serviceBase.ts | 2 +- src/modules/wallet.ts | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 3b3010e..6ee3a2d 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -19,7 +19,7 @@ export default class Handler extends ModuleBase { } async subscribe(requester:string, appName: string, serviceName: string, callback: (valueChangedEvent: any) => any) { - if(this.checkSubscribeTableExists(requester, appName, serviceName)){ + if (this.checkSubscribeTableExists(requester, appName, serviceName)){ throw new Error("Already subscribed"); } const filterId = await this.ain.em.subscribe( @@ -47,12 +47,12 @@ export default class Handler extends ModuleBase { } getSubscribeList(requester?: string) { - if(!requester) return this.subscribeTable; + if (!requester) return this.subscribeTable; return this.subscribeTable[requester]; } unsubscribe(requester:string, appName: string, serviceName: string) { - if(!this.checkSubscribeTableExists(requester, appName, serviceName)) { + if (!this.checkSubscribeTableExists(requester, appName, serviceName)) { throw new Error("Not subscribed"); } this.ain.em.unsubscribe( diff --git a/src/middlewares/middleware.ts b/src/middlewares/middleware.ts index 02aeb4a..9978801 100644 --- a/src/middlewares/middleware.ts +++ b/src/middlewares/middleware.ts @@ -8,7 +8,7 @@ export default class Middleware { } triggerDuplicateFilter = (req: Request, res: Response, next: NextFunction) => { - if(req.body.fid === undefined){ + if (req.body.fid === undefined){ next(); } const txHash = req.body.transaction.hash; diff --git a/src/modules/app.ts b/src/modules/app.ts index 0488648..e479cd9 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -93,7 +93,7 @@ export default class App extends ModuleBase { const defaultRules = defaultAppRules(appName); for (const rule of Object.values(defaultRules)) { const { ref, value } = rule; - const ruleOp = buildSetOperation("SET_RULE" , ref, value); + const ruleOp = buildSetOperation("SET_RULE", ref, value); setRuleOps.push(ruleOp); } diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index 0df7154..ce5b871 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -26,7 +26,7 @@ export default class DepositService extends ServiceBase { return this.wallet.sendTxWithAddress(txBody, userAddress); } - async handleDeposit(appName: string, transferKey: string ,transferValue: number, requesterAddress: string) { + async handleDeposit(appName: string, transferKey: string, transferValue: number, requesterAddress: string) { await this.changeBalance(appName, requesterAddress, "INC", transferValue); await this.writeHistory(appName, requesterAddress, HISTORY_TYPE.DEPOSIT, transferValue, transferKey); } diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts index fb6b8e2..9599be8 100644 --- a/src/modules/service/serviceBase.ts +++ b/src/modules/service/serviceBase.ts @@ -22,7 +22,7 @@ export default class ServiceBase extends ModuleBase { // ADMIN: need defaultAccount protected async changeBalance(appName: string, requesterAddress: string, type: string, value: number) { const balancePath = Path.app(appName).balanceOfUser(requesterAddress); - if(type === "INC") { + if (type === "INC") { const result = await this.ain.db.ref(balancePath).incrementValue({ value, gas_price: 500, diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index 36b24f6..696d07d 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -26,17 +26,17 @@ export default class Wallet extends ModuleBase{ } getAinBalance(address?: string) { - if(!address) { + if (!address) { address = this.getDefaultAccount(); } return this.ain.wallet.getBalance(address); } async sendTxWithAddress(txBody: any, signerAddress?: string) { - if(!signerAddress) { + if (!signerAddress) { signerAddress = this.getDefaultAccount(); } - if(this.ain.wallet.isAdded(signerAddress)) { + if (this.ain.wallet.isAdded(signerAddress)) { throw new Error ("You need to add account"); } txBody.address = signerAddress; From c0dfbf6fef80f8d384b9cfdee82ad8de03d7e534 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 6 Sep 2023 13:45:32 +0900 Subject: [PATCH 076/235] refactor: batch --- src/modules/service/serviceBase.ts | 29 ++++++++++------------------- src/modules/service/useService.ts | 13 +++++++++---- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts index 9599be8..0622673 100644 --- a/src/modules/service/serviceBase.ts +++ b/src/modules/service/serviceBase.ts @@ -5,6 +5,7 @@ import { HISTORY_TYPE } from "../../types/type"; import Ainize from "../../ainize"; import Wallet from "../wallet"; import App from "../app"; +import { SetOperation } from "@ainblockchain/ain-js/lib/types"; export default class ServiceBase extends ModuleBase { protected app: App; @@ -20,27 +21,18 @@ export default class ServiceBase extends ModuleBase { } // ADMIN: need defaultAccount - protected async changeBalance(appName: string, requesterAddress: string, type: string, value: number) { + protected async getChangeBalanceOp(appName: string, requesterAddress: string, type: string, value: number) { const balancePath = Path.app(appName).balanceOfUser(requesterAddress); - if (type === "INC") { - const result = await this.ain.db.ref(balancePath).incrementValue({ - value, - gas_price: 500, - nonce: -1 - }); - console.log("incvalue result", result); - }else { - const result = await this.ain.db.ref(balancePath).decrementValue({ - value, - gas_price: 500, - nonce: -1 - }); - console.log("incvalue result", result); + const changeValueOp:SetOperation = { + type: type === "INC" ? "INC_VALUE" : "DEC_VALUE", + ref: balancePath, + value: type, } + return changeValueOp; } // ADMIN: need defaultAccount - protected async writeHistory(appName: string, requesterAddress: string, type: string, amount: number, key: string) { + protected async getWriteHistoryOp(appName: string, requesterAddress: string, type: string, amount: number, key: string) { const historyPath = `${Path.app(appName).historyOfUser(requesterAddress)}/${Date.now()}`; const value = { type, @@ -48,8 +40,7 @@ export default class ServiceBase extends ModuleBase { transferKey: type === HISTORY_TYPE.DEPOSIT ? key : undefined, requestTimestamp: type === HISTORY_TYPE.USAGE ? key : undefined, }; - const wrieHistoryOp = buildSetOperation("SET_VALUE", historyPath, value); - const txBody = this.buildTxBody(wrieHistoryOp); - return await this.sendTransaction(txBody); + const writeHistoryOp = buildSetOperation("SET_VALUE", historyPath, value); + return writeHistoryOp; } } diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index 5d63efa..f305dc1 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -1,3 +1,4 @@ +import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../../constants"; import { HISTORY_TYPE, RESPONSE_STATUS } from "../../types/type"; import { buildSetOperation } from "../../utils/builder"; @@ -41,12 +42,16 @@ export default class UseService extends ServiceBase{ status, data: responseData, } + const ops:SetOperation[] = []; const responseOp = buildSetOperation("SET_VALUE", responsePath, responseValue); - const txbody = this.buildTxBody(responseOp); - await this.sendTransaction(txbody); + ops.push(responseOp); if (status === RESPONSE_STATUS.SUCCESS) { - await this.changeBalance(appName, requesterAddress, 'DEC', amount); - await this.writeHistory(appName, requesterAddress, HISTORY_TYPE.USAGE, amount, requestKey); + const changeBalanceOp = await this.getChangeBalanceOp(appName, requesterAddress, 'DEC', amount); + const writeHistoryOp = await this.getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.USAGE, amount, requestKey); + ops.push(changeBalanceOp); + ops.push(writeHistoryOp); } + const txBody = this.buildTxBody(ops); + return await this.sendTransaction(txBody); } } \ No newline at end of file From e42a87c6b9d6b6123cd941958949de35c8d300a0 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 6 Sep 2023 13:48:07 +0900 Subject: [PATCH 077/235] refactor: batch --- src/modules/service/depositService.ts | 9 +++++++-- src/modules/service/useService.ts | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index ce5b871..1f73edc 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -27,7 +27,12 @@ export default class DepositService extends ServiceBase { } async handleDeposit(appName: string, transferKey: string, transferValue: number, requesterAddress: string) { - await this.changeBalance(appName, requesterAddress, "INC", transferValue); - await this.writeHistory(appName, requesterAddress, HISTORY_TYPE.DEPOSIT, transferValue, transferKey); + const ops: SetOperation[] = []; + const changeBalanceOp = await this.getChangeBalanceOp(appName, requesterAddress, "INC", transferValue); + ops.push(changeBalanceOp); + const writeHistoryOp = await this.getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.DEPOSIT, transferValue, transferKey); + ops.push(writeHistoryOp); + const txBody = this.buildTxBody(ops); + return await this.wallet.sendTxWithAddress(txBody); } } diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index f305dc1..a88a658 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -13,7 +13,7 @@ export default class UseService extends ServiceBase{ } const requestOp = buildSetOperation("SET_VALUE", requestPath, requestData); const txBody = this.buildTxBody(requestOp); - await this.sendTransaction(txBody); + await this.wallet.sendTxWithAddress(txBody, requesterAddress); return requestKey; } @@ -52,6 +52,6 @@ export default class UseService extends ServiceBase{ ops.push(writeHistoryOp); } const txBody = this.buildTxBody(ops); - return await this.sendTransaction(txBody); + return await this.wallet.sendTxWithAddress(txBody); } } \ No newline at end of file From 72a15d6ae48c7fda0978b33bc9c1e427cd41dc25 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 6 Sep 2023 13:51:56 +0900 Subject: [PATCH 078/235] docs: add jsdoc example --- src/modules/app.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/app.ts b/src/modules/app.ts index cccb81e..48c4163 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -82,6 +82,12 @@ const defaultAppFunctions = (appName: string) => { } export default class App extends ModuleBase { + /** + * Create App for your AI Service on AI Network. + * @param {string} appName - The name of app you will create. + * @param {setDefaultFlag} setDefaultFlag - Set true which you wan to set config as default. + * @returns result of transaction. + */ async create(appName: string, setDefaultFlag?: setDefaultFlag) { if (!setDefaultFlag) setDefaultFlag = { triggerFuncton: true, billingConfig: true }; From 42b278dbac4aff58059c06c63951b6451eba8bea Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 6 Sep 2023 15:28:22 +0900 Subject: [PATCH 079/235] fix: remove packgae-lock.json --- package-lock.json | 6172 --------------------------------------------- 1 file changed, 6172 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 24bb72e..0000000 --- a/package-lock.json +++ /dev/null @@ -1,6172 +0,0 @@ -{ - "name": "@ainize-team/ainize-sdk", - "version": "0.0.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@ainize-team/ainize-sdk", - "version": "0.0.1", - "license": "MIT", - "dependencies": { - "@ainblockchain/ain-js": "^1.3.5", - "axios": "^0.26.1", - "express": "^4.18.2", - "fast-json-stable-stringify": "^2.1.0", - "lodash": "^4.17.21", - "node-cache": "^5.1.2" - }, - "devDependencies": { - "@types/express": "^4.17.17", - "@types/jest": "^27.4.1", - "@types/lodash": "^4.14.197", - "jest": "^27.5.1", - "ts-jest": "^27.1.4", - "typedoc": "^0.23.17", - "typedoc-plugin-remove-references": "^0.0.6", - "typedoc-plugin-rename-defaults": "^0.6.4", - "typedoc-theme-hierarchy": "^3.0.0", - "typescript": "^4.6.3" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@ainblockchain/ain-js": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@ainblockchain/ain-js/-/ain-js-1.6.0.tgz", - "integrity": "sha512-REzTJAf8w2TIsJLH7DhKWJF+kxfgMnCCwzWaeD4rYAv4TeD70PhFmYDrDMuy/qZd5KKMXqMigiU9PLWbiu8a7A==", - "license": "ISC", - "dependencies": { - "@ainblockchain/ain-util": "^1.1.9", - "@types/node": "^12.7.3", - "@types/randombytes": "^2.0.0", - "@types/semver": "^7.3.4", - "axios": "^0.21.4", - "bip39": "^3.0.2", - "browserify-cipher": "^1.0.1", - "eventemitter3": "^4.0.0", - "hdkey": "^1.1.1", - "lodash": "^4.17.20", - "node-seal": "^4.5.7", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "scryptsy": "^2.1.0", - "semver": "^6.3.0", - "url-parse": "^1.4.7", - "uuid": "^3.3.3", - "ws": "^8.2.3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@ainblockchain/ain-js/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "license": "MIT" - }, - "node_modules/@ainblockchain/ain-js/node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, - "node_modules/@ainblockchain/ain-util": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@ainblockchain/ain-util/-/ain-util-1.1.9.tgz", - "integrity": "sha512-u3q0h0zwWk+vzZ6VpBZiagVKJbNw/Dw4LVjBAhOvgPCx/E3jHHQCufIMDGqD4wjeBuHVtTAQyMTv7LRPSZFBGg==", - "license": "MPL-2.0", - "dependencies": { - "bip39": "^3.0.4", - "bn.js": "^4.11.8", - "browserify-cipher": "^1.0.1", - "eccrypto": "^1.1.6", - "fast-json-stable-stringify": "^2.0.0", - "hdkey": "^2.0.1", - "keccak": "^2.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "rlp": "^2.2.2", - "safe-buffer": "^5.1.2", - "scryptsy": "^2.1.0", - "secp256k1": "^3.6.2", - "uuid": "^3.3.3", - "varuint-bitcoin": "^1.1.0" - } - }, - "node_modules/@ainblockchain/ain-util/node_modules/hdkey": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-2.1.0.tgz", - "integrity": "sha512-i9Wzi0Dy49bNS4tXXeGeu0vIcn86xXdPQUpEYg+SO1YiO8HtomjmmRMaRyqL0r59QfcD4PfVbSF3qmsWFwAemA==", - "license": "MIT", - "dependencies": { - "bs58check": "^2.1.2", - "ripemd160": "^2.0.2", - "safe-buffer": "^5.1.1", - "secp256k1": "^4.0.0" - } - }, - "node_modules/@ainblockchain/ain-util/node_modules/hdkey/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, - "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/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.22.13", - "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, - "license": "MIT", - "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, - "license": "MIT", - "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, - "license": "MIT", - "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, - "license": "MIT" - }, - "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, - "license": "MIT", - "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, - "license": "MIT", - "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, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", - "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.11.tgz", - "integrity": "sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", - "@babel/helper-compilation-targets": "^7.22.10", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.11", - "@babel/parser": "^7.22.11", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.11", - "@babel/types": "^7.22.11", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", - "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.10", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz", - "integrity": "sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", - "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", - "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.11.tgz", - "integrity": "sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.11", - "@babel/types": "^7.22.11" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", - "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "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, - "license": "MIT", - "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, - "license": "MIT", - "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, - "license": "MIT", - "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, - "license": "MIT" - }, - "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, - "license": "MIT", - "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, - "license": "MIT", - "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, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.13.tgz", - "integrity": "sha512-3l6+4YOvc9wx7VlCSw4yQfcBo01ECA8TicQfbnCPuCEpRQrf+gTUyGdxNw+pyTUyywp6JRD1w0YQs9TpBXYlkw==", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", - "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz", - "integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.11", - "@babel/types": "^7.22.11", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", - "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", - "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/core": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", - "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^27.5.1", - "@jest/reporters": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^27.5.1", - "jest-config": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-resolve-dependencies": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "jest-watcher": "^27.5.1", - "micromatch": "^4.0.4", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/environment": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", - "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", - "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@sinonjs/fake-timers": "^8.0.1", - "@types/node": "*", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", - "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/types": "^27.5.1", - "expect": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", - "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "slash": "^3.0.0", - "source-map": "^0.6.0", - "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/source-map": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", - "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9", - "source-map": "^0.6.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", - "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", - "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^27.5.1", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-runtime": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", - "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.5.1", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-util": "^27.5.1", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/types": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", - "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", - "license": "MIT", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@sinonjs/commons": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", - "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/@types/babel__core": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", - "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz", - "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/body-parser": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", - "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", - "dev": true, - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", - "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/express": { - "version": "4.17.17", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", - "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", - "dev": true, - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.36", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.36.tgz", - "integrity": "sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", - "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/http-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==", - "dev": true - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jest": { - "version": "27.5.2", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz", - "integrity": "sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-matcher-utils": "^27.0.0", - "pretty-format": "^27.0.0" - } - }, - "node_modules/@types/lodash": { - "version": "4.14.197", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.197.tgz", - "integrity": "sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g==", - "dev": true - }, - "node_modules/@types/mime": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", - "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.5.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.7.tgz", - "integrity": "sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==", - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", - "dev": true - }, - "node_modules/@types/randombytes": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/randombytes/-/randombytes-2.0.0.tgz", - "integrity": "sha512-bz8PhAVlwN72vqefzxa14DKNT8jK/mV66CSjwdVQM/k3Th3EPKfUtdMniwZgMedQTFuywAsfjnZsg+pEnltaMA==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/range-parser": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", - "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", - "dev": true - }, - "node_modules/@types/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==", - "license": "MIT" - }, - "node_modules/@types/send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", - "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==", - "dev": true, - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/@types/serve-static": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz", - "integrity": "sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==", - "dev": true, - "dependencies": { - "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" - } - }, - "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/yargs": { - "version": "16.0.5", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz", - "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", - "dev": true, - "license": "MIT" - }, - "node_modules/abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-globals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", - "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" - } - }, - "node_modules/acorn-globals/node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "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, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "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", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "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==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "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==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "license": "MIT" - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.14.8" - } - }, - "node_modules/babel-jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", - "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^27.5.1", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", - "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", - "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-plugin-jest-hoist": "^27.5.1", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.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==", - "dev": true, - "license": "MIT" - }, - "node_modules/base-x": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", - "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "license": "MIT", - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, - "node_modules/bip39": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", - "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", - "license": "ISC", - "dependencies": { - "@noble/hashes": "^1.2.0" - } - }, - "node_modules/bip66": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", - "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==", - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "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==", - "license": "MIT" - }, - "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "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, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "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==", - "license": "MIT" - }, - "node_modules/browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true, - "license": "BSD-2-Clause" - }, - "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==", - "license": "MIT", - "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/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==", - "license": "MIT", - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/browserslist": { - "version": "4.21.10", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", - "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001517", - "electron-to-chromium": "^1.4.477", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.11" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bs-logger": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", - "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-json-stable-stringify": "2.x" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", - "license": "MIT", - "dependencies": { - "base-x": "^3.0.2" - } - }, - "node_modules/bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", - "license": "MIT", - "dependencies": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "license": "MIT" - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "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", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001524", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001524.tgz", - "integrity": "sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", - "dev": true, - "license": "MIT" - }, - "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, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", - "dev": true, - "license": "MIT" - }, - "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, - "license": "MIT", - "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, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true, - "license": "MIT" - }, - "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "license": "MIT" - }, - "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==", - "license": "MIT", - "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/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==", - "license": "MIT", - "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/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", - "dev": true, - "license": "MIT" - }, - "node_modules/cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", - "dev": true, - "license": "MIT", - "dependencies": { - "cssom": "~0.3.6" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true, - "license": "MIT" - }, - "node_modules/data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decimal.js": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", - "dev": true, - "license": "MIT" - }, - "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, - "license": "MIT" - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/des.js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", - "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/diff-sequences": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", - "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "webidl-conversions": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/domexception/node_modules/webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/drbg.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", - "integrity": "sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g==", - "license": "MIT", - "dependencies": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/eccrypto": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/eccrypto/-/eccrypto-1.1.6.tgz", - "integrity": "sha512-d78ivVEzu7Tn0ZphUUaL43+jVPKTMPFGtmgtz1D0LrFn7cY3K8CdrvibuLz2AAkHBLKZtR8DMbB2ukRYFk987A==", - "hasInstallScript": true, - "license": "CC0-1.0", - "dependencies": { - "acorn": "7.1.1", - "elliptic": "6.5.4", - "es6-promise": "4.2.8", - "nan": "2.14.0" - }, - "optionalDependencies": { - "secp256k1": "3.7.1" - } - }, - "node_modules/eccrypto/node_modules/nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "license": "MIT" - }, - "node_modules/eccrypto/node_modules/secp256k1": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", - "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.4.1", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/eccrypto/node_modules/secp256k1/node_modules/nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", - "license": "MIT", - "optional": true - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "license": "MIT" - }, - "node_modules/electron-to-chromium": { - "version": "1.4.505", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.505.tgz", - "integrity": "sha512-0A50eL5BCCKdxig2SsCXhpuztnB9PfUgRMojj5tMvt8O54lbwz3t6wNgnpiTRosw5QjlJB7ixhVyeg8daLQwSQ==", - "dev": true, - "license": "ISC" - }, - "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==", - "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/emittery": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", - "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "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, - "license": "MIT" - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "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, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "license": "MIT" - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "license": "MIT" - }, - "node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "license": "MIT" - }, - "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==", - "license": "MIT", - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "license": "MIT", - "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" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", - "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "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==", - "license": "MIT" - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dev": true, - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "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==", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "license": "MIT" - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.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==", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "license": "ISC", - "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/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "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, - "license": "ISC" - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "license": "MIT", - "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==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/hdkey": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-1.1.2.tgz", - "integrity": "sha512-PTQ4VKu0oRnCrYfLp04iQZ7T2Cxz0UsEXYauk2j8eh6PJXCpbXuCFhOmtIFtbET0i3PMWmHN9J11gU8LEgUljQ==", - "license": "MIT", - "dependencies": { - "bs58check": "^2.1.2", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.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==", - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-encoding": "^1.0.5" - }, - "engines": { - "node": ">=10" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "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==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.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==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "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==", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "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, - "license": "MIT" - }, - "node_modules/is-core-module": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true, - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", - "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^27.5.1", - "import-local": "^3.0.2", - "jest-cli": "^27.5.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz", - "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "execa": "^5.0.0", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-circus": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", - "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "expect": "^27.5.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-cli": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz", - "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "prompts": "^2.0.1", - "yargs": "^16.2.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz", - "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.8.0", - "@jest/test-sequencer": "^27.5.1", - "@jest/types": "^27.5.1", - "babel-jest": "^27.5.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.1", - "graceful-fs": "^4.2.9", - "jest-circus": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-jasmine2": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-diff": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", - "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", - "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-each": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz", - "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-environment-jsdom": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", - "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1", - "jsdom": "^16.6.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", - "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", - "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", - "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/graceful-fs": "^4.1.2", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^27.5.1", - "jest-serializer": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "micromatch": "^4.0.4", - "walker": "^1.0.7" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-jasmine2": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", - "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.5.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-leak-detector": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", - "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", - "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", - "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.5.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-mock": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", - "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", - "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", - "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", - "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-snapshot": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-runner": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz", - "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^27.5.1", - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-leak-detector": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz", - "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/globals": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-serializer": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", - "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz", - "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.7.2", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^27.5.1", - "graceful-fs": "^4.2.9", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", - "natural-compare": "^1.4.0", - "pretty-format": "^27.5.1", - "semver": "^7.3.2" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-snapshot/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==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", - "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-validate": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", - "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", - "leven": "^3.1.0", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-watcher": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz", - "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "jest-util": "^27.5.1", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/jest-worker/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, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "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, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsdom": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", - "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", - "dev": true, - "license": "MIT", - "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", - "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jsdom/node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/jsdom/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "dev": true, - "license": "MIT", - "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/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "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, - "license": "MIT" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true, - "license": "MIT" - }, - "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, - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/keccak": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", - "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "bindings": "^1.5.0", - "inherits": "^2.0.4", - "nan": "^2.14.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=5.12.0" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "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, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "license": "MIT" - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/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==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "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==", - "dev": true, - "license": "ISC" - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tmpl": "1.0.5" - } - }, - "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==", - "dev": true, - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 12" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "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==", - "license": "MIT", - "engines": { - "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==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "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==", - "license": "ISC" - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "license": "MIT" - }, - "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, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", - "license": "MIT" - }, - "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==", - "license": "MIT", - "dependencies": { - "clone": "2.x" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/node-gyp-build": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", - "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", - "license": "MIT", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-seal": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/node-seal/-/node-seal-4.6.4.tgz", - "integrity": "sha512-ZQU63Ikt9/n9CXueEltszdAxUPHWpfbExcoux6Ktn2W3lxWc7jG2yx3p0ok34LzOgKOfytUSwHCxYmabAm3VPQ==", - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "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==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "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, - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "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, - "license": "MIT", - "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/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true, - "license": "MIT" - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "license": "MIT" - }, - "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "license": "MIT", - "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/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true, - "license": "MIT" - }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "license": "MIT" - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true, - "license": "MIT" - }, - "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==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "license": "MIT" - }, - "node_modules/resolve": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", - "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", - "dev": true, - "license": "MIT", - "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-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==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "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, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve.exports": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.1.tgz", - "integrity": "sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/rlp": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", - "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", - "license": "MPL-2.0", - "dependencies": { - "bn.js": "^5.2.0" - }, - "bin": { - "rlp": "bin/rlp" - } - }, - "node_modules/rlp/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==", - "license": "MIT" - }, - "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" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" - }, - "node_modules/saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", - "dev": true, - "license": "ISC", - "dependencies": { - "xmlchars": "^2.2.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/scryptsy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", - "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==", - "license": "MIT" - }, - "node_modules/secp256k1": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", - "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.5.2", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "node_modules/send/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==", - "license": "MIT" - }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "license": "MIT", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "license": "ISC" - }, - "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==", - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "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==", - "dev": true, - "license": "MIT", - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/shiki": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz", - "integrity": "sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g==", - "dev": true, - "license": "MIT", - "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.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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, - "license": "ISC" - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true, - "license": "MIT" - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "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, - "license": "MIT", - "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", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "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, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true, - "license": "MIT" - }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/throat": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.2.tgz", - "integrity": "sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tough-cookie/node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ts-jest": { - "version": "27.1.5", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.5.tgz", - "integrity": "sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^27.0.0", - "json5": "2.x", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "20.x" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@types/jest": "^27.0.0", - "babel-jest": ">=27.0.0 <28", - "jest": "^27.0.0", - "typescript": ">=3.8 <5.0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@types/jest": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } - } - }, - "node_modules/ts-jest/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==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "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, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/typedoc": { - "version": "0.23.28", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz", - "integrity": "sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "lunr": "^2.3.9", - "marked": "^4.2.12", - "minimatch": "^7.1.3", - "shiki": "^0.14.1" - }, - "bin": { - "typedoc": "bin/typedoc" - }, - "engines": { - "node": ">= 14.14" - }, - "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x" - } - }, - "node_modules/typedoc-plugin-remove-references": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedoc-plugin-remove-references/-/typedoc-plugin-remove-references-0.0.6.tgz", - "integrity": "sha512-QoyHpopznnJbWW/9JT2NHSK+eTmyShkPYebwe5ZnO8aohPLc5okk4puWUDXnNh2Tn7cJU8U3t1tEMO6ghbwE8Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/typedoc-plugin-rename-defaults": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/typedoc-plugin-rename-defaults/-/typedoc-plugin-rename-defaults-0.6.6.tgz", - "integrity": "sha512-8TCDrxMG8cR0IRhMZbxMCXlmQrEwFFH0she4eHsaUGd1TPfrkk8GLO4n2qlSISd66OtT28e17ysiVZPbQnLGMg==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "typedoc": "0.22.x || 0.23.x || 0.24.x || 0.25.x" - } - }, - "node_modules/typedoc-theme-hierarchy": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/typedoc-theme-hierarchy/-/typedoc-theme-hierarchy-3.2.1.tgz", - "integrity": "sha512-Spum9ccW7bc++c8dLFNRh+9hvG+REntLQCNUb74pz28qcuhPOtxOuKteM/4aJbJDjw/9mORXZZYSToMGb+MrYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fs-extra": "^10.0.0" - }, - "peerDependencies": { - "typedoc": "^0.23.6" - } - }, - "node_modules/typedoc/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/typedoc/node_modules/minimatch": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", - "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.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==", - "license": "MIT" - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "license": "MIT", - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/v8-to-istanbul": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", - "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", - "dev": true, - "license": "ISC", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/v8-to-istanbul/node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">= 8" - } - }, - "node_modules/varuint-bitcoin": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz", - "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==", - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.1" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "browser-process-hrtime": "^1.0.0" - } - }, - "node_modules/w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "xml-name-validator": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=10.4" - } - }, - "node_modules/whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "0.4.24" - } - }, - "node_modules/whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true, - "license": "MIT" - }, - "node_modules/whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "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, - "license": "MIT", - "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", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "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==", - "license": "MIT", - "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/xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true, - "license": "MIT" - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "license": "ISC", - "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==", - "dev": true, - "license": "ISC" - }, - "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, - "license": "MIT", - "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/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, - "license": "ISC", - "engines": { - "node": ">=10" - } - } - } -} From 4d47d3045935af4a710cfe2cfd741e1ce42b4140 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 6 Sep 2023 15:28:37 +0900 Subject: [PATCH 080/235] feat: add handleTxResultWrapper --- src/modules/moduleBase.ts | 29 ++++++++++++++++++++++++++++- src/types/type.ts | 12 ++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index 58eb601..809536a 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -1,6 +1,7 @@ import Ain from "@ainblockchain/ain-js"; import { SetOperation, TransactionBody } from "@ainblockchain/ain-js/lib/types"; import Ainize from "../ainize"; +import { txResult } from "../types/type"; export default class ModuleBase { protected ain: Ain; @@ -20,7 +21,33 @@ export default class ModuleBase { } } - protected async sendTransaction(txBody: TransactionBody) { + private async _sendTransaction(txBody: TransactionBody) { return await this.ain.sendTransaction(txBody); } + + private isFailedTxResult(result: txResult) { + if (!result) return true; + if (result.result_list) { + return Object.values(result.result_list).some( + (result: { code: number }) => result.code !== 0 + ); + } + return result.code !== 0; + } + + private handleTxResultWrapper(operation: Function) { + return async (args: any) => { + const res = await operation(args[0]); + const { tx_hash } = res.result; + const { code, message } = res.result.result; + if (this.isFailedTxResult(res.result.result)) { + throw new Error( + `Failed to send transaction (${tx_hash}).\n - Code: ${code}\n - Error: ${message}` + ); + } + return tx_hash; + } + } + + protected sendTransaction = this.handleTxResultWrapper(this._sendTransaction); } diff --git a/src/types/type.ts b/src/types/type.ts index 3b3e9dc..4c75f4f 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -34,3 +34,15 @@ export enum HISTORY_TYPE { DEPOSIT = "DEPOSIT", USAGE = "USAGE", } + +export type txResult = { + gas_amount_total: object; + gas_cost_total: number; + code?: number; + result_list?: { + [index: string]: { + code: number; + bandwidth_gas_amount: number; + }; + }; +}; \ No newline at end of file From d66e6d1f8a44301bf8645fb3f1aa1691d28f309b Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 6 Sep 2023 15:51:25 +0900 Subject: [PATCH 081/235] fix: path --- src/constants.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 16b9cb6..4057ea5 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -5,14 +5,14 @@ export const getBlockChainEndpoint = (chainId:number) =>{ export const Path = { app: (appName: string): any => { return { - root: `/apps/${appName}`, - balance: `${Path.app(appName).root}/balance`, - balanceOfUser: (userAddress: string) => `${Path.app(appName).balance}/${userAddress}/balance`, - historyOfUser: (userAddress: string) => `${Path.app(appName).balance}/${userAddress}/history`, - deposit: `${Path.app(appName).root}/deposit`, - depositOfUser: (userAddress: string) => `${Path.app(appName).deposit}/${userAddress}`, - billingConfig: `${Path.app(appName).root}/billingConfig`, - service: (serviceName: string) => `${Path.app(appName).root}/service/${serviceName}`, + root: () => `/apps/${appName}`, + balance: () => `${Path.app(appName).root()}/balance`, + balanceOfUser: (userAddress: string) => `${Path.app(appName).balance()}/${userAddress}/balance`, + historyOfUser: (userAddress: string) => `${Path.app(appName).balance()}/${userAddress}/history`, + deposit: () => `${Path.app(appName).root()}/deposit`, + depositOfUser: (userAddress: string) => `${Path.app(appName).deposit()}/${userAddress}`, + billingConfig: () => `${Path.app(appName).root()}/billingConfig`, + service: (serviceName: string) => `${Path.app(appName).root()}/service/${serviceName}`, userOfService: (serviceName: string, userAddress: string) => `${Path.app(appName).service(serviceName)}/${userAddress}`, request: (serviceName: string, userAddress: string, requestKey: string) => From 2756876b4f5963ecbef6a677539de61d2904d8d1 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 6 Sep 2023 16:07:34 +0900 Subject: [PATCH 082/235] doc: tsdoc --- src/handlers/handler.ts | 60 +++++++++++++++++++++++++---------- src/middlewares/middleware.ts | 8 +++++ src/modules/admin.ts | 28 ++++++++++++++-- src/modules/service.ts | 16 ++++++++++ src/modules/wallet.ts | 29 +++++++++++++++-- 5 files changed, 119 insertions(+), 22 deletions(-) diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 6ee3a2d..2d370f7 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -5,6 +5,11 @@ import ModuleBase from "../modules/moduleBase"; export default class Handler extends ModuleBase { isConnected: boolean = false; subscribeTable:any = {}; + + /** + * connect to ai network event node. you should connect before subscibe. it will auto reconnect when disconnected. + * @returns nothing. + */ async connect() { await this.ain.em.connect({ handshakeTimeout: HANDLER_TIMEOUT, // Timeout in milliseconds for the web socket handshake request. @@ -18,14 +23,23 @@ export default class Handler extends ModuleBase { this.connect(); } - async subscribe(requester:string, appName: string, serviceName: string, callback: (valueChangedEvent: any) => any) { - if (this.checkSubscribeTableExists(requester, appName, serviceName)){ + /** + * subscribe to specific service reponse. you can handle reponse with callback function. + * you should connect before subscibe. + * @param {string} userAddress - address of account you request with. + * @param {string} appName - app name you want to subscribe. + * @param {string} serviceName - service name you want to subscribe. + * @param {Function(valueChangedEvent: any)} callback - a callback function to handle response. it will be called when response is written. + * @returns subscribeId. + */ + async subscribe(userAddress:string, appName: string, serviceName: string, callback: (valueChangedEvent: any) => any) { + if (this.checkSubscribeTableExists(userAddress, appName, serviceName)){ throw new Error("Already subscribed"); } - const filterId = await this.ain.em.subscribe( + const subscribeId = await this.ain.em.subscribe( "VALUE_CHANGED", { - path: Path.app(appName).response(serviceName, requester, "$requestKey"), + path: Path.app(appName).response(serviceName, userAddress, "$requestKey"), event_source: "USER", }, (valueChangedEvent) => { @@ -35,33 +49,45 @@ export default class Handler extends ModuleBase { throw new Error(err.message); }, ); - this.addToSubscribeTable(requester, appName, serviceName, filterId); + this.addToSubscribeTable(userAddress, appName, serviceName, subscribeId); + return subscribeId; } - private checkSubscribeTableExists(requester:string, appName:string, serviceName: string) { - return _.has(this.subscribeTable, [requester, appName, serviceName]); + private checkSubscribeTableExists(userAddress:string, appName:string, serviceName: string) { + return _.has(this.subscribeTable, [userAddress, appName, serviceName]); } - private addToSubscribeTable(requester:string, appName: string, serviceName: string, filterId: string) { - _.set(this.subscribeTable, [requester, appName], {serviceName:filterId}); + private addToSubscribeTable(userAddress:string, appName: string, serviceName: string, filterId: string) { + _.set(this.subscribeTable, [userAddress, appName], {serviceName:filterId}); } - getSubscribeList(requester?: string) { - if (!requester) return this.subscribeTable; - return this.subscribeTable[requester]; + /** + * get subscribe list of userAddress. if you don't set userAddress, it will return all subscribe list. + * @param {string=} userAddress - address of account you want to get subscribe list. + * @returns result of transaction. + */ + getSubscribeList(userAddress?: string) { + if (!userAddress) return this.subscribeTable; + return this.subscribeTable[userAddress]; } - - unsubscribe(requester:string, appName: string, serviceName: string) { - if (!this.checkSubscribeTableExists(requester, appName, serviceName)) { + /** + * unsubscribe to specific service reponse. + * @param {string} userAddress - address of account you want to unsubscribe. + * @param {string} appName - app name you want to unsubscribe. + * @param {string} serviceName - service name you want to unsubscribe. + * @returns true if successfuly unsubscribed. + */ + unsubscribe(userAddress:string, appName: string, serviceName: string) { + if (!this.checkSubscribeTableExists(userAddress, appName, serviceName)) { throw new Error("Not subscribed"); } this.ain.em.unsubscribe( - this.subscribeTable[requester][appName][serviceName], + this.subscribeTable[userAddress][appName][serviceName], (err)=>{ if (err) { throw new Error(err.message); } else { - this.subscribeTable[requester][appName][serviceName] = null; + this.subscribeTable[userAddress][appName][serviceName] = null; return true; } }); diff --git a/src/middlewares/middleware.ts b/src/middlewares/middleware.ts index 9978801..45c4a69 100644 --- a/src/middlewares/middleware.ts +++ b/src/middlewares/middleware.ts @@ -7,6 +7,14 @@ export default class Middleware { this.cache = cache; } + /** + * middleware for AI network trigger call. it will filter duplicated request triggered by same transaction. + * it will pass request which is not from AI network trigger. + * @param {Request} request - request data + * @param {Res} amount - response data + * @param {NextFunction} next - next function + * @returns null if if request is duplicated. + */ triggerDuplicateFilter = (req: Request, res: Response, next: NextFunction) => { if (req.body.fid === undefined){ next(); diff --git a/src/modules/admin.ts b/src/modules/admin.ts index 4da981c..5936af3 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -13,7 +13,12 @@ export default class Admin extends ModuleBase { this.depositService = depositService; this.useService = useService; } - + + /** + * handle deposit and write history of requester. you should match this function with deposit trigger. + * @param {Request} req - request data from deposit trigger. if req data is not from trigger function, it will throw error. + * @returns result of transaction. + */ async deposit(req: Request) { const transferKey = req.body.valuePath[4]; const transferValue = req.body.value; @@ -22,15 +27,32 @@ export default class Admin extends ModuleBase { return await this.depositService.handleDeposit(appName, transferKey, transferValue,requesterAddress); } + /** + * check cost of request and check if account can pay. you should use this function before send or handle request. + * if you don't set address, it will use default account's address. + * @param {string} appName - app name you want to request service to. + * @param {string} prompt - data you want to request to service . + * @param {string=} userAddress - address of account you want to check balance. you should set default account if you don't provide address. + * @returns result cost of service. it throws error when user can't pay. + */ async checkCostAndBalance(appName: string, prompt: string, userAddress?: string) { return await this.useService.calculateCostAndCheckBalance(appName, prompt, userAddress); } - async writeSuccessResponse(req:Request, amount: number, responseData: string ) { + /** + * write response. then change balance of requester and write history of user balance if response status is success. + * you should match this function with service trigger. + * @param {Request} request - request data from request trigger. if req data is not from trigger function, it will throw error. + * @param {number} amount - cost of service. calculate it with checkCostAndBalance function. + * @param {string} responseData - data you want to response to requester. + * @param {RESPONSE_STATUS} status - status of response. if status is success, it will change balance of requester and write history of user balance. + * @returns result of transaction. + */ + async writeResponse(req:Request, amount: number, responseData: string, status: RESPONSE_STATUS ) { const appName = req.body.valuePath[1]; const serviceName = req.body.valuePath[3]; const requesterAddress = req.body.auth.addr; const requestKey = req.body.valuePath[6]; - return await this.useService.writeResponse(RESPONSE_STATUS.SUCCESS, appName, serviceName, requesterAddress, requestKey, responseData, amount); + return await this.useService.writeResponse(status , appName, serviceName, requesterAddress, requestKey, responseData, amount); } } diff --git a/src/modules/service.ts b/src/modules/service.ts index 2332110..6bf3438 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -12,10 +12,26 @@ export default class Service extends ModuleBase { this.useService = useService; } + /** + * deposit AIN to app. transfer AIN to depositAddress and write deposit request to app. + * if you don't set address, it will use default account's address. + * @param {string} appName - app name you want to deposit to. + * @param {number} amount - amount of AIN you want to deposit. + * @param {string=} signerAddress - address of account you want to use for deposit. you should set default account if you don't provide address. + * @returns result of transaction. + */ async deposit(appName: string, amount: number, userAddress?: string) { return await this.depositService.requestDeposit(appName, amount, userAddress); } + /** + * request service to app. you can use handler to get response. if you don't set address, it will use default account's address. + * @param {string} appName - app name you want to request service to. + * @param {string} serviceName - service name you want to request. + * @param {string} prompt - data you want to request to service . + * @param {string=} userAddress - address of account you want to use for request. you should set default account if you don't provide address. + * @returns requestKey. you can use it to get response by handler. + */ async writeRequest(appName: string, serviceName: string, prompt: string, userAddress?: string) { await this.useService.calculateCostAndCheckBalance(appName, prompt, userAddress); return await this.useService.writeRequest(appName, serviceName, prompt, userAddress); diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index 696d07d..e5cc711 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -1,3 +1,4 @@ +import { TransactionInput } from "@ainblockchain/ain-js/lib/types"; import Ainize from "../ainize"; import ModuleBase from "./moduleBase"; @@ -8,7 +9,10 @@ export default class Wallet extends ModuleBase{ this.ain.wallet.addAndSetDefaultAccount(privateKey); } } - + /** + * Get defult AI network blockchain account information set in ainize. + * @returns default account's address. + */ getDefaultAccount() { if (!this.ain.wallet.defaultAccount) { throw new Error("You need to set default account."); @@ -16,15 +20,30 @@ export default class Wallet extends ModuleBase{ return this.ain.wallet.defaultAccount.address; } + /** + * set default AI network account in ainize. this account is used for AI Network transaction. + * @param {string} privateKey - private Key of AI network account you want to set default. + * @returns address of setted default AI network account. + */ setDefaultAccount(privateKey: string) { this.ain.wallet.addAndSetDefaultAccount(privateKey); return this.getDefaultAccount(); } + /** + * add AI network account at ainize. once you add account, you can use it for AI Network transaction with address. + * @param {string} privateKey - privateK Key of AI network account you want to add. + * @returns address of added AI network account. + */ addAccount(privateKey: string) { return this.ain.wallet.add(privateKey); } + /** + *get AIN balance of your account. if you don't set address, it will return default account's balance. + * @param {string=} address - address of account you want to get balance. + * @returns balance of your account. + */ getAinBalance(address?: string) { if (!address) { address = this.getDefaultAccount(); @@ -32,7 +51,13 @@ export default class Wallet extends ModuleBase{ return this.ain.wallet.getBalance(address); } - async sendTxWithAddress(txBody: any, signerAddress?: string) { + /** + * send transaction to AI Network. if you don't set address, it will use default account's address. + * @param {TransactionInput} txBody - transaction body you want to send. + * @param {string=} signerAddress - address of account you want to use for sign transaction. you should set default account if you don't provide address. + * @returns result of transaction. + */ + async sendTxWithAddress(txBody: TransactionInput, signerAddress?: string) { if (!signerAddress) { signerAddress = this.getDefaultAccount(); } From ba692e14249e5d51ab7604288e3286231a8f7a12 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 6 Sep 2023 17:11:29 +0900 Subject: [PATCH 083/235] 0.0.2 --- 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 24bb72e..d968966 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ainize-team/ainize-sdk", - "version": "0.0.1", + "version": "0.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ainize-team/ainize-sdk", - "version": "0.0.1", + "version": "0.0.2", "license": "MIT", "dependencies": { "@ainblockchain/ain-js": "^1.3.5", diff --git a/package.json b/package.json index a0804b7..7f7310e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ainize-team/ainize-sdk", - "version": "0.0.1", + "version": "0.0.2", "main": "dist/ainize.js", "types": "dist/ainize.d.ts", "scripts": { From 6a4760d18c029a6d0b2586dedf03ef530ad18d6d Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 6 Sep 2023 17:11:33 +0900 Subject: [PATCH 084/235] 1.0.0 --- 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 d968966..17bcdbf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ainize-team/ainize-sdk", - "version": "0.0.2", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ainize-team/ainize-sdk", - "version": "0.0.2", + "version": "1.0.0", "license": "MIT", "dependencies": { "@ainblockchain/ain-js": "^1.3.5", diff --git a/package.json b/package.json index 7f7310e..13f7849 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ainize-team/ainize-sdk", - "version": "0.0.2", + "version": "1.0.0", "main": "dist/ainize.js", "types": "dist/ainize.d.ts", "scripts": { From 331e3ae647461da20dcf6706662b09575288079c Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 6 Sep 2023 17:11:36 +0900 Subject: [PATCH 085/235] 1.1.0 --- 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 17bcdbf..1deb54f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ainize-team/ainize-sdk", - "version": "1.0.0", + "version": "1.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ainize-team/ainize-sdk", - "version": "1.0.0", + "version": "1.1.0", "license": "MIT", "dependencies": { "@ainblockchain/ain-js": "^1.3.5", diff --git a/package.json b/package.json index 13f7849..57683c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ainize-team/ainize-sdk", - "version": "1.0.0", + "version": "1.1.0", "main": "dist/ainize.js", "types": "dist/ainize.d.ts", "scripts": { From b7fea8918e389bb33be9b24dde529990a41026e8 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 6 Sep 2023 17:35:30 +0900 Subject: [PATCH 086/235] fix: tx result wrapper and --- src/modules/moduleBase.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index 809536a..5bb146d 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -37,17 +37,17 @@ export default class ModuleBase { private handleTxResultWrapper(operation: Function) { return async (args: any) => { - const res = await operation(args[0]); - const { tx_hash } = res.result; - const { code, message } = res.result.result; - if (this.isFailedTxResult(res.result.result)) { + const res = await operation(args); + const { tx_hash, result } = res; + if (this.isFailedTxResult(result)) { + // TODO(yoojin): need to add throw error message tx by tx. throw new Error( - `Failed to send transaction (${tx_hash}).\n - Code: ${code}\n - Error: ${message}` + `Failed to send transaction (${tx_hash}).\n` ); } return tx_hash; } } - protected sendTransaction = this.handleTxResultWrapper(this._sendTransaction); + protected sendTransaction = this.handleTxResultWrapper(this._sendTransaction.bind(this)); } From 217d18a0961aa29db387460f019c2133eccc47fd Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 6 Sep 2023 17:35:51 +0900 Subject: [PATCH 087/235] fix: set functions error --- src/modules/app.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 48c4163..76779b8 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -6,7 +6,7 @@ import ModuleBase from "./moduleBase"; // FIXME(yoojin): move to constant. const defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { - const rootRef = Path.app(appName).root; + const rootRef = Path.app(appName).root(); return { root: { ref: rootRef, @@ -81,6 +81,12 @@ const defaultAppFunctions = (appName: string) => { } } +// FIXME(yoojin): move to types. +// NOTE(yoojin): temporary type. service url may be changed to array? +interface TriggerFunctionUrlMap { + [type: string]: string +} + export default class App extends ModuleBase { /** * Create App for your AI Service on AI Network. @@ -88,7 +94,7 @@ export default class App extends ModuleBase { * @param {setDefaultFlag} setDefaultFlag - Set true which you wan to set config as default. * @returns result of transaction. */ - async create(appName: string, setDefaultFlag?: setDefaultFlag) { + async create(appName: string, function_urls: TriggerFunctionUrlMap, setDefaultFlag?: setDefaultFlag) { if (!setDefaultFlag) setDefaultFlag = { triggerFuncton: true, billingConfig: true }; const setRuleOps: SetOperation[] = []; @@ -105,8 +111,8 @@ export default class App extends ModuleBase { if (setDefaultFlag.triggerFuncton) { const defaultFunctions = defaultAppFunctions(appName); - for (const func of Object.values(defaultFunctions)) { - const { ref, function_id, function_type, function_url } = func(appName); + for (const [type, func] of Object.entries(defaultFunctions)) { + const { ref, function_id, function_type, function_url } = func(function_urls[type]); const value = this.buildSetFunctionValue({function_id, function_type, function_url}); const funcOp = buildSetOperation("SET_FUNCTION", ref, value); setFunctionOps.push(funcOp); @@ -138,7 +144,7 @@ export default class App extends ModuleBase { } async getBillingConfig(appName: string): Promise { - return await this.ain.db.ref().getValue(Path.app(appName).billingConfig); + return await this.ain.db.ref().getValue(Path.app(appName).billingConfig()); } async setTriggerFunctions(appName: string, functions: setTriggerFunctionParm[]) { From 5dc72215f8740c8ba2845b82d35d1fd71c72df97 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Thu, 7 Sep 2023 10:25:50 +0900 Subject: [PATCH 088/235] refactor: upper case --- src/handlers/handler.ts | 34 +++++++++++++++++----------------- src/middlewares/middleware.ts | 12 ++++++------ src/modules/admin.ts | 32 ++++++++++++++++---------------- src/modules/service.ts | 24 ++++++++++++------------ src/modules/wallet.ts | 30 +++++++++++++++--------------- 5 files changed, 66 insertions(+), 66 deletions(-) diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 2d370f7..9f17251 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -7,8 +7,8 @@ export default class Handler extends ModuleBase { subscribeTable:any = {}; /** - * connect to ai network event node. you should connect before subscibe. it will auto reconnect when disconnected. - * @returns nothing. + * Connect to ai Network event node. you should connect before subscibe. It will auto reconnect when disconnected. + * @returns Nothing. */ async connect() { await this.ain.em.connect({ @@ -24,13 +24,13 @@ export default class Handler extends ModuleBase { } /** - * subscribe to specific service reponse. you can handle reponse with callback function. - * you should connect before subscibe. - * @param {string} userAddress - address of account you request with. - * @param {string} appName - app name you want to subscribe. - * @param {string} serviceName - service name you want to subscribe. - * @param {Function(valueChangedEvent: any)} callback - a callback function to handle response. it will be called when response is written. - * @returns subscribeId. + * Subscribe to specific service reponse. You can handle reponse with callback function. + * You should connect before subscibe. + * @param {string} userAddress - Address of account you request with. + * @param {string} appName - App name you want to subscribe. + * @param {string} serviceName - Service name you want to subscribe. + * @param {Function(valueChangedEvent: any)} callback - A callback function to handle response. It will be called when response is written. + * @returns SubscribeId. */ async subscribe(userAddress:string, appName: string, serviceName: string, callback: (valueChangedEvent: any) => any) { if (this.checkSubscribeTableExists(userAddress, appName, serviceName)){ @@ -62,20 +62,20 @@ export default class Handler extends ModuleBase { } /** - * get subscribe list of userAddress. if you don't set userAddress, it will return all subscribe list. - * @param {string=} userAddress - address of account you want to get subscribe list. - * @returns result of transaction. + * Get subscribe list of userAddress. If you don't set userAddress, it will return all subscribe list. + * @param {string=} userAddress - Address of account you want to get subscribe list. + * @returns Result of transaction. */ getSubscribeList(userAddress?: string) { if (!userAddress) return this.subscribeTable; return this.subscribeTable[userAddress]; } /** - * unsubscribe to specific service reponse. - * @param {string} userAddress - address of account you want to unsubscribe. - * @param {string} appName - app name you want to unsubscribe. - * @param {string} serviceName - service name you want to unsubscribe. - * @returns true if successfuly unsubscribed. + * Unsubscribe to specific service reponse. + * @param {string} userAddress - Address of account you want to unsubscribe. + * @param {string} appName - App name you want to unsubscribe. + * @param {string} serviceName - Service name you want to unsubscribe. + * @returns True if successfuly unsubscribed. */ unsubscribe(userAddress:string, appName: string, serviceName: string) { if (!this.checkSubscribeTableExists(userAddress, appName, serviceName)) { diff --git a/src/middlewares/middleware.ts b/src/middlewares/middleware.ts index 45c4a69..79d1f9e 100644 --- a/src/middlewares/middleware.ts +++ b/src/middlewares/middleware.ts @@ -8,12 +8,12 @@ export default class Middleware { } /** - * middleware for AI network trigger call. it will filter duplicated request triggered by same transaction. - * it will pass request which is not from AI network trigger. - * @param {Request} request - request data - * @param {Res} amount - response data - * @param {NextFunction} next - next function - * @returns null if if request is duplicated. + * Middleware for AI Network trigger call. It will filter duplicated request triggered by same transaction. + * It will pass request which is not from AI Network trigger. + * @param {Request} request - Request data + * @param {Res} amount - Response data + * @param {NextFunction} next - Next function + * @returns Null if if request is duplicated. */ triggerDuplicateFilter = (req: Request, res: Response, next: NextFunction) => { if (req.body.fid === undefined){ diff --git a/src/modules/admin.ts b/src/modules/admin.ts index 5936af3..09c0c01 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -15,9 +15,9 @@ export default class Admin extends ModuleBase { } /** - * handle deposit and write history of requester. you should match this function with deposit trigger. - * @param {Request} req - request data from deposit trigger. if req data is not from trigger function, it will throw error. - * @returns result of transaction. + * Handle deposit and write history of requester. You should match this function with deposit trigger. + * @param {Request} req - Request data from deposit trigger. If req data is not from trigger function, it will throw error. + * @returns Result of transaction. */ async deposit(req: Request) { const transferKey = req.body.valuePath[4]; @@ -28,25 +28,25 @@ export default class Admin extends ModuleBase { } /** - * check cost of request and check if account can pay. you should use this function before send or handle request. - * if you don't set address, it will use default account's address. - * @param {string} appName - app name you want to request service to. - * @param {string} prompt - data you want to request to service . - * @param {string=} userAddress - address of account you want to check balance. you should set default account if you don't provide address. - * @returns result cost of service. it throws error when user can't pay. + * Check cost of request and check if account can pay. You should use this function before send or handle request. + * If you don't set address, it will use default account's address. + * @param {string} appName - App name you want to request service to. + * @param {string} prompt - Data you want to request to service . + * @param {string=} userAddress - Address of account you want to check balance. You should set default account if you don't provide address. + * @returns Result cost of service. It throws error when user can't pay. */ async checkCostAndBalance(appName: string, prompt: string, userAddress?: string) { return await this.useService.calculateCostAndCheckBalance(appName, prompt, userAddress); } /** - * write response. then change balance of requester and write history of user balance if response status is success. - * you should match this function with service trigger. - * @param {Request} request - request data from request trigger. if req data is not from trigger function, it will throw error. - * @param {number} amount - cost of service. calculate it with checkCostAndBalance function. - * @param {string} responseData - data you want to response to requester. - * @param {RESPONSE_STATUS} status - status of response. if status is success, it will change balance of requester and write history of user balance. - * @returns result of transaction. + * Write response. Then change balance of requester and write history of user balance if response status is success. + * You should match this function with service trigger. + * @param {Request} request - Request data from request trigger. If req data is not from trigger function, it will throw error. + * @param {number} amount - Cost of service. Calculate it with checkCostAndBalance function. + * @param {string} responseData - Data you want to response to requester. + * @param {RESPONSE_STATUS} status - Status of response. If status is success, it will change balance of requester and write history of user balance. + * @returns Result of transaction. */ async writeResponse(req:Request, amount: number, responseData: string, status: RESPONSE_STATUS ) { const appName = req.body.valuePath[1]; diff --git a/src/modules/service.ts b/src/modules/service.ts index 6bf3438..40564c8 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -13,24 +13,24 @@ export default class Service extends ModuleBase { } /** - * deposit AIN to app. transfer AIN to depositAddress and write deposit request to app. - * if you don't set address, it will use default account's address. - * @param {string} appName - app name you want to deposit to. - * @param {number} amount - amount of AIN you want to deposit. - * @param {string=} signerAddress - address of account you want to use for deposit. you should set default account if you don't provide address. - * @returns result of transaction. + * Deposit AIN to app. Transfer AIN to depositAddress and write deposit request to app. + * If you don't set address, it will use default account's address. + * @param {string} appName - App name you want to deposit to. + * @param {number} amount - Amount of AIN you want to deposit. + * @param {string=} signerAddress - Address of account you want to use for deposit. You should set default account if you don't provide address. + * @returns Result of transaction. */ async deposit(appName: string, amount: number, userAddress?: string) { return await this.depositService.requestDeposit(appName, amount, userAddress); } /** - * request service to app. you can use handler to get response. if you don't set address, it will use default account's address. - * @param {string} appName - app name you want to request service to. - * @param {string} serviceName - service name you want to request. - * @param {string} prompt - data you want to request to service . - * @param {string=} userAddress - address of account you want to use for request. you should set default account if you don't provide address. - * @returns requestKey. you can use it to get response by handler. + * Request service to app. You can use handler to get response. If you don't set address, it will use default account's address. + * @param {string} appName - App name you want to request service to. + * @param {string} serviceName - Service name you want to request. + * @param {string} prompt - Data you want to request to service . + * @param {string=} userAddress - Address of account you want to use for request. You should set default account if you don't provide address. + * @returns RequestKey. You can use it to get response by handler. */ async writeRequest(appName: string, serviceName: string, prompt: string, userAddress?: string) { await this.useService.calculateCostAndCheckBalance(appName, prompt, userAddress); diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index e5cc711..ac6e857 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -10,8 +10,8 @@ export default class Wallet extends ModuleBase{ } } /** - * Get defult AI network blockchain account information set in ainize. - * @returns default account's address. + * Get defult AI Network blockchain account information set in ainize. + * @returns Default account's address. */ getDefaultAccount() { if (!this.ain.wallet.defaultAccount) { @@ -21,9 +21,9 @@ export default class Wallet extends ModuleBase{ } /** - * set default AI network account in ainize. this account is used for AI Network transaction. - * @param {string} privateKey - private Key of AI network account you want to set default. - * @returns address of setted default AI network account. + * Set default AI Network account in ainize. This account is used for AI Network transaction. + * @param {string} privateKey - Private Key of AI Network account you want to set default. + * @returns Address of setted default AI Network account. */ setDefaultAccount(privateKey: string) { this.ain.wallet.addAndSetDefaultAccount(privateKey); @@ -31,18 +31,18 @@ export default class Wallet extends ModuleBase{ } /** - * add AI network account at ainize. once you add account, you can use it for AI Network transaction with address. - * @param {string} privateKey - privateK Key of AI network account you want to add. - * @returns address of added AI network account. + * Add AI Network account at ainize. Once you add account, you can use it for AI Network transaction with address. + * @param {string} privateKey - PrivateK Key of AI Network account you want to add. + * @returns Address of added AI Network account. */ addAccount(privateKey: string) { return this.ain.wallet.add(privateKey); } /** - *get AIN balance of your account. if you don't set address, it will return default account's balance. - * @param {string=} address - address of account you want to get balance. - * @returns balance of your account. + *Get AIN balance of your account. If you don't set address, it will return default account's balance. + * @param {string=} address - Address of account you want to get balance. + * @returns Balance of your account. */ getAinBalance(address?: string) { if (!address) { @@ -52,10 +52,10 @@ export default class Wallet extends ModuleBase{ } /** - * send transaction to AI Network. if you don't set address, it will use default account's address. - * @param {TransactionInput} txBody - transaction body you want to send. - * @param {string=} signerAddress - address of account you want to use for sign transaction. you should set default account if you don't provide address. - * @returns result of transaction. + * Send transaction to AI Network. If you don't set address, it will use default account's address. + * @param {TransactionInput} txBody - Transaction body you want to send. + * @param {string=} signerAddress - Address of account you want to use for sign transaction. You should set default account if you don't provide address. + * @returns Result of transaction. */ async sendTxWithAddress(txBody: TransactionInput, signerAddress?: string) { if (!signerAddress) { From 5b3998d7c827695fac7b82a310b6cd8d84263473 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Thu, 7 Sep 2023 10:26:36 +0900 Subject: [PATCH 089/235] delete package-lock.json --- package-lock.json | 6172 --------------------------------------------- 1 file changed, 6172 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 1deb54f..0000000 --- a/package-lock.json +++ /dev/null @@ -1,6172 +0,0 @@ -{ - "name": "@ainize-team/ainize-sdk", - "version": "1.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@ainize-team/ainize-sdk", - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "@ainblockchain/ain-js": "^1.3.5", - "axios": "^0.26.1", - "express": "^4.18.2", - "fast-json-stable-stringify": "^2.1.0", - "lodash": "^4.17.21", - "node-cache": "^5.1.2" - }, - "devDependencies": { - "@types/express": "^4.17.17", - "@types/jest": "^27.4.1", - "@types/lodash": "^4.14.197", - "jest": "^27.5.1", - "ts-jest": "^27.1.4", - "typedoc": "^0.23.17", - "typedoc-plugin-remove-references": "^0.0.6", - "typedoc-plugin-rename-defaults": "^0.6.4", - "typedoc-theme-hierarchy": "^3.0.0", - "typescript": "^4.6.3" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@ainblockchain/ain-js": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@ainblockchain/ain-js/-/ain-js-1.6.0.tgz", - "integrity": "sha512-REzTJAf8w2TIsJLH7DhKWJF+kxfgMnCCwzWaeD4rYAv4TeD70PhFmYDrDMuy/qZd5KKMXqMigiU9PLWbiu8a7A==", - "license": "ISC", - "dependencies": { - "@ainblockchain/ain-util": "^1.1.9", - "@types/node": "^12.7.3", - "@types/randombytes": "^2.0.0", - "@types/semver": "^7.3.4", - "axios": "^0.21.4", - "bip39": "^3.0.2", - "browserify-cipher": "^1.0.1", - "eventemitter3": "^4.0.0", - "hdkey": "^1.1.1", - "lodash": "^4.17.20", - "node-seal": "^4.5.7", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "scryptsy": "^2.1.0", - "semver": "^6.3.0", - "url-parse": "^1.4.7", - "uuid": "^3.3.3", - "ws": "^8.2.3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@ainblockchain/ain-js/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "license": "MIT" - }, - "node_modules/@ainblockchain/ain-js/node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, - "node_modules/@ainblockchain/ain-util": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@ainblockchain/ain-util/-/ain-util-1.1.9.tgz", - "integrity": "sha512-u3q0h0zwWk+vzZ6VpBZiagVKJbNw/Dw4LVjBAhOvgPCx/E3jHHQCufIMDGqD4wjeBuHVtTAQyMTv7LRPSZFBGg==", - "license": "MPL-2.0", - "dependencies": { - "bip39": "^3.0.4", - "bn.js": "^4.11.8", - "browserify-cipher": "^1.0.1", - "eccrypto": "^1.1.6", - "fast-json-stable-stringify": "^2.0.0", - "hdkey": "^2.0.1", - "keccak": "^2.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "rlp": "^2.2.2", - "safe-buffer": "^5.1.2", - "scryptsy": "^2.1.0", - "secp256k1": "^3.6.2", - "uuid": "^3.3.3", - "varuint-bitcoin": "^1.1.0" - } - }, - "node_modules/@ainblockchain/ain-util/node_modules/hdkey": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-2.1.0.tgz", - "integrity": "sha512-i9Wzi0Dy49bNS4tXXeGeu0vIcn86xXdPQUpEYg+SO1YiO8HtomjmmRMaRyqL0r59QfcD4PfVbSF3qmsWFwAemA==", - "license": "MIT", - "dependencies": { - "bs58check": "^2.1.2", - "ripemd160": "^2.0.2", - "safe-buffer": "^5.1.1", - "secp256k1": "^4.0.0" - } - }, - "node_modules/@ainblockchain/ain-util/node_modules/hdkey/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, - "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/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.22.13", - "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, - "license": "MIT", - "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, - "license": "MIT", - "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, - "license": "MIT", - "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, - "license": "MIT" - }, - "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, - "license": "MIT", - "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, - "license": "MIT", - "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, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", - "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.11.tgz", - "integrity": "sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", - "@babel/helper-compilation-targets": "^7.22.10", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.11", - "@babel/parser": "^7.22.11", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.11", - "@babel/types": "^7.22.11", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", - "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.10", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz", - "integrity": "sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", - "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", - "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.11.tgz", - "integrity": "sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.11", - "@babel/types": "^7.22.11" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", - "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "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, - "license": "MIT", - "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, - "license": "MIT", - "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, - "license": "MIT", - "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, - "license": "MIT" - }, - "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, - "license": "MIT", - "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, - "license": "MIT", - "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, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.13.tgz", - "integrity": "sha512-3l6+4YOvc9wx7VlCSw4yQfcBo01ECA8TicQfbnCPuCEpRQrf+gTUyGdxNw+pyTUyywp6JRD1w0YQs9TpBXYlkw==", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", - "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz", - "integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.11", - "@babel/types": "^7.22.11", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", - "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", - "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/core": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", - "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^27.5.1", - "@jest/reporters": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^27.5.1", - "jest-config": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-resolve-dependencies": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "jest-watcher": "^27.5.1", - "micromatch": "^4.0.4", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/environment": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", - "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", - "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@sinonjs/fake-timers": "^8.0.1", - "@types/node": "*", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", - "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/types": "^27.5.1", - "expect": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", - "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "slash": "^3.0.0", - "source-map": "^0.6.0", - "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/source-map": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", - "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9", - "source-map": "^0.6.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", - "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", - "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^27.5.1", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-runtime": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", - "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.5.1", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-util": "^27.5.1", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/types": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", - "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", - "license": "MIT", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@sinonjs/commons": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", - "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/@types/babel__core": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", - "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz", - "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/body-parser": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", - "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", - "dev": true, - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", - "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/express": { - "version": "4.17.17", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", - "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", - "dev": true, - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.36", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.36.tgz", - "integrity": "sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", - "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/http-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==", - "dev": true - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jest": { - "version": "27.5.2", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz", - "integrity": "sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-matcher-utils": "^27.0.0", - "pretty-format": "^27.0.0" - } - }, - "node_modules/@types/lodash": { - "version": "4.14.197", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.197.tgz", - "integrity": "sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g==", - "dev": true - }, - "node_modules/@types/mime": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", - "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.5.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.7.tgz", - "integrity": "sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==", - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", - "dev": true - }, - "node_modules/@types/randombytes": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/randombytes/-/randombytes-2.0.0.tgz", - "integrity": "sha512-bz8PhAVlwN72vqefzxa14DKNT8jK/mV66CSjwdVQM/k3Th3EPKfUtdMniwZgMedQTFuywAsfjnZsg+pEnltaMA==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/range-parser": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", - "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", - "dev": true - }, - "node_modules/@types/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==", - "license": "MIT" - }, - "node_modules/@types/send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", - "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==", - "dev": true, - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/@types/serve-static": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz", - "integrity": "sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==", - "dev": true, - "dependencies": { - "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" - } - }, - "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/yargs": { - "version": "16.0.5", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz", - "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", - "dev": true, - "license": "MIT" - }, - "node_modules/abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-globals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", - "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" - } - }, - "node_modules/acorn-globals/node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "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, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "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", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "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==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "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==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "license": "MIT" - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.14.8" - } - }, - "node_modules/babel-jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", - "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^27.5.1", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", - "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", - "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-plugin-jest-hoist": "^27.5.1", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.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==", - "dev": true, - "license": "MIT" - }, - "node_modules/base-x": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", - "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "license": "MIT", - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, - "node_modules/bip39": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", - "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", - "license": "ISC", - "dependencies": { - "@noble/hashes": "^1.2.0" - } - }, - "node_modules/bip66": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", - "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==", - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "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==", - "license": "MIT" - }, - "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "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, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "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==", - "license": "MIT" - }, - "node_modules/browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true, - "license": "BSD-2-Clause" - }, - "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==", - "license": "MIT", - "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/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==", - "license": "MIT", - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/browserslist": { - "version": "4.21.10", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", - "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001517", - "electron-to-chromium": "^1.4.477", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.11" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bs-logger": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", - "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-json-stable-stringify": "2.x" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", - "license": "MIT", - "dependencies": { - "base-x": "^3.0.2" - } - }, - "node_modules/bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", - "license": "MIT", - "dependencies": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "license": "MIT" - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "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", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001524", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001524.tgz", - "integrity": "sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", - "dev": true, - "license": "MIT" - }, - "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, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", - "dev": true, - "license": "MIT" - }, - "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, - "license": "MIT", - "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, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true, - "license": "MIT" - }, - "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "license": "MIT" - }, - "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==", - "license": "MIT", - "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/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==", - "license": "MIT", - "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/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", - "dev": true, - "license": "MIT" - }, - "node_modules/cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", - "dev": true, - "license": "MIT", - "dependencies": { - "cssom": "~0.3.6" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true, - "license": "MIT" - }, - "node_modules/data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decimal.js": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", - "dev": true, - "license": "MIT" - }, - "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, - "license": "MIT" - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/des.js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", - "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/diff-sequences": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", - "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "webidl-conversions": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/domexception/node_modules/webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/drbg.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", - "integrity": "sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g==", - "license": "MIT", - "dependencies": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/eccrypto": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/eccrypto/-/eccrypto-1.1.6.tgz", - "integrity": "sha512-d78ivVEzu7Tn0ZphUUaL43+jVPKTMPFGtmgtz1D0LrFn7cY3K8CdrvibuLz2AAkHBLKZtR8DMbB2ukRYFk987A==", - "hasInstallScript": true, - "license": "CC0-1.0", - "dependencies": { - "acorn": "7.1.1", - "elliptic": "6.5.4", - "es6-promise": "4.2.8", - "nan": "2.14.0" - }, - "optionalDependencies": { - "secp256k1": "3.7.1" - } - }, - "node_modules/eccrypto/node_modules/nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "license": "MIT" - }, - "node_modules/eccrypto/node_modules/secp256k1": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", - "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.4.1", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/eccrypto/node_modules/secp256k1/node_modules/nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", - "license": "MIT", - "optional": true - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "license": "MIT" - }, - "node_modules/electron-to-chromium": { - "version": "1.4.505", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.505.tgz", - "integrity": "sha512-0A50eL5BCCKdxig2SsCXhpuztnB9PfUgRMojj5tMvt8O54lbwz3t6wNgnpiTRosw5QjlJB7ixhVyeg8daLQwSQ==", - "dev": true, - "license": "ISC" - }, - "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==", - "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/emittery": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", - "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "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, - "license": "MIT" - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "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, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "license": "MIT" - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "license": "MIT" - }, - "node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "license": "MIT" - }, - "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==", - "license": "MIT", - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "license": "MIT", - "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" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", - "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "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==", - "license": "MIT" - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dev": true, - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "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==", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "license": "MIT" - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.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==", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "license": "ISC", - "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/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "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, - "license": "ISC" - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "license": "MIT", - "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==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/hdkey": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-1.1.2.tgz", - "integrity": "sha512-PTQ4VKu0oRnCrYfLp04iQZ7T2Cxz0UsEXYauk2j8eh6PJXCpbXuCFhOmtIFtbET0i3PMWmHN9J11gU8LEgUljQ==", - "license": "MIT", - "dependencies": { - "bs58check": "^2.1.2", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.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==", - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-encoding": "^1.0.5" - }, - "engines": { - "node": ">=10" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "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==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.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==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "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==", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "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, - "license": "MIT" - }, - "node_modules/is-core-module": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true, - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", - "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^27.5.1", - "import-local": "^3.0.2", - "jest-cli": "^27.5.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz", - "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "execa": "^5.0.0", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-circus": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", - "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "expect": "^27.5.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-cli": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz", - "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "prompts": "^2.0.1", - "yargs": "^16.2.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz", - "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.8.0", - "@jest/test-sequencer": "^27.5.1", - "@jest/types": "^27.5.1", - "babel-jest": "^27.5.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.1", - "graceful-fs": "^4.2.9", - "jest-circus": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-jasmine2": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-diff": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", - "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", - "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-each": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz", - "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-environment-jsdom": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", - "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1", - "jsdom": "^16.6.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", - "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", - "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", - "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/graceful-fs": "^4.1.2", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^27.5.1", - "jest-serializer": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "micromatch": "^4.0.4", - "walker": "^1.0.7" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-jasmine2": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", - "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.5.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-leak-detector": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", - "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", - "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", - "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.5.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-mock": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", - "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", - "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", - "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", - "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-snapshot": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-runner": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz", - "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^27.5.1", - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-leak-detector": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz", - "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/globals": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-serializer": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", - "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz", - "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.7.2", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^27.5.1", - "graceful-fs": "^4.2.9", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", - "natural-compare": "^1.4.0", - "pretty-format": "^27.5.1", - "semver": "^7.3.2" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-snapshot/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==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", - "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-validate": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", - "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", - "leven": "^3.1.0", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-watcher": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz", - "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "jest-util": "^27.5.1", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/jest-worker/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, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "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, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsdom": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", - "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", - "dev": true, - "license": "MIT", - "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", - "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jsdom/node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/jsdom/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "dev": true, - "license": "MIT", - "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/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "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, - "license": "MIT" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true, - "license": "MIT" - }, - "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, - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/keccak": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", - "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "bindings": "^1.5.0", - "inherits": "^2.0.4", - "nan": "^2.14.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=5.12.0" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "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, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "license": "MIT" - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/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==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "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==", - "dev": true, - "license": "ISC" - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tmpl": "1.0.5" - } - }, - "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==", - "dev": true, - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 12" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "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==", - "license": "MIT", - "engines": { - "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==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "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==", - "license": "ISC" - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "license": "MIT" - }, - "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, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", - "license": "MIT" - }, - "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==", - "license": "MIT", - "dependencies": { - "clone": "2.x" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/node-gyp-build": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", - "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", - "license": "MIT", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-seal": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/node-seal/-/node-seal-4.6.4.tgz", - "integrity": "sha512-ZQU63Ikt9/n9CXueEltszdAxUPHWpfbExcoux6Ktn2W3lxWc7jG2yx3p0ok34LzOgKOfytUSwHCxYmabAm3VPQ==", - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "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==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "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, - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "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, - "license": "MIT", - "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/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true, - "license": "MIT" - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "license": "MIT" - }, - "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "license": "MIT", - "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/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true, - "license": "MIT" - }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "license": "MIT" - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true, - "license": "MIT" - }, - "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==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "license": "MIT" - }, - "node_modules/resolve": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", - "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", - "dev": true, - "license": "MIT", - "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-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==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "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, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve.exports": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.1.tgz", - "integrity": "sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/rlp": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", - "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", - "license": "MPL-2.0", - "dependencies": { - "bn.js": "^5.2.0" - }, - "bin": { - "rlp": "bin/rlp" - } - }, - "node_modules/rlp/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==", - "license": "MIT" - }, - "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" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" - }, - "node_modules/saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", - "dev": true, - "license": "ISC", - "dependencies": { - "xmlchars": "^2.2.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/scryptsy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", - "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==", - "license": "MIT" - }, - "node_modules/secp256k1": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", - "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.5.2", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "node_modules/send/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==", - "license": "MIT" - }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "license": "MIT", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "license": "ISC" - }, - "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==", - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "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==", - "dev": true, - "license": "MIT", - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/shiki": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz", - "integrity": "sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g==", - "dev": true, - "license": "MIT", - "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.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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, - "license": "ISC" - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true, - "license": "MIT" - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "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, - "license": "MIT", - "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", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "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, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true, - "license": "MIT" - }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/throat": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.2.tgz", - "integrity": "sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tough-cookie/node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ts-jest": { - "version": "27.1.5", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.5.tgz", - "integrity": "sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^27.0.0", - "json5": "2.x", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "20.x" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@types/jest": "^27.0.0", - "babel-jest": ">=27.0.0 <28", - "jest": "^27.0.0", - "typescript": ">=3.8 <5.0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@types/jest": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } - } - }, - "node_modules/ts-jest/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==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "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, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/typedoc": { - "version": "0.23.28", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz", - "integrity": "sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "lunr": "^2.3.9", - "marked": "^4.2.12", - "minimatch": "^7.1.3", - "shiki": "^0.14.1" - }, - "bin": { - "typedoc": "bin/typedoc" - }, - "engines": { - "node": ">= 14.14" - }, - "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x" - } - }, - "node_modules/typedoc-plugin-remove-references": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedoc-plugin-remove-references/-/typedoc-plugin-remove-references-0.0.6.tgz", - "integrity": "sha512-QoyHpopznnJbWW/9JT2NHSK+eTmyShkPYebwe5ZnO8aohPLc5okk4puWUDXnNh2Tn7cJU8U3t1tEMO6ghbwE8Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/typedoc-plugin-rename-defaults": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/typedoc-plugin-rename-defaults/-/typedoc-plugin-rename-defaults-0.6.6.tgz", - "integrity": "sha512-8TCDrxMG8cR0IRhMZbxMCXlmQrEwFFH0she4eHsaUGd1TPfrkk8GLO4n2qlSISd66OtT28e17ysiVZPbQnLGMg==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "typedoc": "0.22.x || 0.23.x || 0.24.x || 0.25.x" - } - }, - "node_modules/typedoc-theme-hierarchy": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/typedoc-theme-hierarchy/-/typedoc-theme-hierarchy-3.2.1.tgz", - "integrity": "sha512-Spum9ccW7bc++c8dLFNRh+9hvG+REntLQCNUb74pz28qcuhPOtxOuKteM/4aJbJDjw/9mORXZZYSToMGb+MrYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fs-extra": "^10.0.0" - }, - "peerDependencies": { - "typedoc": "^0.23.6" - } - }, - "node_modules/typedoc/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/typedoc/node_modules/minimatch": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", - "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.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==", - "license": "MIT" - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "license": "MIT", - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/v8-to-istanbul": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", - "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", - "dev": true, - "license": "ISC", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/v8-to-istanbul/node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">= 8" - } - }, - "node_modules/varuint-bitcoin": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz", - "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==", - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.1" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "browser-process-hrtime": "^1.0.0" - } - }, - "node_modules/w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "xml-name-validator": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=10.4" - } - }, - "node_modules/whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "0.4.24" - } - }, - "node_modules/whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true, - "license": "MIT" - }, - "node_modules/whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "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, - "license": "MIT", - "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", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "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==", - "license": "MIT", - "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/xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true, - "license": "MIT" - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "license": "ISC", - "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==", - "dev": true, - "license": "ISC" - }, - "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, - "license": "MIT", - "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/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, - "license": "ISC", - "engines": { - "node": ">=10" - } - } - } -} From 84ba9f38d32bf7515674beb092061b07bcdf8bbe Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 7 Sep 2023 10:31:03 +0900 Subject: [PATCH 090/235] docs: add js docs --- src/modules/app.ts | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 76779b8..9fabbfb 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -91,10 +91,12 @@ export default class App extends ModuleBase { /** * Create App for your AI Service on AI Network. * @param {string} appName - The name of app you will create. + * @param {TriggerFunctionUrlMap} functioniUrls - The urls of trigger function you set. * @param {setDefaultFlag} setDefaultFlag - Set true which you wan to set config as default. - * @returns result of transaction. + * @returns Result of transaction. */ - async create(appName: string, function_urls: TriggerFunctionUrlMap, setDefaultFlag?: setDefaultFlag) { + // FIXME(yoojin): need to fix getting function urls. + async create(appName: string, functionUrls: TriggerFunctionUrlMap, setDefaultFlag?: setDefaultFlag) { if (!setDefaultFlag) setDefaultFlag = { triggerFuncton: true, billingConfig: true }; const setRuleOps: SetOperation[] = []; @@ -112,7 +114,7 @@ export default class App extends ModuleBase { if (setDefaultFlag.triggerFuncton) { const defaultFunctions = defaultAppFunctions(appName); for (const [type, func] of Object.entries(defaultFunctions)) { - const { ref, function_id, function_type, function_url } = func(function_urls[type]); + const { ref, function_id, function_type, function_url } = func(functionUrls[type]); const value = this.buildSetFunctionValue({function_id, function_type, function_url}); const funcOp = buildSetOperation("SET_FUNCTION", ref, value); setFunctionOps.push(funcOp); @@ -137,16 +139,34 @@ export default class App extends ModuleBase { return await this.sendTransaction(txBody); } + + /** + * Set billing config to app. + * @param {string} appName + * @param {billingConfig} config - The configuration of your app's billing. + * @returns Result of transaction. + */ async setBillingConfig(appName: string, config: billingConfig) { const setConfigOp = this.buildSetBillingConfigOp(appName, config); const txBody = this.buildTxBody(setConfigOp); return await this.sendTransaction(txBody); } + /** + * Get billing config of app + * @param {string} appName + * @returns {Promise} + */ async getBillingConfig(appName: string): Promise { return await this.ain.db.ref().getValue(Path.app(appName).billingConfig()); } + /** + * Set trigger function to app. + * @param {string} appName + * @param {setTriggerFunctionParam[]} functions + * @returns Result of transaction. + */ async setTriggerFunctions(appName: string, functions: setTriggerFunctionParm[]) { const setFunctionOps: SetOperation[] = []; for (const func of Object.values(functions)) { @@ -164,6 +184,12 @@ export default class App extends ModuleBase { return await this.sendTransaction(txBody); } + /** + * Set rules to app. + * @param {string} appName + * @param {setRuleParam} rules + * @returns Result of transaction. + */ async setRules(appName: string, rules: setRuleParam[]) { const setRuleOps: SetOperation[] = []; for (const rule of Object.values(rules)) { @@ -176,12 +202,24 @@ export default class App extends ModuleBase { return await this.sendTransaction(txBody); } + /** + * Add admin on app. + * @param {string} appName + * @param {string} userAddress + * @returns Result of transaction. + */ async addAdmin(appName: string, userAddress: string) { const op = this.buildSetAdminOp(appName, userAddress); const txBody = this.buildTxBody(op); return await this.sendTransaction(txBody); } + /** + * Remove admin on app. + * @param {string} appName + * @param {string} userAddress + * @returns Result of transaction. + */ async deleteAdmin(appName: string, userAddress: string) { const op = this.buildSetAdminOp(appName, userAddress, true); const txBody = this.buildTxBody(op); From 3a97a0eae9fca49732e562bb739efa323cde1baf Mon Sep 17 00:00:00 2001 From: akaster99 Date: Thu, 7 Sep 2023 10:46:40 +0900 Subject: [PATCH 091/235] update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 57683c9..f56eda1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ainize-team/ainize-sdk", - "version": "1.1.0", + "version": "0.0.1-beta.3", "main": "dist/ainize.js", "types": "dist/ainize.d.ts", "scripts": { From 56278295724f22f4b0be9df7dc46e807abba2e40 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 7 Sep 2023 14:24:12 +0900 Subject: [PATCH 092/235] refactor: changeBalance type --- src/modules/service/depositService.ts | 4 ++-- src/modules/service/serviceBase.ts | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index 1f73edc..5e9b6ad 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -28,9 +28,9 @@ export default class DepositService extends ServiceBase { async handleDeposit(appName: string, transferKey: string, transferValue: number, requesterAddress: string) { const ops: SetOperation[] = []; - const changeBalanceOp = await this.getChangeBalanceOp(appName, requesterAddress, "INC", transferValue); - ops.push(changeBalanceOp); + const changeBalanceOp = await this.getChangeBalanceOp(appName, requesterAddress, "INC_VALUE", transferValue); const writeHistoryOp = await this.getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.DEPOSIT, transferValue, transferKey); + ops.push(changeBalanceOp); ops.push(writeHistoryOp); const txBody = this.buildTxBody(ops); return await this.wallet.sendTxWithAddress(txBody); diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts index 0622673..7b967e5 100644 --- a/src/modules/service/serviceBase.ts +++ b/src/modules/service/serviceBase.ts @@ -21,18 +21,29 @@ export default class ServiceBase extends ModuleBase { } // ADMIN: need defaultAccount - protected async getChangeBalanceOp(appName: string, requesterAddress: string, type: string, value: number) { + protected async getChangeBalanceOp( + appName: string, + requesterAddress: string, + type: "INC_VALUE" | "DEC_VALUE", + value: number + ) { const balancePath = Path.app(appName).balanceOfUser(requesterAddress); - const changeValueOp:SetOperation = { - type: type === "INC" ? "INC_VALUE" : "DEC_VALUE", + const changeValueOp: SetOperation = { + type, ref: balancePath, - value: type, + value, } return changeValueOp; } // ADMIN: need defaultAccount - protected async getWriteHistoryOp(appName: string, requesterAddress: string, type: string, amount: number, key: string) { + protected async getWriteHistoryOp( + appName: string, + requesterAddress: string, + type: HISTORY_TYPE, + amount: number, + key: string + ) { const historyPath = `${Path.app(appName).historyOfUser(requesterAddress)}/${Date.now()}`; const value = { type, From 80679b5cdee995f150b5dae3191d8bdc4103e8af Mon Sep 17 00:00:00 2001 From: akaster99 Date: Thu, 7 Sep 2023 14:26:56 +0900 Subject: [PATCH 093/235] fix: git push origin HEAD --- src/modules/admin.ts | 2 +- src/modules/wallet.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/admin.ts b/src/modules/admin.ts index 09c0c01..1e42a13 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -52,7 +52,7 @@ export default class Admin extends ModuleBase { const appName = req.body.valuePath[1]; const serviceName = req.body.valuePath[3]; const requesterAddress = req.body.auth.addr; - const requestKey = req.body.valuePath[6]; + const requestKey = req.body.valuePath[5]; return await this.useService.writeResponse(status , appName, serviceName, requesterAddress, requestKey, responseData, amount); } } diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index ac6e857..eb23349 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -61,7 +61,7 @@ export default class Wallet extends ModuleBase{ if (!signerAddress) { signerAddress = this.getDefaultAccount(); } - if (this.ain.wallet.isAdded(signerAddress)) { + if (!this.ain.wallet.isAdded(signerAddress)) { throw new Error ("You need to add account"); } txBody.address = signerAddress; From cb587276fe45f143c447c12471054bca2ee18edd Mon Sep 17 00:00:00 2001 From: akaster99 Date: Thu, 7 Sep 2023 14:29:37 +0900 Subject: [PATCH 094/235] fix: git push origin HEAD --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f56eda1..a0804b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ainize-team/ainize-sdk", - "version": "0.0.1-beta.3", + "version": "0.0.1", "main": "dist/ainize.js", "types": "dist/ainize.d.ts", "scripts": { From be925d3887e3ba80c931f930a9bb8e134e223309 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Thu, 7 Sep 2023 14:35:18 +0900 Subject: [PATCH 095/235] fix: dec_value --- src/modules/service/useService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index a88a658..961c47d 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -46,7 +46,7 @@ export default class UseService extends ServiceBase{ const responseOp = buildSetOperation("SET_VALUE", responsePath, responseValue); ops.push(responseOp); if (status === RESPONSE_STATUS.SUCCESS) { - const changeBalanceOp = await this.getChangeBalanceOp(appName, requesterAddress, 'DEC', amount); + const changeBalanceOp = await this.getChangeBalanceOp(appName, requesterAddress, 'DEC_VALUE', amount); const writeHistoryOp = await this.getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.USAGE, amount, requestKey); ops.push(changeBalanceOp); ops.push(writeHistoryOp); From cd14c27e2ad02079a767d99cc243fec099864b4f Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 7 Sep 2023 15:53:30 +0900 Subject: [PATCH 096/235] fix: request rule --- src/modules/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index aa978f3..89f39c9 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -45,7 +45,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu value: { ".rule": { write: - "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`)" + "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && (getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`) !== null && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))" } } }, From c8399853099f4bbcf5494df0411c445a93e4b2a7 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 8 Sep 2023 09:36:40 +0900 Subject: [PATCH 097/235] fix: default account --- src/modules/service/useService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index 961c47d..c025917 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -7,6 +7,7 @@ import ServiceBase from "./serviceBase"; export default class UseService extends ServiceBase{ async writeRequest(appName: string, serviceName: string, value: string, requesterAddress?: string) { const requestKey = Date.now(); + requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAccount(); const requestPath = Path.app(appName).request(serviceName, requesterAddress, requestKey); const requestData = { prompt: value, @@ -28,7 +29,6 @@ export default class UseService extends ServiceBase{ }else if (billingConfig.maxCost && amount > billingConfig.maxCost) { amount = billingConfig.maxCost; } - const balancePath = Path.app(appName).balanceOfUser(requesterAddress); const balance = await this.app.getCreditBalance(appName, requesterAddress); if (balance < amount) { throw new Error("not enough balance"); From 44ec4efdff6b5b958146ee480aedd7879aa52763 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 8 Sep 2023 09:47:00 +0900 Subject: [PATCH 098/235] feat: getDataFromServiceRequest --- src/modules/admin.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/modules/admin.ts b/src/modules/admin.ts index 1e42a13..0e664ae 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -55,4 +55,21 @@ export default class Admin extends ModuleBase { const requestKey = req.body.valuePath[5]; return await this.useService.writeResponse(status , appName, serviceName, requesterAddress, requestKey, responseData, amount); } + /** + * Get data from service request. You should use it only with service trigger. + * @param {Request} request - Request data from request trigger. If req data is not from trigger function, it will throw error. + * @returns Object with appName, serviceName, requesterAddress, requestKey, responseData. + */ + getDataFromServiceRequest(req: Request) { + if(!req.body.valuePath[1] || !req.body.valuePath[3] || !req.body.valuePath[5] || !req.body.value.prompt) { + throw new Error("Not from service request"); + } + return { + appName: req.body.valuePath[1], + serviceName: req.body.valuePath[3], + requesterAddress: req.body.auth.addr, + requestKey: req.body.valuePath[5], + responseData: req.body.value.prompt, + } + } } From 20632bd9ee685e7a39889cef54fdd906b29f687e Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 8 Sep 2023 10:02:19 +0900 Subject: [PATCH 099/235] refactor: billingConfigService --- src/constants.ts | 1 + src/modules/app.ts | 9 +++++++-- src/modules/service/useService.ts | 17 ++++++++++------- src/types/type.ts | 12 ++++++++---- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 4057ea5..b591463 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -12,6 +12,7 @@ export const Path = { deposit: () => `${Path.app(appName).root()}/deposit`, depositOfUser: (userAddress: string) => `${Path.app(appName).deposit()}/${userAddress}`, billingConfig: () => `${Path.app(appName).root()}/billingConfig`, + serviceOfbillingConfig: (serviceName: string) => `${Path.app(appName).billingConfig()}/service/${serviceName}`, service: (serviceName: string) => `${Path.app(appName).root()}/service/${serviceName}`, userOfService: (serviceName: string, userAddress: string) => `${Path.app(appName).service(serviceName)}/${userAddress}`, diff --git a/src/modules/app.ts b/src/modules/app.ts index aa978f3..9b5b20d 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -45,7 +45,7 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu value: { ".rule": { write: - "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`)" + "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/service/` + $serviceName + `/minCost`)" } } }, @@ -124,7 +124,11 @@ export default class App extends ModuleBase { if (setDefaultFlag.billingConfig) { const defaultConfig: billingConfig = { depositAddress: this.ain.wallet.defaultAccount!.address, - costPerToken: 0, + service: { + default: { + costPerToken: 0, + } + } } const configOp = this.buildSetBillingConfigOp(appName, defaultConfig); setBillingConfigOps.push(configOp); @@ -160,6 +164,7 @@ export default class App extends ModuleBase { async getBillingConfig(appName: string): Promise { return await this.ain.db.ref().getValue(Path.app(appName).billingConfig()); } + /** * Set trigger function to app. diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index 961c47d..13419b9 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -17,18 +17,21 @@ export default class UseService extends ServiceBase{ return requestKey; } - async calculateCostAndCheckBalance(appName: string, value: string, requesterAddress?: string) { + async calculateCostAndCheckBalance(appName: string, serviceName: string, value: string, requesterAddress?: string) { requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAccount(); const billingConfig = await this.app.getBillingConfig(appName); // TODO(woojae): calculate cost more accurately + let serviceBillingConfig = billingConfig.service.default; + if(billingConfig.service[serviceName]) { + serviceBillingConfig = billingConfig.service[serviceName]; + } const token = value.split(' ').length; - let amount = token * billingConfig.costPerToken; - if (billingConfig.minCost && amount < billingConfig.minCost) { - amount = billingConfig.minCost; - }else if (billingConfig.maxCost && amount > billingConfig.maxCost) { - amount = billingConfig.maxCost; + let amount = token * serviceBillingConfig.costPerToken; + if (serviceBillingConfig.minCost && amount < serviceBillingConfig.minCost) { + amount = serviceBillingConfig.minCost; + }else if (serviceBillingConfig.maxCost && amount > serviceBillingConfig.maxCost) { + amount = serviceBillingConfig.maxCost; } - const balancePath = Path.app(appName).balanceOfUser(requesterAddress); const balance = await this.app.getCreditBalance(appName, requesterAddress); if (balance < amount) { throw new Error("not enough balance"); diff --git a/src/types/type.ts b/src/types/type.ts index 60b339b..09e381d 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -24,10 +24,14 @@ export type setRuleParam = { export type billingConfig = { depositAddress: string, - costPerToken: number, - minCost?: number, - maxCost?: number, - responseTimeout?: number, + service: { + [serviceName: string]: { + costPerToken: number, + minCost?: number, + maxCost?: number, + responseTimeout?: number, + } + } }; export enum HISTORY_TYPE { From 99f3527f8d3a5395939ffa9ebc5fcc0d68c7c631 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 8 Sep 2023 10:04:51 +0900 Subject: [PATCH 100/235] refactor: indent --- src/modules/app.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 9b5b20d..2201311 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -164,7 +164,6 @@ export default class App extends ModuleBase { async getBillingConfig(appName: string): Promise { return await this.ain.db.ref().getValue(Path.app(appName).billingConfig()); } - /** * Set trigger function to app. From 464d3bb6286c62800fb4491699f7e42cd65ffb4f Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 8 Sep 2023 10:23:03 +0900 Subject: [PATCH 101/235] refactor: indent --- src/modules/service/useService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index c025917..2ff87fe 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -26,7 +26,7 @@ export default class UseService extends ServiceBase{ let amount = token * billingConfig.costPerToken; if (billingConfig.minCost && amount < billingConfig.minCost) { amount = billingConfig.minCost; - }else if (billingConfig.maxCost && amount > billingConfig.maxCost) { + } else if (billingConfig.maxCost && amount > billingConfig.maxCost) { amount = billingConfig.maxCost; } const balance = await this.app.getCreditBalance(appName, requesterAddress); From 48949b865d8155b056d4979113bdd6825c454411 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 8 Sep 2023 10:45:22 +0900 Subject: [PATCH 102/235] style: space --- src/types/type.ts | 11 +++++++---- src/utils/builder.ts | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/types/type.ts b/src/types/type.ts index 60b339b..a6ceb46 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -35,15 +35,18 @@ export enum HISTORY_TYPE { USAGE = "USAGE", } +export type opResult = { + code: number, + bandwidth_gas_amount: number; + message?: string +} + export type txResult = { gas_amount_total: object; gas_cost_total: number; code?: number; result_list?: { - [index: string]: { - code: number; - bandwidth_gas_amount: number; - }; + [index: string]: opResult; }; }; diff --git a/src/utils/builder.ts b/src/utils/builder.ts index 6adad3f..6c1ff3b 100644 --- a/src/utils/builder.ts +++ b/src/utils/builder.ts @@ -1,6 +1,6 @@ import { SetOperation, SetOperationType } from "@ainblockchain/ain-js/lib/types" -export const buildSetOperation = (type: SetOperationType,ref: string, value: any): SetOperation => { +export const buildSetOperation = (type: SetOperationType, ref: string, value: any): SetOperation => { return { type, ref, From 2919b53e859d8996581818e856e94068e127e8ae Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 8 Sep 2023 10:54:43 +0900 Subject: [PATCH 103/235] fix: handle tx error --- src/modules/moduleBase.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index 5bb146d..b57b235 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -1,7 +1,7 @@ import Ain from "@ainblockchain/ain-js"; import { SetOperation, TransactionBody } from "@ainblockchain/ain-js/lib/types"; import Ainize from "../ainize"; -import { txResult } from "../types/type"; +import { opResult, txResult } from "../types/type"; export default class ModuleBase { protected ain: Ain; @@ -25,24 +25,26 @@ export default class ModuleBase { return await this.ain.sendTransaction(txBody); } - private isFailedTxResult(result: txResult) { - if (!result) return true; + private getFailedOpResultList(result: txResult): opResult[] { if (result.result_list) { - return Object.values(result.result_list).some( + return Object.values(result.result_list).filter( (result: { code: number }) => result.code !== 0 ); } - return result.code !== 0; + return []; } private handleTxResultWrapper(operation: Function) { return async (args: any) => { const res = await operation(args); const { tx_hash, result } = res; - if (this.isFailedTxResult(result)) { + const failedOpResult = this.getFailedOpResultList(result); + if (failedOpResult.length > 0) { // TODO(yoojin): need to add throw error message tx by tx. + const errorString = failedOpResult.map((value) => `\n code: ${value.code} - ${value.message}`); + console.log('failedOpResult :>> ', failedOpResult); throw new Error( - `Failed to send transaction (${tx_hash}).\n` + `Failed to send transaction (${tx_hash}).` + errorString ); } return tx_hash; From 5ab1fc5012496dd693b938e58098d40b4a3335f9 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 8 Sep 2023 10:54:54 +0900 Subject: [PATCH 104/235] fix: remove todo --- src/modules/moduleBase.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index b57b235..6fa0c23 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -40,7 +40,6 @@ export default class ModuleBase { const { tx_hash, result } = res; const failedOpResult = this.getFailedOpResultList(result); if (failedOpResult.length > 0) { - // TODO(yoojin): need to add throw error message tx by tx. const errorString = failedOpResult.map((value) => `\n code: ${value.code} - ${value.message}`); console.log('failedOpResult :>> ', failedOpResult); throw new Error( From 6305c1df4bebe2b2c3e7b5b82eedd2bb280a3bdd Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 8 Sep 2023 10:55:03 +0900 Subject: [PATCH 105/235] fix: account check --- src/modules/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 89f39c9..a126684 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -238,7 +238,7 @@ export default class App extends ModuleBase { private buildCreateAppOp(appName: string): SetOperation { const path = `/manage_app/${appName}/create/${Date.now()}`; const adminAccount = this.ain.wallet.defaultAccount!; - if (adminAccount && adminAccount.address) { + if (!adminAccount || !adminAccount.address) { // FIXME(yoojin): change Error to Custom error when it added. throw new Error("You need to enter your private key when initialize sdk."); } From 42818a25b03319b5101326b53140b268b0efa197 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 8 Sep 2023 13:38:18 +0900 Subject: [PATCH 106/235] fix: write rule --- src/modules/app.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 2201311..d645bce 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -45,7 +45,9 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu value: { ".rule": { write: - "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/service/` + $serviceName + `/minCost`)" + "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + + "((getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`) !== null) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`)) || " + + "((getValue(`/apps/" + `${appName}` + "/billingConfig/default/minCost`) !== null) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/service/default/minCost`))" } } }, From 1640be0f5bebb75483d0643cab18e69c7523ef3c Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 8 Sep 2023 13:42:01 +0900 Subject: [PATCH 107/235] fix: params --- src/modules/admin.ts | 5 +++-- src/modules/service.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/admin.ts b/src/modules/admin.ts index 0e664ae..292a395 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -31,12 +31,13 @@ export default class Admin extends ModuleBase { * Check cost of request and check if account can pay. You should use this function before send or handle request. * If you don't set address, it will use default account's address. * @param {string} appName - App name you want to request service to. + * @param {string} serviceName * @param {string} prompt - Data you want to request to service . * @param {string=} userAddress - Address of account you want to check balance. You should set default account if you don't provide address. * @returns Result cost of service. It throws error when user can't pay. */ - async checkCostAndBalance(appName: string, prompt: string, userAddress?: string) { - return await this.useService.calculateCostAndCheckBalance(appName, prompt, userAddress); + async checkCostAndBalance(appName: string, serviceName: string, prompt: string, userAddress?: string) { + return await this.useService.calculateCostAndCheckBalance(appName, serviceName, prompt, userAddress); } /** diff --git a/src/modules/service.ts b/src/modules/service.ts index 40564c8..f28b1ad 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -33,7 +33,7 @@ export default class Service extends ModuleBase { * @returns RequestKey. You can use it to get response by handler. */ async writeRequest(appName: string, serviceName: string, prompt: string, userAddress?: string) { - await this.useService.calculateCostAndCheckBalance(appName, prompt, userAddress); + await this.useService.calculateCostAndCheckBalance(appName, serviceName, prompt, userAddress); return await this.useService.writeRequest(appName, serviceName, prompt, userAddress); } } From c7c1b03ff374447f2a68d92d3b3d34ab342276f8 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 8 Sep 2023 13:45:23 +0900 Subject: [PATCH 108/235] fix: default billing config should set on create --- src/modules/app.ts | 19 +++++++++---------- src/types/type.ts | 1 - 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index d645bce..47af77c 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -100,7 +100,7 @@ export default class App extends ModuleBase { // FIXME(yoojin): need to fix getting function urls. async create(appName: string, functionUrls: TriggerFunctionUrlMap, setDefaultFlag?: setDefaultFlag) { if (!setDefaultFlag) - setDefaultFlag = { triggerFuncton: true, billingConfig: true }; + setDefaultFlag = { triggerFuncton: true }; const setRuleOps: SetOperation[] = []; const setFunctionOps: SetOperation[] = []; const setBillingConfigOps: SetOperation[] = [] ; @@ -123,18 +123,17 @@ export default class App extends ModuleBase { } } - if (setDefaultFlag.billingConfig) { - const defaultConfig: billingConfig = { - depositAddress: this.ain.wallet.defaultAccount!.address, - service: { - default: { - costPerToken: 0, - } + const defaultConfig: billingConfig = { + depositAddress: this.ain.wallet.defaultAccount!.address, + service: { + default: { + costPerToken: 0, + minCost: 0, } } - const configOp = this.buildSetBillingConfigOp(appName, defaultConfig); - setBillingConfigOps.push(configOp); } + const configOp = this.buildSetBillingConfigOp(appName, defaultConfig); + setBillingConfigOps.push(configOp); const txBody = this.buildTxBody([ createAppOp, diff --git a/src/types/type.ts b/src/types/type.ts index 09e381d..999954e 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -1,6 +1,5 @@ export type setDefaultFlag = { triggerFuncton: boolean, - billingConfig: boolean, }; // NOTE(yoojin): pls suggest good name. From b3963da3a3485b00ebf278c1b3af92b72b268313 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 8 Sep 2023 14:08:30 +0900 Subject: [PATCH 109/235] fix: write rule --- src/modules/app.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 47af77c..c0a3a546 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -46,8 +46,8 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu ".rule": { write: "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + - "((getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`) !== null) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`)) || " + - "((getValue(`/apps/" + `${appName}` + "/billingConfig/default/minCost`) !== null) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/service/default/minCost`))" + "((getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName) !== null) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`)) || " + + "getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/service/default/minCost`)" } } }, @@ -144,7 +144,6 @@ export default class App extends ModuleBase { return await this.sendTransaction(txBody); } - /** * Set billing config to app. * @param {string} appName From 082582cca8ed7ef4d0dcd9d00e1146b21fe574d6 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 8 Sep 2023 14:44:06 +0900 Subject: [PATCH 110/235] reafactor: minCost --- src/types/type.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/type.ts b/src/types/type.ts index 40bae85..b37f2c1 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -26,7 +26,7 @@ export type billingConfig = { service: { [serviceName: string]: { costPerToken: number, - minCost?: number, + minCost: number, maxCost?: number, responseTimeout?: number, } From bf066ad85dbb339a0b9fa021e17e1dd6fd1618f4 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 8 Sep 2023 14:52:13 +0900 Subject: [PATCH 111/235] feat: add billingConfig and configOfService rule --- src/modules/app.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/modules/app.ts b/src/modules/app.ts index 24aa66f..c5820a9 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -59,6 +59,22 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu } }, }, + billingConfig: { + ref: Path.app(appName).billingConfig(), + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.depositAddress)", + } + } + }, + billingConfigOfService: { + ref: Path.app(appName).billingConfigOfService("$serviceName"), + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth,addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.minCost)", + } + } + } } } From 2b65007b70b9eb14b01db27a359f6870a96c30bf Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 8 Sep 2023 14:57:29 +0900 Subject: [PATCH 112/235] feat: add billingConfigOfService --- src/modules/app.ts | 14 +++++++------- src/types/type.ts | 18 ++++++++++-------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index c5820a9..4236e1c 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -1,6 +1,6 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../constants"; -import { billingConfig, setDefaultFlag, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; +import { appBillingConfig, setDefaultFlag, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; import { buildSetOperation } from "../utils/builder"; import ModuleBase from "./moduleBase"; @@ -139,7 +139,7 @@ export default class App extends ModuleBase { } } - const defaultConfig: billingConfig = { + const defaultConfig: appBillingConfig = { depositAddress: this.ain.wallet.defaultAccount!.address, service: { default: { @@ -163,10 +163,10 @@ export default class App extends ModuleBase { /** * Set billing config to app. * @param {string} appName - * @param {billingConfig} config - The configuration of your app's billing. + * @param {appBillingConfig} config - The configuration of your app's billing. * @returns Result of transaction. */ - async setBillingConfig(appName: string, config: billingConfig) { + async setBillingConfig(appName: string, config: appBillingConfig) { const setConfigOp = this.buildSetBillingConfigOp(appName, config); const txBody = this.buildTxBody(setConfigOp); return await this.sendTransaction(txBody); @@ -175,9 +175,9 @@ export default class App extends ModuleBase { /** * Get billing config of app * @param {string} appName - * @returns {Promise} + * @returns {Promise} */ - async getBillingConfig(appName: string): Promise { + async getBillingConfig(appName: string): Promise { return await this.ain.db.ref().getValue(Path.app(appName).billingConfig()); } @@ -250,7 +250,7 @@ export default class App extends ModuleBase { const balancePath = Path.app(appName).balanceOfUser(userAddress); return await this.ain.db.ref(balancePath).getValue(); } - private buildSetBillingConfigOp(appName: string, config: billingConfig) { + private buildSetBillingConfigOp(appName: string, config: appBillingConfig) { const path = Path.app(appName).billingConfig(); return buildSetOperation("SET_VALUE", path, config); } diff --git a/src/types/type.ts b/src/types/type.ts index b37f2c1..4041af1 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -21,15 +21,17 @@ export type setRuleParam = { ref: string } & writeRuleConfig; -export type billingConfig = { - depositAddress: string, +export type serviceBillingConfig = { + costPerToken: number; + minCost: number; + maxCost?: number; + responseTimeout?: number; +} + +export type appBillingConfig = { + depositAddress: string; service: { - [serviceName: string]: { - costPerToken: number, - minCost: number, - maxCost?: number, - responseTimeout?: number, - } + [serviceName: string]: serviceBillingConfig; } }; From c17f28e5e8f365fe67e3059649a7feb289e0ff18 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Fri, 8 Sep 2023 15:01:05 +0900 Subject: [PATCH 113/235] fix: check default set --- src/modules/app.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 4236e1c..23932b1 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -63,7 +63,8 @@ const defaultAppRules = (appName: string): { [type: string]: { ref: string, valu ref: Path.app(appName).billingConfig(), value: { ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.depositAddress)", + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && " + + "util.isString(newData.depositAddress) && util.isDict(newData.service) && util.isDict(newData.service.default)", } } }, From 6f8bc20012edf1d04b7acd55bdb875d77d51b6b4 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 11 Sep 2023 09:12:54 +0900 Subject: [PATCH 114/235] fix: remove default set flag --- src/modules/app.ts | 19 +++++++------------ src/types/type.ts | 5 ----- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 23932b1..3b09afb 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -4,7 +4,6 @@ import { appBillingConfig, setDefaultFlag, setRuleParam, setTriggerFunctionParm, import { buildSetOperation } from "../utils/builder"; import ModuleBase from "./moduleBase"; -// FIXME(yoojin): move to constant. const defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { const rootRef = Path.app(appName).root(); return { @@ -115,9 +114,7 @@ export default class App extends ModuleBase { * @returns Result of transaction. */ // FIXME(yoojin): need to fix getting function urls. - async create(appName: string, functionUrls: TriggerFunctionUrlMap, setDefaultFlag?: setDefaultFlag) { - if (!setDefaultFlag) - setDefaultFlag = { triggerFuncton: true }; + async create(appName: string, functionUrls: TriggerFunctionUrlMap) { const setRuleOps: SetOperation[] = []; const setFunctionOps: SetOperation[] = []; const setBillingConfigOps: SetOperation[] = [] ; @@ -130,14 +127,12 @@ export default class App extends ModuleBase { setRuleOps.push(ruleOp); } - if (setDefaultFlag.triggerFuncton) { - const defaultFunctions = defaultAppFunctions(appName); - for (const [type, func] of Object.entries(defaultFunctions)) { - const { ref, function_id, function_type, function_url } = func(functionUrls[type]); - const value = this.buildSetFunctionValue({function_id, function_type, function_url}); - const funcOp = buildSetOperation("SET_FUNCTION", ref, value); - setFunctionOps.push(funcOp); - } + const defaultFunctions = defaultAppFunctions(appName); + for (const [type, func] of Object.entries(defaultFunctions)) { + const { ref, function_id, function_type, function_url } = func(functionUrls[type]); + const value = this.buildSetFunctionValue({function_id, function_type, function_url}); + const funcOp = buildSetOperation("SET_FUNCTION", ref, value); + setFunctionOps.push(funcOp); } const defaultConfig: appBillingConfig = { diff --git a/src/types/type.ts b/src/types/type.ts index 4041af1..964e040 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -1,8 +1,3 @@ -export type setDefaultFlag = { - triggerFuncton: boolean, -}; - -// NOTE(yoojin): pls suggest good name. export type triggerFunctionConfig = { function_type: string, function_url: string, From dc15174513112f3c0dd354241a74d75d5d1785c8 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 11 Sep 2023 09:14:21 +0900 Subject: [PATCH 115/235] fix: move default set functions in app module --- src/modules/app.ts | 196 +++++++++++++++++++++++---------------------- 1 file changed, 100 insertions(+), 96 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 3b09afb..c3a8571 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -1,103 +1,12 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../constants"; -import { appBillingConfig, setDefaultFlag, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; +import { appBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; import { buildSetOperation } from "../utils/builder"; import ModuleBase from "./moduleBase"; -const defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { - const rootRef = Path.app(appName).root(); - return { - root: { - ref: rootRef, - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true" - } - } - }, - deposit: { - ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, - value: { - ".rule": { - write: "data === null && util.isNumber(newData) && getValue(`/transfer/` + $userAddress + `/` + getValue(`/apps/" + `${appName}` + "/billingConfig/depositAddress`) + `/` + $transferKey + `/value`) === newData" - } - } - }, - balance: { - ref: Path.app(appName).balanceOfUser("$userAddress"), - value: { - ".rule": { - write: "(util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true) && util.isNumber(newData)" - } - } - }, - balanceHistory: { - ref: `${rootRef}/balance/$userAddress/history/$timestamp_and_type`, - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.amount) && (newData.type === 'DEPOSIT' || newData.type === 'USAGE')" - } - } - }, - request: { - ref: Path.app(appName).request("$serviceName", "$userAddress", "$requestKey"), - value: { - ".rule": { - write: - "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + - "((getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName) !== null) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`)) || " + - "getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/service/default/minCost`)" - } - } - }, - response: { - ref: Path.app(appName).response("$serviceName", "userAddress", "$requestKey"), - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.status)" - } - }, - }, - billingConfig: { - ref: Path.app(appName).billingConfig(), - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && " + - "util.isString(newData.depositAddress) && util.isDict(newData.service) && util.isDict(newData.service.default)", - } - } - }, - billingConfigOfService: { - ref: Path.app(appName).billingConfigOfService("$serviceName"), - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth,addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.minCost)", - } - } - } - } -} -const defaultAppFunctions = (appName: string) => { - return { - deposit: (url: string) => { - return { - ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, - function_type: "REST", - function_id: "deposit-trigger", - function_url: url, - } - }, - service: (url: string) => { - return { - ref: Path.app(appName).request("$serviceName", "$userAddress", "$requestKey"), - function_type: "REST", - function_id: "service-trigger", - function_url: url, - } - } - } -} + + // FIXME(yoojin): move to types. // NOTE(yoojin): temporary type. service url may be changed to array? @@ -120,14 +29,14 @@ export default class App extends ModuleBase { const setBillingConfigOps: SetOperation[] = [] ; const createAppOp = this.buildCreateAppOp(appName); - const defaultRules = defaultAppRules(appName); + const defaultRules = this.defaultAppRules(appName); for (const rule of Object.values(defaultRules)) { const { ref, value } = rule; const ruleOp = buildSetOperation("SET_RULE", ref, value); setRuleOps.push(ruleOp); } - const defaultFunctions = defaultAppFunctions(appName); + const defaultFunctions = this.defaultAppFunctions(appName); for (const [type, func] of Object.entries(defaultFunctions)) { const { ref, function_id, function_type, function_url } = func(functionUrls[type]); const value = this.buildSetFunctionValue({function_id, function_type, function_url}); @@ -283,4 +192,99 @@ export default class App extends ModuleBase { const value = !isRemoveOp ? null : true; return buildSetOperation("SET_VALUE", path, value); } + + private defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { + const rootRef = Path.app(appName).root(); + return { + root: { + ref: rootRef, + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true" + } + } + }, + deposit: { + ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, + value: { + ".rule": { + write: "data === null && util.isNumber(newData) && getValue(`/transfer/` + $userAddress + `/` + getValue(`/apps/" + `${appName}` + "/billingConfig/depositAddress`) + `/` + $transferKey + `/value`) === newData" + } + } + }, + balance: { + ref: Path.app(appName).balanceOfUser("$userAddress"), + value: { + ".rule": { + write: "(util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true) && util.isNumber(newData)" + } + } + }, + balanceHistory: { + ref: `${rootRef}/balance/$userAddress/history/$timestamp_and_type`, + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.amount) && (newData.type === 'DEPOSIT' || newData.type === 'USAGE')" + } + } + }, + request: { + ref: Path.app(appName).request("$serviceName", "$userAddress", "$requestKey"), + value: { + ".rule": { + write: + "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + + "((getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName) !== null) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`)) || " + + "getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/service/default/minCost`)" + } + } + }, + response: { + ref: Path.app(appName).response("$serviceName", "userAddress", "$requestKey"), + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.status)" + } + }, + }, + billingConfig: { + ref: Path.app(appName).billingConfig(), + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && " + + "util.isString(newData.depositAddress) && util.isDict(newData.service) && util.isDict(newData.service.default)", + } + } + }, + billingConfigOfService: { + ref: Path.app(appName).billingConfigOfService("$serviceName"), + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth,addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.minCost)", + } + } + } + } + } + + private defaultAppFunctions = (appName: string) => { + return { + deposit: (url: string) => { + return { + ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, + function_type: "REST", + function_id: "deposit-trigger", + function_url: url, + } + }, + service: (url: string) => { + return { + ref: Path.app(appName).request("$serviceName", "$userAddress", "$requestKey"), + function_type: "REST", + function_id: "service-trigger", + function_url: url, + } + } + } + } } From 10cdf2dba1ba77f23d3cdd7f4056b21699aaac25 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 11 Sep 2023 09:16:19 +0900 Subject: [PATCH 116/235] fix: move trigger function url map to types --- src/modules/app.ts | 12 +----------- src/types/type.ts | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index c3a8571..e1308f6 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -1,19 +1,9 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../constants"; -import { appBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; +import { appBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig, TriggerFunctionUrlMap } from "../types/type"; import { buildSetOperation } from "../utils/builder"; import ModuleBase from "./moduleBase"; - - - - -// FIXME(yoojin): move to types. -// NOTE(yoojin): temporary type. service url may be changed to array? -interface TriggerFunctionUrlMap { - [type: string]: string -} - export default class App extends ModuleBase { /** * Create App for your AI Service on AI Network. diff --git a/src/types/type.ts b/src/types/type.ts index 964e040..e1fe44b 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -1,19 +1,25 @@ export type triggerFunctionConfig = { - function_type: string, - function_url: string, - function_id: string, + function_type: string; + function_url: string; + function_id: string; }; +export type TriggerFunctionUrlMap = { + deposit: string; + service: string; + [type: string]: string; +} + export type setTriggerFunctionParm = { - ref: string + ref: string; } & triggerFunctionConfig; export type writeRuleConfig = { - write: string, + write: string; }; export type setRuleParam = { - ref: string + ref: string; } & writeRuleConfig; export type serviceBillingConfig = { @@ -36,9 +42,9 @@ export enum HISTORY_TYPE { } export type opResult = { - code: number, + code: number; bandwidth_gas_amount: number; - message?: string + message?: string; } export type txResult = { From ecf04503e42c9d9fbaeb38432363922c8e94aff0 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 11 Sep 2023 10:29:10 +0900 Subject: [PATCH 117/235] refactor: remove service tf set when app create --- src/modules/app.ts | 39 ++++++++++++--------------------------- src/types/type.ts | 6 ------ 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index e1308f6..5818c76 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -1,6 +1,6 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../constants"; -import { appBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig, TriggerFunctionUrlMap } from "../types/type"; +import { appBillingConfig, defaultTriggerFunctionParam, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; import { buildSetOperation } from "../utils/builder"; import ModuleBase from "./moduleBase"; @@ -13,7 +13,7 @@ export default class App extends ModuleBase { * @returns Result of transaction. */ // FIXME(yoojin): need to fix getting function urls. - async create(appName: string, functionUrls: TriggerFunctionUrlMap) { + async create(appName: string, serviceUrl: string) { const setRuleOps: SetOperation[] = []; const setFunctionOps: SetOperation[] = []; const setBillingConfigOps: SetOperation[] = [] ; @@ -26,14 +26,11 @@ export default class App extends ModuleBase { setRuleOps.push(ruleOp); } - const defaultFunctions = this.defaultAppFunctions(appName); - for (const [type, func] of Object.entries(defaultFunctions)) { - const { ref, function_id, function_type, function_url } = func(functionUrls[type]); - const value = this.buildSetFunctionValue({function_id, function_type, function_url}); - const funcOp = buildSetOperation("SET_FUNCTION", ref, value); - setFunctionOps.push(funcOp); - } - + const { ref, function_id, function_type, function_url } = this.depositTriggerFunction(appName, serviceUrl); + const value = this.buildSetFunctionValue({ function_id, function_type, function_url }); + const funcOp = buildSetOperation("SET_FUNCTION", ref, value); + setFunctionOps.push(funcOp); + const defaultConfig: appBillingConfig = { depositAddress: this.ain.wallet.defaultAccount!.address, service: { @@ -257,24 +254,12 @@ export default class App extends ModuleBase { } } - private defaultAppFunctions = (appName: string) => { + private depositTriggerFunction = (appName: string, serviceUrl: string) => { return { - deposit: (url: string) => { - return { - ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, - function_type: "REST", - function_id: "deposit-trigger", - function_url: url, - } - }, - service: (url: string) => { - return { - ref: Path.app(appName).request("$serviceName", "$userAddress", "$requestKey"), - function_type: "REST", - function_id: "service-trigger", - function_url: url, - } - } + ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, + function_type: "REST", + function_id: "deposit-trigger", + function_url: `${serviceUrl}/deposit`, } } } diff --git a/src/types/type.ts b/src/types/type.ts index e1fe44b..b16c174 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -4,12 +4,6 @@ export type triggerFunctionConfig = { function_id: string; }; -export type TriggerFunctionUrlMap = { - deposit: string; - service: string; - [type: string]: string; -} - export type setTriggerFunctionParm = { ref: string; } & triggerFunctionConfig; From 24a7fea46fd2c207d73260ceb518b2fd8ec1c800 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 11 Sep 2023 10:32:13 +0900 Subject: [PATCH 118/235] refactor: param --- src/modules/app.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 5818c76..04233f9 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -1,6 +1,6 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../constants"; -import { appBillingConfig, defaultTriggerFunctionParam, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; +import { appBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; import { buildSetOperation } from "../utils/builder"; import ModuleBase from "./moduleBase"; @@ -26,9 +26,9 @@ export default class App extends ModuleBase { setRuleOps.push(ruleOp); } - const { ref, function_id, function_type, function_url } = this.depositTriggerFunction(appName, serviceUrl); - const value = this.buildSetFunctionValue({ function_id, function_type, function_url }); - const funcOp = buildSetOperation("SET_FUNCTION", ref, value); + const depositParam = this.depositTriggerFunctionConfig(appName, serviceUrl); + const value = this.buildSetFunctionValue(depositParam); + const funcOp = buildSetOperation("SET_FUNCTION", depositParam.ref, value); setFunctionOps.push(funcOp); const defaultConfig: appBillingConfig = { @@ -81,10 +81,9 @@ export default class App extends ModuleBase { */ async setTriggerFunctions(appName: string, functions: setTriggerFunctionParm[]) { const setFunctionOps: SetOperation[] = []; - for (const func of Object.values(functions)) { - const { ref } = func; - const value = this.buildSetFunctionValue(func); - const op = buildSetOperation("SET_FUNCTION", ref, value); + for (const param of Object.values(functions)) { + const value = this.buildSetFunctionValue(param); + const op = buildSetOperation("SET_FUNCTION", param.ref, value); setFunctionOps.push(op); } if (setFunctionOps.length <= 0) { @@ -254,7 +253,7 @@ export default class App extends ModuleBase { } } - private depositTriggerFunction = (appName: string, serviceUrl: string) => { + private depositTriggerFunctionConfig = (appName: string, serviceUrl: string): setTriggerFunctionParm => { return { ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, function_type: "REST", From 26079a6b74678404ba7861e160a2bff30b0441ef Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 11 Sep 2023 11:19:15 +0900 Subject: [PATCH 119/235] docs: add readme --- README.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7384cad..7367054 100644 --- a/README.md +++ b/README.md @@ -1 +1,57 @@ -# ainize-sdk \ No newline at end of file +# ainize-sdk + +A Typescript SDK for the Ainize, a system for running AI services on the AI Network. + +## Requirements +node >= 16 + +## usage +### Install +```bash +npm install @ainize-team/ainize-sdk + +yarn install @ainize-team/ainize-sdk +``` + +### Import +```typescript +import Ainize from '@ainize-team/ainize-sdk' +const ainize = new Ainize(, ); +``` + +CHAIN_ID +- 0: AI Network test net +- 1: AI Network main net + +### App +You can manage the AI Network app required for operating AI Services. +```typescript +ainize.app.create(, ); +ainize.app.setTriggerFunction(, ); +ainize.app.setBillingConfig(, ); +ainize.app.setRules(, ); +ainize.app.addAdmin(,
); +ainize.app.deleteAdmin(,
); +``` + +APP_NAME: The app name to be registered on AI Network. +SERVICE_URL: The URL for sending API requests to your AI Service. + +### Service +You can use AI Service. +```typescript +ainize.service.deposit(, ); +ainize.service.writeRequest(, , ); +``` + +### Admin +You can get user requests. +```typescript +ainize.admin.deposit(); +ainize.admin.writeResponse(, , , ); +``` + +## Test +```bash +yarn test +``` \ No newline at end of file From f22ee1fe6b33d16d83bf6583e875fafaf367f7a8 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 11 Sep 2023 11:19:22 +0900 Subject: [PATCH 120/235] style: space --- src/modules/app.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/app.ts b/src/modules/app.ts index 23932b1..02e23a4 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -251,6 +251,7 @@ export default class App extends ModuleBase { const balancePath = Path.app(appName).balanceOfUser(userAddress); return await this.ain.db.ref(balancePath).getValue(); } + private buildSetBillingConfigOp(appName: string, config: appBillingConfig) { const path = Path.app(appName).billingConfig(); return buildSetOperation("SET_VALUE", path, config); From b5a6288cb18f1c3478b3ff7c0223d039a80bf80e Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 11 Sep 2023 11:20:53 +0900 Subject: [PATCH 121/235] docs: value desc --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7367054..88e726e 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,8 @@ ainize.app.addAdmin(,
); ainize.app.deleteAdmin(,
); ``` -APP_NAME: The app name to be registered on AI Network. -SERVICE_URL: The URL for sending API requests to your AI Service. +- APP_NAME: The app name to be registered on AI Network. +- SERVICE_URL: The URL for sending API requests to your AI Service. ### Service You can use AI Service. From ee5821bfe94e9da1917cd8c0ee868b4472a1de2e Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 12 Sep 2023 09:25:49 +0900 Subject: [PATCH 122/235] docs: unlicense -> mit --- LICENSE | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/LICENSE b/LICENSE index fdddb29..b2c7ad9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,24 +1,21 @@ -This is free and unencumbered software released into the public domain. +MIT License -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. +Copyright (c) 2023 AINIZE Team -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -For more information, please refer to +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file From 38b5c83aefb98ee4fbcf28b6c3b8226f4c01a620 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 12 Sep 2023 14:56:56 +0900 Subject: [PATCH 123/235] feat: add get default account to moduleBase --- src/modules/moduleBase.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index 6fa0c23..fad028e 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -21,6 +21,10 @@ export default class ModuleBase { } } + protected getDefaultAccount() { + return this.ain.wallet.defaultAccount; + } + private async _sendTransaction(txBody: TransactionBody) { return await this.ain.sendTransaction(txBody); } From 341e8b9efef5ed400c218f031d8f09fb03a5470c Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 12 Sep 2023 15:00:46 +0900 Subject: [PATCH 124/235] feat: check defaultAccount at getDefaultAccount --- src/modules/moduleBase.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index fad028e..a564d6b 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -22,7 +22,10 @@ export default class ModuleBase { } protected getDefaultAccount() { - return this.ain.wallet.defaultAccount; + const defaultAccount = this.ain.wallet.defaultAccount; + if (!defaultAccount) + throw new Error("You need to initialize ainize with private key."); + return defaultAccount; } private async _sendTransaction(txBody: TransactionBody) { From c6bb3d7914ee50284228d2a636403b76e11d0fe1 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 12 Sep 2023 15:01:05 +0900 Subject: [PATCH 125/235] feat: use getDefaultAccount --- src/modules/app.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 007b5df..50bb1f4 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -30,9 +30,9 @@ export default class App extends ModuleBase { const value = this.buildSetFunctionValue(depositParam); const funcOp = buildSetOperation("SET_FUNCTION", depositParam.ref, value); setFunctionOps.push(funcOp); - + const depositAddress = this.getDefaultAccount().address; const defaultConfig: appBillingConfig = { - depositAddress: this.ain.wallet.defaultAccount!.address, + depositAddress, service: { default: { costPerToken: 0, @@ -149,11 +149,7 @@ export default class App extends ModuleBase { private buildCreateAppOp(appName: string): SetOperation { const path = `/manage_app/${appName}/create/${Date.now()}`; - const adminAccount = this.ain.wallet.defaultAccount!; - if (!adminAccount || !adminAccount.address) { - // FIXME(yoojin): change Error to Custom error when it added. - throw new Error("You need to enter your private key when initialize sdk."); - } + const adminAccount = this.getDefaultAccount(); const value = { admin: { [adminAccount.address]: true, From 2ef321784e96d7491f86be167395b8d177142e8f Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 12 Sep 2023 15:02:45 +0900 Subject: [PATCH 126/235] refactor: change getDefaultAccount to address --- src/modules/wallet.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index eb23349..e585072 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -13,11 +13,8 @@ export default class Wallet extends ModuleBase{ * Get defult AI Network blockchain account information set in ainize. * @returns Default account's address. */ - getDefaultAccount() { - if (!this.ain.wallet.defaultAccount) { - throw new Error("You need to set default account."); - } - return this.ain.wallet.defaultAccount.address; + getDefaultAddress() { + return this.getDefaultAccount().address; } /** @@ -27,7 +24,7 @@ export default class Wallet extends ModuleBase{ */ setDefaultAccount(privateKey: string) { this.ain.wallet.addAndSetDefaultAccount(privateKey); - return this.getDefaultAccount(); + return this.getDefaultAddress(); } /** @@ -46,7 +43,7 @@ export default class Wallet extends ModuleBase{ */ getAinBalance(address?: string) { if (!address) { - address = this.getDefaultAccount(); + address = this.getDefaultAddress(); } return this.ain.wallet.getBalance(address); } @@ -59,7 +56,7 @@ export default class Wallet extends ModuleBase{ */ async sendTxWithAddress(txBody: TransactionInput, signerAddress?: string) { if (!signerAddress) { - signerAddress = this.getDefaultAccount(); + signerAddress = this.getDefaultAddress(); } if (!this.ain.wallet.isAdded(signerAddress)) { throw new Error ("You need to add account"); From 6a2f1017fc3c3d43803f41be259e4c135c46a784 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 12 Sep 2023 15:03:57 +0900 Subject: [PATCH 127/235] refactor: change to getDefaultAddress --- src/modules/service/depositService.ts | 2 +- src/modules/service/useService.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index 5e9b6ad..f2f3bca 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -7,7 +7,7 @@ import { HISTORY_TYPE } from "../../types/type"; export default class DepositService extends ServiceBase { async requestDeposit(appName: string, amount: number, userAddress?: string) { const transferKey = Date.now(); - userAddress = userAddress ? userAddress : this.wallet.getDefaultAccount(); + userAddress = userAddress ? userAddress : this.wallet.getDefaultAddress(); const depositAddress = await this.getDepositAddress(appName); const op_list: SetOperation[] = [ diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index 991231c..0fa93fe 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -7,7 +7,7 @@ import ServiceBase from "./serviceBase"; export default class UseService extends ServiceBase{ async writeRequest(appName: string, serviceName: string, value: string, requesterAddress?: string) { const requestKey = Date.now(); - requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAccount(); + requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAddress(); const requestPath = Path.app(appName).request(serviceName, requesterAddress, requestKey); const requestData = { prompt: value, @@ -19,7 +19,7 @@ export default class UseService extends ServiceBase{ } async calculateCostAndCheckBalance(appName: string, serviceName: string, value: string, requesterAddress?: string) { - requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAccount(); + requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAddress(); const billingConfig = await this.app.getBillingConfig(appName); // TODO(woojae): calculate cost more accurately let serviceBillingConfig = billingConfig.service.default; From 57174f828540af75e586663f1a5df3eb301e0936 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 12 Sep 2023 15:19:03 +0900 Subject: [PATCH 128/235] fix: error msg --- src/modules/moduleBase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index a564d6b..163d948 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -24,7 +24,7 @@ export default class ModuleBase { protected getDefaultAccount() { const defaultAccount = this.ain.wallet.defaultAccount; if (!defaultAccount) - throw new Error("You need to initialize ainize with private key."); + throw new Error("You need to set default account."); return defaultAccount; } From 526fe8d046d00097308240327748ef9bcabc7995 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 12 Sep 2023 16:40:22 +0900 Subject: [PATCH 129/235] refactor: add req,res type --- src/modules/admin.ts | 24 ++++++++++++++---------- src/modules/service/useService.ts | 5 +++-- src/types/type.ts | 27 +++++++++++++++++++++++---- 3 files changed, 40 insertions(+), 16 deletions(-) diff --git a/src/modules/admin.ts b/src/modules/admin.ts index 1891c40..629bb16 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -3,7 +3,7 @@ import { Request } from "express"; import ModuleBase from "./moduleBase"; import DepositService from "./service/depositService"; import UseService from "./service/useService"; -import { RESPONSE_STATUS } from "../types/type"; +import { RESPONSE_STATUS, requestData, response } from "../types/type"; export default class Admin extends ModuleBase { private depositService: DepositService; @@ -50,27 +50,31 @@ export default class Admin extends ModuleBase { * @returns Result of transaction. */ async writeResponse(req:Request, amount: number, responseData: string, status: RESPONSE_STATUS ) { - const appName = req.body.valuePath[1]; - const serviceName = req.body.valuePath[3]; - const requesterAddress = req.body.auth.addr; - const requestKey = req.body.valuePath[5]; - return await this.useService.writeResponse(status , appName, serviceName, requesterAddress, requestKey, responseData, amount); + const requestData = this.getDataFromServiceRequest(req); + const response: response = { + status: status, + amount: amount, + responseData: responseData, + ...requestData, + } + return await this.useService.writeResponse(response); } /** * Get data from service request. You should use it only with service trigger. * @param {Request} request - Request data from request trigger. If req data is not from trigger function, it will throw error. - * @returns Object with appName, serviceName, requesterAddress, requestKey, responseData. + * @returns RequestData type. */ getDataFromServiceRequest(req: Request) { if(!req.body.valuePath[1] || !req.body.valuePath[3] || !req.body.valuePath[5] || !req.body.value.prompt) { throw new Error("Not from service request"); } - return { + const requestData: requestData = { appName: req.body.valuePath[1], serviceName: req.body.valuePath[3], requesterAddress: req.body.auth.addr, requestKey: req.body.valuePath[5], - responseData: req.body.value.prompt, + prompt: req.body.value.prompt, } + return requestData; } -} +} \ No newline at end of file diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index 0fa93fe..f6ceb20 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -1,6 +1,6 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../../constants"; -import { HISTORY_TYPE, RESPONSE_STATUS } from "../../types/type"; +import { HISTORY_TYPE, RESPONSE_STATUS, response } from "../../types/type"; import { buildSetOperation } from "../../utils/builder"; import ServiceBase from "./serviceBase"; @@ -40,7 +40,8 @@ export default class UseService extends ServiceBase{ return amount; } - async writeResponse(status: RESPONSE_STATUS, appName: string, serviceName: string, requesterAddress: string, requestKey: string, responseData: string, amount: number) { + async writeResponse(response: response) { + const { responseData, status, requesterAddress, requestKey, appName, serviceName, amount } = response; const responsePath = Path.app(appName).response(serviceName, requesterAddress, requestKey); const responseValue = { status, diff --git a/src/types/type.ts b/src/types/type.ts index b16c174..a37f0b8 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -17,10 +17,10 @@ export type setRuleParam = { } & writeRuleConfig; export type serviceBillingConfig = { - costPerToken: number; - minCost: number; - maxCost?: number; - responseTimeout?: number; + costPerToken: number; + minCost: number; + maxCost?: number; + responseTimeout?: number; } export type appBillingConfig = { @@ -54,3 +54,22 @@ export enum RESPONSE_STATUS { SUCCESS = "SUCCESS", FAIL = "FAIL", } + +export type requestData = { + prompt: string, + requesterAddress: string, + requestKey: string, + serviceName: string, + appName: string, +}; + +export type response = { + responseData: string, + amount: number, + status: RESPONSE_STATUS, + prompt: string, + requesterAddress: string, + requestKey: string, + appName: string, + serviceName: string, +} \ No newline at end of file From 344e8c19e940edee5d3d9de27205a56dc605b5de Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 12 Sep 2023 16:41:37 +0900 Subject: [PATCH 130/235] refactor: requestData to request --- src/modules/admin.ts | 4 ++-- src/types/type.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/admin.ts b/src/modules/admin.ts index 629bb16..c83cf2e 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -3,7 +3,7 @@ import { Request } from "express"; import ModuleBase from "./moduleBase"; import DepositService from "./service/depositService"; import UseService from "./service/useService"; -import { RESPONSE_STATUS, requestData, response } from "../types/type"; +import { RESPONSE_STATUS, request, response } from "../types/type"; export default class Admin extends ModuleBase { private depositService: DepositService; @@ -68,7 +68,7 @@ export default class Admin extends ModuleBase { if(!req.body.valuePath[1] || !req.body.valuePath[3] || !req.body.valuePath[5] || !req.body.value.prompt) { throw new Error("Not from service request"); } - const requestData: requestData = { + const requestData: request = { appName: req.body.valuePath[1], serviceName: req.body.valuePath[3], requesterAddress: req.body.auth.addr, diff --git a/src/types/type.ts b/src/types/type.ts index a37f0b8..7853b5e 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -55,7 +55,7 @@ export enum RESPONSE_STATUS { FAIL = "FAIL", } -export type requestData = { +export type request = { prompt: string, requesterAddress: string, requestKey: string, From 7da0224de9ad5b76b2d1951c31819a280c8dc5f9 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 12 Sep 2023 16:42:33 +0900 Subject: [PATCH 131/235] refactor: prompt to requestData --- src/modules/admin.ts | 2 +- src/types/type.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/admin.ts b/src/modules/admin.ts index c83cf2e..789b446 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -73,7 +73,7 @@ export default class Admin extends ModuleBase { serviceName: req.body.valuePath[3], requesterAddress: req.body.auth.addr, requestKey: req.body.valuePath[5], - prompt: req.body.value.prompt, + requestData: req.body.value.prompt, } return requestData; } diff --git a/src/types/type.ts b/src/types/type.ts index 7853b5e..c95dfba 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -56,7 +56,7 @@ export enum RESPONSE_STATUS { } export type request = { - prompt: string, + requestData: string, requesterAddress: string, requestKey: string, serviceName: string, @@ -67,7 +67,7 @@ export type response = { responseData: string, amount: number, status: RESPONSE_STATUS, - prompt: string, + requestData: string, requesterAddress: string, requestKey: string, appName: string, From 435102e2f22ec721126266e24cea932250303e58 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 13 Sep 2023 09:53:29 +0900 Subject: [PATCH 132/235] feat: add serviceBillingConfig --- src/modules/app.ts | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 50bb1f4..3bde511 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -1,6 +1,6 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../constants"; -import { appBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; +import { appBillingConfig, serviceBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; import { buildSetOperation } from "../utils/builder"; import ModuleBase from "./moduleBase"; @@ -40,7 +40,7 @@ export default class App extends ModuleBase { } } } - const configOp = this.buildSetBillingConfigOp(appName, defaultConfig); + const configOp = this.buildSetAppBillingConfigOp(appName, defaultConfig); setBillingConfigOps.push(configOp); const txBody = this.buildTxBody([ @@ -58,8 +58,21 @@ export default class App extends ModuleBase { * @param {appBillingConfig} config - The configuration of your app's billing. * @returns Result of transaction. */ - async setBillingConfig(appName: string, config: appBillingConfig) { - const setConfigOp = this.buildSetBillingConfigOp(appName, config); + async setAppBillingConfig(appName: string, config: appBillingConfig) { + const setConfigOp = this.buildSetAppBillingConfigOp(appName, config); + const txBody = this.buildTxBody(setConfigOp); + return await this.sendTransaction(txBody); + } + + /** + * Set billing config to a specific service. + * @param {string} appName + * @param {string} serviceName + * @param {serviceBillingConfig} config + * @returns Result of transaction. + */ + async setServiceBillingConfig(appName: string, serviceName: string, config: serviceBillingConfig) { + const setConfigOp = this.buildSetServiceBillingConfigOp(appName, serviceName, config); const txBody = this.buildTxBody(setConfigOp); return await this.sendTransaction(txBody); } @@ -142,11 +155,16 @@ export default class App extends ModuleBase { return await this.ain.db.ref(balancePath).getValue(); } - private buildSetBillingConfigOp(appName: string, config: appBillingConfig) { + private buildSetAppBillingConfigOp(appName: string, config: appBillingConfig) { const path = Path.app(appName).billingConfig(); return buildSetOperation("SET_VALUE", path, config); } + private buildSetServiceBillingConfigOp(appName: string,serviceName: string, config: serviceBillingConfig) { + const path = Path.app(appName).billingConfigOfService(serviceName); + return buildSetOperation("SET_VALUE", path, config); + } + private buildCreateAppOp(appName: string): SetOperation { const path = `/manage_app/${appName}/create/${Date.now()}`; const adminAccount = this.getDefaultAccount(); From 8d4124f5ff4190b0a92ac2f0e180c5d520c2becb Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 13 Sep 2023 10:01:57 +0900 Subject: [PATCH 133/235] style: space --- src/modules/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 3bde511..80351b1 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -160,7 +160,7 @@ export default class App extends ModuleBase { return buildSetOperation("SET_VALUE", path, config); } - private buildSetServiceBillingConfigOp(appName: string,serviceName: string, config: serviceBillingConfig) { + private buildSetServiceBillingConfigOp(appName: string, serviceName: string, config: serviceBillingConfig) { const path = Path.app(appName).billingConfigOfService(serviceName); return buildSetOperation("SET_VALUE", path, config); } From 71793cc7c0a36e6b02fbdacfe6a177f8171aadd2 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 13 Sep 2023 10:14:29 +0900 Subject: [PATCH 134/235] refactor: amount to cost --- src/middlewares/middleware.ts | 2 +- src/modules/admin.ts | 10 +++++----- src/modules/service/useService.ts | 20 ++++++++++---------- src/types/type.ts | 9 ++------- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/src/middlewares/middleware.ts b/src/middlewares/middleware.ts index 79d1f9e..e373036 100644 --- a/src/middlewares/middleware.ts +++ b/src/middlewares/middleware.ts @@ -11,7 +11,7 @@ export default class Middleware { * Middleware for AI Network trigger call. It will filter duplicated request triggered by same transaction. * It will pass request which is not from AI Network trigger. * @param {Request} request - Request data - * @param {Res} amount - Response data + * @param {Res} response - Response data * @param {NextFunction} next - Next function * @returns Null if if request is duplicated. */ diff --git a/src/modules/admin.ts b/src/modules/admin.ts index 789b446..49d7e10 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -44,17 +44,17 @@ export default class Admin extends ModuleBase { * Write response. Then change balance of requester and write history of user balance if response status is success. * You should match this function with service trigger. * @param {Request} request - Request data from request trigger. If req data is not from trigger function, it will throw error. - * @param {number} amount - Cost of service. Calculate it with checkCostAndBalance function. + * @param {number} cost - Cost of service. Calculate it with checkCostAndBalance function. * @param {string} responseData - Data you want to response to requester. * @param {RESPONSE_STATUS} status - Status of response. If status is success, it will change balance of requester and write history of user balance. * @returns Result of transaction. */ - async writeResponse(req:Request, amount: number, responseData: string, status: RESPONSE_STATUS ) { + async writeResponse(req:Request, cost: number, responseData: string, status: RESPONSE_STATUS ) { const requestData = this.getDataFromServiceRequest(req); const response: response = { - status: status, - amount: amount, - responseData: responseData, + status, + cost, + responseData, ...requestData, } return await this.useService.writeResponse(response); diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index f6ceb20..45acc72 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -27,21 +27,21 @@ export default class UseService extends ServiceBase{ serviceBillingConfig = billingConfig.service[serviceName]; } const token = value.split(' ').length; - let amount = token * serviceBillingConfig.costPerToken; - if (serviceBillingConfig.minCost && amount < serviceBillingConfig.minCost) { - amount = serviceBillingConfig.minCost; - } else if (serviceBillingConfig.maxCost && amount > serviceBillingConfig.maxCost) { - amount = serviceBillingConfig.maxCost; + let cost = token * serviceBillingConfig.costPerToken; + if (serviceBillingConfig.minCost && cost < serviceBillingConfig.minCost) { + cost = serviceBillingConfig.minCost; + } else if (serviceBillingConfig.maxCost && cost > serviceBillingConfig.maxCost) { + cost = serviceBillingConfig.maxCost; } const balance = await this.app.getCreditBalance(appName, requesterAddress); - if (balance < amount) { + if (balance < cost) { throw new Error("not enough balance"); } - return amount; + return cost; } async writeResponse(response: response) { - const { responseData, status, requesterAddress, requestKey, appName, serviceName, amount } = response; + const { responseData, status, requesterAddress, requestKey, appName, serviceName, cost } = response; const responsePath = Path.app(appName).response(serviceName, requesterAddress, requestKey); const responseValue = { status, @@ -51,8 +51,8 @@ export default class UseService extends ServiceBase{ const responseOp = buildSetOperation("SET_VALUE", responsePath, responseValue); ops.push(responseOp); if (status === RESPONSE_STATUS.SUCCESS) { - const changeBalanceOp = await this.getChangeBalanceOp(appName, requesterAddress, 'DEC_VALUE', amount); - const writeHistoryOp = await this.getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.USAGE, amount, requestKey); + const changeBalanceOp = await this.getChangeBalanceOp(appName, requesterAddress, 'DEC_VALUE', cost); + const writeHistoryOp = await this.getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.USAGE, cost, requestKey); ops.push(changeBalanceOp); ops.push(writeHistoryOp); } diff --git a/src/types/type.ts b/src/types/type.ts index c95dfba..5830713 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -63,13 +63,8 @@ export type request = { appName: string, }; -export type response = { +export type response = request & { responseData: string, - amount: number, + cost: number, status: RESPONSE_STATUS, - requestData: string, - requesterAddress: string, - requestKey: string, - appName: string, - serviceName: string, } \ No newline at end of file From e404ba1874c6a42c12a3017a11f4be2c71daa2b8 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 13 Sep 2023 10:48:18 +0900 Subject: [PATCH 135/235] refactor: checkCostAndBalance --- src/modules/admin.ts | 13 ------------- src/modules/app.ts | 31 +++++++++++++++++++++++++++++++ src/modules/service.ts | 5 ++++- src/modules/service/useService.ts | 22 ---------------------- 4 files changed, 35 insertions(+), 36 deletions(-) diff --git a/src/modules/admin.ts b/src/modules/admin.ts index 49d7e10..6207d47 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -26,19 +26,6 @@ export default class Admin extends ModuleBase { const requesterAddress = req.body.auth.addr; return await this.depositService.handleDeposit(appName, transferKey, transferValue,requesterAddress); } - - /** - * Check cost of request and check if account can pay. You should use this function before send or handle request. - * If you don't set address, it will use default account's address. - * @param {string} appName - App name you want to request service to. - * @param {string} serviceName - Service name you want to request to. - * @param {string} prompt - Data you want to request to service . - * @param {string=} userAddress - Address of account you want to check balance. You should set default account if you don't provide address. - * @returns Result cost of service. It throws error when user can't pay. - */ - async checkCostAndBalance(appName: string, serviceName: string, prompt: string, userAddress?: string) { - return await this.useService.calculateCostAndCheckBalance(appName, serviceName, prompt, userAddress); - } /** * Write response. Then change balance of requester and write history of user balance if response status is success. diff --git a/src/modules/app.ts b/src/modules/app.ts index 80351b1..7f92ce5 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -150,6 +150,37 @@ export default class App extends ModuleBase { return await this.sendTransaction(txBody); } + /** + * Check cost of request and check if account can pay. You should use this function before send or handle request. + * If you don't set address, it will use default account's address. + * @param {string} appName - App name you want to request service to. + * @param {string} serviceName - Service name you want to request to. + * @param {string} prompt - Data you want to request to service . + * @param {string=} userAddress - Address of account you want to check balance. You should set default account if you don't provide address. + * @returns Result cost of service. It throws error when user can't pay. + */ + async checkCostAndBalance(appName: string, serviceName: string, value: string, requesterAddress?: string) { + requesterAddress = requesterAddress ? requesterAddress : this.getDefaultAccount().address; + const billingConfig = await this.getBillingConfig(appName); + // TODO(woojae): calculate cost more accurately + let serviceBillingConfig = billingConfig.service.default; + if(billingConfig.service[serviceName]) { + serviceBillingConfig = billingConfig.service[serviceName]; + } + const token = value.split(' ').length; + let cost = token * serviceBillingConfig.costPerToken; + if (serviceBillingConfig.minCost && cost < serviceBillingConfig.minCost) { + cost = serviceBillingConfig.minCost; + } else if (serviceBillingConfig.maxCost && cost > serviceBillingConfig.maxCost) { + cost = serviceBillingConfig.maxCost; + } + const balance = await this.getCreditBalance(appName, requesterAddress); + if (balance < cost) { + throw new Error("not enough balance"); + } + return cost; + } + async getCreditBalance(appName: string, userAddress: string) { const balancePath = Path.app(appName).balanceOfUser(userAddress); return await this.ain.db.ref(balancePath).getValue(); diff --git a/src/modules/service.ts b/src/modules/service.ts index f28b1ad..2128738 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -2,14 +2,17 @@ import ModuleBase from "./moduleBase"; import DepositService from "./service/depositService"; import UseService from "./service/useService"; import Ainize from "../ainize"; +import App from "./app"; export default class Service extends ModuleBase { private depositService: DepositService; private useService: UseService; + private app: App; constructor(ainize: Ainize, depositService: DepositService, useService: UseService) { super(ainize); this.depositService = depositService; this.useService = useService; + this.app = ainize.app; } /** @@ -33,7 +36,7 @@ export default class Service extends ModuleBase { * @returns RequestKey. You can use it to get response by handler. */ async writeRequest(appName: string, serviceName: string, prompt: string, userAddress?: string) { - await this.useService.calculateCostAndCheckBalance(appName, serviceName, prompt, userAddress); + await this.app.checkCostAndBalance(appName, serviceName, prompt, userAddress); return await this.useService.writeRequest(appName, serviceName, prompt, userAddress); } } diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index 45acc72..1aa364a 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -18,28 +18,6 @@ export default class UseService extends ServiceBase{ return requestKey; } - async calculateCostAndCheckBalance(appName: string, serviceName: string, value: string, requesterAddress?: string) { - requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAddress(); - const billingConfig = await this.app.getBillingConfig(appName); - // TODO(woojae): calculate cost more accurately - let serviceBillingConfig = billingConfig.service.default; - if(billingConfig.service[serviceName]) { - serviceBillingConfig = billingConfig.service[serviceName]; - } - const token = value.split(' ').length; - let cost = token * serviceBillingConfig.costPerToken; - if (serviceBillingConfig.minCost && cost < serviceBillingConfig.minCost) { - cost = serviceBillingConfig.minCost; - } else if (serviceBillingConfig.maxCost && cost > serviceBillingConfig.maxCost) { - cost = serviceBillingConfig.maxCost; - } - const balance = await this.app.getCreditBalance(appName, requesterAddress); - if (balance < cost) { - throw new Error("not enough balance"); - } - return cost; - } - async writeResponse(response: response) { const { responseData, status, requesterAddress, requestKey, appName, serviceName, cost } = response; const responsePath = Path.app(appName).response(serviceName, requesterAddress, requestKey); From 19044eee626e6329cb64b7189e676e6fd82d2a87 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 13 Sep 2023 15:50:26 +0900 Subject: [PATCH 136/235] fix: throw all tx result --- src/modules/moduleBase.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index 163d948..56789a9 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -32,25 +32,22 @@ export default class ModuleBase { return await this.ain.sendTransaction(txBody); } - private getFailedOpResultList(result: txResult): opResult[] { + private hasFailedOpResultList(result: txResult): boolean { if (result.result_list) { - return Object.values(result.result_list).filter( + return Object.values(result.result_list).some( (result: { code: number }) => result.code !== 0 ); } - return []; + return result.code !== 0; } private handleTxResultWrapper(operation: Function) { return async (args: any) => { const res = await operation(args); const { tx_hash, result } = res; - const failedOpResult = this.getFailedOpResultList(result); - if (failedOpResult.length > 0) { - const errorString = failedOpResult.map((value) => `\n code: ${value.code} - ${value.message}`); - console.log('failedOpResult :>> ', failedOpResult); + if (this.hasFailedOpResultList(result)) { throw new Error( - `Failed to send transaction (${tx_hash}).` + errorString + `Failed to send transaction (${tx_hash}).\n Tx Result: ${JSON.stringify(result)}` ); } return tx_hash; From 603c0ecb41a01c7938364d68259971b7fee21100 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 13 Sep 2023 15:51:04 +0900 Subject: [PATCH 137/235] fix: billing config rules --- src/modules/app.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 7f92ce5..b46373d 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -283,19 +283,11 @@ export default class App extends ModuleBase { ref: Path.app(appName).billingConfig(), value: { ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && " + - "util.isString(newData.depositAddress) && util.isDict(newData.service) && util.isDict(newData.service.default)", + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.depositAddress) && " + + "util.isDict(newData.service) && util.isDict(newData.service.default) && util.isNumber(newData.service.default.costPerToken) && util.isNumber(newData.service.default.minCost)", } } }, - billingConfigOfService: { - ref: Path.app(appName).billingConfigOfService("$serviceName"), - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth,addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.minCost)", - } - } - } } } From de87a41685ecc8e9adbc8f5e6a4af5ec3bb1367d Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 13 Sep 2023 15:51:22 +0900 Subject: [PATCH 138/235] billingconfig --- src/modules/app.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 7f92ce5..5ea4eb2 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -161,11 +161,19 @@ export default class App extends ModuleBase { */ async checkCostAndBalance(appName: string, serviceName: string, value: string, requesterAddress?: string) { requesterAddress = requesterAddress ? requesterAddress : this.getDefaultAccount().address; - const billingConfig = await this.getBillingConfig(appName); + const billingConfig = (await this.getBillingConfig(appName)).service; + const serviceBillingConfig = billingConfig.default; // TODO(woojae): calculate cost more accurately - let serviceBillingConfig = billingConfig.service.default; - if(billingConfig.service[serviceName]) { - serviceBillingConfig = billingConfig.service[serviceName]; + if(billingConfig[serviceName]) { + if(billingConfig[serviceName].costPerToken) { + serviceBillingConfig.costPerToken = billingConfig[serviceName].costPerToken; + } + if(billingConfig[serviceName].minCost) { + serviceBillingConfig.minCost = billingConfig[serviceName].minCost; + } + if(billingConfig[serviceName].maxCost) { + serviceBillingConfig.maxCost = billingConfig[serviceName].maxCost; + } } const token = value.split(' ').length; let cost = token * serviceBillingConfig.costPerToken; From 99fc5802e9974e9a17eff06600cc9fe3216db621 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 13 Sep 2023 15:54:16 +0900 Subject: [PATCH 139/235] fix: request rule --- src/modules/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index b46373d..7eeddb5 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -266,7 +266,7 @@ export default class App extends ModuleBase { ".rule": { write: "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + - "((getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName) !== null) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`)) || " + + "((getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`) !== null) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`)) || " + "getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/service/default/minCost`)" } } From 5b46a950792acf15160ab3acf7b3083ccec15b7c Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 13 Sep 2023 15:59:07 +0900 Subject: [PATCH 140/235] fix: delete maxCost elseIf --- src/modules/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 5ea4eb2..7c33b27 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -163,7 +163,6 @@ export default class App extends ModuleBase { requesterAddress = requesterAddress ? requesterAddress : this.getDefaultAccount().address; const billingConfig = (await this.getBillingConfig(appName)).service; const serviceBillingConfig = billingConfig.default; - // TODO(woojae): calculate cost more accurately if(billingConfig[serviceName]) { if(billingConfig[serviceName].costPerToken) { serviceBillingConfig.costPerToken = billingConfig[serviceName].costPerToken; @@ -179,7 +178,8 @@ export default class App extends ModuleBase { let cost = token * serviceBillingConfig.costPerToken; if (serviceBillingConfig.minCost && cost < serviceBillingConfig.minCost) { cost = serviceBillingConfig.minCost; - } else if (serviceBillingConfig.maxCost && cost > serviceBillingConfig.maxCost) { + } + if (serviceBillingConfig.maxCost && cost > serviceBillingConfig.maxCost) { cost = serviceBillingConfig.maxCost; } const balance = await this.getCreditBalance(appName, requesterAddress); From cdbd125eedefacca66cefe74e29869ab859b4822 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 13 Sep 2023 16:00:37 +0900 Subject: [PATCH 141/235] revert --- src/modules/app.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 7c33b27..6f9e821 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -178,8 +178,7 @@ export default class App extends ModuleBase { let cost = token * serviceBillingConfig.costPerToken; if (serviceBillingConfig.minCost && cost < serviceBillingConfig.minCost) { cost = serviceBillingConfig.minCost; - } - if (serviceBillingConfig.maxCost && cost > serviceBillingConfig.maxCost) { + } else if (serviceBillingConfig.maxCost && cost > serviceBillingConfig.maxCost) { cost = serviceBillingConfig.maxCost; } const balance = await this.getCreditBalance(appName, requesterAddress); From a751210f1b683f0a7961eba0e3c18eedfe2a3ecb Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 13 Sep 2023 16:02:45 +0900 Subject: [PATCH 142/235] feat: add maxCost rule --- src/modules/app.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 7eeddb5..cd8152d 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -284,7 +284,8 @@ export default class App extends ModuleBase { value: { ".rule": { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.depositAddress) && " + - "util.isDict(newData.service) && util.isDict(newData.service.default) && util.isNumber(newData.service.default.costPerToken) && util.isNumber(newData.service.default.minCost)", + "util.isDict(newData.service) && util.isDict(newData.service.default) && util.isNumber(newData.service.default.costPerToken) && util.isNumber(newData.service.default.minCost) && " + + "util.isNull(newData.service.default.maxCost) || (util.isNumber(newData.service.default.maxCost) && newData.service.default.maxCost >= newData.service.default.minCost", } } }, From 26d0c5a1d340d6d8cfd6c01b96910a414c453c95 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 13 Sep 2023 16:10:58 +0900 Subject: [PATCH 143/235] fix: typo --- src/modules/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index cd8152d..e67272d 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -285,7 +285,7 @@ export default class App extends ModuleBase { ".rule": { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.depositAddress) && " + "util.isDict(newData.service) && util.isDict(newData.service.default) && util.isNumber(newData.service.default.costPerToken) && util.isNumber(newData.service.default.minCost) && " + - "util.isNull(newData.service.default.maxCost) || (util.isNumber(newData.service.default.maxCost) && newData.service.default.maxCost >= newData.service.default.minCost", + "util.isNull(newData.service.default.maxCost) || (util.isNumber(newData.service.default.maxCost) && newData.service.default.maxCost >= newData.service.default.minCost)", } } }, From b2c93b378d3224ca6c46756ad5c805a27b653366 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 13 Sep 2023 16:20:25 +0900 Subject: [PATCH 144/235] fix: rule null check --- src/modules/app.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index e67272d..3060279 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -44,9 +44,9 @@ export default class App extends ModuleBase { setBillingConfigOps.push(configOp); const txBody = this.buildTxBody([ - createAppOp, + // createAppOp, ...setRuleOps, - ...setFunctionOps, + // ...setFunctionOps, ...setBillingConfigOps, ]); return await this.sendTransaction(txBody); @@ -285,7 +285,7 @@ export default class App extends ModuleBase { ".rule": { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.depositAddress) && " + "util.isDict(newData.service) && util.isDict(newData.service.default) && util.isNumber(newData.service.default.costPerToken) && util.isNumber(newData.service.default.minCost) && " + - "util.isNull(newData.service.default.maxCost) || (util.isNumber(newData.service.default.maxCost) && newData.service.default.maxCost >= newData.service.default.minCost)", + "util.isEmpty(newData.service.default.maxCost) || (util.isNumber(newData.service.default.maxCost) && newData.service.default.maxCost >= newData.service.default.minCost)", } } }, From 227713e4c25622e9152d47c9a10a9aa0613f3e62 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 13 Sep 2023 17:19:09 +0900 Subject: [PATCH 145/235] fix: request rull null check --- src/modules/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 3060279..fb1bc7a 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -92,7 +92,7 @@ export default class App extends ModuleBase { * @param {setTriggerFunctionParam[]} functions * @returns Result of transaction. */ - async setTriggerFunctions(appName: string, functions: setTriggerFunctionParm[]) { + async setTriggerFunctions(appName: string, functions: any[]) { const setFunctionOps: SetOperation[] = []; for (const param of Object.values(functions)) { const value = this.buildSetFunctionValue(param); @@ -266,7 +266,7 @@ export default class App extends ModuleBase { ".rule": { write: "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + - "((getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`) !== null) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`)) || " + + "(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`)) || " + "getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/service/default/minCost`)" } } From d01dd71b7e1963de6af537160ff78961c6b616d1 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 13 Sep 2023 17:19:26 +0900 Subject: [PATCH 146/235] fix: send transaction to wrapped method --- src/modules/wallet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts index e585072..16dc8d4 100644 --- a/src/modules/wallet.ts +++ b/src/modules/wallet.ts @@ -62,6 +62,6 @@ export default class Wallet extends ModuleBase{ throw new Error ("You need to add account"); } txBody.address = signerAddress; - return await this.ain.sendTransaction(txBody); + return await this.sendTransaction(txBody); } } From f7a870ed6adb029cdc1d33f5453c711b2ff9f0cd Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 13 Sep 2023 17:20:09 +0900 Subject: [PATCH 147/235] fix: uncomment --- src/modules/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index fb1bc7a..064875e 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -44,9 +44,9 @@ export default class App extends ModuleBase { setBillingConfigOps.push(configOp); const txBody = this.buildTxBody([ - // createAppOp, + createAppOp, ...setRuleOps, - // ...setFunctionOps, + ...setFunctionOps, ...setBillingConfigOps, ]); return await this.sendTransaction(txBody); From 92186d1f9380341d4c7c89663f9659703eece3a4 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 13 Sep 2023 17:23:04 +0900 Subject: [PATCH 148/235] fix: type --- src/modules/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/app.ts b/src/modules/app.ts index 064875e..8fd74c6 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -92,7 +92,7 @@ export default class App extends ModuleBase { * @param {setTriggerFunctionParam[]} functions * @returns Result of transaction. */ - async setTriggerFunctions(appName: string, functions: any[]) { + async setTriggerFunctions(appName: string, functions: setTriggerFunctionParm[]) { const setFunctionOps: SetOperation[] = []; for (const param of Object.values(functions)) { const value = this.buildSetFunctionValue(param); From e2ab8f13e44e404f534c686b8794bea4b0d9228f Mon Sep 17 00:00:00 2001 From: akaster99 Date: Thu, 14 Sep 2023 11:59:27 +0900 Subject: [PATCH 149/235] fix: delete Timeout --- src/constants.ts | 1 - src/handlers/handler.ts | 14 +++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 3088caa..9b96674 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -27,5 +27,4 @@ export const Path = { } export const SECOND = 1000; -export const HANDLER_TIMEOUT = 30 * SECOND; export const HANDLER_HEARBEAT_INTERVAL = 15 * SECOND; diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 9f17251..20ddd28 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -1,10 +1,15 @@ const _ = require("lodash"); -import { HANDLER_HEARBEAT_INTERVAL, HANDLER_TIMEOUT, Path } from "../constants"; -import ModuleBase from "../modules/moduleBase"; +import Ain from "@ainblockchain/ain-js"; +import { HANDLER_HEARBEAT_INTERVAL, Path } from "../constants"; +import Ainize from "../ainize"; -export default class Handler extends ModuleBase { +export default class Handler { isConnected: boolean = false; subscribeTable:any = {}; + ain: Ain; + constructor(ainize: Ainize) { + this.ain = ainize.ain; + } /** * Connect to ai Network event node. you should connect before subscibe. It will auto reconnect when disconnected. @@ -12,9 +17,8 @@ export default class Handler extends ModuleBase { */ async connect() { await this.ain.em.connect({ - handshakeTimeout: HANDLER_TIMEOUT, // Timeout in milliseconds for the web socket handshake request. heartbeatIntervalMs: HANDLER_HEARBEAT_INTERVAL, - }, this.disconnectedCallback); + }, this.disconnectedCallback.bind(this)); this.isConnected = true; }; From 600e39eaead2fc69db771f9470fd5b71118614dd Mon Sep 17 00:00:00 2001 From: akaster99 Date: Thu, 14 Sep 2023 13:45:08 +0900 Subject: [PATCH 150/235] fix: delte interval --- src/handlers/handler.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 20ddd28..1b068a9 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -16,15 +16,13 @@ export default class Handler { * @returns Nothing. */ async connect() { - await this.ain.em.connect({ - heartbeatIntervalMs: HANDLER_HEARBEAT_INTERVAL, - }, this.disconnectedCallback.bind(this)); + await this.ain.em.connect({}, this.disconnectedCallback.bind(this)); this.isConnected = true; }; - private disconnectedCallback() { + private async disconnectedCallback() { this.isConnected = false; - this.connect(); + await this.connect(); } /** From 67f8d17b2bb0e38960f6cc06730648036df77b4b Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 18 Sep 2023 17:08:54 +0900 Subject: [PATCH 151/235] feat: modelSkeleton --- src/ainize.ts | 4 ++ src/controllers/modelController.ts | 65 ++++++++++++++++++++++++++++ src/model.ts | 68 ++++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 100644 src/controllers/modelController.ts create mode 100644 src/model.ts diff --git a/src/ainize.ts b/src/ainize.ts index 53cb3bb..206f5cc 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -9,6 +9,7 @@ import DepositService from "./modules/service/depositService"; import UseService from "./modules/service/useService"; import Service from "./modules/service"; import Admin from "./modules/admin"; +import Model from "./model"; export default class Ainize { private cache: NodeCache; ain: Ain; @@ -33,6 +34,9 @@ export default class Ainize { this.admin = new Admin(this, depositService, useService); } + model(modelName: string) { + return new Model(modelName); + } test() { console.log("test"); } diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts new file mode 100644 index 0000000..89f288c --- /dev/null +++ b/src/controllers/modelController.ts @@ -0,0 +1,65 @@ +export default class ModelController { + instance: ModelController | undefined; + constructor() { + if(this.instance) return this.instance; + this.instance = this; + } + + //TODO(woojae): implement this + async isRunning(modelName: string) { + return await true; + } + + //TODO(woojae): implement this + async getInformation(modelName: string) { + return await true; + } + + //TODO(woojae): implement this + async calculateCost(modelName: string, requestData: string) { + return await 0.3; + } + + //TODO(woojae): implement this + async chargeCredit(modelName: string, amount: number) { + return await true; + } + + //TODO(woojae): implement this + async withdrawCredit(modelName: string, amount: number) { + return await true; + } + + //TODO(woojae): implement this + async getCreditBalance(modelName: string) { + return await 0.3; + } + + //TODO(woojae): implement this + async getCreditHistory(modelName: string) { + return await true; + } + + //TODO(woojae): implement this + async use(modelName: string, requestData: string) { + return await true; + } + + //TODO(woojae): implement this + //NOTE(woojae): need admin + async run(modelName: string) { + return await true; + } + + //TODO(woojae): implement this + //NOTE:(woojae): need admin + async stop(modelName: string) { + return await true; + } + + //TODO:(woojae): implement this + //NOTE:(woojae): need admin + async changeModelInfo(modelName: string, config: any) { + return await true; + } +} \ No newline at end of file diff --git a/src/model.ts b/src/model.ts new file mode 100644 index 0000000..6bd4dea --- /dev/null +++ b/src/model.ts @@ -0,0 +1,68 @@ +import ModelController from "./controllers/modelController"; + +export default class Model { + modelName: string; + modelController: ModelController; + + constructor(modelName: string) { + this.modelName = modelName; + this.modelController = new ModelController(); + } + //TODO(woojae): login not Required + async isRunning() { + return await this.modelController.isRunning(this.modelName); + } + + //TODO(woojae): login not Required + async getInformation() { + return await this.modelController.getInformation(this.modelName); + } + + //TODO(woojae): login not Required + async calculateCost (requestData: string) { + return await this.modelController.calculateCost(this.modelName, requestData); + } + + async chargeCredit(amount: number) { + return await this.modelController.chargeCredit(this.modelName, amount); + } + + async withdrawCredit(amount: number) { + return await this.modelController.withdrawCredit(this.modelName, amount); + } + + async getCreditBalance() { + return await this.modelController.getCreditBalance(this.modelName); + } + + async getCreditHistory() { + return await this.modelController.getCreditHistory(this.modelName); + } + + async use(requestData: string) { + return await this.modelController.use(this.modelName, requestData); + } + + //NOTE(woojae): need admin + async run() { + await this.isAdmin(); + return await this.modelController.run(this.modelName); + } + + //NOTE(woojae): need admin + async stop() { + await this.isAdmin(); + return await this.modelController.stop(this.modelName); + } + + //NOTE(woojae): need admin + async changeModelInfo(config: any) { + await this.isAdmin(); + return await this.modelController.changeModelInfo(this.modelName, config); + } + + //TODO(woojae): implement this + private async isAdmin() { + return true; + } +} From 108ef86b781041b3b793ceca668aa63f6f8c500b Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 18 Sep 2023 17:19:32 +0900 Subject: [PATCH 152/235] feat: add AinModule --- src/ain.ts | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/ain.ts diff --git a/src/ain.ts b/src/ain.ts new file mode 100644 index 0000000..f084b04 --- /dev/null +++ b/src/ain.ts @@ -0,0 +1,37 @@ +import Ain from "@ainblockchain/ain-js"; +import { getBlockChainEndpoint } from "./constants"; +import { TransactionBody } from "@ainblockchain/ain-util"; + +// NOTE(yoojin): Plz suggest a good name. +export default class AinModule { + private ain?: Ain; + private static instance: AinModule; + + getInstance() { + if (!AinModule.instance) { + AinModule.instance = new AinModule(); + } + return AinModule.instance; + } + + initAin(chainId: 0 | 1) { + const blockchainEndpoint = getBlockChainEndpoint(chainId); + this.ain = new Ain(blockchainEndpoint, chainId); + } + + checkAinInitiated(): boolean { + return this.ain ? true : false; + } + + setDefaultAddress(privateKey: string) { + if(!this.checkAinInitiated()) + throw new Error('Set initAin(chainId) First.'); + this.ain!.wallet.addAndSetDefaultAccount(privateKey); + } + + async sendTransaction(data: TransactionBody) { + if (!this.checkAinInitiated()) + throw new Error('Set initAin(chainId) First.'); + return await this.ain!.sendTransaction(data); + } +} \ No newline at end of file From 71cca96a71c523a944d2bd93d52c9a93f2ccb571 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 18 Sep 2023 17:29:50 +0900 Subject: [PATCH 153/235] refactor: private static instance --- src/controllers/modelController.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 89f288c..c49168b 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -1,8 +1,8 @@ export default class ModelController { - instance: ModelController | undefined; + private static instance: ModelController | undefined; constructor() { - if(this.instance) return this.instance; - this.instance = this; + if(ModelController.instance) return ModelController.instance; + ModelController.instance = this; } //TODO(woojae): implement this From 98421036397c552d7bc41351bc61337831b036fa Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 18 Sep 2023 17:33:04 +0900 Subject: [PATCH 154/235] fix: static getInstance --- src/ain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ain.ts b/src/ain.ts index f084b04..5809f00 100644 --- a/src/ain.ts +++ b/src/ain.ts @@ -7,7 +7,7 @@ export default class AinModule { private ain?: Ain; private static instance: AinModule; - getInstance() { + static getInstance() { if (!AinModule.instance) { AinModule.instance = new AinModule(); } From fbbfdc8a6fea1f3b41b8971692c04718ae2fc531 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 18 Sep 2023 17:39:04 +0900 Subject: [PATCH 155/235] refactor: constructor to static --- src/controllers/modelController.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index c49168b..8c946b0 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -1,8 +1,10 @@ export default class ModelController { private static instance: ModelController | undefined; - constructor() { - if(ModelController.instance) return ModelController.instance; - ModelController.instance = this; + static getInstance() { + if(!ModelController.instance){ + ModelController.instance = new ModelController(); + } + return ModelController.instance; } //TODO(woojae): implement this From ea30ec3d9d8e042c7aaa0569540d34b49f9b31c6 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 18 Sep 2023 17:39:28 +0900 Subject: [PATCH 156/235] refactor: modelController --- src/model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model.ts b/src/model.ts index 6bd4dea..6280a6a 100644 --- a/src/model.ts +++ b/src/model.ts @@ -6,7 +6,7 @@ export default class Model { constructor(modelName: string) { this.modelName = modelName; - this.modelController = new ModelController(); + this.modelController = ModelController.getInstance(); } //TODO(woojae): login not Required async isRunning() { From f062f24c3760aff13b1d4038fb1dcf9529acd5cf Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 18 Sep 2023 17:47:58 +0900 Subject: [PATCH 157/235] feat: add getDefaultAccount --- src/ain.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ain.ts b/src/ain.ts index 5809f00..fbd930a 100644 --- a/src/ain.ts +++ b/src/ain.ts @@ -23,12 +23,19 @@ export default class AinModule { return this.ain ? true : false; } - setDefaultAddress(privateKey: string) { - if(!this.checkAinInitiated()) + setDefaultAccount(privateKey: string) { + if (!this.checkAinInitiated()) throw new Error('Set initAin(chainId) First.'); this.ain!.wallet.addAndSetDefaultAccount(privateKey); } + // FIXME(yoojin): check ain error. + getDefaultAccount() { + if (!this.checkAinInitiated()) + throw new Error('Set initAin(chainId) First.'); + return this.ain!.wallet.defaultAccount; + } + async sendTransaction(data: TransactionBody) { if (!this.checkAinInitiated()) throw new Error('Set initAin(chainId) First.'); From 264877cc6cb5724356a55be3348bc08fe2cffa07 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 18 Sep 2023 17:56:30 +0900 Subject: [PATCH 158/235] refactor: delete serviceName --- src/constants.ts | 15 ++++---- src/handlers/handler.ts | 26 ++++++------- src/modules/admin.ts | 1 - src/modules/app.ts | 62 +++++++------------------------ src/modules/service.ts | 7 ++-- src/modules/service/useService.ts | 8 ++-- src/types/type.ts | 12 ++---- 7 files changed, 42 insertions(+), 89 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 9b96674..316cdf6 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -12,14 +12,13 @@ export const Path = { deposit: () => `${Path.app(appName).root()}/deposit`, depositOfUser: (userAddress: string) => `${Path.app(appName).deposit()}/${userAddress}`, billingConfig: () => `${Path.app(appName).root()}/billingConfig`, - billingConfigOfService: (serviceName: string) => `${Path.app(appName).billingConfig()}/service/${serviceName}`, - service: (serviceName: string) => `${Path.app(appName).root()}/service/${serviceName}`, - userOfService: (serviceName: string, userAddress: string) => - `${Path.app(appName).service(serviceName)}/${userAddress}`, - request: (serviceName: string, userAddress: string, requestKey: string) => - `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/request`, - response: (serviceName: string, userAddress: string, requestKey: string) => - `${Path.app(appName).userOfService(serviceName, userAddress)}/${requestKey}/response`, + service: () => `${Path.app(appName).root()}/service/`, + userOfService: (userAddress: string) => + `${Path.app(appName).service()}/${userAddress}`, + request: (userAddress: string, requestKey: string) => + `${Path.app(appName).userOfService(userAddress)}/${requestKey}/request`, + response: (userAddress: string, requestKey: string) => + `${Path.app(appName).userOfService(userAddress)}/${requestKey}/response`, } }, transfer: (from: string, to: string, transferKey: string) => diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 1b068a9..725f1e6 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -30,18 +30,17 @@ export default class Handler { * You should connect before subscibe. * @param {string} userAddress - Address of account you request with. * @param {string} appName - App name you want to subscribe. - * @param {string} serviceName - Service name you want to subscribe. * @param {Function(valueChangedEvent: any)} callback - A callback function to handle response. It will be called when response is written. * @returns SubscribeId. */ - async subscribe(userAddress:string, appName: string, serviceName: string, callback: (valueChangedEvent: any) => any) { - if (this.checkSubscribeTableExists(userAddress, appName, serviceName)){ + async subscribe(userAddress:string, appName: string, callback: (valueChangedEvent: any) => any) { + if (this.checkSubscribeTableExists(userAddress, appName)){ throw new Error("Already subscribed"); } const subscribeId = await this.ain.em.subscribe( "VALUE_CHANGED", { - path: Path.app(appName).response(serviceName, userAddress, "$requestKey"), + path: Path.app(appName).response(userAddress, "$requestKey"), event_source: "USER", }, (valueChangedEvent) => { @@ -51,16 +50,16 @@ export default class Handler { throw new Error(err.message); }, ); - this.addToSubscribeTable(userAddress, appName, serviceName, subscribeId); + this.addToSubscribeTable(userAddress, appName, subscribeId); return subscribeId; } - private checkSubscribeTableExists(userAddress:string, appName:string, serviceName: string) { - return _.has(this.subscribeTable, [userAddress, appName, serviceName]); + private checkSubscribeTableExists(userAddress:string, appName:string,) { + return _.has(this.subscribeTable, [userAddress, appName]); } - private addToSubscribeTable(userAddress:string, appName: string, serviceName: string, filterId: string) { - _.set(this.subscribeTable, [userAddress, appName], {serviceName:filterId}); + private addToSubscribeTable(userAddress:string, appName: string, filterId: string) { + _.set(this.subscribeTable, [userAddress], {appName:filterId}); } /** @@ -76,20 +75,19 @@ export default class Handler { * Unsubscribe to specific service reponse. * @param {string} userAddress - Address of account you want to unsubscribe. * @param {string} appName - App name you want to unsubscribe. - * @param {string} serviceName - Service name you want to unsubscribe. * @returns True if successfuly unsubscribed. */ - unsubscribe(userAddress:string, appName: string, serviceName: string) { - if (!this.checkSubscribeTableExists(userAddress, appName, serviceName)) { + unsubscribe(userAddress:string, appName: string) { + if (!this.checkSubscribeTableExists(userAddress, appName)) { throw new Error("Not subscribed"); } this.ain.em.unsubscribe( - this.subscribeTable[userAddress][appName][serviceName], + this.subscribeTable[userAddress][appName], (err)=>{ if (err) { throw new Error(err.message); } else { - this.subscribeTable[userAddress][appName][serviceName] = null; + this.subscribeTable[userAddress][appName] = null; return true; } }); diff --git a/src/modules/admin.ts b/src/modules/admin.ts index 6207d47..b52d65e 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -57,7 +57,6 @@ export default class Admin extends ModuleBase { } const requestData: request = { appName: req.body.valuePath[1], - serviceName: req.body.valuePath[3], requesterAddress: req.body.auth.addr, requestKey: req.body.valuePath[5], requestData: req.body.value.prompt, diff --git a/src/modules/app.ts b/src/modules/app.ts index e3384e3..71354de 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -1,6 +1,6 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../constants"; -import { appBillingConfig, serviceBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; +import { appBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; import { buildSetOperation } from "../utils/builder"; import ModuleBase from "./moduleBase"; @@ -33,12 +33,8 @@ export default class App extends ModuleBase { const depositAddress = this.getDefaultAccount().address; const defaultConfig: appBillingConfig = { depositAddress, - service: { - default: { - costPerToken: 0, - minCost: 0, - } - } + costPerToken: 0, + minCost: 0, } const configOp = this.buildSetAppBillingConfigOp(appName, defaultConfig); setBillingConfigOps.push(configOp); @@ -64,19 +60,6 @@ export default class App extends ModuleBase { return await this.sendTransaction(txBody); } - /** - * Set billing config to a specific service. - * @param {string} appName - * @param {string} serviceName - * @param {serviceBillingConfig} config - * @returns Result of transaction. - */ - async setServiceBillingConfig(appName: string, serviceName: string, config: serviceBillingConfig) { - const setConfigOp = this.buildSetServiceBillingConfigOp(appName, serviceName, config); - const txBody = this.buildTxBody(setConfigOp); - return await this.sendTransaction(txBody); - } - /** * Get billing config of app * @param {string} appName @@ -154,32 +137,19 @@ export default class App extends ModuleBase { * Check cost of request and check if account can pay. You should use this function before send or handle request. * If you don't set address, it will use default account's address. * @param {string} appName - App name you want to request service to. - * @param {string} serviceName - Service name you want to request to. * @param {string} prompt - Data you want to request to service . * @param {string=} userAddress - Address of account you want to check balance. You should set default account if you don't provide address. * @returns Result cost of service. It throws error when user can't pay. */ - async checkCostAndBalance(appName: string, serviceName: string, value: string, requesterAddress?: string) { + async checkCostAndBalance(appName: string, value: string, requesterAddress?: string) { requesterAddress = requesterAddress ? requesterAddress : this.getDefaultAccount().address; - const billingConfig = (await this.getBillingConfig(appName)).service; - const serviceBillingConfig = billingConfig.default; - if(billingConfig[serviceName]) { - if(billingConfig[serviceName].costPerToken) { - serviceBillingConfig.costPerToken = billingConfig[serviceName].costPerToken; - } - if(billingConfig[serviceName].minCost) { - serviceBillingConfig.minCost = billingConfig[serviceName].minCost; - } - if(billingConfig[serviceName].maxCost) { - serviceBillingConfig.maxCost = billingConfig[serviceName].maxCost; - } - } + const billingConfig = (await this.getBillingConfig(appName)); const token = value.split(' ').length; - let cost = token * serviceBillingConfig.costPerToken; - if (serviceBillingConfig.minCost && cost < serviceBillingConfig.minCost) { - cost = serviceBillingConfig.minCost; - } else if (serviceBillingConfig.maxCost && cost > serviceBillingConfig.maxCost) { - cost = serviceBillingConfig.maxCost; + let cost = token * billingConfig.costPerToken; + if (billingConfig.minCost && cost < billingConfig.minCost) { + cost = billingConfig.minCost; + } else if (billingConfig.maxCost && cost > billingConfig.maxCost) { + cost = billingConfig.maxCost; } const balance = await this.getCreditBalance(appName, requesterAddress); if (balance < cost) { @@ -197,12 +167,6 @@ export default class App extends ModuleBase { const path = Path.app(appName).billingConfig(); return buildSetOperation("SET_VALUE", path, config); } - - private buildSetServiceBillingConfigOp(appName: string, serviceName: string, config: serviceBillingConfig) { - const path = Path.app(appName).billingConfigOfService(serviceName); - return buildSetOperation("SET_VALUE", path, config); - } - private buildCreateAppOp(appName: string): SetOperation { const path = `/manage_app/${appName}/create/${Date.now()}`; const adminAccount = this.getDefaultAccount(); @@ -268,18 +232,18 @@ export default class App extends ModuleBase { } }, request: { - ref: Path.app(appName).request("$serviceName", "$userAddress", "$requestKey"), + ref: Path.app(appName).request("$userAddress", "$requestKey"), value: { ".rule": { write: "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + - "(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/` + $serviceName + `/minCost`)) || " + + "(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`)) || " + "getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/service/default/minCost`)" } } }, response: { - ref: Path.app(appName).response("$serviceName", "userAddress", "$requestKey"), + ref: Path.app(appName).response("userAddress", "$requestKey"), value: { ".rule": { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.status)" diff --git a/src/modules/service.ts b/src/modules/service.ts index 2128738..f00facc 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -30,13 +30,12 @@ export default class Service extends ModuleBase { /** * Request service to app. You can use handler to get response. If you don't set address, it will use default account's address. * @param {string} appName - App name you want to request service to. - * @param {string} serviceName - Service name you want to request. * @param {string} prompt - Data you want to request to service . * @param {string=} userAddress - Address of account you want to use for request. You should set default account if you don't provide address. * @returns RequestKey. You can use it to get response by handler. */ - async writeRequest(appName: string, serviceName: string, prompt: string, userAddress?: string) { - await this.app.checkCostAndBalance(appName, serviceName, prompt, userAddress); - return await this.useService.writeRequest(appName, serviceName, prompt, userAddress); + async writeRequest(appName: string, prompt: string, userAddress?: string) { + await this.app.checkCostAndBalance(appName, prompt, userAddress); + return await this.useService.writeRequest(appName, prompt, userAddress); } } diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index 1aa364a..ffcc81f 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -5,10 +5,10 @@ import { buildSetOperation } from "../../utils/builder"; import ServiceBase from "./serviceBase"; export default class UseService extends ServiceBase{ - async writeRequest(appName: string, serviceName: string, value: string, requesterAddress?: string) { + async writeRequest(appName: string, value: string, requesterAddress?: string) { const requestKey = Date.now(); requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAddress(); - const requestPath = Path.app(appName).request(serviceName, requesterAddress, requestKey); + const requestPath = Path.app(appName).request(requesterAddress, requestKey); const requestData = { prompt: value, } @@ -19,8 +19,8 @@ export default class UseService extends ServiceBase{ } async writeResponse(response: response) { - const { responseData, status, requesterAddress, requestKey, appName, serviceName, cost } = response; - const responsePath = Path.app(appName).response(serviceName, requesterAddress, requestKey); + const { responseData, status, requesterAddress, requestKey, appName, cost } = response; + const responsePath = Path.app(appName).response(requesterAddress, requestKey); const responseValue = { status, data: responseData, diff --git a/src/types/type.ts b/src/types/type.ts index 5830713..52d3812 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -16,18 +16,13 @@ export type setRuleParam = { ref: string; } & writeRuleConfig; -export type serviceBillingConfig = { + +export type appBillingConfig = { + depositAddress: string; costPerToken: number; minCost: number; maxCost?: number; responseTimeout?: number; -} - -export type appBillingConfig = { - depositAddress: string; - service: { - [serviceName: string]: serviceBillingConfig; - } }; export enum HISTORY_TYPE { @@ -59,7 +54,6 @@ export type request = { requestData: string, requesterAddress: string, requestKey: string, - serviceName: string, appName: string, }; From 3023710537d1e77267d7e28b973e516324e6773e Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 18 Sep 2023 18:02:21 +0900 Subject: [PATCH 159/235] fix: throw error with check --- src/ain.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ain.ts b/src/ain.ts index fbd930a..b4002ef 100644 --- a/src/ain.ts +++ b/src/ain.ts @@ -20,25 +20,24 @@ export default class AinModule { } checkAinInitiated(): boolean { - return this.ain ? true : false; + if (!this.ain) + throw new Error('Set initAin(chainId) First.'); + return true; } setDefaultAccount(privateKey: string) { - if (!this.checkAinInitiated()) - throw new Error('Set initAin(chainId) First.'); + this.checkAinInitiated() this.ain!.wallet.addAndSetDefaultAccount(privateKey); } // FIXME(yoojin): check ain error. getDefaultAccount() { - if (!this.checkAinInitiated()) - throw new Error('Set initAin(chainId) First.'); + this.checkAinInitiated(); return this.ain!.wallet.defaultAccount; } async sendTransaction(data: TransactionBody) { - if (!this.checkAinInitiated()) - throw new Error('Set initAin(chainId) First.'); + this.checkAinInitiated() return await this.ain!.sendTransaction(data); } } \ No newline at end of file From 597e7b1445f570d4b6fc469867214f176600fa82 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 18 Sep 2023 18:06:14 +0900 Subject: [PATCH 160/235] feat: add isDefaultAccountExist --- src/ain.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ain.ts b/src/ain.ts index b4002ef..adb5038 100644 --- a/src/ain.ts +++ b/src/ain.ts @@ -25,12 +25,17 @@ export default class AinModule { return true; } + isDefaultAccountExist(): boolean { + if (this.getDefaultAccount()) + return false; + return true; + } + setDefaultAccount(privateKey: string) { - this.checkAinInitiated() + this.checkAinInitiated(); this.ain!.wallet.addAndSetDefaultAccount(privateKey); } - // FIXME(yoojin): check ain error. getDefaultAccount() { this.checkAinInitiated(); return this.ain!.wallet.defaultAccount; From c1f46c412373ee2f1838f5840d2bf2cde6b4d9a2 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 19 Sep 2023 09:04:00 +0900 Subject: [PATCH 161/235] refactor: serviceName --- src/modules/admin.ts | 4 ++-- src/modules/app.ts | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/modules/admin.ts b/src/modules/admin.ts index b52d65e..0757f05 100644 --- a/src/modules/admin.ts +++ b/src/modules/admin.ts @@ -52,13 +52,13 @@ export default class Admin extends ModuleBase { * @returns RequestData type. */ getDataFromServiceRequest(req: Request) { - if(!req.body.valuePath[1] || !req.body.valuePath[3] || !req.body.valuePath[5] || !req.body.value.prompt) { + if(!req.body.valuePath[1] || !req.body.valuePath[3] || !req.body.valuePath[4] || !req.body.value.prompt) { throw new Error("Not from service request"); } const requestData: request = { appName: req.body.valuePath[1], requesterAddress: req.body.auth.addr, - requestKey: req.body.valuePath[5], + requestKey: req.body.valuePath[4], requestData: req.body.value.prompt, } return requestData; diff --git a/src/modules/app.ts b/src/modules/app.ts index 71354de..1557c2f 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -237,8 +237,7 @@ export default class App extends ModuleBase { ".rule": { write: "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + - "(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`)) || " + - "getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/service/default/minCost`)" + "(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))" } } }, From 35fb337ebf56767ec319ce757eac6ea7dfabf086 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 09:45:48 +0900 Subject: [PATCH 162/235] feat: add getValue --- src/ain.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/ain.ts b/src/ain.ts index adb5038..320fd62 100644 --- a/src/ain.ts +++ b/src/ain.ts @@ -19,12 +19,6 @@ export default class AinModule { this.ain = new Ain(blockchainEndpoint, chainId); } - checkAinInitiated(): boolean { - if (!this.ain) - throw new Error('Set initAin(chainId) First.'); - return true; - } - isDefaultAccountExist(): boolean { if (this.getDefaultAccount()) return false; @@ -41,8 +35,19 @@ export default class AinModule { return this.ain!.wallet.defaultAccount; } + async getValue(path: string) { + this.checkAinInitiated(); + return await this.ain!.db.ref(path).getValue(); + } + async sendTransaction(data: TransactionBody) { - this.checkAinInitiated() + this.checkAinInitiated(); return await this.ain!.sendTransaction(data); } + + private checkAinInitiated(): boolean { + if (!this.ain) + throw new Error('Set initAin(chainId) First.'); + return true; + } } \ No newline at end of file From 0227acc40f7ed2aeecdec4f956b25884bd00b043 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 19 Sep 2023 09:55:35 +0900 Subject: [PATCH 163/235] util --- src/controllers/modelController.ts | 1 + src/modules/service/depositService.ts | 5 +-- src/modules/service/serviceBase.ts | 45 --------------------------- src/modules/service/useService.ts | 5 +-- src/utils/util.ts | 39 +++++++++++++++++++++++ 5 files changed, 46 insertions(+), 49 deletions(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 8c946b0..0bb6553 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -64,4 +64,5 @@ export default class ModelController { async changeModelInfo(modelName: string, config: any) { return await true; } + } \ No newline at end of file diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index f2f3bca..0a2c10c 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -3,6 +3,7 @@ import { Request } from "express"; import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import ServiceBase from "./serviceBase"; import { HISTORY_TYPE } from "../../types/type"; +import { getChangeBalanceOp, getWriteHistoryOp } from "../../utils/util"; export default class DepositService extends ServiceBase { async requestDeposit(appName: string, amount: number, userAddress?: string) { @@ -28,8 +29,8 @@ export default class DepositService extends ServiceBase { async handleDeposit(appName: string, transferKey: string, transferValue: number, requesterAddress: string) { const ops: SetOperation[] = []; - const changeBalanceOp = await this.getChangeBalanceOp(appName, requesterAddress, "INC_VALUE", transferValue); - const writeHistoryOp = await this.getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.DEPOSIT, transferValue, transferKey); + const changeBalanceOp = await getChangeBalanceOp(appName, requesterAddress, "INC_VALUE", transferValue); + const writeHistoryOp = await getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.DEPOSIT, transferValue, transferKey); ops.push(changeBalanceOp); ops.push(writeHistoryOp); const txBody = this.buildTxBody(ops); diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts index 7b967e5..edcb105 100644 --- a/src/modules/service/serviceBase.ts +++ b/src/modules/service/serviceBase.ts @@ -8,50 +8,5 @@ import App from "../app"; import { SetOperation } from "@ainblockchain/ain-js/lib/types"; export default class ServiceBase extends ModuleBase { - protected app: App; - protected wallet: Wallet; - constructor(ainize: Ainize) { - super(ainize); - this.app = ainize.app; - this.wallet = ainize.wallet; - } - protected async getDepositAddress(appName: string) { - return (await this.app.getBillingConfig(appName)).depositAddress; - } - - // ADMIN: need defaultAccount - protected async getChangeBalanceOp( - appName: string, - requesterAddress: string, - type: "INC_VALUE" | "DEC_VALUE", - value: number - ) { - const balancePath = Path.app(appName).balanceOfUser(requesterAddress); - const changeValueOp: SetOperation = { - type, - ref: balancePath, - value, - } - return changeValueOp; - } - - // ADMIN: need defaultAccount - protected async getWriteHistoryOp( - appName: string, - requesterAddress: string, - type: HISTORY_TYPE, - amount: number, - key: string - ) { - const historyPath = `${Path.app(appName).historyOfUser(requesterAddress)}/${Date.now()}`; - const value = { - type, - amount, - transferKey: type === HISTORY_TYPE.DEPOSIT ? key : undefined, - requestTimestamp: type === HISTORY_TYPE.USAGE ? key : undefined, - }; - const writeHistoryOp = buildSetOperation("SET_VALUE", historyPath, value); - return writeHistoryOp; - } } diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index ffcc81f..650f8e4 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -3,6 +3,7 @@ import { Path } from "../../constants"; import { HISTORY_TYPE, RESPONSE_STATUS, response } from "../../types/type"; import { buildSetOperation } from "../../utils/builder"; import ServiceBase from "./serviceBase"; +import { getChangeBalanceOp, getWriteHistoryOp } from "../../utils/util"; export default class UseService extends ServiceBase{ async writeRequest(appName: string, value: string, requesterAddress?: string) { @@ -29,8 +30,8 @@ export default class UseService extends ServiceBase{ const responseOp = buildSetOperation("SET_VALUE", responsePath, responseValue); ops.push(responseOp); if (status === RESPONSE_STATUS.SUCCESS) { - const changeBalanceOp = await this.getChangeBalanceOp(appName, requesterAddress, 'DEC_VALUE', cost); - const writeHistoryOp = await this.getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.USAGE, cost, requestKey); + const changeBalanceOp = await getChangeBalanceOp(appName, requesterAddress, 'DEC_VALUE', cost); + const writeHistoryOp = await getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.USAGE, cost, requestKey); ops.push(changeBalanceOp); ops.push(writeHistoryOp); } diff --git a/src/utils/util.ts b/src/utils/util.ts index e69de29..f08ee13 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -0,0 +1,39 @@ +import { SetOperation } from "@ainblockchain/ain-js/lib/types"; +import { Path } from "../constants"; +import { HISTORY_TYPE } from "../types/type"; +import { buildSetOperation } from "./builder"; + +// ADMIN: need defaultAccount +export const getChangeBalanceOp = async ( + appName: string, + requesterAddress: string, + type: "INC_VALUE" | "DEC_VALUE", + value: number +) => { + const balancePath = Path.app(appName).balanceOfUser(requesterAddress); + const changeValueOp: SetOperation = { + type, + ref: balancePath, + value, + } + return changeValueOp; +} + +// ADMIN: need defaultAccount +export const getWriteHistoryOp = async ( + appName: string, + requesterAddress: string, + type: HISTORY_TYPE, + amount: number, + key: string +) => { + const historyPath = `${Path.app(appName).historyOfUser(requesterAddress)}/${Date.now()}`; + const value = { + type, + amount, + transferKey: type === HISTORY_TYPE.DEPOSIT ? key : undefined, + requestTimestamp: type === HISTORY_TYPE.USAGE ? key : undefined, + }; + const writeHistoryOp = buildSetOperation("SET_VALUE", historyPath, value); + return writeHistoryOp; +} \ No newline at end of file From 48672b240bede86a358fd9492b392b0cc0e75bbd Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 19 Sep 2023 10:35:52 +0900 Subject: [PATCH 164/235] modelController --- src/ainize.ts | 15 +----- src/controllers/modelController.ts | 41 ++++++++++++++-- src/internal.ts | 55 ++++++++++++++++++++++ src/modules/admin.ts | 66 -------------------------- src/modules/app.ts | 6 +-- src/modules/moduleBase.ts | 12 ----- src/modules/service.ts | 41 ---------------- src/modules/service/depositService.ts | 39 ---------------- src/modules/service/serviceBase.ts | 12 ----- src/modules/service/useService.ts | 41 ---------------- src/modules/wallet.ts | 67 --------------------------- src/utils/builder.ts | 15 +++++- src/utils/util.ts | 45 ++++++++++++++++-- 13 files changed, 151 insertions(+), 304 deletions(-) create mode 100644 src/internal.ts delete mode 100644 src/modules/admin.ts delete mode 100644 src/modules/service.ts delete mode 100644 src/modules/service/depositService.ts delete mode 100644 src/modules/service/serviceBase.ts delete mode 100644 src/modules/service/useService.ts delete mode 100644 src/modules/wallet.ts diff --git a/src/ainize.ts b/src/ainize.ts index 206f5cc..76a9096 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -3,35 +3,22 @@ import * as NodeCache from "node-cache"; import Middleware from "./middlewares/middleware"; import { getBlockChainEndpoint } from "./constants"; import Handler from "./handlers/handler"; -import Wallet from "./modules/wallet"; import App from "./modules/app"; -import DepositService from "./modules/service/depositService"; -import UseService from "./modules/service/useService"; -import Service from "./modules/service"; -import Admin from "./modules/admin"; import Model from "./model"; export default class Ainize { private cache: NodeCache; ain: Ain; middleware: Middleware; handler: Handler; - wallet: Wallet; app:App; - service: Service; - admin: Admin; - constructor(chainId: 1|0, privateKey?: string ) { + constructor(chainId: 1|0) { const blockChainEndpoint = getBlockChainEndpoint(chainId); this.ain = new Ain(blockChainEndpoint, chainId); this.app = new App(this); this.cache = new NodeCache(); this.middleware = new Middleware(this.cache); this.handler = new Handler(this); - this.wallet = new Wallet(this, privateKey); - const depositService = new DepositService(this); - const useService = new UseService(this); - this.service = new Service(this, depositService, useService); - this.admin = new Admin(this, depositService, useService); } model(modelName: string) { diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 0bb6553..9ba4072 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -1,8 +1,16 @@ +import { SetOperation } from "@ainblockchain/ain-js/lib/types"; +import AinModule from "../ain"; +import { Path } from "../constants"; +import { getRequestDepositOp, getTransferOp } from "../utils/util"; +import { buildSetOperation, buildTxBody } from "../utils/builder"; + export default class ModelController { private static instance: ModelController | undefined; + private ain = AinModule.getInstance(); static getInstance() { if(!ModelController.instance){ ModelController.instance = new ModelController(); + } return ModelController.instance; } @@ -22,10 +30,19 @@ export default class ModelController { return await 0.3; } - //TODO(woojae): implement this async chargeCredit(modelName: string, amount: number) { - return await true; + this.isLoggedIn(); + const transferKey = Date.now(); + const userAddress = this.ain.getDefaultAccount()!.address; + const depositAddress = await this.getDepositAddress(modelName); + const op_list: SetOperation[] = [ + getTransferOp(userAddress, depositAddress, transferKey.toString(), amount), + getRequestDepositOp(modelName, userAddress, transferKey.toString(), amount) + ] + const txBody = buildTxBody(op_list, transferKey); + return this.ain.sendTransaction(txBody); } + //TODO(woojae): implement this async withdrawCredit(modelName: string, amount: number) { @@ -42,9 +59,16 @@ export default class ModelController { return await true; } - //TODO(woojae): implement this + //TODO(woojae): connect with handler async use(modelName: string, requestData: string) { - return await true; + this.isLoggedIn(); + const requestKey = Date.now(); + const requesterAddress = this.ain.getDefaultAccount()!.address; + const requestPath = Path.app(modelName).request(requesterAddress, requestKey); + const requestOp = buildSetOperation("SET_VALUE", requestPath, {prompt: requestData}); + const txBody = buildTxBody(requestOp); + await this.ain.sendTransaction(txBody); + return requestKey; } //TODO(woojae): implement this @@ -64,5 +88,14 @@ export default class ModelController { async changeModelInfo(modelName: string, config: any) { return await true; } + + private async getDepositAddress(appName: string) { + return await this.ain.getValue(Path.app(appName).billingConfig().defaultAddress); + } + private isLoggedIn() { + if(!this.ain.getDefaultAccount()) + throw new Error('Set defaultAccount First.'); + return true; + } } \ No newline at end of file diff --git a/src/internal.ts b/src/internal.ts new file mode 100644 index 0000000..431119b --- /dev/null +++ b/src/internal.ts @@ -0,0 +1,55 @@ +import { SetOperation } from "@ainblockchain/ain-js/lib/types"; +import { Request } from "express"; +import { getChangeBalanceOp, getResponseOp, getWriteHistoryOp } from "./utils/util"; +import { HISTORY_TYPE, RESPONSE_STATUS, request, response } from "./types/type"; +import { buildTxBody } from "./utils/builder"; +import AinModule from "./ain"; +import { Path } from "./constants"; + +export default class internal { + private ain: AinModule; + constructor() { + this.ain = AinModule.getInstance(); + } + async handleDeposit(req: Request) { + const transferKey = req.body.valuePath[4]; + const transferValue = req.body.value; + const appName = req.body.valuePath[1]; + const requesterAddress = req.body.auth.addr; + const ops: SetOperation[] = []; + const changeBalanceOp = await getChangeBalanceOp(appName, requesterAddress, "INC_VALUE", transferValue); + const writeHistoryOp = await getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.DEPOSIT, transferValue, transferKey); + ops.push(changeBalanceOp); + ops.push(writeHistoryOp); + const txBody = buildTxBody(ops); + return await this.ain.sendTransaction(txBody); + } + + async handleRequest(req: Request, cost: number, status: RESPONSE_STATUS, responseData: string) { + const { requesterAddress, requestKey, appName } = this.getDataFromServiceRequest(req); + const ops:SetOperation[] = []; + const responseOp = getResponseOp(appName, requesterAddress, requestKey, status, responseData, cost); + ops.push(responseOp); + if(cost > 0) { + const changeBalanceOp = getChangeBalanceOp(appName, requesterAddress, 'DEC_VALUE', cost); + const writeHistoryOp = getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.USAGE, cost, requestKey); + ops.push(changeBalanceOp); + ops.push(writeHistoryOp); + } + const txBody = buildTxBody(ops); + return await this.ain.sendTransaction(txBody); + } + + getDataFromServiceRequest(req: Request) { + if(!req.body.valuePath[1] || !req.body.valuePath[3] || !req.body.valuePath[4] || !req.body.value.prompt) { + throw new Error("Not from service request"); + } + const requestData: request = { + appName: req.body.valuePath[1], + requesterAddress: req.body.auth.addr, + requestKey: req.body.valuePath[4], + requestData: req.body.value.prompt, + } + return requestData; + } +}; \ No newline at end of file diff --git a/src/modules/admin.ts b/src/modules/admin.ts deleted file mode 100644 index 0757f05..0000000 --- a/src/modules/admin.ts +++ /dev/null @@ -1,66 +0,0 @@ -import Ainize from "../ainize"; -import { Request } from "express"; -import ModuleBase from "./moduleBase"; -import DepositService from "./service/depositService"; -import UseService from "./service/useService"; -import { RESPONSE_STATUS, request, response } from "../types/type"; - -export default class Admin extends ModuleBase { - private depositService: DepositService; - private useService: UseService; - constructor(ainize: Ainize, depositService: DepositService, useService: UseService) { - super(ainize); - this.depositService = depositService; - this.useService = useService; - } - - /** - * Handle deposit and write history of requester. You should match this function with deposit trigger. - * @param {Request} req - Request data from deposit trigger. If req data is not from trigger function, it will throw error. - * @returns Result of transaction. - */ - async deposit(req: Request) { - const transferKey = req.body.valuePath[4]; - const transferValue = req.body.value; - const appName = req.body.valuePath[1]; - const requesterAddress = req.body.auth.addr; - return await this.depositService.handleDeposit(appName, transferKey, transferValue,requesterAddress); - } - - /** - * Write response. Then change balance of requester and write history of user balance if response status is success. - * You should match this function with service trigger. - * @param {Request} request - Request data from request trigger. If req data is not from trigger function, it will throw error. - * @param {number} cost - Cost of service. Calculate it with checkCostAndBalance function. - * @param {string} responseData - Data you want to response to requester. - * @param {RESPONSE_STATUS} status - Status of response. If status is success, it will change balance of requester and write history of user balance. - * @returns Result of transaction. - */ - async writeResponse(req:Request, cost: number, responseData: string, status: RESPONSE_STATUS ) { - const requestData = this.getDataFromServiceRequest(req); - const response: response = { - status, - cost, - responseData, - ...requestData, - } - return await this.useService.writeResponse(response); - } - /** - * Get data from service request. You should use it only with service trigger. - * @param {Request} request - Request data from request trigger. If req data is not from trigger function, it will throw error. - * @returns RequestData type. - */ - getDataFromServiceRequest(req: Request) { - if(!req.body.valuePath[1] || !req.body.valuePath[3] || !req.body.valuePath[4] || !req.body.value.prompt) { - throw new Error("Not from service request"); - } - const requestData: request = { - appName: req.body.valuePath[1], - requesterAddress: req.body.auth.addr, - requestKey: req.body.valuePath[4], - requestData: req.body.value.prompt, - } - return requestData; - } -} \ No newline at end of file diff --git a/src/modules/app.ts b/src/modules/app.ts index 1557c2f..18c8d7b 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -1,7 +1,7 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../constants"; import { appBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; -import { buildSetOperation } from "../utils/builder"; +import { buildSetOperation, buildTxBody } from "../utils/builder"; import ModuleBase from "./moduleBase"; export default class App extends ModuleBase { @@ -39,7 +39,7 @@ export default class App extends ModuleBase { const configOp = this.buildSetAppBillingConfigOp(appName, defaultConfig); setBillingConfigOps.push(configOp); - const txBody = this.buildTxBody([ + const txBody = buildTxBody([ createAppOp, ...setRuleOps, ...setFunctionOps, @@ -56,7 +56,7 @@ export default class App extends ModuleBase { */ async setAppBillingConfig(appName: string, config: appBillingConfig) { const setConfigOp = this.buildSetAppBillingConfigOp(appName, config); - const txBody = this.buildTxBody(setConfigOp); + const txBody = buildTxBody(setConfigOp); return await this.sendTransaction(txBody); } diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts index 56789a9..9767d7f 100644 --- a/src/modules/moduleBase.ts +++ b/src/modules/moduleBase.ts @@ -8,18 +8,6 @@ export default class ModuleBase { constructor(ainize: Ainize) { this.ain = ainize.ain; } - - protected buildTxBody(operation: SetOperation | SetOperation[], timestamp? : number): TransactionBody { - return { - operation: Array.isArray(operation) ? { - type: "SET", - op_list: operation - } : operation, - gas_price: 500, - timestamp: timestamp? timestamp : Date.now(), - nonce: -1, - } - } protected getDefaultAccount() { const defaultAccount = this.ain.wallet.defaultAccount; diff --git a/src/modules/service.ts b/src/modules/service.ts deleted file mode 100644 index f00facc..0000000 --- a/src/modules/service.ts +++ /dev/null @@ -1,41 +0,0 @@ -import ModuleBase from "./moduleBase"; -import DepositService from "./service/depositService"; -import UseService from "./service/useService"; -import Ainize from "../ainize"; -import App from "./app"; - -export default class Service extends ModuleBase { - private depositService: DepositService; - private useService: UseService; - private app: App; - constructor(ainize: Ainize, depositService: DepositService, useService: UseService) { - super(ainize); - this.depositService = depositService; - this.useService = useService; - this.app = ainize.app; - } - - /** - * Deposit AIN to app. Transfer AIN to depositAddress and write deposit request to app. - * If you don't set address, it will use default account's address. - * @param {string} appName - App name you want to deposit to. - * @param {number} amount - Amount of AIN you want to deposit. - * @param {string=} signerAddress - Address of account you want to use for deposit. You should set default account if you don't provide address. - * @returns Result of transaction. - */ - async deposit(appName: string, amount: number, userAddress?: string) { - return await this.depositService.requestDeposit(appName, amount, userAddress); - } - - /** - * Request service to app. You can use handler to get response. If you don't set address, it will use default account's address. - * @param {string} appName - App name you want to request service to. - * @param {string} prompt - Data you want to request to service . - * @param {string=} userAddress - Address of account you want to use for request. You should set default account if you don't provide address. - * @returns RequestKey. You can use it to get response by handler. - */ - async writeRequest(appName: string, prompt: string, userAddress?: string) { - await this.app.checkCostAndBalance(appName, prompt, userAddress); - return await this.useService.writeRequest(appName, prompt, userAddress); - } -} diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts deleted file mode 100644 index 0a2c10c..0000000 --- a/src/modules/service/depositService.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Path } from "../../constants"; -import { Request } from "express"; -import { SetOperation } from "@ainblockchain/ain-js/lib/types"; -import ServiceBase from "./serviceBase"; -import { HISTORY_TYPE } from "../../types/type"; -import { getChangeBalanceOp, getWriteHistoryOp } from "../../utils/util"; - -export default class DepositService extends ServiceBase { - async requestDeposit(appName: string, amount: number, userAddress?: string) { - const transferKey = Date.now(); - userAddress = userAddress ? userAddress : this.wallet.getDefaultAddress(); - const depositAddress = await this.getDepositAddress(appName); - - const op_list: SetOperation[] = [ - { - type: "SET_VALUE", - ref: Path.transfer(userAddress, depositAddress, transferKey.toString()), - value: amount, - }, - { - type: "SET_VALUE", - ref: `${Path.app(appName).depositOfUser(userAddress)}/${transferKey}`, - value: amount, - } - ] - const txBody = this.buildTxBody(op_list, transferKey); - return this.wallet.sendTxWithAddress(txBody, userAddress); - } - - async handleDeposit(appName: string, transferKey: string, transferValue: number, requesterAddress: string) { - const ops: SetOperation[] = []; - const changeBalanceOp = await getChangeBalanceOp(appName, requesterAddress, "INC_VALUE", transferValue); - const writeHistoryOp = await getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.DEPOSIT, transferValue, transferKey); - ops.push(changeBalanceOp); - ops.push(writeHistoryOp); - const txBody = this.buildTxBody(ops); - return await this.wallet.sendTxWithAddress(txBody); - } -} diff --git a/src/modules/service/serviceBase.ts b/src/modules/service/serviceBase.ts deleted file mode 100644 index edcb105..0000000 --- a/src/modules/service/serviceBase.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Path } from "../../constants"; -import ModuleBase from "../moduleBase"; -import { buildSetOperation } from "../../utils/builder"; -import { HISTORY_TYPE } from "../../types/type"; -import Ainize from "../../ainize"; -import Wallet from "../wallet"; -import App from "../app"; -import { SetOperation } from "@ainblockchain/ain-js/lib/types"; - -export default class ServiceBase extends ModuleBase { - -} diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts deleted file mode 100644 index 650f8e4..0000000 --- a/src/modules/service/useService.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { SetOperation } from "@ainblockchain/ain-js/lib/types"; -import { Path } from "../../constants"; -import { HISTORY_TYPE, RESPONSE_STATUS, response } from "../../types/type"; -import { buildSetOperation } from "../../utils/builder"; -import ServiceBase from "./serviceBase"; -import { getChangeBalanceOp, getWriteHistoryOp } from "../../utils/util"; - -export default class UseService extends ServiceBase{ - async writeRequest(appName: string, value: string, requesterAddress?: string) { - const requestKey = Date.now(); - requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAddress(); - const requestPath = Path.app(appName).request(requesterAddress, requestKey); - const requestData = { - prompt: value, - } - const requestOp = buildSetOperation("SET_VALUE", requestPath, requestData); - const txBody = this.buildTxBody(requestOp); - await this.wallet.sendTxWithAddress(txBody, requesterAddress); - return requestKey; - } - - async writeResponse(response: response) { - const { responseData, status, requesterAddress, requestKey, appName, cost } = response; - const responsePath = Path.app(appName).response(requesterAddress, requestKey); - const responseValue = { - status, - data: responseData, - } - const ops:SetOperation[] = []; - const responseOp = buildSetOperation("SET_VALUE", responsePath, responseValue); - ops.push(responseOp); - if (status === RESPONSE_STATUS.SUCCESS) { - const changeBalanceOp = await getChangeBalanceOp(appName, requesterAddress, 'DEC_VALUE', cost); - const writeHistoryOp = await getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.USAGE, cost, requestKey); - ops.push(changeBalanceOp); - ops.push(writeHistoryOp); - } - const txBody = this.buildTxBody(ops); - return await this.wallet.sendTxWithAddress(txBody); - } -} \ No newline at end of file diff --git a/src/modules/wallet.ts b/src/modules/wallet.ts deleted file mode 100644 index 16dc8d4..0000000 --- a/src/modules/wallet.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { TransactionInput } from "@ainblockchain/ain-js/lib/types"; -import Ainize from "../ainize"; -import ModuleBase from "./moduleBase"; - -export default class Wallet extends ModuleBase{ - constructor(ainize: Ainize, privateKey?: string) { - super(ainize); - if (privateKey) { - this.ain.wallet.addAndSetDefaultAccount(privateKey); - } - } - /** - * Get defult AI Network blockchain account information set in ainize. - * @returns Default account's address. - */ - getDefaultAddress() { - return this.getDefaultAccount().address; - } - - /** - * Set default AI Network account in ainize. This account is used for AI Network transaction. - * @param {string} privateKey - Private Key of AI Network account you want to set default. - * @returns Address of setted default AI Network account. - */ - setDefaultAccount(privateKey: string) { - this.ain.wallet.addAndSetDefaultAccount(privateKey); - return this.getDefaultAddress(); - } - - /** - * Add AI Network account at ainize. Once you add account, you can use it for AI Network transaction with address. - * @param {string} privateKey - PrivateK Key of AI Network account you want to add. - * @returns Address of added AI Network account. - */ - addAccount(privateKey: string) { - return this.ain.wallet.add(privateKey); - } - - /** - *Get AIN balance of your account. If you don't set address, it will return default account's balance. - * @param {string=} address - Address of account you want to get balance. - * @returns Balance of your account. - */ - getAinBalance(address?: string) { - if (!address) { - address = this.getDefaultAddress(); - } - return this.ain.wallet.getBalance(address); - } - - /** - * Send transaction to AI Network. If you don't set address, it will use default account's address. - * @param {TransactionInput} txBody - Transaction body you want to send. - * @param {string=} signerAddress - Address of account you want to use for sign transaction. You should set default account if you don't provide address. - * @returns Result of transaction. - */ - async sendTxWithAddress(txBody: TransactionInput, signerAddress?: string) { - if (!signerAddress) { - signerAddress = this.getDefaultAddress(); - } - if (!this.ain.wallet.isAdded(signerAddress)) { - throw new Error ("You need to add account"); - } - txBody.address = signerAddress; - return await this.sendTransaction(txBody); - } -} diff --git a/src/utils/builder.ts b/src/utils/builder.ts index 6c1ff3b..1962093 100644 --- a/src/utils/builder.ts +++ b/src/utils/builder.ts @@ -1,9 +1,20 @@ -import { SetOperation, SetOperationType } from "@ainblockchain/ain-js/lib/types" +import { SetOperation, SetOperationType, TransactionBody } from "@ainblockchain/ain-js/lib/types" export const buildSetOperation = (type: SetOperationType, ref: string, value: any): SetOperation => { return { type, ref, value, - } + } +} +export const buildTxBody = (operation: SetOperation | SetOperation[], timestamp? : number): TransactionBody => { + return { + operation: Array.isArray(operation) ? { + type: "SET", + op_list: operation + } : operation, + gas_price: 500, + timestamp: timestamp? timestamp : Date.now(), + nonce: -1, + } } diff --git a/src/utils/util.ts b/src/utils/util.ts index f08ee13..035a2df 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -1,10 +1,10 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../constants"; -import { HISTORY_TYPE } from "../types/type"; +import { HISTORY_TYPE, RESPONSE_STATUS } from "../types/type"; import { buildSetOperation } from "./builder"; // ADMIN: need defaultAccount -export const getChangeBalanceOp = async ( +export const getChangeBalanceOp = ( appName: string, requesterAddress: string, type: "INC_VALUE" | "DEC_VALUE", @@ -20,7 +20,7 @@ export const getChangeBalanceOp = async ( } // ADMIN: need defaultAccount -export const getWriteHistoryOp = async ( +export const getWriteHistoryOp = ( appName: string, requesterAddress: string, type: HISTORY_TYPE, @@ -36,4 +36,43 @@ export const getWriteHistoryOp = async ( }; const writeHistoryOp = buildSetOperation("SET_VALUE", historyPath, value); return writeHistoryOp; +} + +export const getTransferOp = ( + userAddress:string, + depositAddress:string, + transferKey: string, + amount: number +) => { + const transferPath = Path.transfer(userAddress, depositAddress, transferKey); + const transferOp = buildSetOperation("SET_VALUE", transferPath, amount); + return transferOp; +} + +export const getRequestDepositOp = ( + appName: string, + userAddress: string, + transferKey: string, + amount: number + ) => { + const requestDepositPath = `${Path.app(appName).depositOfUser(userAddress)}/${transferKey}`; + const requestDepositOp = buildSetOperation("SET_VALUE", requestDepositPath, amount); + return requestDepositOp; +} + +export const getResponseOp = ( + appName: string, + requesterAddress: string, + requestKey: string, + status: RESPONSE_STATUS, + responseData: string, + cost: number, +) => { + const responsePath = Path.app(appName).response(requesterAddress, requestKey); + const responseValue = { + status, + data: responseData, + } + const responseOp = buildSetOperation("SET_VALUE", responsePath, responseValue); + return responseOp; } \ No newline at end of file From 97346736179da57228063d84cf7323f97df4add2 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 19 Sep 2023 10:44:16 +0900 Subject: [PATCH 165/235] modelController --- src/controllers/modelController.ts | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 9ba4072..c9d3cc0 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -22,12 +22,19 @@ export default class ModelController { //TODO(woojae): implement this async getInformation(modelName: string) { - return await true; + return await 'information of model'; } - //TODO(woojae): implement this async calculateCost(modelName: string, requestData: string) { - return await 0.3; + const billingConfig = await this.ain.getValue(Path.app(modelName).billingConfig()); + const token = requestData.split(' ').length; + let cost = token * billingConfig.costPerToken; + if (billingConfig.minCost && cost < billingConfig.minCost) { + cost = billingConfig.minCost; + } else if (billingConfig.maxCost && cost > billingConfig.maxCost) { + cost = billingConfig.maxCost; + } + return cost; } async chargeCredit(modelName: string, amount: number) { @@ -49,14 +56,18 @@ export default class ModelController { return await true; } - //TODO(woojae): implement this async getCreditBalance(modelName: string) { - return await 0.3; + this.isLoggedIn(); + const userAddress = this.ain.getDefaultAccount()!.address; + const balancePath = Path.app(modelName).balanceOfUser(userAddress); + return await this.ain.getValue(balancePath); } - //TODO(woojae): implement this async getCreditHistory(modelName: string) { - return await true; + this.isLoggedIn(); + const userAddress = this.ain.getDefaultAccount()!.address; + const creditHistoryPath = Path.app(modelName).historyOfUser(userAddress); + return await this.ain.getValue(creditHistoryPath); } //TODO(woojae): connect with handler From e93ca76f6ac512353ab464ef39c1872a38855488 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 19 Sep 2023 11:12:56 +0900 Subject: [PATCH 166/235] refactor: ops --- src/ain.ts | 5 +++++ src/controllers/modelController.ts | 16 ++++++++-------- src/internal.ts | 28 +++++++++++++++++----------- src/utils/{util.ts => operator.ts} | 0 4 files changed, 30 insertions(+), 19 deletions(-) rename src/utils/{util.ts => operator.ts} (100%) diff --git a/src/ain.ts b/src/ain.ts index 320fd62..1b878c6 100644 --- a/src/ain.ts +++ b/src/ain.ts @@ -50,4 +50,9 @@ export default class AinModule { throw new Error('Set initAin(chainId) First.'); return true; } + + getAddress() { + this.checkAinInitiated(); + return this.ain!.wallet.defaultAccount!.address; + } } \ No newline at end of file diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index c9d3cc0..94e9f10 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -1,7 +1,7 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import AinModule from "../ain"; import { Path } from "../constants"; -import { getRequestDepositOp, getTransferOp } from "../utils/util"; +import { getRequestDepositOp, getTransferOp } from "../utils/operator"; import { buildSetOperation, buildTxBody } from "../utils/builder"; export default class ModelController { @@ -40,9 +40,9 @@ export default class ModelController { async chargeCredit(modelName: string, amount: number) { this.isLoggedIn(); const transferKey = Date.now(); - const userAddress = this.ain.getDefaultAccount()!.address; + const userAddress = this.ain.getAddress(); const depositAddress = await this.getDepositAddress(modelName); - const op_list: SetOperation[] = [ + const op_list: SetOperation[] = [ getTransferOp(userAddress, depositAddress, transferKey.toString(), amount), getRequestDepositOp(modelName, userAddress, transferKey.toString(), amount) ] @@ -58,14 +58,14 @@ export default class ModelController { async getCreditBalance(modelName: string) { this.isLoggedIn(); - const userAddress = this.ain.getDefaultAccount()!.address; + const userAddress = this.ain.getAddress(); const balancePath = Path.app(modelName).balanceOfUser(userAddress); return await this.ain.getValue(balancePath); } async getCreditHistory(modelName: string) { this.isLoggedIn(); - const userAddress = this.ain.getDefaultAccount()!.address; + const userAddress = this.ain.getAddress(); const creditHistoryPath = Path.app(modelName).historyOfUser(userAddress); return await this.ain.getValue(creditHistoryPath); } @@ -74,7 +74,7 @@ export default class ModelController { async use(modelName: string, requestData: string) { this.isLoggedIn(); const requestKey = Date.now(); - const requesterAddress = this.ain.getDefaultAccount()!.address; + const requesterAddress = this.ain.getAddress(); const requestPath = Path.app(modelName).request(requesterAddress, requestKey); const requestOp = buildSetOperation("SET_VALUE", requestPath, {prompt: requestData}); const txBody = buildTxBody(requestOp); @@ -101,12 +101,12 @@ export default class ModelController { } private async getDepositAddress(appName: string) { - return await this.ain.getValue(Path.app(appName).billingConfig().defaultAddress); + return (await this.ain.getValue(Path.app(appName).billingConfig())).defaultAddress; } private isLoggedIn() { if(!this.ain.getDefaultAccount()) - throw new Error('Set defaultAccount First.'); + throw new Error('You should login First.'); return true; } } \ No newline at end of file diff --git a/src/internal.ts b/src/internal.ts index 431119b..1240187 100644 --- a/src/internal.ts +++ b/src/internal.ts @@ -1,21 +1,14 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Request } from "express"; -import { getChangeBalanceOp, getResponseOp, getWriteHistoryOp } from "./utils/util"; +import { getChangeBalanceOp, getResponseOp, getWriteHistoryOp } from "./utils/operator"; import { HISTORY_TYPE, RESPONSE_STATUS, request, response } from "./types/type"; import { buildTxBody } from "./utils/builder"; import AinModule from "./ain"; -import { Path } from "./constants"; export default class internal { - private ain: AinModule; - constructor() { - this.ain = AinModule.getInstance(); - } + private ain = AinModule.getInstance(); async handleDeposit(req: Request) { - const transferKey = req.body.valuePath[4]; - const transferValue = req.body.value; - const appName = req.body.valuePath[1]; - const requesterAddress = req.body.auth.addr; + const { requesterAddress, appName, transferKey, transferValue } = this.getDataFromDepositRequest(req); const ops: SetOperation[] = []; const changeBalanceOp = await getChangeBalanceOp(appName, requesterAddress, "INC_VALUE", transferValue); const writeHistoryOp = await getWriteHistoryOp(appName, requesterAddress, HISTORY_TYPE.DEPOSIT, transferValue, transferKey); @@ -52,4 +45,17 @@ export default class internal { } return requestData; } -}; \ No newline at end of file + + private getDataFromDepositRequest(req: Request) { + if(!req.body.valuePath[1] || !req.body.valuePath[4] || !req.body.value) { + throw new Error("Not from deposit request"); + } + const depositData = { + transferKey: req.body.valuePath[4], + transferValue: req.body.value, + appName: req.body.valuePath[1], + requesterAddress: req.body.auth.addr, + } + return depositData; + } +} \ No newline at end of file diff --git a/src/utils/util.ts b/src/utils/operator.ts similarity index 100% rename from src/utils/util.ts rename to src/utils/operator.ts From 9bb9a861bd96eacdc8181924355816cf6c4a62a8 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 19 Sep 2023 11:13:57 +0900 Subject: [PATCH 167/235] feat: deposit Type --- src/internal.ts | 4 ++-- src/types/type.ts | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/internal.ts b/src/internal.ts index 1240187..1ae9b53 100644 --- a/src/internal.ts +++ b/src/internal.ts @@ -1,7 +1,7 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Request } from "express"; import { getChangeBalanceOp, getResponseOp, getWriteHistoryOp } from "./utils/operator"; -import { HISTORY_TYPE, RESPONSE_STATUS, request, response } from "./types/type"; +import { HISTORY_TYPE, RESPONSE_STATUS, deposit, request, response } from "./types/type"; import { buildTxBody } from "./utils/builder"; import AinModule from "./ain"; @@ -50,7 +50,7 @@ export default class internal { if(!req.body.valuePath[1] || !req.body.valuePath[4] || !req.body.value) { throw new Error("Not from deposit request"); } - const depositData = { + const depositData: deposit = { transferKey: req.body.valuePath[4], transferValue: req.body.value, appName: req.body.valuePath[1], diff --git a/src/types/type.ts b/src/types/type.ts index 52d3812..2511425 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -61,4 +61,11 @@ export type response = request & { responseData: string, cost: number, status: RESPONSE_STATUS, +} + +export type deposit = { + transferKey: string, + transferValue: number, + appName: string, + requesterAddress: string, } \ No newline at end of file From c3a44c21275cd567185647d15173443217d470e7 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 11:36:43 +0900 Subject: [PATCH 168/235] refactor: move app to appController --- src/controller/appController.ts | 281 ++++++++++++++++++++++++++++++++ 1 file changed, 281 insertions(+) create mode 100644 src/controller/appController.ts diff --git a/src/controller/appController.ts b/src/controller/appController.ts new file mode 100644 index 0000000..2466c1e --- /dev/null +++ b/src/controller/appController.ts @@ -0,0 +1,281 @@ +import { SetOperation } from "@ainblockchain/ain-js/lib/types"; +import { Path } from "../constants"; +import { appBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; +import { buildSetOperation } from "../utils/builder"; +import AinModule from '../ain'; + +export default class AppController { + private static instance: AppController; + private ain: AinModule = AinModule.getInstance(); + + static getInstance() { + if (!AppController.instance) { + AppController.instance = new AppController(); + } + return AppController.instance; + } + /** + * Create App for your AI Service on AI Network. + * @param {string} appName - The name of app you will create. + * @param {TriggerFunctionUrlMap} functioniUrls - The urls of trigger function you set. + * @param {setDefaultFlag} setDefaultFlag - Set true which you wan to set config as default. + * @returns Result of transaction. + */ + async createApp(appName: string, serviceUrl: string) { + const setRuleOps: SetOperation[] = []; + const setFunctionOps: SetOperation[] = []; + const setBillingConfigOps: SetOperation[] = [] ; + + const createAppOp = this.buildCreateAppOp(appName); + const defaultRules = this.defaultAppRules(appName); + for (const rule of Object.values(defaultRules)) { + const { ref, value } = rule; + const ruleOp = buildSetOperation("SET_RULE", ref, value); + setRuleOps.push(ruleOp); + } + + const depositParam = this.depositTriggerFunctionConfig(appName, serviceUrl); + const value = this.buildSetFunctionValue(depositParam); + const funcOp = buildSetOperation("SET_FUNCTION", depositParam.ref, value); + setFunctionOps.push(funcOp); + const depositAddress = this.ain.getDefaultAccount()!.address; + const defaultConfig: appBillingConfig = { + depositAddress, + costPerToken: 0, + minCost: 0, + } + const configOp = this.buildSetAppBillingConfigOp(appName, defaultConfig); + setBillingConfigOps.push(configOp); + + const txBody = this.buildTxBody([ + createAppOp, + ...setRuleOps, + ...setFunctionOps, + ...setBillingConfigOps, + ]); + return await this.ain.sendTransaction(txBody); + } + + /** + * Set billing config to app. + * @param {string} appName + * @param {appBillingConfig} config - The configuration of your app's billing. + * @returns Result of transaction. + */ + async setAppBillingConfig(appName: string, config: appBillingConfig) { + const setConfigOp = this.buildSetAppBillingConfigOp(appName, config); + const txBody = this.buildTxBody(setConfigOp); + return await this.ain.sendTransaction(txBody); + } + + /** + * Get billing config of app + * @param {string} appName + * @returns {Promise} + */ + async getBillingConfig(appName: string): Promise { + return await this.ain.getValue(Path.app(appName).billingConfig()); + } + + /** + * Set trigger function to app. + * @param {string} appName + * @param {setTriggerFunctionParam[]} functions + * @returns Result of transaction. + */ + async setTriggerFunctions(appName: string, functions: setTriggerFunctionParm[]) { + const setFunctionOps: SetOperation[] = []; + for (const param of Object.values(functions)) { + const value = this.buildSetFunctionValue(param); + const op = buildSetOperation("SET_FUNCTION", param.ref, value); + setFunctionOps.push(op); + } + if (setFunctionOps.length <= 0) { + // TODO(yoojin): Will make TransactionWrapper and catch error in wrapper. I think it will add in moduleBase. + // FIXME(yoojin): error message. + throw new Error ("Please input setTriggerFunctionParams."); + } + const txBody = this.buildTxBody(setFunctionOps); + return await this.ain.sendTransaction(txBody); + } + + /** + * Set rules to app. + * @param {string} appName + * @param {setRuleParam} rules + * @returns Result of transaction. + */ + async setRules(appName: string, rules: setRuleParam[]) { + const setRuleOps: SetOperation[] = []; + for (const rule of Object.values(rules)) { + const { ref } = rule; + const value = rule.write; + const op = buildSetOperation("SET_RULE", ref, value); + setRuleOps.push(op); + } + const txBody = this.buildTxBody(setRuleOps); + return await this.ain.sendTransaction(txBody); + } + + /** + * Add admin on app. + * @param {string} appName + * @param {string} userAddress + * @returns Result of transaction. + */ + async addAdmin(appName: string, userAddress: string) { + const op = this.buildSetAdminOp(appName, userAddress); + const txBody = this.buildTxBody(op); + return await this.ain.sendTransaction(txBody); + } + + /** + * Remove admin on app. + * @param {string} appName + * @param {string} userAddress + * @returns Result of transaction. + */ + async deleteAdmin(appName: string, userAddress: string) { + const op = this.buildSetAdminOp(appName, userAddress, true); + const txBody = this.buildTxBody(op); + return await this.ain.sendTransaction(txBody); + } + + /** + * Check cost of request and check if account can pay. You should use this function before send or handle request. + * If you don't set address, it will use default account's address. + * @param {string} appName - App name you want to request service to. + * @param {string} prompt - Data you want to request to service . + * @param {string=} userAddress - Address of account you want to check balance. You should set default account if you don't provide address. + * @returns Result cost of service. It throws error when user can't pay. + */ + async checkCostAndBalance(appName: string, value: string, requesterAddress?: string) { + requesterAddress = requesterAddress ? requesterAddress : this.ain.getDefaultAccount()!.address; + const billingConfig = (await this.getBillingConfig(appName)); + const token = value.split(' ').length; + let cost = token * billingConfig.costPerToken; + if (billingConfig.minCost && cost < billingConfig.minCost) { + cost = billingConfig.minCost; + } else if (billingConfig.maxCost && cost > billingConfig.maxCost) { + cost = billingConfig.maxCost; + } + const balance = await this.getCreditBalance(appName, requesterAddress); + if (balance < cost) { + throw new Error("not enough balance"); + } + return cost; + } + + async getCreditBalance(appName: string, userAddress: string) { + const balancePath = Path.app(appName).balanceOfUser(userAddress); + return await this.ain.getValue(balancePath); + } + + private buildSetAppBillingConfigOp(appName: string, config: appBillingConfig) { + const path = Path.app(appName).billingConfig(); + return buildSetOperation("SET_VALUE", path, config); + } + private buildCreateAppOp(appName: string): SetOperation { + const path = `/manage_app/${appName}/create/${Date.now()}`; + const adminAccount = this.ain.getDefaultAccount()!; + const value = { + admin: { + [adminAccount.address]: true, + } + } + return buildSetOperation("SET_VALUE", path, value); + } + + private buildSetFunctionValue({function_type, function_url, function_id}: triggerFunctionConfig) { + return { + ".function": { + [function_id]: { + function_type, + function_url, + function_id, + }, + }, + }; + } + + private buildSetAdminOp(appName: string, userAddress: string, isRemoveOp?: boolean) { + const path = `/manage_app/${appName}/config/admin/${userAddress}`; + const value = !isRemoveOp ? null : true; + return buildSetOperation("SET_VALUE", path, value); + } + + private defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { + const rootRef = Path.app(appName).root(); + return { + root: { + ref: rootRef, + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true" + } + } + }, + deposit: { + ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, + value: { + ".rule": { + write: "data === null && util.isNumber(newData) && getValue(`/transfer/` + $userAddress + `/` + getValue(`/apps/" + `${appName}` + "/billingConfig/depositAddress`) + `/` + $transferKey + `/value`) === newData" + } + } + }, + balance: { + ref: Path.app(appName).balanceOfUser("$userAddress"), + value: { + ".rule": { + write: "(util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true) && util.isNumber(newData)" + } + } + }, + balanceHistory: { + ref: `${rootRef}/balance/$userAddress/history/$timestamp_and_type`, + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.amount) && (newData.type === 'DEPOSIT' || newData.type === 'USAGE')" + } + } + }, + request: { + ref: Path.app(appName).request("$userAddress", "$requestKey"), + value: { + ".rule": { + write: + "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + + "(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))" + } + } + }, + response: { + ref: Path.app(appName).response("userAddress", "$requestKey"), + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.status)" + } + }, + }, + billingConfig: { + ref: Path.app(appName).billingConfig(), + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.depositAddress) && " + + "util.isDict(newData.service) && util.isDict(newData.service.default) && util.isNumber(newData.service.default.costPerToken) && util.isNumber(newData.service.default.minCost) && " + + "util.isEmpty(newData.service.default.maxCost) || (util.isNumber(newData.service.default.maxCost) && newData.service.default.maxCost >= newData.service.default.minCost)", + } + } + }, + } + } + + private depositTriggerFunctionConfig = (appName: string, serviceUrl: string): setTriggerFunctionParm => { + return { + ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, + function_type: "REST", + function_id: "deposit-trigger", + function_url: `${serviceUrl}/deposit`, + } + } +} From bfe339f679c7a5d1b6407dbf1cf842f7ae26f713 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 19 Sep 2023 11:37:02 +0900 Subject: [PATCH 169/235] fix: isDefaultAccountExist --- src/ain.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ain.ts b/src/ain.ts index 1b878c6..ac5eb05 100644 --- a/src/ain.ts +++ b/src/ain.ts @@ -21,8 +21,8 @@ export default class AinModule { isDefaultAccountExist(): boolean { if (this.getDefaultAccount()) - return false; - return true; + return true; + return false; } setDefaultAccount(privateKey: string) { @@ -52,7 +52,7 @@ export default class AinModule { } getAddress() { - this.checkAinInitiated(); + this.isDefaultAccountExist(); return this.ain!.wallet.defaultAccount!.address; } } \ No newline at end of file From b0776a2eb5006cddba56d98430c44d986e66b074 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 12:15:56 +0900 Subject: [PATCH 170/235] fix: buildTxBody --- src/controller/appController.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/controller/appController.ts b/src/controller/appController.ts index 2466c1e..7c956cb 100644 --- a/src/controller/appController.ts +++ b/src/controller/appController.ts @@ -1,7 +1,7 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path } from "../constants"; import { appBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; -import { buildSetOperation } from "../utils/builder"; +import { buildSetOperation, buildTxBody } from "../utils/builder"; import AinModule from '../ain'; export default class AppController { @@ -47,7 +47,7 @@ export default class AppController { const configOp = this.buildSetAppBillingConfigOp(appName, defaultConfig); setBillingConfigOps.push(configOp); - const txBody = this.buildTxBody([ + const txBody = buildTxBody([ createAppOp, ...setRuleOps, ...setFunctionOps, @@ -64,7 +64,7 @@ export default class AppController { */ async setAppBillingConfig(appName: string, config: appBillingConfig) { const setConfigOp = this.buildSetAppBillingConfigOp(appName, config); - const txBody = this.buildTxBody(setConfigOp); + const txBody = buildTxBody(setConfigOp); return await this.ain.sendTransaction(txBody); } @@ -95,7 +95,7 @@ export default class AppController { // FIXME(yoojin): error message. throw new Error ("Please input setTriggerFunctionParams."); } - const txBody = this.buildTxBody(setFunctionOps); + const txBody = buildTxBody(setFunctionOps); return await this.ain.sendTransaction(txBody); } @@ -113,7 +113,7 @@ export default class AppController { const op = buildSetOperation("SET_RULE", ref, value); setRuleOps.push(op); } - const txBody = this.buildTxBody(setRuleOps); + const txBody = buildTxBody(setRuleOps); return await this.ain.sendTransaction(txBody); } @@ -125,7 +125,7 @@ export default class AppController { */ async addAdmin(appName: string, userAddress: string) { const op = this.buildSetAdminOp(appName, userAddress); - const txBody = this.buildTxBody(op); + const txBody = buildTxBody(op); return await this.ain.sendTransaction(txBody); } @@ -137,7 +137,7 @@ export default class AppController { */ async deleteAdmin(appName: string, userAddress: string) { const op = this.buildSetAdminOp(appName, userAddress, true); - const txBody = this.buildTxBody(op); + const txBody = buildTxBody(op); return await this.ain.sendTransaction(txBody); } From 0c7c8395a266c8a3f2e5ec8539d91859e4ba2993 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 12:18:35 +0900 Subject: [PATCH 171/235] fix: move default app rules to constant --- src/constants.ts | 66 +++++++++++++++++++++++++++++++ src/controller/appController.ts | 70 +-------------------------------- 2 files changed, 68 insertions(+), 68 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 316cdf6..e9b9c8b 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -25,5 +25,71 @@ export const Path = { `/transfer/${from}/${to}/${transferKey}/value`, } +export const defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { + const rootRef = Path.app(appName).root(); + return { + root: { + ref: rootRef, + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true" + } + } + }, + deposit: { + ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, + value: { + ".rule": { + write: "data === null && util.isNumber(newData) && getValue(`/transfer/` + $userAddress + `/` + getValue(`/apps/" + `${appName}` + "/billingConfig/depositAddress`) + `/` + $transferKey + `/value`) === newData" + } + } + }, + balance: { + ref: Path.app(appName).balanceOfUser("$userAddress"), + value: { + ".rule": { + write: "(util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true) && util.isNumber(newData) && newData > 0", + } + } + }, + balanceHistory: { + ref: `${rootRef}/balance/$userAddress/history/$timestamp_and_type`, + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.amount) && (newData.type === 'DEPOSIT' || newData.type === 'USAGE')" + } + } + }, + request: { + ref: Path.app(appName).request("$userAddress", "$requestKey"), + value: { + ".rule": { + write: + "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + + "(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))" + } + } + }, + response: { + ref: Path.app(appName).response("userAddress", "$requestKey"), + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.status)" + } + }, + }, + billingConfig: { + ref: Path.app(appName).billingConfig(), + value: { + ".rule": { + write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.depositAddress) && " + + "util.isDict(newData.service) && util.isDict(newData.service.default) && util.isNumber(newData.service.default.costPerToken) && util.isNumber(newData.service.default.minCost) && " + + "util.isEmpty(newData.service.default.maxCost) || (util.isNumber(newData.service.default.maxCost) && newData.service.default.maxCost >= newData.service.default.minCost)", + } + } + }, + } +} + export const SECOND = 1000; export const HANDLER_HEARBEAT_INTERVAL = 15 * SECOND; diff --git a/src/controller/appController.ts b/src/controller/appController.ts index 7c956cb..4a56a77 100644 --- a/src/controller/appController.ts +++ b/src/controller/appController.ts @@ -1,5 +1,5 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; -import { Path } from "../constants"; +import { Path, defaultAppRules } from "../constants"; import { appBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; import { buildSetOperation, buildTxBody } from "../utils/builder"; import AinModule from '../ain'; @@ -27,7 +27,7 @@ export default class AppController { const setBillingConfigOps: SetOperation[] = [] ; const createAppOp = this.buildCreateAppOp(appName); - const defaultRules = this.defaultAppRules(appName); + const defaultRules = defaultAppRules(appName); for (const rule of Object.values(defaultRules)) { const { ref, value } = rule; const ruleOp = buildSetOperation("SET_RULE", ref, value); @@ -204,72 +204,6 @@ export default class AppController { return buildSetOperation("SET_VALUE", path, value); } - private defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { - const rootRef = Path.app(appName).root(); - return { - root: { - ref: rootRef, - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true" - } - } - }, - deposit: { - ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, - value: { - ".rule": { - write: "data === null && util.isNumber(newData) && getValue(`/transfer/` + $userAddress + `/` + getValue(`/apps/" + `${appName}` + "/billingConfig/depositAddress`) + `/` + $transferKey + `/value`) === newData" - } - } - }, - balance: { - ref: Path.app(appName).balanceOfUser("$userAddress"), - value: { - ".rule": { - write: "(util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true) && util.isNumber(newData)" - } - } - }, - balanceHistory: { - ref: `${rootRef}/balance/$userAddress/history/$timestamp_and_type`, - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.amount) && (newData.type === 'DEPOSIT' || newData.type === 'USAGE')" - } - } - }, - request: { - ref: Path.app(appName).request("$userAddress", "$requestKey"), - value: { - ".rule": { - write: - "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + - "(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))" - } - } - }, - response: { - ref: Path.app(appName).response("userAddress", "$requestKey"), - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.status)" - } - }, - }, - billingConfig: { - ref: Path.app(appName).billingConfig(), - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.depositAddress) && " + - "util.isDict(newData.service) && util.isDict(newData.service.default) && util.isNumber(newData.service.default.costPerToken) && util.isNumber(newData.service.default.minCost) && " + - "util.isEmpty(newData.service.default.maxCost) || (util.isNumber(newData.service.default.maxCost) && newData.service.default.maxCost >= newData.service.default.minCost)", - } - } - }, - } - } - private depositTriggerFunctionConfig = (appName: string, serviceUrl: string): setTriggerFunctionParm => { return { ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, From 7aa2df5abf14a80a84053dcfd22eaf7b9cce3af8 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 12:22:02 +0900 Subject: [PATCH 172/235] style: space --- src/controller/appController.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controller/appController.ts b/src/controller/appController.ts index 4a56a77..794b816 100644 --- a/src/controller/appController.ts +++ b/src/controller/appController.ts @@ -14,6 +14,7 @@ export default class AppController { } return AppController.instance; } + /** * Create App for your AI Service on AI Network. * @param {string} appName - The name of app you will create. @@ -175,6 +176,7 @@ export default class AppController { const path = Path.app(appName).billingConfig(); return buildSetOperation("SET_VALUE", path, config); } + private buildCreateAppOp(appName: string): SetOperation { const path = `/manage_app/${appName}/create/${Date.now()}`; const adminAccount = this.ain.getDefaultAccount()!; From f8f28f40367cd6445f7a7574f128d4ee0f9f464d Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 12:25:43 +0900 Subject: [PATCH 173/235] refactor: remove app --- src/modules/app.ts | 273 --------------------------------------------- 1 file changed, 273 deletions(-) delete mode 100644 src/modules/app.ts diff --git a/src/modules/app.ts b/src/modules/app.ts deleted file mode 100644 index 1557c2f..0000000 --- a/src/modules/app.ts +++ /dev/null @@ -1,273 +0,0 @@ -import { SetOperation } from "@ainblockchain/ain-js/lib/types"; -import { Path } from "../constants"; -import { appBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; -import { buildSetOperation } from "../utils/builder"; -import ModuleBase from "./moduleBase"; - -export default class App extends ModuleBase { - /** - * Create App for your AI Service on AI Network. - * @param {string} appName - The name of app you will create. - * @param {TriggerFunctionUrlMap} functioniUrls - The urls of trigger function you set. - * @param {setDefaultFlag} setDefaultFlag - Set true which you wan to set config as default. - * @returns Result of transaction. - */ - // FIXME(yoojin): need to fix getting function urls. - async create(appName: string, serviceUrl: string) { - const setRuleOps: SetOperation[] = []; - const setFunctionOps: SetOperation[] = []; - const setBillingConfigOps: SetOperation[] = [] ; - - const createAppOp = this.buildCreateAppOp(appName); - const defaultRules = this.defaultAppRules(appName); - for (const rule of Object.values(defaultRules)) { - const { ref, value } = rule; - const ruleOp = buildSetOperation("SET_RULE", ref, value); - setRuleOps.push(ruleOp); - } - - const depositParam = this.depositTriggerFunctionConfig(appName, serviceUrl); - const value = this.buildSetFunctionValue(depositParam); - const funcOp = buildSetOperation("SET_FUNCTION", depositParam.ref, value); - setFunctionOps.push(funcOp); - const depositAddress = this.getDefaultAccount().address; - const defaultConfig: appBillingConfig = { - depositAddress, - costPerToken: 0, - minCost: 0, - } - const configOp = this.buildSetAppBillingConfigOp(appName, defaultConfig); - setBillingConfigOps.push(configOp); - - const txBody = this.buildTxBody([ - createAppOp, - ...setRuleOps, - ...setFunctionOps, - ...setBillingConfigOps, - ]); - return await this.sendTransaction(txBody); - } - - /** - * Set billing config to app. - * @param {string} appName - * @param {appBillingConfig} config - The configuration of your app's billing. - * @returns Result of transaction. - */ - async setAppBillingConfig(appName: string, config: appBillingConfig) { - const setConfigOp = this.buildSetAppBillingConfigOp(appName, config); - const txBody = this.buildTxBody(setConfigOp); - return await this.sendTransaction(txBody); - } - - /** - * Get billing config of app - * @param {string} appName - * @returns {Promise} - */ - async getBillingConfig(appName: string): Promise { - return await this.ain.db.ref().getValue(Path.app(appName).billingConfig()); - } - - /** - * Set trigger function to app. - * @param {string} appName - * @param {setTriggerFunctionParam[]} functions - * @returns Result of transaction. - */ - async setTriggerFunctions(appName: string, functions: setTriggerFunctionParm[]) { - const setFunctionOps: SetOperation[] = []; - for (const param of Object.values(functions)) { - const value = this.buildSetFunctionValue(param); - const op = buildSetOperation("SET_FUNCTION", param.ref, value); - setFunctionOps.push(op); - } - if (setFunctionOps.length <= 0) { - // TODO(yoojin): Will make TransactionWrapper and catch error in wrapper. I think it will add in moduleBase. - // FIXME(yoojin): error message. - throw new Error ("Please input setTriggerFunctionParams."); - } - const txBody = this.buildTxBody(setFunctionOps); - return await this.sendTransaction(txBody); - } - - /** - * Set rules to app. - * @param {string} appName - * @param {setRuleParam} rules - * @returns Result of transaction. - */ - async setRules(appName: string, rules: setRuleParam[]) { - const setRuleOps: SetOperation[] = []; - for (const rule of Object.values(rules)) { - const { ref } = rule; - const value = rule.write; - const op = buildSetOperation("SET_RULE", ref, value); - setRuleOps.push(op); - } - const txBody = this.buildTxBody(setRuleOps); - return await this.sendTransaction(txBody); - } - - /** - * Add admin on app. - * @param {string} appName - * @param {string} userAddress - * @returns Result of transaction. - */ - async addAdmin(appName: string, userAddress: string) { - const op = this.buildSetAdminOp(appName, userAddress); - const txBody = this.buildTxBody(op); - return await this.sendTransaction(txBody); - } - - /** - * Remove admin on app. - * @param {string} appName - * @param {string} userAddress - * @returns Result of transaction. - */ - async deleteAdmin(appName: string, userAddress: string) { - const op = this.buildSetAdminOp(appName, userAddress, true); - const txBody = this.buildTxBody(op); - return await this.sendTransaction(txBody); - } - - /** - * Check cost of request and check if account can pay. You should use this function before send or handle request. - * If you don't set address, it will use default account's address. - * @param {string} appName - App name you want to request service to. - * @param {string} prompt - Data you want to request to service . - * @param {string=} userAddress - Address of account you want to check balance. You should set default account if you don't provide address. - * @returns Result cost of service. It throws error when user can't pay. - */ - async checkCostAndBalance(appName: string, value: string, requesterAddress?: string) { - requesterAddress = requesterAddress ? requesterAddress : this.getDefaultAccount().address; - const billingConfig = (await this.getBillingConfig(appName)); - const token = value.split(' ').length; - let cost = token * billingConfig.costPerToken; - if (billingConfig.minCost && cost < billingConfig.minCost) { - cost = billingConfig.minCost; - } else if (billingConfig.maxCost && cost > billingConfig.maxCost) { - cost = billingConfig.maxCost; - } - const balance = await this.getCreditBalance(appName, requesterAddress); - if (balance < cost) { - throw new Error("not enough balance"); - } - return cost; - } - - async getCreditBalance(appName: string, userAddress: string) { - const balancePath = Path.app(appName).balanceOfUser(userAddress); - return await this.ain.db.ref(balancePath).getValue(); - } - - private buildSetAppBillingConfigOp(appName: string, config: appBillingConfig) { - const path = Path.app(appName).billingConfig(); - return buildSetOperation("SET_VALUE", path, config); - } - private buildCreateAppOp(appName: string): SetOperation { - const path = `/manage_app/${appName}/create/${Date.now()}`; - const adminAccount = this.getDefaultAccount(); - const value = { - admin: { - [adminAccount.address]: true, - } - } - return buildSetOperation("SET_VALUE", path, value); - } - - private buildSetFunctionValue({function_type, function_url, function_id}: triggerFunctionConfig) { - return { - ".function": { - [function_id]: { - function_type, - function_url, - function_id, - }, - }, - }; - } - - private buildSetAdminOp(appName: string, userAddress: string, isRemoveOp?: boolean) { - const path = `/manage_app/${appName}/config/admin/${userAddress}`; - const value = !isRemoveOp ? null : true; - return buildSetOperation("SET_VALUE", path, value); - } - - private defaultAppRules = (appName: string): { [type: string]: { ref: string, value: object } } => { - const rootRef = Path.app(appName).root(); - return { - root: { - ref: rootRef, - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true" - } - } - }, - deposit: { - ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, - value: { - ".rule": { - write: "data === null && util.isNumber(newData) && getValue(`/transfer/` + $userAddress + `/` + getValue(`/apps/" + `${appName}` + "/billingConfig/depositAddress`) + `/` + $transferKey + `/value`) === newData" - } - } - }, - balance: { - ref: Path.app(appName).balanceOfUser("$userAddress"), - value: { - ".rule": { - write: "(util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true) && util.isNumber(newData)" - } - } - }, - balanceHistory: { - ref: `${rootRef}/balance/$userAddress/history/$timestamp_and_type`, - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.amount) && (newData.type === 'DEPOSIT' || newData.type === 'USAGE')" - } - } - }, - request: { - ref: Path.app(appName).request("$userAddress", "$requestKey"), - value: { - ".rule": { - write: - "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + - "(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))" - } - } - }, - response: { - ref: Path.app(appName).response("userAddress", "$requestKey"), - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.status)" - } - }, - }, - billingConfig: { - ref: Path.app(appName).billingConfig(), - value: { - ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.depositAddress) && " + - "util.isDict(newData.service) && util.isDict(newData.service.default) && util.isNumber(newData.service.default.costPerToken) && util.isNumber(newData.service.default.minCost) && " + - "util.isEmpty(newData.service.default.maxCost) || (util.isNumber(newData.service.default.maxCost) && newData.service.default.maxCost >= newData.service.default.minCost)", - } - } - }, - } - } - - private depositTriggerFunctionConfig = (appName: string, serviceUrl: string): setTriggerFunctionParm => { - return { - ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, - function_type: "REST", - function_id: "deposit-trigger", - function_url: `${serviceUrl}/deposit`, - } - } -} From 846f0f204d8e5e8b8384b9569185d66fe9f143d3 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 12:26:04 +0900 Subject: [PATCH 174/235] refactor: change app to appController --- src/ainize.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index 206f5cc..48cd491 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -4,7 +4,7 @@ import Middleware from "./middlewares/middleware"; import { getBlockChainEndpoint } from "./constants"; import Handler from "./handlers/handler"; import Wallet from "./modules/wallet"; -import App from "./modules/app"; +import AppController from "./controller/appController"; import DepositService from "./modules/service/depositService"; import UseService from "./modules/service/useService"; import Service from "./modules/service"; @@ -16,14 +16,13 @@ export default class Ainize { middleware: Middleware; handler: Handler; wallet: Wallet; - app:App; + appController: AppController = AppController.getInstance(); service: Service; admin: Admin; constructor(chainId: 1|0, privateKey?: string ) { const blockChainEndpoint = getBlockChainEndpoint(chainId); this.ain = new Ain(blockChainEndpoint, chainId); - this.app = new App(this); this.cache = new NodeCache(); this.middleware = new Middleware(this.cache); this.handler = new Handler(this); @@ -34,9 +33,17 @@ export default class Ainize { this.admin = new Admin(this, depositService, useService); } + // FIXME(yoojin): add config type and change param type. + deploy(modelName: string, config: any) { + // TODO(yoojin, woojae): Deploy container, advanced. + // TODO(yoojin): add createApp + // this.appController.createApp(modelName, ) + } + model(modelName: string) { return new Model(modelName); } + test() { console.log("test"); } From 0a5b508435f0786d22bb52e416cf44281abdada1 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 14:01:52 +0900 Subject: [PATCH 175/235] fix: move appController path --- src/{controller => controllers}/appController.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{controller => controllers}/appController.ts (100%) diff --git a/src/controller/appController.ts b/src/controllers/appController.ts similarity index 100% rename from src/controller/appController.ts rename to src/controllers/appController.ts From ce707ac8db9f882d3b7b867e490f021b0d1bec3f Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 14:02:13 +0900 Subject: [PATCH 176/235] fix: remove requesterAddress --- src/controllers/appController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/appController.ts b/src/controllers/appController.ts index 794b816..1172836 100644 --- a/src/controllers/appController.ts +++ b/src/controllers/appController.ts @@ -150,8 +150,8 @@ export default class AppController { * @param {string=} userAddress - Address of account you want to check balance. You should set default account if you don't provide address. * @returns Result cost of service. It throws error when user can't pay. */ - async checkCostAndBalance(appName: string, value: string, requesterAddress?: string) { - requesterAddress = requesterAddress ? requesterAddress : this.ain.getDefaultAccount()!.address; + async checkCostAndBalance(appName: string, value: string) { + const requesterAddress = this.ain.getAddress(); const billingConfig = (await this.getBillingConfig(appName)); const token = value.split(' ').length; let cost = token * billingConfig.costPerToken; From ad1fb2c421640b8d3a83eaf22db79aa3eece1cb4 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 15:34:39 +0900 Subject: [PATCH 177/235] fix: import path --- src/ainize.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ainize.ts b/src/ainize.ts index c31b709..9484ee2 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -3,7 +3,7 @@ import * as NodeCache from "node-cache"; import Middleware from "./middlewares/middleware"; import { getBlockChainEndpoint } from "./constants"; import Handler from "./handlers/handler"; -import AppController from "./controller/appController"; +import AppController from "./controllers/appController"; import Model from "./model"; export default class Ainize { private cache: NodeCache; From 2f3edc0037ffa26f5609d7269e8ea815ffcdeda0 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 16:14:00 +0900 Subject: [PATCH 178/235] feat: add createApp on deploy --- src/ainize.ts | 23 ++++++++++++++++++----- src/constants.ts | 7 +++++++ src/controllers/appController.ts | 12 +++--------- src/types/type.ts | 14 +++++++++++++- 4 files changed, 41 insertions(+), 15 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index 9484ee2..c66ab5f 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -1,10 +1,12 @@ import Ain from "@ainblockchain/ain-js"; import * as NodeCache from "node-cache"; import Middleware from "./middlewares/middleware"; -import { getBlockChainEndpoint } from "./constants"; +import { DEFAULT_BILLING_CONFIG, getBlockChainEndpoint } from "./constants"; import Handler from "./handlers/handler"; import AppController from "./controllers/appController"; import Model from "./model"; +import { deployConfig } from "./types/type"; +import AinModule from "./ain"; export default class Ainize { private cache: NodeCache; ain: Ain; @@ -12,7 +14,7 @@ export default class Ainize { handler: Handler; appController: AppController = AppController.getInstance(); - constructor(chainId: 1|0) { + constructor(chainId: 1 | 0) { const blockChainEndpoint = getBlockChainEndpoint(chainId); this.ain = new Ain(blockChainEndpoint, chainId); this.cache = new NodeCache(); @@ -21,10 +23,21 @@ export default class Ainize { } // FIXME(yoojin): add config type and change param type. - deploy(modelName: string, config: any) { + deploy({modelName, billingConfig, serviceUrl}: deployConfig) { // TODO(yoojin, woojae): Deploy container, advanced. - // TODO(yoojin): add createApp - // this.appController.createApp(modelName, ) + const deployer = AinModule.getInstance().getAddress(); + if (!billingConfig) { + billingConfig = { + ...DEFAULT_BILLING_CONFIG, + depositAddress: deployer, + } + } + // NOTE(yoojin): For test. We make fixed url on service. + if (!serviceUrl) { + serviceUrl = `https://${modelName}.ainetwork.xyz`; + } + + this.appController.createApp({ appName: modelName, serviceUrl, billingConfig }) } model(modelName: string) { diff --git a/src/constants.ts b/src/constants.ts index e9b9c8b..7130a85 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,3 +1,5 @@ +import { appBillingConfig } from "./types/type" + export const getBlockChainEndpoint = (chainId:number) =>{ return chainId === 1 ? "https://mainnet-event.ainetwork.ai" : "https://testnet-event.ainetwork.ai" } @@ -91,5 +93,10 @@ export const defaultAppRules = (appName: string): { [type: string]: { ref: strin } } +export const DEFAULT_BILLING_CONFIG: Omit = { + costPerToken: 0, + minCost: 0, +} + export const SECOND = 1000; export const HANDLER_HEARBEAT_INTERVAL = 15 * SECOND; diff --git a/src/controllers/appController.ts b/src/controllers/appController.ts index 1172836..2ec4314 100644 --- a/src/controllers/appController.ts +++ b/src/controllers/appController.ts @@ -1,6 +1,6 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path, defaultAppRules } from "../constants"; -import { appBillingConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; +import { appBillingConfig, createAppConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; import { buildSetOperation, buildTxBody } from "../utils/builder"; import AinModule from '../ain'; @@ -22,7 +22,7 @@ export default class AppController { * @param {setDefaultFlag} setDefaultFlag - Set true which you wan to set config as default. * @returns Result of transaction. */ - async createApp(appName: string, serviceUrl: string) { + async createApp({ appName, serviceUrl, billingConfig }: createAppConfig) { const setRuleOps: SetOperation[] = []; const setFunctionOps: SetOperation[] = []; const setBillingConfigOps: SetOperation[] = [] ; @@ -39,13 +39,7 @@ export default class AppController { const value = this.buildSetFunctionValue(depositParam); const funcOp = buildSetOperation("SET_FUNCTION", depositParam.ref, value); setFunctionOps.push(funcOp); - const depositAddress = this.ain.getDefaultAccount()!.address; - const defaultConfig: appBillingConfig = { - depositAddress, - costPerToken: 0, - minCost: 0, - } - const configOp = this.buildSetAppBillingConfigOp(appName, defaultConfig); + const configOp = this.buildSetAppBillingConfigOp(appName, billingConfig); setBillingConfigOps.push(configOp); const txBody = buildTxBody([ diff --git a/src/types/type.ts b/src/types/type.ts index 2511425..736a34a 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -68,4 +68,16 @@ export type deposit = { transferValue: number, appName: string, requesterAddress: string, -} \ No newline at end of file +} + +export type deployConfig = { + modelName: string, + billingConfig?: appBillingConfig, + serviceUrl?: string, +} + +export type createAppConfig = { + appName: string, + billingConfig: appBillingConfig, + serviceUrl: string, +} From 94fda8ea0eaf7c01f95e3cbe9ce4354654c07f63 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 16:20:28 +0900 Subject: [PATCH 179/235] feat: add setContainerStatus and use on createApp --- src/controllers/appController.ts | 18 ++++++++++++++++-- src/types/type.ts | 5 +++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/controllers/appController.ts b/src/controllers/appController.ts index 2ec4314..8a65579 100644 --- a/src/controllers/appController.ts +++ b/src/controllers/appController.ts @@ -1,6 +1,6 @@ import { SetOperation } from "@ainblockchain/ain-js/lib/types"; import { Path, defaultAppRules } from "../constants"; -import { appBillingConfig, createAppConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; +import { ContainerStatus, appBillingConfig, createAppConfig, setRuleParam, setTriggerFunctionParm, triggerFunctionConfig } from "../types/type"; import { buildSetOperation, buildTxBody } from "../utils/builder"; import AinModule from '../ain'; @@ -42,11 +42,14 @@ export default class AppController { const configOp = this.buildSetAppBillingConfigOp(appName, billingConfig); setBillingConfigOps.push(configOp); + const statusOp = this.buildSetContainerStatusOp(appName, ContainerStatus.RUNNING); + const txBody = buildTxBody([ createAppOp, ...setRuleOps, ...setFunctionOps, ...setBillingConfigOps, + statusOp, ]); return await this.ain.sendTransaction(txBody); } @@ -112,6 +115,12 @@ export default class AppController { return await this.ain.sendTransaction(txBody); } + async setContainerStatus(appName: string, status: ContainerStatus) { + const op = this.buildSetContainerStatusOp(appName, status); + const txBody = buildTxBody(op); + return await this.ain.sendTransaction(txBody); + } + /** * Add admin on app. * @param {string} appName @@ -136,7 +145,7 @@ export default class AppController { return await this.ain.sendTransaction(txBody); } - /** + /** * Check cost of request and check if account can pay. You should use this function before send or handle request. * If you don't set address, it will use default account's address. * @param {string} appName - App name you want to request service to. @@ -166,6 +175,11 @@ export default class AppController { return await this.ain.getValue(balancePath); } + private buildSetContainerStatusOp(appName: string, status: ContainerStatus) { + const path = Path.app(appName).status(); + return buildSetOperation("SET_VALUE", path, status); + } + private buildSetAppBillingConfigOp(appName: string, config: appBillingConfig) { const path = Path.app(appName).billingConfig(); return buildSetOperation("SET_VALUE", path, config); diff --git a/src/types/type.ts b/src/types/type.ts index 736a34a..bda88ad 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -81,3 +81,8 @@ export type createAppConfig = { billingConfig: appBillingConfig, serviceUrl: string, } + +export enum ContainerStatus { + RUNNING = "RUNNING", + STOP = "STOP", +} From e7f02f8883aab9b58c0441eccb99dcc2bf40c051 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 19 Sep 2023 16:53:25 +0900 Subject: [PATCH 180/235] feat: add hander at use --- src/ain.ts | 5 ++ src/ainize.ts | 4 +- src/controllers/modelController.ts | 20 +++--- src/handlers/handler.ts | 99 +++++++++++------------------- src/modules/moduleBase.ts | 46 -------------- 5 files changed, 53 insertions(+), 121 deletions(-) delete mode 100644 src/modules/moduleBase.ts diff --git a/src/ain.ts b/src/ain.ts index ac5eb05..18b58d3 100644 --- a/src/ain.ts +++ b/src/ain.ts @@ -55,4 +55,9 @@ export default class AinModule { this.isDefaultAccountExist(); return this.ain!.wallet.defaultAccount!.address; } + + getEventManager() { + this.checkAinInitiated(); + return this.ain!.em; + } } \ No newline at end of file diff --git a/src/ainize.ts b/src/ainize.ts index c31b709..38befa8 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -3,13 +3,12 @@ import * as NodeCache from "node-cache"; import Middleware from "./middlewares/middleware"; import { getBlockChainEndpoint } from "./constants"; import Handler from "./handlers/handler"; -import AppController from "./controller/appController"; +import AppController from "./controllers/appController"; import Model from "./model"; export default class Ainize { private cache: NodeCache; ain: Ain; middleware: Middleware; - handler: Handler; appController: AppController = AppController.getInstance(); constructor(chainId: 1|0) { @@ -17,7 +16,6 @@ export default class Ainize { this.ain = new Ain(blockChainEndpoint, chainId); this.cache = new NodeCache(); this.middleware = new Middleware(this.cache); - this.handler = new Handler(this); } // FIXME(yoojin): add config type and change param type. diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 94e9f10..c91ff57 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -3,14 +3,15 @@ import AinModule from "../ain"; import { Path } from "../constants"; import { getRequestDepositOp, getTransferOp } from "../utils/operator"; import { buildSetOperation, buildTxBody } from "../utils/builder"; +import Handler from "../handlers/handler"; export default class ModelController { private static instance: ModelController | undefined; private ain = AinModule.getInstance(); + private handler = Handler.getInstance(); static getInstance() { if(!ModelController.instance){ ModelController.instance = new ModelController(); - } return ModelController.instance; } @@ -73,13 +74,16 @@ export default class ModelController { //TODO(woojae): connect with handler async use(modelName: string, requestData: string) { this.isLoggedIn(); - const requestKey = Date.now(); - const requesterAddress = this.ain.getAddress(); - const requestPath = Path.app(modelName).request(requesterAddress, requestKey); - const requestOp = buildSetOperation("SET_VALUE", requestPath, {prompt: requestData}); - const txBody = buildTxBody(requestOp); - await this.ain.sendTransaction(txBody); - return requestKey; + new Promise(async (resolve, reject) => { + const requestKey = Date.now(); + const requesterAddress = this.ain.getAddress(); + await this.handler.subscribe(requesterAddress, requestKey.toString(), modelName, resolve); + const requestPath = Path.app(modelName).request(requesterAddress, requestKey); + const requestOp = buildSetOperation("SET_VALUE", requestPath, {prompt: requestData}); + const txBody = buildTxBody(requestOp); + await this.ain.sendTransaction(txBody); + return requestKey; + }); } //TODO(woojae): implement this diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 725f1e6..8f9f546 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -1,94 +1,65 @@ const _ = require("lodash"); import Ain from "@ainblockchain/ain-js"; -import { HANDLER_HEARBEAT_INTERVAL, Path } from "../constants"; import Ainize from "../ainize"; +import { Path } from "../constants"; +import AinModule from "../ain"; +import EventManager from "@ainblockchain/ain-js/lib/event-manager"; export default class Handler { - isConnected: boolean = false; - subscribeTable:any = {}; - ain: Ain; - constructor(ainize: Ainize) { - this.ain = ainize.ain; + private static instance: Handler | undefined; + ain = AinModule.getInstance(); + em: EventManager | undefined; + static getInstance() { + if(!Handler.instance){ + Handler.instance = new Handler(); + Handler.instance.em = Handler.instance.ain.getEventManager(); + } + return Handler.instance; + } + + checkEventManager() { + if (!this.em) + throw new Error('set eventManager First.'); + return true; } - /** - * Connect to ai Network event node. you should connect before subscibe. It will auto reconnect when disconnected. - * @returns Nothing. - */ async connect() { - await this.ain.em.connect({}, this.disconnectedCallback.bind(this)); - this.isConnected = true; + this.checkEventManager(); + await this.em!.connect({},this.disconnectedCb); + console.log('connected'); }; - private async disconnectedCallback() { - this.isConnected = false; + private async disconnectedCb() { + console.log('disconnected. reconnecting...'); await this.connect(); } - /** - * Subscribe to specific service reponse. You can handle reponse with callback function. - * You should connect before subscibe. - * @param {string} userAddress - Address of account you request with. - * @param {string} appName - App name you want to subscribe. - * @param {Function(valueChangedEvent: any)} callback - A callback function to handle response. It will be called when response is written. - * @returns SubscribeId. - */ - async subscribe(userAddress:string, appName: string, callback: (valueChangedEvent: any) => any) { - if (this.checkSubscribeTableExists(userAddress, appName)){ - throw new Error("Already subscribed"); - } - const subscribeId = await this.ain.em.subscribe( + async subscribe(requester:string, recordId:string, appName: string, resolve: any) { + this.checkEventManager(); + const responsePath = Path.app(appName).response(requester, recordId); + const subscribeId = await this.em!.subscribe( "VALUE_CHANGED", { - path: Path.app(appName).response(userAddress, "$requestKey"), + path: responsePath, event_source: "USER", }, - (valueChangedEvent) => { - callback(valueChangedEvent); + (valueChangedEvent: any) => { + this.unsubscribe(subscribeId); + resolve(valueChangedEvent.values.after.data); }, (err) => { throw new Error(err.message); }, ); - this.addToSubscribeTable(userAddress, appName, subscribeId); - return subscribeId; - } - - private checkSubscribeTableExists(userAddress:string, appName:string,) { - return _.has(this.subscribeTable, [userAddress, appName]); } - private addToSubscribeTable(userAddress:string, appName: string, filterId: string) { - _.set(this.subscribeTable, [userAddress], {appName:filterId}); - } - - /** - * Get subscribe list of userAddress. If you don't set userAddress, it will return all subscribe list. - * @param {string=} userAddress - Address of account you want to get subscribe list. - * @returns Result of transaction. - */ - getSubscribeList(userAddress?: string) { - if (!userAddress) return this.subscribeTable; - return this.subscribeTable[userAddress]; - } - /** - * Unsubscribe to specific service reponse. - * @param {string} userAddress - Address of account you want to unsubscribe. - * @param {string} appName - App name you want to unsubscribe. - * @returns True if successfuly unsubscribed. - */ - unsubscribe(userAddress:string, appName: string) { - if (!this.checkSubscribeTableExists(userAddress, appName)) { - throw new Error("Not subscribed"); - } - this.ain.em.unsubscribe( - this.subscribeTable[userAddress][appName], + async unsubscribe(filterId: string) { + this.checkEventManager(); + await this.em!.unsubscribe( + filterId, (err)=>{ if (err) { throw new Error(err.message); - } else { - this.subscribeTable[userAddress][appName] = null; - return true; } }); } diff --git a/src/modules/moduleBase.ts b/src/modules/moduleBase.ts deleted file mode 100644 index 9767d7f..0000000 --- a/src/modules/moduleBase.ts +++ /dev/null @@ -1,46 +0,0 @@ -import Ain from "@ainblockchain/ain-js"; -import { SetOperation, TransactionBody } from "@ainblockchain/ain-js/lib/types"; -import Ainize from "../ainize"; -import { opResult, txResult } from "../types/type"; - -export default class ModuleBase { - protected ain: Ain; - constructor(ainize: Ainize) { - this.ain = ainize.ain; - } - - protected getDefaultAccount() { - const defaultAccount = this.ain.wallet.defaultAccount; - if (!defaultAccount) - throw new Error("You need to set default account."); - return defaultAccount; - } - - private async _sendTransaction(txBody: TransactionBody) { - return await this.ain.sendTransaction(txBody); - } - - private hasFailedOpResultList(result: txResult): boolean { - if (result.result_list) { - return Object.values(result.result_list).some( - (result: { code: number }) => result.code !== 0 - ); - } - return result.code !== 0; - } - - private handleTxResultWrapper(operation: Function) { - return async (args: any) => { - const res = await operation(args); - const { tx_hash, result } = res; - if (this.hasFailedOpResultList(result)) { - throw new Error( - `Failed to send transaction (${tx_hash}).\n Tx Result: ${JSON.stringify(result)}` - ); - } - return tx_hash; - } - } - - protected sendTransaction = this.handleTxResultWrapper(this._sendTransaction.bind(this)); -} From d4a8b8d230150c249fedfab00ce11c6ff2c2539f Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 19 Sep 2023 16:57:47 +0900 Subject: [PATCH 181/235] feat: return result --- src/controllers/modelController.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index c91ff57..6c5bb3f 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -74,7 +74,7 @@ export default class ModelController { //TODO(woojae): connect with handler async use(modelName: string, requestData: string) { this.isLoggedIn(); - new Promise(async (resolve, reject) => { + const result = await new Promise(async (resolve, reject) => { const requestKey = Date.now(); const requesterAddress = this.ain.getAddress(); await this.handler.subscribe(requesterAddress, requestKey.toString(), modelName, resolve); @@ -84,6 +84,7 @@ export default class ModelController { await this.ain.sendTransaction(txBody); return requestKey; }); + return result; } //TODO(woojae): implement this From 09705b76c692c861c5f6e02a1b070e4194e26679 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 17:17:06 +0900 Subject: [PATCH 182/235] style: space --- src/constants.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 7130a85..3c75390 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { appBillingConfig } from "./types/type" -export const getBlockChainEndpoint = (chainId:number) =>{ +export const getBlockChainEndpoint = (chainId: number) =>{ return chainId === 1 ? "https://mainnet-event.ainetwork.ai" : "https://testnet-event.ainetwork.ai" } @@ -35,32 +35,32 @@ export const defaultAppRules = (appName: string): { [type: string]: { ref: strin value: { ".rule": { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true" - } - } + }, + }, }, deposit: { ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, value: { ".rule": { write: "data === null && util.isNumber(newData) && getValue(`/transfer/` + $userAddress + `/` + getValue(`/apps/" + `${appName}` + "/billingConfig/depositAddress`) + `/` + $transferKey + `/value`) === newData" - } - } + }, + }, }, balance: { ref: Path.app(appName).balanceOfUser("$userAddress"), value: { ".rule": { write: "(util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true) && util.isNumber(newData) && newData > 0", - } - } + }, + }, }, balanceHistory: { ref: `${rootRef}/balance/$userAddress/history/$timestamp_and_type`, value: { ".rule": { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.amount) && (newData.type === 'DEPOSIT' || newData.type === 'USAGE')" - } - } + }, + }, }, request: { ref: Path.app(appName).request("$userAddress", "$requestKey"), @@ -69,15 +69,15 @@ export const defaultAppRules = (appName: string): { [type: string]: { ref: strin write: "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + "(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))" - } - } + }, + }, }, response: { ref: Path.app(appName).response("userAddress", "$requestKey"), value: { ".rule": { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.status)" - } + }, }, }, billingConfig: { @@ -87,16 +87,16 @@ export const defaultAppRules = (appName: string): { [type: string]: { ref: strin write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.depositAddress) && " + "util.isDict(newData.service) && util.isDict(newData.service.default) && util.isNumber(newData.service.default.costPerToken) && util.isNumber(newData.service.default.minCost) && " + "util.isEmpty(newData.service.default.maxCost) || (util.isNumber(newData.service.default.maxCost) && newData.service.default.maxCost >= newData.service.default.minCost)", - } - } + }, + }, }, - } + }; } export const DEFAULT_BILLING_CONFIG: Omit = { costPerToken: 0, minCost: 0, -} +}; export const SECOND = 1000; export const HANDLER_HEARBEAT_INTERVAL = 15 * SECOND; From cd9cf07032720a353a69b0e46eadfc90614ad9ae Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 19 Sep 2023 17:17:38 +0900 Subject: [PATCH 183/235] add todo --- src/types/type.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/type.ts b/src/types/type.ts index bda88ad..c797106 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -73,7 +73,7 @@ export type deposit = { export type deployConfig = { modelName: string, billingConfig?: appBillingConfig, - serviceUrl?: string, + serviceUrl?: string, // NOTE(yoojin): for test. } export type createAppConfig = { From 952e231f08ec22a28ae8e8cceea172acda4d0f71 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Tue, 19 Sep 2023 17:18:39 +0900 Subject: [PATCH 184/235] refactor: em --- src/handlers/handler.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 8f9f546..9a8c2cd 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -7,19 +7,21 @@ import EventManager from "@ainblockchain/ain-js/lib/event-manager"; export default class Handler { private static instance: Handler | undefined; - ain = AinModule.getInstance(); - em: EventManager | undefined; + em = AinModule.getInstance().getEventManager(); static getInstance() { if(!Handler.instance){ Handler.instance = new Handler(); - Handler.instance.em = Handler.instance.ain.getEventManager(); } return Handler.instance; } checkEventManager() { - if (!this.em) - throw new Error('set eventManager First.'); + if (!this.em) { + if(!AinModule.getInstance().getEventManager()){ + throw new Error('you should init ain first'); + } + this.em = AinModule.getInstance().getEventManager(); + } return true; } From 2cbe6fc3d6c2f1325cb671fd16a8dae1591bfec8 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 20 Sep 2023 10:53:46 +0900 Subject: [PATCH 185/235] feat: add account controll --- src/ain.ts | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/ain.ts b/src/ain.ts index ac5eb05..1fe61fd 100644 --- a/src/ain.ts +++ b/src/ain.ts @@ -35,6 +35,22 @@ export default class AinModule { return this.ain!.wallet.defaultAccount; } + removeDefaultAccount() { + this.checkAinInitiated(); + this.ain!.wallet.removeDefaultAccount(); + } + + getAddress() { + this.isDefaultAccountExist(); + return this.ain!.wallet.defaultAccount!.address; + } + + createAccount() { + this.checkAinInitiated() + const newAccount = this.ain!.wallet.create(1)[0]; + return newAccount; + } + async getValue(path: string) { this.checkAinInitiated(); return await this.ain!.db.ref(path).getValue(); @@ -44,15 +60,10 @@ export default class AinModule { this.checkAinInitiated(); return await this.ain!.sendTransaction(data); } - + private checkAinInitiated(): boolean { if (!this.ain) throw new Error('Set initAin(chainId) First.'); return true; } - - getAddress() { - this.isDefaultAccountExist(); - return this.ain!.wallet.defaultAccount!.address; - } } \ No newline at end of file From 97ea2819531a486390974833c947fc2f8815894f Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 20 Sep 2023 10:53:55 +0900 Subject: [PATCH 186/235] feat: add ainize methods --- src/ainize.ts | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index c66ab5f..c69e0eb 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -1,4 +1,3 @@ -import Ain from "@ainblockchain/ain-js"; import * as NodeCache from "node-cache"; import Middleware from "./middlewares/middleware"; import { DEFAULT_BILLING_CONFIG, getBlockChainEndpoint } from "./constants"; @@ -9,41 +8,53 @@ import { deployConfig } from "./types/type"; import AinModule from "./ain"; export default class Ainize { private cache: NodeCache; - ain: Ain; + ain: AinModule = AinModule.getInstance(); middleware: Middleware; handler: Handler; appController: AppController = AppController.getInstance(); constructor(chainId: 1 | 0) { - const blockChainEndpoint = getBlockChainEndpoint(chainId); - this.ain = new Ain(blockChainEndpoint, chainId); + this.ain.initAin(chainId); this.cache = new NodeCache(); this.middleware = new Middleware(this.cache); this.handler = new Handler(this); } + login(privateKey: string) { + this.ain.setDefaultAccount(privateKey); + } + + logout() { + this.ain.removeDefaultAccount(); + } + // FIXME(yoojin): add config type and change param type. - deploy({modelName, billingConfig, serviceUrl}: deployConfig) { + async deploy({modelName, billingConfig, serviceUrl}: deployConfig): Promise { // TODO(yoojin, woojae): Deploy container, advanced. - const deployer = AinModule.getInstance().getAddress(); + const deployer = this.ain.getAddress(); if (!billingConfig) { billingConfig = { ...DEFAULT_BILLING_CONFIG, depositAddress: deployer, - } + }; } // NOTE(yoojin): For test. We make fixed url on service. if (!serviceUrl) { serviceUrl = `https://${modelName}.ainetwork.xyz`; } - this.appController.createApp({ appName: modelName, serviceUrl, billingConfig }) + await this.appController.createApp({ appName: modelName, serviceUrl, billingConfig }); + return new Model(modelName); } - model(modelName: string) { + model(modelName: string): Model { return new Model(modelName); } + createAinAccount () { + return this.ain.createAccount(); + } + test() { console.log("test"); } From 5c1bc4191688b4691e1470b6b6b7555a7ce5d80f Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 20 Sep 2023 10:59:25 +0900 Subject: [PATCH 187/235] feat: add getBalance --- src/ain.ts | 15 ++++++++++----- src/ainize.ts | 12 +++++++++--- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/ain.ts b/src/ain.ts index 1fe61fd..319e830 100644 --- a/src/ain.ts +++ b/src/ain.ts @@ -25,6 +25,12 @@ export default class AinModule { return false; } + createAccount() { + this.checkAinInitiated() + const newAccount = this.ain!.wallet.create(1)[0]; + return newAccount; + } + setDefaultAccount(privateKey: string) { this.checkAinInitiated(); this.ain!.wallet.addAndSetDefaultAccount(privateKey); @@ -45,10 +51,9 @@ export default class AinModule { return this.ain!.wallet.defaultAccount!.address; } - createAccount() { - this.checkAinInitiated() - const newAccount = this.ain!.wallet.create(1)[0]; - return newAccount; + async getBalance() { + this.isDefaultAccountExist(); + return await this.ain!.wallet.getBalance(); } async getValue(path: string) { @@ -60,7 +65,7 @@ export default class AinModule { this.checkAinInitiated(); return await this.ain!.sendTransaction(data); } - + private checkAinInitiated(): boolean { if (!this.ain) throw new Error('Set initAin(chainId) First.'); diff --git a/src/ainize.ts b/src/ainize.ts index c69e0eb..b6058ce 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -20,6 +20,10 @@ export default class Ainize { this.handler = new Handler(this); } + createAinAccount () { + return this.ain.createAccount(); + } + login(privateKey: string) { this.ain.setDefaultAccount(privateKey); } @@ -28,6 +32,10 @@ export default class Ainize { this.ain.removeDefaultAccount(); } + async getAinBalance(): Promise { + return await this.ain.getBalance(); + } + // FIXME(yoojin): add config type and change param type. async deploy({modelName, billingConfig, serviceUrl}: deployConfig): Promise { // TODO(yoojin, woojae): Deploy container, advanced. @@ -51,9 +59,7 @@ export default class Ainize { return new Model(modelName); } - createAinAccount () { - return this.ain.createAccount(); - } + test() { console.log("test"); From 4650ad6be306cd29bde77c9375ff99b66484f47f Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 20 Sep 2023 11:33:40 +0900 Subject: [PATCH 188/235] fix: change createAinAccount to static --- src/ainize.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index b6058ce..0042b99 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -20,8 +20,8 @@ export default class Ainize { this.handler = new Handler(this); } - createAinAccount () { - return this.ain.createAccount(); + static createAinAccount () { + return AinModule.getInstance().createAccount(); } login(privateKey: string) { @@ -59,8 +59,6 @@ export default class Ainize { return new Model(modelName); } - - test() { console.log("test"); } From 0cbe54a27abe54f281f60e910bf1a9d05b6af0e4 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 20 Sep 2023 11:36:37 +0900 Subject: [PATCH 189/235] style: semi colon --- src/ain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ain.ts b/src/ain.ts index 319e830..0b36fe0 100644 --- a/src/ain.ts +++ b/src/ain.ts @@ -26,7 +26,7 @@ export default class AinModule { } createAccount() { - this.checkAinInitiated() + this.checkAinInitiated(); const newAccount = this.ain!.wallet.create(1)[0]; return newAccount; } From d8ec315ece50334ee8f8c2530254bd1a4c5abd36 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 20 Sep 2023 13:52:42 +0900 Subject: [PATCH 190/235] fix: path --- src/constants.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/constants.ts b/src/constants.ts index 3c75390..fcaeaab 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -8,13 +8,14 @@ export const Path = { app: (appName: string): any => { return { root: () => `/apps/${appName}`, + status: () => `${Path.app(appName).root()}/status`, balance: () => `${Path.app(appName).root()}/balance`, balanceOfUser: (userAddress: string) => `${Path.app(appName).balance()}/${userAddress}/balance`, historyOfUser: (userAddress: string) => `${Path.app(appName).balance()}/${userAddress}/history`, deposit: () => `${Path.app(appName).root()}/deposit`, depositOfUser: (userAddress: string) => `${Path.app(appName).deposit()}/${userAddress}`, billingConfig: () => `${Path.app(appName).root()}/billingConfig`, - service: () => `${Path.app(appName).root()}/service/`, + service: () => `${Path.app(appName).root()}/service`, userOfService: (userAddress: string) => `${Path.app(appName).service()}/${userAddress}`, request: (userAddress: string, requestKey: string) => From 3262d40ca5066b7f289881c90daa2bc7d88f5505 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 20 Sep 2023 14:02:45 +0900 Subject: [PATCH 191/235] feat: connect --- src/ainize.ts | 2 ++ src/controllers/modelController.ts | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index 8ed15fe..ae8550f 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -9,11 +9,13 @@ import AinModule from "./ain"; export default class Ainize { private cache: NodeCache; ain: AinModule = AinModule.getInstance(); + private handler: Handler = Handler.getInstance(); middleware: Middleware; appController: AppController = AppController.getInstance(); constructor(chainId: 1 | 0) { this.ain.initAin(chainId); + this.handler.connect(); this.cache = new NodeCache(); this.middleware = new Middleware(this.cache); } diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 6c5bb3f..dd90643 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -4,6 +4,7 @@ import { Path } from "../constants"; import { getRequestDepositOp, getTransferOp } from "../utils/operator"; import { buildSetOperation, buildTxBody } from "../utils/builder"; import Handler from "../handlers/handler"; +import { ContainerStatus } from "../types/type"; export default class ModelController { private static instance: ModelController | undefined; @@ -16,9 +17,9 @@ export default class ModelController { return ModelController.instance; } - //TODO(woojae): implement this async isRunning(modelName: string) { - return await true; + const isRunning = await this.ain.getValue(Path.app(modelName).status()); + return isRunning === ContainerStatus.RUNNING; } //TODO(woojae): implement this @@ -40,6 +41,7 @@ export default class ModelController { async chargeCredit(modelName: string, amount: number) { this.isLoggedIn(); + this.isRunning(modelName); const transferKey = Date.now(); const userAddress = this.ain.getAddress(); const depositAddress = await this.getDepositAddress(modelName); @@ -74,6 +76,7 @@ export default class ModelController { //TODO(woojae): connect with handler async use(modelName: string, requestData: string) { this.isLoggedIn(); + this.isRunning(modelName); const result = await new Promise(async (resolve, reject) => { const requestKey = Date.now(); const requesterAddress = this.ain.getAddress(); From fbf5971f880d617bbab2f1402ca0b4c0b0042bcf Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 20 Sep 2023 14:06:41 +0900 Subject: [PATCH 192/235] feat: isRunning --- src/controllers/modelController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index dd90643..91c5f7b 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -19,7 +19,9 @@ export default class ModelController { async isRunning(modelName: string) { const isRunning = await this.ain.getValue(Path.app(modelName).status()); - return isRunning === ContainerStatus.RUNNING; + if(isRunning !== ContainerStatus.RUNNING) { + throw new Error('Model is not running'); + } } //TODO(woojae): implement this From 719180bce4d66fa7ff08b131820c0a21c5034b55 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 20 Sep 2023 14:15:04 +0900 Subject: [PATCH 193/235] fix: add internal --- src/ainize.ts | 3 +++ src/internal.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ainize.ts b/src/ainize.ts index ae8550f..48bc161 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -6,11 +6,13 @@ import AppController from "./controllers/appController"; import Model from "./model"; import { deployConfig } from "./types/type"; import AinModule from "./ain"; +import Internal from "./internal"; export default class Ainize { private cache: NodeCache; ain: AinModule = AinModule.getInstance(); private handler: Handler = Handler.getInstance(); middleware: Middleware; + internal: Internal; appController: AppController = AppController.getInstance(); constructor(chainId: 1 | 0) { @@ -18,6 +20,7 @@ export default class Ainize { this.handler.connect(); this.cache = new NodeCache(); this.middleware = new Middleware(this.cache); + this.internal = new Internal(); } static createAinAccount () { diff --git a/src/internal.ts b/src/internal.ts index 1ae9b53..639521d 100644 --- a/src/internal.ts +++ b/src/internal.ts @@ -5,7 +5,7 @@ import { HISTORY_TYPE, RESPONSE_STATUS, deposit, request, response } from "./typ import { buildTxBody } from "./utils/builder"; import AinModule from "./ain"; -export default class internal { +export default class Internal { private ain = AinModule.getInstance(); async handleDeposit(req: Request) { const { requesterAddress, appName, transferKey, transferValue } = this.getDataFromDepositRequest(req); From 625ea5ec6fc600642d6046e5ae58f854d2ca33f5 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 20 Sep 2023 14:22:33 +0900 Subject: [PATCH 194/235] refactor: space --- src/ainize.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ainize.ts b/src/ainize.ts index 48bc161..ee0dab5 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -7,10 +7,11 @@ import Model from "./model"; import { deployConfig } from "./types/type"; import AinModule from "./ain"; import Internal from "./internal"; + export default class Ainize { private cache: NodeCache; - ain: AinModule = AinModule.getInstance(); private handler: Handler = Handler.getInstance(); + ain: AinModule = AinModule.getInstance(); middleware: Middleware; internal: Internal; appController: AppController = AppController.getInstance(); From b8b1b2f067524958a01315359c6c833bae21b1ef Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 20 Sep 2023 14:23:15 +0900 Subject: [PATCH 195/235] refactor: space --- src/internal.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/internal.ts b/src/internal.ts index 639521d..1fa53c3 100644 --- a/src/internal.ts +++ b/src/internal.ts @@ -7,6 +7,7 @@ import AinModule from "./ain"; export default class Internal { private ain = AinModule.getInstance(); + async handleDeposit(req: Request) { const { requesterAddress, appName, transferKey, transferValue } = this.getDataFromDepositRequest(req); const ops: SetOperation[] = []; From 60fd8f11d9e53feb3cbffbc0d7b140228f8e354d Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 20 Sep 2023 15:06:12 +0900 Subject: [PATCH 196/235] fix: handler init --- src/ain.ts | 4 +++- src/handlers/handler.ts | 17 +++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/ain.ts b/src/ain.ts index 1047a6a..1b56323 100644 --- a/src/ain.ts +++ b/src/ain.ts @@ -28,7 +28,9 @@ export default class AinModule { createAccount() { this.checkAinInitiated(); const newAccount = this.ain!.wallet.create(1)[0]; - return newAccount; + const wallet = this.ain!.wallet.accounts[newAccount]; + this.ain!.wallet.remove(newAccount); + return wallet; } setDefaultAccount(privateKey: string) { diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 9a8c2cd..6ce1967 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -3,11 +3,11 @@ import Ain from "@ainblockchain/ain-js"; import Ainize from "../ainize"; import { Path } from "../constants"; import AinModule from "../ain"; -import EventManager from "@ainblockchain/ain-js/lib/event-manager"; export default class Handler { private static instance: Handler | undefined; - em = AinModule.getInstance().getEventManager(); + ain = AinModule.getInstance(); + static getInstance() { if(!Handler.instance){ Handler.instance = new Handler(); @@ -16,18 +16,15 @@ export default class Handler { } checkEventManager() { - if (!this.em) { - if(!AinModule.getInstance().getEventManager()){ - throw new Error('you should init ain first'); - } - this.em = AinModule.getInstance().getEventManager(); + if(!AinModule.getInstance().getEventManager()){ + throw new Error('you should init ain first'); } return true; } async connect() { this.checkEventManager(); - await this.em!.connect({},this.disconnectedCb); + await this.ain.getEventManager().connect({},this.disconnectedCb); console.log('connected'); }; @@ -39,7 +36,7 @@ export default class Handler { async subscribe(requester:string, recordId:string, appName: string, resolve: any) { this.checkEventManager(); const responsePath = Path.app(appName).response(requester, recordId); - const subscribeId = await this.em!.subscribe( + const subscribeId = await this.ain.getEventManager().subscribe( "VALUE_CHANGED", { path: responsePath, @@ -57,7 +54,7 @@ export default class Handler { async unsubscribe(filterId: string) { this.checkEventManager(); - await this.em!.unsubscribe( + await this.ain.getEventManager().unsubscribe( filterId, (err)=>{ if (err) { From 1feb37744a5c8cf1a18a1e6aaaac0889de4dd05e Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 20 Sep 2023 15:56:51 +0900 Subject: [PATCH 197/235] fix: login --- src/ainize.ts | 11 ++++++++--- src/model.ts | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index ae8550f..996e6cb 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -15,7 +15,6 @@ export default class Ainize { constructor(chainId: 1 | 0) { this.ain.initAin(chainId); - this.handler.connect(); this.cache = new NodeCache(); this.middleware = new Middleware(this.cache); } @@ -24,14 +23,20 @@ export default class Ainize { return AinModule.getInstance().createAccount(); } - login(privateKey: string) { + async login(privateKey: string) { this.ain.setDefaultAccount(privateKey); + await this.handler.connect(); + console.log('login success! address:', this.ain.getAddress()); } logout() { this.ain.removeDefaultAccount(); } + async getAddress(): Promise { + return await this.ain.getAddress(); + } + async getAinBalance(): Promise { return await this.ain.getBalance(); } @@ -52,7 +57,7 @@ export default class Ainize { } await this.appController.createApp({ appName: modelName, serviceUrl, billingConfig }); - return new Model(modelName); + return this.model(modelName); } model(modelName: string): Model { diff --git a/src/model.ts b/src/model.ts index 6280a6a..6bfd921 100644 --- a/src/model.ts +++ b/src/model.ts @@ -2,7 +2,7 @@ import ModelController from "./controllers/modelController"; export default class Model { modelName: string; - modelController: ModelController; + private modelController: ModelController; constructor(modelName: string) { this.modelName = modelName; From 2b39280f6d07fedf46cc093045df4e30fb8aab88 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 20 Sep 2023 15:59:18 +0900 Subject: [PATCH 198/235] feat: logout disconnect --- src/ainize.ts | 4 +++- src/handlers/handler.ts | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ainize.ts b/src/ainize.ts index 996e6cb..8e3b7c1 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -29,8 +29,10 @@ export default class Ainize { console.log('login success! address:', this.ain.getAddress()); } - logout() { + async logout() { + await this.handler.disconnect(); this.ain.removeDefaultAccount(); + console.log('logout success!'); } async getAddress(): Promise { diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 6ce1967..a28b780 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -27,6 +27,12 @@ export default class Handler { await this.ain.getEventManager().connect({},this.disconnectedCb); console.log('connected'); }; + + async disconnect() { + this.checkEventManager(); + await this.ain.getEventManager().disconnect(); + console.log('disconnected'); + } private async disconnectedCb() { console.log('disconnected. reconnecting...'); From 9cdc4b28c313f1c12936b6622f45a995b56e00aa Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 20 Sep 2023 16:03:23 +0900 Subject: [PATCH 199/235] feat: model check --- src/ainize.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index 68b849e..fed66ad 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -1,6 +1,6 @@ import * as NodeCache from "node-cache"; import Middleware from "./middlewares/middleware"; -import { DEFAULT_BILLING_CONFIG, getBlockChainEndpoint } from "./constants"; +import { DEFAULT_BILLING_CONFIG, Path, getBlockChainEndpoint } from "./constants"; import Handler from "./handlers/handler"; import AppController from "./controllers/appController"; import Model from "./model"; @@ -66,7 +66,12 @@ export default class Ainize { return this.model(modelName); } - model(modelName: string): Model { + async model(modelName: string): Promise { + const modelPath = Path.app(modelName).root(); + const modelData = await this.ain.getValue(modelPath); + if(!modelData) { + throw new Error("Model not found"); + } return new Model(modelName); } From d67cf6601cd2e398d258bc2dde3961e15ed0f52b Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 20 Sep 2023 16:41:52 +0900 Subject: [PATCH 200/235] feat: add txResultWrapper --- src/ain.ts | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/ain.ts b/src/ain.ts index 1b56323..c271369 100644 --- a/src/ain.ts +++ b/src/ain.ts @@ -1,6 +1,7 @@ import Ain from "@ainblockchain/ain-js"; import { getBlockChainEndpoint } from "./constants"; import { TransactionBody } from "@ainblockchain/ain-util"; +import { txResult } from "./types/type"; // NOTE(yoojin): Plz suggest a good name. export default class AinModule { @@ -63,7 +64,7 @@ export default class AinModule { return await this.ain!.db.ref(path).getValue(); } - async sendTransaction(data: TransactionBody) { + private async _sendTransaction(data: TransactionBody) { this.checkAinInitiated(); return await this.ain!.sendTransaction(data); } @@ -78,4 +79,28 @@ export default class AinModule { this.checkAinInitiated(); return this.ain!.em; } + + private hasFailedOpResultList(result: txResult): boolean { + if (result.result_list) { + return Object.values(result.result_list).some( + (result: { code: number }) => result.code !== 0 + ); + } + return result.code !== 0; + } + + private handleTxResultWrapper(operation: Function) { + return async (args: any) => { + const res = await operation(args); + const { tx_hash, result } = res; + if (this.hasFailedOpResultList(result)) { + throw new Error( + `Failed to send transaction (${tx_hash}).\n Tx Result: ${JSON.stringify(result)}` + ); + } + return tx_hash; + } + } + + sendTransaction = this.handleTxResultWrapper(this._sendTransaction.bind(this)); } From 22efb6541b4e84a32ea3eb7df7ce0bea0f430f95 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Wed, 20 Sep 2023 16:42:00 +0900 Subject: [PATCH 201/235] fix: write rules --- src/constants.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index fcaeaab..8c56959 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -69,7 +69,7 @@ export const defaultAppRules = (appName: string): { [type: string]: { ref: strin ".rule": { write: "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + - "(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))" + "(getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))" }, }, }, @@ -86,8 +86,8 @@ export const defaultAppRules = (appName: string): { [type: string]: { ref: strin value: { ".rule": { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.depositAddress) && " + - "util.isDict(newData.service) && util.isDict(newData.service.default) && util.isNumber(newData.service.default.costPerToken) && util.isNumber(newData.service.default.minCost) && " + - "util.isEmpty(newData.service.default.maxCost) || (util.isNumber(newData.service.default.maxCost) && newData.service.default.maxCost >= newData.service.default.minCost)", + "util.isDict(newData) && util.isNumber(newData.costPerToken) && util.isNumber(newData.minCost) && " + + "util.isEmpty(newData.maxCost) || (util.isNumber(newData.maxCost) && newData.maxCost >= newData.minCost)", }, }, }, From e547d6ccf04c29567b288018c851744035c2b9c0 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 20 Sep 2023 16:56:16 +0900 Subject: [PATCH 202/235] fix: depositAddress --- src/controllers/modelController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 91c5f7b..a2d60fc 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -111,7 +111,7 @@ export default class ModelController { } private async getDepositAddress(appName: string) { - return (await this.ain.getValue(Path.app(appName).billingConfig())).defaultAddress; + return (await this.ain.getValue(Path.app(appName).billingConfig())).depositAddress; } private isLoggedIn() { From b32fbfa7807ea1300ef37189efc51cd9cb572e5e Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 20 Sep 2023 17:01:11 +0900 Subject: [PATCH 203/235] fix --- src/ainize.ts | 2 +- src/handlers/handler.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index fed66ad..7af0614 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -34,8 +34,8 @@ export default class Ainize { } async logout() { - await this.handler.disconnect(); this.ain.removeDefaultAccount(); + await this.handler.disconnect(); console.log('logout success!'); } diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index a28b780..e98a366 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -35,8 +35,10 @@ export default class Handler { } private async disconnectedCb() { - console.log('disconnected. reconnecting...'); - await this.connect(); + if(!AinModule.getInstance().isDefaultAccountExist()) { + console.log('disconnected. reconnecting...'); + await this.connect(); + } } async subscribe(requester:string, recordId:string, appName: string, resolve: any) { From 007ee79b2a964740574e66418c397da264778a3e Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 20 Sep 2023 17:02:01 +0900 Subject: [PATCH 204/235] refactor: getCreditBalance --- src/controllers/modelController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index a2d60fc..02dd761 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -65,7 +65,7 @@ export default class ModelController { this.isLoggedIn(); const userAddress = this.ain.getAddress(); const balancePath = Path.app(modelName).balanceOfUser(userAddress); - return await this.ain.getValue(balancePath); + return await this.ain.getValue(balancePath) | 0; } async getCreditHistory(modelName: string) { From eadd4bdd90c32fbfb16cc8dc3cd51e8843df1719 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Thu, 21 Sep 2023 09:36:26 +0900 Subject: [PATCH 205/235] fix: handler --- src/handlers/handler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index e98a366..67bce12 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -24,7 +24,7 @@ export default class Handler { async connect() { this.checkEventManager(); - await this.ain.getEventManager().connect({},this.disconnectedCb); + await this.ain.getEventManager().connect({},this.disconnectedCb.bind(this)); console.log('connected'); }; @@ -35,7 +35,7 @@ export default class Handler { } private async disconnectedCb() { - if(!AinModule.getInstance().isDefaultAccountExist()) { + if(AinModule.getInstance().isDefaultAccountExist()) { console.log('disconnected. reconnecting...'); await this.connect(); } From 453ff5fc5988168cf33a17e1c29e18ac521fd2c7 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 21 Sep 2023 10:57:25 +0900 Subject: [PATCH 206/235] feat: add service function --- src/controllers/appController.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/controllers/appController.ts b/src/controllers/appController.ts index 8a65579..2a1f1f9 100644 --- a/src/controllers/appController.ts +++ b/src/controllers/appController.ts @@ -35,10 +35,20 @@ export default class AppController { setRuleOps.push(ruleOp); } - const depositParam = this.depositTriggerFunctionConfig(appName, serviceUrl); - const value = this.buildSetFunctionValue(depositParam); - const funcOp = buildSetOperation("SET_FUNCTION", depositParam.ref, value); - setFunctionOps.push(funcOp); + const depositPath = `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey` + const depositUrl = `${serviceUrl}/deposit`; + const depositParam = this.buildTriggerFunctionConfig(appName, depositPath, depositUrl); + const depositValue = this.buildSetFunctionValue(depositParam); + const depositFuncOp = buildSetOperation("SET_FUNCTION", depositParam.ref, depositValue); + setFunctionOps.push(depositFuncOp); + + const serviceFuncPath = Path.app(appName).request("$userAddress", "$requestKey") + const serviceFuncUrl = `${serviceUrl}/service`; + const serviceFuncParam = this.buildTriggerFunctionConfig(appName, serviceFuncPath, serviceFuncUrl); + const serviceFuncValue = this.buildSetFunctionValue(serviceFuncParam); + const serviceFuncOp = buildSetOperation("SET_FUNCTION", depositParam.ref, serviceFuncValue); + setFunctionOps.push(serviceFuncOp); + const configOp = this.buildSetAppBillingConfigOp(appName, billingConfig); setBillingConfigOps.push(configOp); @@ -214,7 +224,7 @@ export default class AppController { return buildSetOperation("SET_VALUE", path, value); } - private depositTriggerFunctionConfig = (appName: string, serviceUrl: string): setTriggerFunctionParm => { + private buildTriggerFunctionConfig = (appName: string, path: string, serviceUrl: string): setTriggerFunctionParm => { return { ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, function_type: "REST", From a640406e9eecefffe88627780d1d92e2a9d4bb3d Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 21 Sep 2023 12:13:12 +0900 Subject: [PATCH 207/235] fix: trigger function --- src/controllers/appController.ts | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/controllers/appController.ts b/src/controllers/appController.ts index 2a1f1f9..f3d0e64 100644 --- a/src/controllers/appController.ts +++ b/src/controllers/appController.ts @@ -37,16 +37,26 @@ export default class AppController { const depositPath = `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey` const depositUrl = `${serviceUrl}/deposit`; - const depositParam = this.buildTriggerFunctionConfig(appName, depositPath, depositUrl); + const depositParam: setTriggerFunctionParm = { + ref: depositPath, + function_id: "deposit-tregger", + function_type: "REST", + function_url: depositUrl + } const depositValue = this.buildSetFunctionValue(depositParam); const depositFuncOp = buildSetOperation("SET_FUNCTION", depositParam.ref, depositValue); setFunctionOps.push(depositFuncOp); const serviceFuncPath = Path.app(appName).request("$userAddress", "$requestKey") const serviceFuncUrl = `${serviceUrl}/service`; - const serviceFuncParam = this.buildTriggerFunctionConfig(appName, serviceFuncPath, serviceFuncUrl); + const serviceFuncParam: setTriggerFunctionParm = { + ref: serviceFuncPath, + function_id: "service-tregger", + function_type: "REST", + function_url: serviceFuncUrl + } const serviceFuncValue = this.buildSetFunctionValue(serviceFuncParam); - const serviceFuncOp = buildSetOperation("SET_FUNCTION", depositParam.ref, serviceFuncValue); + const serviceFuncOp = buildSetOperation("SET_FUNCTION", serviceFuncParam.ref, serviceFuncValue); setFunctionOps.push(serviceFuncOp); const configOp = this.buildSetAppBillingConfigOp(appName, billingConfig); @@ -223,13 +233,4 @@ export default class AppController { const value = !isRemoveOp ? null : true; return buildSetOperation("SET_VALUE", path, value); } - - private buildTriggerFunctionConfig = (appName: string, path: string, serviceUrl: string): setTriggerFunctionParm => { - return { - ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, - function_type: "REST", - function_id: "deposit-trigger", - function_url: `${serviceUrl}/deposit`, - } - } } From 15441310c11346536a138a8a1b1189d2a2abf330 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 21 Sep 2023 13:41:48 +0900 Subject: [PATCH 208/235] fix: typo --- src/controllers/appController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/appController.ts b/src/controllers/appController.ts index f3d0e64..2007a0e 100644 --- a/src/controllers/appController.ts +++ b/src/controllers/appController.ts @@ -39,7 +39,7 @@ export default class AppController { const depositUrl = `${serviceUrl}/deposit`; const depositParam: setTriggerFunctionParm = { ref: depositPath, - function_id: "deposit-tregger", + function_id: "deposit-trigger", function_type: "REST", function_url: depositUrl } @@ -51,7 +51,7 @@ export default class AppController { const serviceFuncUrl = `${serviceUrl}/service`; const serviceFuncParam: setTriggerFunctionParm = { ref: serviceFuncPath, - function_id: "service-tregger", + function_id: "service-trigger", function_type: "REST", function_url: serviceFuncUrl } From 985182509e15f4b42382a9776d88b41ab9d7fe4b Mon Sep 17 00:00:00 2001 From: akaster99 Date: Thu, 21 Sep 2023 14:06:45 +0900 Subject: [PATCH 209/235] feat: add eventHandler --- src/ainize.ts | 32 ++++++++++++++++++------------ src/controllers/modelController.ts | 2 +- src/handlers/handler.ts | 21 +++++++++++++++++++- 3 files changed, 40 insertions(+), 15 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index 7af0614..b939b01 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -48,21 +48,27 @@ export default class Ainize { } // FIXME(yoojin): add config type and change param type. + // TODO(yoojin, woojae): Deploy container, advanced. async deploy({modelName, billingConfig, serviceUrl}: deployConfig): Promise { - // TODO(yoojin, woojae): Deploy container, advanced. - const deployer = this.ain.getAddress(); - if (!billingConfig) { - billingConfig = { - ...DEFAULT_BILLING_CONFIG, - depositAddress: deployer, - }; + if(!this.ain.isDefaultAccountExist()) { + throw new Error('you should login first'); } - // NOTE(yoojin): For test. We make fixed url on service. - if (!serviceUrl) { - serviceUrl = `https://${modelName}.ainetwork.xyz`; - } - - await this.appController.createApp({ appName: modelName, serviceUrl, billingConfig }); + const result = await new Promise(async (resolve, reject) => { + const deployer = this.ain.getAddress(); + if (!billingConfig) { + billingConfig = { + ...DEFAULT_BILLING_CONFIG, + depositAddress: deployer, + }; + } + // NOTE(yoojin): For test. We make fixed url on service. + if (!serviceUrl) { + serviceUrl = `https://${modelName}.ainetwork.xyz`; + } + await this.handler.subscribeDeploy(modelName, resolve); + await this.appController.createApp({ appName: modelName, serviceUrl, billingConfig }); + }); + console.log(`${modelName} deploy success!`); return this.model(modelName); } diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 02dd761..0d3350d 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -82,7 +82,7 @@ export default class ModelController { const result = await new Promise(async (resolve, reject) => { const requestKey = Date.now(); const requesterAddress = this.ain.getAddress(); - await this.handler.subscribe(requesterAddress, requestKey.toString(), modelName, resolve); + await this.handler.subscribeResponse(requesterAddress, requestKey.toString(), modelName, resolve); const requestPath = Path.app(modelName).request(requesterAddress, requestKey); const requestOp = buildSetOperation("SET_VALUE", requestPath, {prompt: requestData}); const txBody = buildTxBody(requestOp); diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 67bce12..b996e5a 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -41,7 +41,7 @@ export default class Handler { } } - async subscribe(requester:string, recordId:string, appName: string, resolve: any) { + async subscribeResponse(requester:string, recordId:string, appName: string, resolve: any) { this.checkEventManager(); const responsePath = Path.app(appName).response(requester, recordId); const subscribeId = await this.ain.getEventManager().subscribe( @@ -60,6 +60,25 @@ export default class Handler { ); } + async subscribeDeploy(appName: string, resolve: any) { + this.checkEventManager(); + const appPath = Path.app(appName).root(); + const subscribeId = await this.ain.getEventManager().subscribe( + "VALUE_CHANGED", + { + path: appPath, + event_source: "USER", + }, + (valueChangedEvent: any) => { + this.unsubscribe(subscribeId); + resolve(valueChangedEvent.values.after.data); + }, + (err) => { + throw new Error(err.message); + }, + ); + } + async unsubscribe(filterId: string) { this.checkEventManager(); await this.ain.getEventManager().unsubscribe( From 1718fc02be45a391d39adf6a2390272efc1f42f0 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Thu, 21 Sep 2023 14:30:48 +0900 Subject: [PATCH 210/235] refactor: integrate subscribe --- src/ainize.ts | 3 ++- src/controllers/modelController.ts | 3 ++- src/handlers/handler.ts | 23 ++--------------------- 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index b939b01..8389bb5 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -65,7 +65,8 @@ export default class Ainize { if (!serviceUrl) { serviceUrl = `https://${modelName}.ainetwork.xyz`; } - await this.handler.subscribeDeploy(modelName, resolve); + const modelPath = Path.app(modelName).root(); + await this.handler.subscribe(modelPath, resolve); await this.appController.createApp({ appName: modelName, serviceUrl, billingConfig }); }); console.log(`${modelName} deploy success!`); diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 0d3350d..51982a9 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -82,7 +82,8 @@ export default class ModelController { const result = await new Promise(async (resolve, reject) => { const requestKey = Date.now(); const requesterAddress = this.ain.getAddress(); - await this.handler.subscribeResponse(requesterAddress, requestKey.toString(), modelName, resolve); + const responsePath = Path.app(modelName).response(requesterAddress, requestKey.toString()); + await this.handler.subscribe(responsePath, resolve); const requestPath = Path.app(modelName).request(requesterAddress, requestKey); const requestOp = buildSetOperation("SET_VALUE", requestPath, {prompt: requestData}); const txBody = buildTxBody(requestOp); diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index b996e5a..758e3c2 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -41,32 +41,13 @@ export default class Handler { } } - async subscribeResponse(requester:string, recordId:string, appName: string, resolve: any) { + async subscribe(subscribePath: string, resolve: any) { this.checkEventManager(); - const responsePath = Path.app(appName).response(requester, recordId); - const subscribeId = await this.ain.getEventManager().subscribe( - "VALUE_CHANGED", - { - path: responsePath, - event_source: "USER", - }, - (valueChangedEvent: any) => { - this.unsubscribe(subscribeId); - resolve(valueChangedEvent.values.after.data); - }, - (err) => { - throw new Error(err.message); - }, - ); - } - async subscribeDeploy(appName: string, resolve: any) { - this.checkEventManager(); - const appPath = Path.app(appName).root(); const subscribeId = await this.ain.getEventManager().subscribe( "VALUE_CHANGED", { - path: appPath, + path: subscribePath, event_source: "USER", }, (valueChangedEvent: any) => { From c06e51c261caa31881a74c209a8175de8b8b75a1 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Thu, 21 Sep 2023 14:38:33 +0900 Subject: [PATCH 211/235] fix: deploy listen path --- src/ainize.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ainize.ts b/src/ainize.ts index 8389bb5..3aaf92f 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -65,7 +65,7 @@ export default class Ainize { if (!serviceUrl) { serviceUrl = `https://${modelName}.ainetwork.xyz`; } - const modelPath = Path.app(modelName).root(); + const modelPath = Path.app(modelName).status(); await this.handler.subscribe(modelPath, resolve); await this.appController.createApp({ appName: modelName, serviceUrl, billingConfig }); }); From 3852a6afbc24cb92bae165a1fee10612eea2f738 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 21 Sep 2023 16:01:06 +0900 Subject: [PATCH 212/235] docs: remove module docs --- src/controllers/appController.ts | 44 -------------------------------- 1 file changed, 44 deletions(-) diff --git a/src/controllers/appController.ts b/src/controllers/appController.ts index 8a65579..4fcf85b 100644 --- a/src/controllers/appController.ts +++ b/src/controllers/appController.ts @@ -15,13 +15,6 @@ export default class AppController { return AppController.instance; } - /** - * Create App for your AI Service on AI Network. - * @param {string} appName - The name of app you will create. - * @param {TriggerFunctionUrlMap} functioniUrls - The urls of trigger function you set. - * @param {setDefaultFlag} setDefaultFlag - Set true which you wan to set config as default. - * @returns Result of transaction. - */ async createApp({ appName, serviceUrl, billingConfig }: createAppConfig) { const setRuleOps: SetOperation[] = []; const setFunctionOps: SetOperation[] = []; @@ -54,33 +47,16 @@ export default class AppController { return await this.ain.sendTransaction(txBody); } - /** - * Set billing config to app. - * @param {string} appName - * @param {appBillingConfig} config - The configuration of your app's billing. - * @returns Result of transaction. - */ async setAppBillingConfig(appName: string, config: appBillingConfig) { const setConfigOp = this.buildSetAppBillingConfigOp(appName, config); const txBody = buildTxBody(setConfigOp); return await this.ain.sendTransaction(txBody); } - /** - * Get billing config of app - * @param {string} appName - * @returns {Promise} - */ async getBillingConfig(appName: string): Promise { return await this.ain.getValue(Path.app(appName).billingConfig()); } - /** - * Set trigger function to app. - * @param {string} appName - * @param {setTriggerFunctionParam[]} functions - * @returns Result of transaction. - */ async setTriggerFunctions(appName: string, functions: setTriggerFunctionParm[]) { const setFunctionOps: SetOperation[] = []; for (const param of Object.values(functions)) { @@ -97,12 +73,6 @@ export default class AppController { return await this.ain.sendTransaction(txBody); } - /** - * Set rules to app. - * @param {string} appName - * @param {setRuleParam} rules - * @returns Result of transaction. - */ async setRules(appName: string, rules: setRuleParam[]) { const setRuleOps: SetOperation[] = []; for (const rule of Object.values(rules)) { @@ -133,26 +103,12 @@ export default class AppController { return await this.ain.sendTransaction(txBody); } - /** - * Remove admin on app. - * @param {string} appName - * @param {string} userAddress - * @returns Result of transaction. - */ async deleteAdmin(appName: string, userAddress: string) { const op = this.buildSetAdminOp(appName, userAddress, true); const txBody = buildTxBody(op); return await this.ain.sendTransaction(txBody); } - /** - * Check cost of request and check if account can pay. You should use this function before send or handle request. - * If you don't set address, it will use default account's address. - * @param {string} appName - App name you want to request service to. - * @param {string} prompt - Data you want to request to service . - * @param {string=} userAddress - Address of account you want to check balance. You should set default account if you don't provide address. - * @returns Result cost of service. It throws error when user can't pay. - */ async checkCostAndBalance(appName: string, value: string) { const requesterAddress = this.ain.getAddress(); const billingConfig = (await this.getBillingConfig(appName)); From 852e999532e7dc35bc99be0e71e5bda1d9e03fd5 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 21 Sep 2023 16:06:50 +0900 Subject: [PATCH 213/235] docs: ainize --- src/ainize.ts | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/ainize.ts b/src/ainize.ts index 7af0614..b943ab9 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -7,6 +7,7 @@ import Model from "./model"; import { deployConfig } from "./types/type"; import AinModule from "./ain"; import Internal from "./internal"; +import { Account } from "@ainblockchain/ain-util"; export default class Ainize { private cache: NodeCache; @@ -23,16 +24,27 @@ export default class Ainize { this.internal = new Internal(); } - static createAinAccount () { + /** + * Create a new AI Network account. + * @returns {Account} created account. + */ + static createAinAccount (): Account { return AinModule.getInstance().createAccount(); } + /** + * Login of the ainize using AI Network account private key. + * @param {string} privateKey + */ async login(privateKey: string) { this.ain.setDefaultAccount(privateKey); await this.handler.connect(); console.log('login success! address:', this.ain.getAddress()); } + /** + * Logout of the ainize. + */ async logout() { this.ain.removeDefaultAccount(); await this.handler.disconnect(); @@ -48,6 +60,11 @@ export default class Ainize { } // FIXME(yoojin): add config type and change param type. + /** + * Deploy AI model container. + * @param {deployConfig} deployConfig Set configuration for container. modelName, billingConfig, etc. + * @returns {Model} Control object of deployed model. + */ async deploy({modelName, billingConfig, serviceUrl}: deployConfig): Promise { // TODO(yoojin, woojae): Deploy container, advanced. const deployer = this.ain.getAddress(); @@ -66,6 +83,11 @@ export default class Ainize { return this.model(modelName); } + /** + * Get deployed model. + * @param modelName + * @returns {Model} Control object of deployed model. + */ async model(modelName: string): Promise { const modelPath = Path.app(modelName).root(); const modelData = await this.ain.getValue(modelPath); From f43e185d6a3af93e2c1e9cacaba5ae2a310467fc Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Thu, 21 Sep 2023 17:08:11 +0900 Subject: [PATCH 214/235] docs: fix expression --- src/ainize.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ainize.ts b/src/ainize.ts index 362c74c..1570f84 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -33,7 +33,7 @@ export default class Ainize { } /** - * Login of the ainize using AI Network account private key. + * Login to ainize using AI Network account private key. * @param {string} privateKey */ async login(privateKey: string) { @@ -43,7 +43,7 @@ export default class Ainize { } /** - * Logout of the ainize. + * Logout from ainize. */ async logout() { this.ain.removeDefaultAccount(); @@ -62,8 +62,8 @@ export default class Ainize { // FIXME(yoojin): add config type and change param type. /** * Deploy AI model container. - * @param {deployConfig} deployConfig Set configuration for container. modelName, billingConfig, etc. - * @returns {Model} Control object of deployed model. + * @param {deployConfig} deployConfig Set configuration for setting container. modelName, billingConfig, etc. + * @returns {Model} Deployed model object. */ // TODO(yoojin, woojae): Deploy container, advanced. async deploy({modelName, billingConfig, serviceUrl}: deployConfig): Promise { @@ -94,7 +94,7 @@ export default class Ainize { /** * Get deployed model. * @param modelName - * @returns {Model} Control object of deployed model. + * @returns {Model} Deployed model object. */ async model(modelName: string): Promise { const modelPath = Path.app(modelName).root(); From 75a02371664f77e81c6805b5be2c6f475df65d4b Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 22 Sep 2023 10:52:13 +0900 Subject: [PATCH 215/235] feat: add typedoc --- src/model.ts | 47 +++++++++++++++++++++++++++++++++++++++++++++++ src/types/type.ts | 11 +++++++++++ 2 files changed, 58 insertions(+) diff --git a/src/model.ts b/src/model.ts index 6bfd921..e3c0500 100644 --- a/src/model.ts +++ b/src/model.ts @@ -1,4 +1,5 @@ import ModelController from "./controllers/modelController"; +import { creditHistories } from "./types/type"; export default class Model { modelName: string; @@ -8,53 +9,99 @@ export default class Model { this.modelName = modelName; this.modelController = ModelController.getInstance(); } + //TODO(woojae): login not Required + /** + * Check if model is running. It throws error when model is not running. + */ async isRunning() { return await this.modelController.isRunning(this.modelName); } + /** + * Get model information. not implemented yet. + * @returns {string} Model information. + */ //TODO(woojae): login not Required async getInformation() { return await this.modelController.getInformation(this.modelName); } + /** + * Calculate estimated cost for given request data. + * @param {string} rerquestData string data for request to model. + * @returns {number} Estimated cost. + */ //TODO(woojae): login not Required async calculateCost (requestData: string) { return await this.modelController.calculateCost(this.modelName, requestData); } + /** + * Charge credit to model. + * @param {number} amount Amount of credit to charge. + * @returns {string} Transaction hash. + */ async chargeCredit(amount: number) { return await this.modelController.chargeCredit(this.modelName, amount); } + /** + * Withdraw credit from model. + * @param {number} amount Amount of credit to withdraw. + * @returns {string} Transaction hash. + */ async withdrawCredit(amount: number) { return await this.modelController.withdrawCredit(this.modelName, amount); } + /** + * Get credit balance of model. + * @returns {number} Amount of credit balance. + */ async getCreditBalance() { return await this.modelController.getCreditBalance(this.modelName); } + /** + * Get credit history of model. + * @returns {creditHistories} Histories of credit deposit and usage. + */ async getCreditHistory() { return await this.modelController.getCreditHistory(this.modelName); } + /** + * Use model with given request data. + * @param {string} requestData String data for request to model. + * @returns {string} Response data from model. + */ async use(requestData: string) { return await this.modelController.use(this.modelName, requestData); } + /** + * Change status of AI model container to Running. Need to be admin. Not implemented yet. + */ //NOTE(woojae): need admin async run() { await this.isAdmin(); return await this.modelController.run(this.modelName); } + /** + * Change status of AI model container to Stopped. Need to be admin. Not implemented yet. + */ //NOTE(woojae): need admin async stop() { await this.isAdmin(); return await this.modelController.stop(this.modelName); } + /** + * Change model configuration. Need to be admin. Not implemented yet. + * @param {any} config Configuration to change. Not implemented yet. + */ //NOTE(woojae): need admin async changeModelInfo(config: any) { await this.isAdmin(); diff --git a/src/types/type.ts b/src/types/type.ts index c797106..72ed108 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -30,6 +30,17 @@ export enum HISTORY_TYPE { USAGE = "USAGE", } +export type creditHistories = { + [timestamp: string]: creditHistory; +} + +export type creditHistory = { + type: HISTORY_TYPE; + amount: number; + transferKey?: string; + requestTimestamp?: string; +} + export type opResult = { code: number; bandwidth_gas_amount: number; From 76eb1b23677623f8508a38359283aa0f71dfad26 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 22 Sep 2023 10:55:47 +0900 Subject: [PATCH 216/235] refactor: delete --- src/model.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/model.ts b/src/model.ts index e3c0500..c2b003b 100644 --- a/src/model.ts +++ b/src/model.ts @@ -10,7 +10,6 @@ export default class Model { this.modelController = ModelController.getInstance(); } - //TODO(woojae): login not Required /** * Check if model is running. It throws error when model is not running. */ @@ -22,7 +21,6 @@ export default class Model { * Get model information. not implemented yet. * @returns {string} Model information. */ - //TODO(woojae): login not Required async getInformation() { return await this.modelController.getInformation(this.modelName); } @@ -32,7 +30,6 @@ export default class Model { * @param {string} rerquestData string data for request to model. * @returns {number} Estimated cost. */ - //TODO(woojae): login not Required async calculateCost (requestData: string) { return await this.modelController.calculateCost(this.modelName, requestData); } From a7a065b1102c6422c8ce3bf3d0ae9629c73540ab Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 22 Sep 2023 11:01:54 +0900 Subject: [PATCH 217/235] refactor: add types at modelController --- src/controllers/modelController.ts | 38 +++++++++++++++--------------- src/model.ts | 3 --- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 51982a9..24ef5ac 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -4,7 +4,7 @@ import { Path } from "../constants"; import { getRequestDepositOp, getTransferOp } from "../utils/operator"; import { buildSetOperation, buildTxBody } from "../utils/builder"; import Handler from "../handlers/handler"; -import { ContainerStatus } from "../types/type"; +import { ContainerStatus, creditHistories } from "../types/type"; export default class ModelController { private static instance: ModelController | undefined; @@ -17,7 +17,7 @@ export default class ModelController { return ModelController.instance; } - async isRunning(modelName: string) { + async isRunning(modelName: string): Promise { const isRunning = await this.ain.getValue(Path.app(modelName).status()); if(isRunning !== ContainerStatus.RUNNING) { throw new Error('Model is not running'); @@ -25,11 +25,11 @@ export default class ModelController { } //TODO(woojae): implement this - async getInformation(modelName: string) { + async getInformation(modelName: string): Promise { return await 'information of model'; } - async calculateCost(modelName: string, requestData: string) { + async calculateCost(modelName: string, requestData: string): Promise { const billingConfig = await this.ain.getValue(Path.app(modelName).billingConfig()); const token = requestData.split(' ').length; let cost = token * billingConfig.costPerToken; @@ -41,7 +41,7 @@ export default class ModelController { return cost; } - async chargeCredit(modelName: string, amount: number) { + async chargeCredit(modelName: string, amount: number): Promise { this.isLoggedIn(); this.isRunning(modelName); const transferKey = Date.now(); @@ -61,22 +61,22 @@ export default class ModelController { return await true; } - async getCreditBalance(modelName: string) { + async getCreditBalance(modelName: string): Promise { this.isLoggedIn(); const userAddress = this.ain.getAddress(); const balancePath = Path.app(modelName).balanceOfUser(userAddress); - return await this.ain.getValue(balancePath) | 0; + return await this.ain.getValue(balancePath) as number | 0; } - async getCreditHistory(modelName: string) { + async getCreditHistory(modelName: string): Promise { this.isLoggedIn(); const userAddress = this.ain.getAddress(); const creditHistoryPath = Path.app(modelName).historyOfUser(userAddress); - return await this.ain.getValue(creditHistoryPath); + return await this.ain.getValue(creditHistoryPath) as creditHistories; } //TODO(woojae): connect with handler - async use(modelName: string, requestData: string) { + async use(modelName: string, requestData: string) : Promise { this.isLoggedIn(); this.isRunning(modelName); const result = await new Promise(async (resolve, reject) => { @@ -90,32 +90,32 @@ export default class ModelController { await this.ain.sendTransaction(txBody); return requestKey; }); - return result; + return result as string; } //TODO(woojae): implement this //NOTE(woojae): need admin - async run(modelName: string) { - return await true; + async run(modelName: string): Promise { + await true; } //TODO(woojae): implement this //NOTE:(woojae): need admin - async stop(modelName: string) { - return await true; + async stop(modelName: string): Promise { + await true; } //TODO:(woojae): implement this //NOTE:(woojae): need admin - async changeModelInfo(modelName: string, config: any) { - return await true; + async changeModelInfo(modelName: string, config: any):Promise { + await true; } - private async getDepositAddress(appName: string) { + private async getDepositAddress(appName: string): Promise { return (await this.ain.getValue(Path.app(appName).billingConfig())).depositAddress; } - private isLoggedIn() { + private isLoggedIn(): boolean { if(!this.ain.getDefaultAccount()) throw new Error('You should login First.'); return true; diff --git a/src/model.ts b/src/model.ts index c2b003b..7ca5f31 100644 --- a/src/model.ts +++ b/src/model.ts @@ -80,7 +80,6 @@ export default class Model { /** * Change status of AI model container to Running. Need to be admin. Not implemented yet. */ - //NOTE(woojae): need admin async run() { await this.isAdmin(); return await this.modelController.run(this.modelName); @@ -89,7 +88,6 @@ export default class Model { /** * Change status of AI model container to Stopped. Need to be admin. Not implemented yet. */ - //NOTE(woojae): need admin async stop() { await this.isAdmin(); return await this.modelController.stop(this.modelName); @@ -99,7 +97,6 @@ export default class Model { * Change model configuration. Need to be admin. Not implemented yet. * @param {any} config Configuration to change. Not implemented yet. */ - //NOTE(woojae): need admin async changeModelInfo(config: any) { await this.isAdmin(); return await this.modelController.changeModelInfo(this.modelName, config); From 347abbb07b796318a75991c6e6af07608623036a Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 22 Sep 2023 11:04:03 +0900 Subject: [PATCH 218/235] .gitignore docs/ --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index c6bba59..c33d004 100644 --- a/.gitignore +++ b/.gitignore @@ -128,3 +128,6 @@ dist .yarn/build-state.yml .yarn/install-state.gz .pnp.* + +# typedoc +docs/ \ No newline at end of file From 30f19d725228fcace1fbfef921e9161e0568b5d7 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 22 Sep 2023 11:06:02 +0900 Subject: [PATCH 219/235] refactor: getInformation --- src/controllers/modelController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 24ef5ac..8943b0c 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -25,7 +25,7 @@ export default class ModelController { } //TODO(woojae): implement this - async getInformation(modelName: string): Promise { + async getInformation(modelName: string): Promise { return await 'information of model'; } From 8db5b1d881f66fee0d9dfd83daf6e67bc8028f4d Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 22 Sep 2023 11:13:21 +0900 Subject: [PATCH 220/235] refactor --- src/controllers/modelController.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 8943b0c..6c52782 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -75,7 +75,6 @@ export default class ModelController { return await this.ain.getValue(creditHistoryPath) as creditHistories; } - //TODO(woojae): connect with handler async use(modelName: string, requestData: string) : Promise { this.isLoggedIn(); this.isRunning(modelName); @@ -93,21 +92,18 @@ export default class ModelController { return result as string; } - //TODO(woojae): implement this - //NOTE(woojae): need admin + //TODO(woojae): implement this. async run(modelName: string): Promise { await true; } - //TODO(woojae): implement this - //NOTE:(woojae): need admin + //TODO(woojae): implement this. async stop(modelName: string): Promise { await true; } //TODO:(woojae): implement this - //NOTE:(woojae): need admin - async changeModelInfo(modelName: string, config: any):Promise { + async changeModelInfo(modelName: string, config: any): Promise { await true; } From 30aaafab62a64b9ff89752e98dcf5fe50a934885 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 22 Sep 2023 11:13:43 +0900 Subject: [PATCH 221/235] indent --- src/controllers/modelController.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 6c52782..972da19 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -55,7 +55,6 @@ export default class ModelController { return this.ain.sendTransaction(txBody); } - //TODO(woojae): implement this async withdrawCredit(modelName: string, amount: number) { return await true; From 42054e1e9ca9fc61476d156f7d3697da4552a9a0 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 22 Sep 2023 11:35:27 +0900 Subject: [PATCH 222/235] feat: model run and stop --- src/controllers/modelController.ts | 32 +++++++++++++++++++----------- src/model.ts | 12 +++++++++-- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 972da19..52c6c85 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -42,7 +42,6 @@ export default class ModelController { } async chargeCredit(modelName: string, amount: number): Promise { - this.isLoggedIn(); this.isRunning(modelName); const transferKey = Date.now(); const userAddress = this.ain.getAddress(); @@ -61,21 +60,18 @@ export default class ModelController { } async getCreditBalance(modelName: string): Promise { - this.isLoggedIn(); const userAddress = this.ain.getAddress(); const balancePath = Path.app(modelName).balanceOfUser(userAddress); return await this.ain.getValue(balancePath) as number | 0; } async getCreditHistory(modelName: string): Promise { - this.isLoggedIn(); const userAddress = this.ain.getAddress(); const creditHistoryPath = Path.app(modelName).historyOfUser(userAddress); return await this.ain.getValue(creditHistoryPath) as creditHistories; } async use(modelName: string, requestData: string) : Promise { - this.isLoggedIn(); this.isRunning(modelName); const result = await new Promise(async (resolve, reject) => { const requestKey = Date.now(); @@ -91,14 +87,18 @@ export default class ModelController { return result as string; } - //TODO(woojae): implement this. async run(modelName: string): Promise { - await true; + const statusPath = Path.app(modelName).status(); + const statusOp = buildSetOperation("SET_VALUE", statusPath, ContainerStatus.RUNNING); + const txBody = buildTxBody(statusOp); + await this.ain.sendTransaction(txBody); } - //TODO(woojae): implement this. async stop(modelName: string): Promise { - await true; + const statusPath = Path.app(modelName).status(); + const statusOp = buildSetOperation("SET_VALUE", statusPath, ContainerStatus.STOP); + const txBody = buildTxBody(statusOp); + await this.ain.sendTransaction(txBody); } //TODO:(woojae): implement this @@ -106,13 +106,21 @@ export default class ModelController { await true; } - private async getDepositAddress(appName: string): Promise { - return (await this.ain.getValue(Path.app(appName).billingConfig())).depositAddress; + private async getDepositAddress(modelName: string): Promise { + return (await this.ain.getValue(Path.app(modelName).billingConfig())).depositAddress; } - private isLoggedIn(): boolean { + isLoggedIn(): void { if(!this.ain.getDefaultAccount()) throw new Error('You should login First.'); - return true; + } + + async isAdmin(modelName: string): Promise { + this.isLoggedIn(); + const adminPath = Path.app(modelName); + const adminList = await this.ain.getValue(adminPath); + if(!adminList[this.ain.getAddress()]) { + throw new Error('You are not admin'); + } } } \ No newline at end of file diff --git a/src/model.ts b/src/model.ts index 7ca5f31..e8c2cf7 100644 --- a/src/model.ts +++ b/src/model.ts @@ -40,6 +40,7 @@ export default class Model { * @returns {string} Transaction hash. */ async chargeCredit(amount: number) { + this.isLoggedIn(); return await this.modelController.chargeCredit(this.modelName, amount); } @@ -49,6 +50,7 @@ export default class Model { * @returns {string} Transaction hash. */ async withdrawCredit(amount: number) { + this.isLoggedIn(); return await this.modelController.withdrawCredit(this.modelName, amount); } @@ -57,6 +59,7 @@ export default class Model { * @returns {number} Amount of credit balance. */ async getCreditBalance() { + this.isLoggedIn(); return await this.modelController.getCreditBalance(this.modelName); } @@ -65,6 +68,7 @@ export default class Model { * @returns {creditHistories} Histories of credit deposit and usage. */ async getCreditHistory() { + this.isLoggedIn(); return await this.modelController.getCreditHistory(this.modelName); } @@ -74,6 +78,7 @@ export default class Model { * @returns {string} Response data from model. */ async use(requestData: string) { + this.isLoggedIn(); return await this.modelController.use(this.modelName, requestData); } @@ -102,8 +107,11 @@ export default class Model { return await this.modelController.changeModelInfo(this.modelName, config); } - //TODO(woojae): implement this private async isAdmin() { - return true; + return this.modelController.isAdmin(this.modelName); + } + + private isLoggedIn() { + return this.modelController.isLoggedIn(); } } From 8cdefa9f5b4c9e37e5f67e92a251b85e55c6fb22 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Fri, 22 Sep 2023 12:01:02 +0900 Subject: [PATCH 223/235] fix: adminPath --- src/controllers/modelController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index 52c6c85..40eafed 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -117,7 +117,7 @@ export default class ModelController { async isAdmin(modelName: string): Promise { this.isLoggedIn(); - const adminPath = Path.app(modelName); + const adminPath = `/manage_app/${modelName}/config/admin`; const adminList = await this.ain.getValue(adminPath); if(!adminList[this.ain.getAddress()]) { throw new Error('You are not admin'); From 0f8a8d620b610e7e80ee6c1d20e0f547a78dee52 Mon Sep 17 00:00:00 2001 From: akastercomcom Date: Fri, 22 Sep 2023 13:50:44 +0900 Subject: [PATCH 224/235] Update docs.yml --- .github/workflows/docs.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f04d420..4c0bce8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,8 +1,7 @@ name: Docs on: push: - branches: - - main + branches: [main, develop] jobs: build: runs-on: ubuntu-latest @@ -19,4 +18,4 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs \ No newline at end of file + publish_dir: ./docs From 9d4e1e1774f2ee6b034905f8ac6066e3c92d07b6 Mon Sep 17 00:00:00 2001 From: akastercomcom Date: Fri, 22 Sep 2023 13:51:57 +0900 Subject: [PATCH 225/235] Update docs.yml --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4c0bce8..707674a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,7 +11,7 @@ jobs: fetch-depth: 0 # otherwise, you will failed to push refs to dest repo - uses: actions/setup-node@v3 with: - node-version: 14 # typedoc require node version >= 14.14 + node-version: 16 # typedoc require node version >= 14.14 - name: Build Docs run: yarn && yarn docs - name: Deploy From 9e533b4d43738b9a364f5a77710373aa96fbb122 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 25 Sep 2023 09:19:13 +0900 Subject: [PATCH 226/235] feat: typedoc --- typedoc.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 typedoc.json diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..e09d1e3 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,4 @@ +// typedoc.json +{ + "excludeNotDocumented": true, +} From 1a4f733f71d5042bfb64a64738971412283423b8 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 25 Sep 2023 09:20:54 +0900 Subject: [PATCH 227/235] fix --- typedoc.json | 1 - 1 file changed, 1 deletion(-) diff --git a/typedoc.json b/typedoc.json index e09d1e3..6f76ec6 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,4 +1,3 @@ -// typedoc.json { "excludeNotDocumented": true, } From 47d6d86a2d20378aab22913d38d598a26cc73f92 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 25 Sep 2023 09:26:39 +0900 Subject: [PATCH 228/235] fix: entrypoint --- typedoc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typedoc.json b/typedoc.json index 6f76ec6..56b39ed 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,3 +1,3 @@ { - "excludeNotDocumented": true, + "entryPoints": ["./src/ainize.ts", "./src/model.ts"] } From df20068d6220f88382f7245dc1ae35983b2b4f08 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 25 Sep 2023 09:50:22 +0900 Subject: [PATCH 229/235] fix: hide private --- .DS_Store | Bin 0 -> 6148 bytes package.json | 2 +- src/ainize.ts | 4 ++-- typedoc.json | 17 +++++++++++++++-- 4 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ca2b7874ee44cef1857d5487e8c8184223131c55 GIT binary patch literal 6148 zcmeH~F$w}f3`G;&La^D=avBfd4F=H@>;(h`8(BfodXDZ-CJ2t!BJu;tpJXO1`-+{7 zi0JxuSc&u^GJ~7S(n4d3ypw~RWiQwJa2ZeM@rat$Cvn!+@Lrnz*rt#G36KB@kN^q% z5COZlVY7KvMiL+a5_l4@??Zx{=Fn2rKOG1@0zf;I-LUpq0-CG<&7q|#Dlm=dL8DcD z46(YmLsOi~p`~hV7meXV4M3`}dgXhH(h?7~0-B+w9;*1Wg-e+&OK|2Hj6Nq_|Y zjDU8VVY9|d#ohY$dRE^>)z$?L_2URHKLJSWDqg_du%B!J&7q|#Dlq;CI0gn1_$q-1 D?w=C8 literal 0 HcmV?d00001 diff --git a/package.json b/package.json index a0804b7..418f92c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "build": "rm -rf ./dist && tsc", "dev": "rm -rf ./dist && tsc", "test": "NODE_ENV=dev jest --passWithNoTests", - "docs": "yarn build && typedoc --out docs" + "docs": "yarn build && typedoc --options typedoc.json --out docs" }, "engines": { "node": ">=16" diff --git a/src/ainize.ts b/src/ainize.ts index 1570f84..f9977d1 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -12,10 +12,10 @@ import { Account } from "@ainblockchain/ain-util"; export default class Ainize { private cache: NodeCache; private handler: Handler = Handler.getInstance(); - ain: AinModule = AinModule.getInstance(); + private ain: AinModule = AinModule.getInstance(); middleware: Middleware; internal: Internal; - appController: AppController = AppController.getInstance(); + private appController: AppController = AppController.getInstance(); constructor(chainId: 1 | 0) { this.ain.initAin(chainId); diff --git a/typedoc.json b/typedoc.json index 56b39ed..a62fba2 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,3 +1,16 @@ { - "entryPoints": ["./src/ainize.ts", "./src/model.ts"] -} + "out": "./docs/dist/api/", + "includes": "./src", + "exclude": [ + "**/src/controllers/**/*", + "**/src/handlers/**/*", + "**/src/middlewares/**/*", + "**/src/ain.ts", + "**/src/internal.ts", + "**/src/utils/**/*", + "**/src/constants.ts", + ], + + "excludeExternals": true, + "excludePrivate": true +} \ No newline at end of file From 5562e4373b1817200cd7b7a22bbbf4f744924d68 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 25 Sep 2023 10:41:41 +0900 Subject: [PATCH 230/235] docs: fix readme --- README.md | 55 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 88e726e..78ed6ef 100644 --- a/README.md +++ b/README.md @@ -16,42 +16,51 @@ yarn install @ainize-team/ainize-sdk ### Import ```typescript import Ainize from '@ainize-team/ainize-sdk' -const ainize = new Ainize(, ); +const ainize = new Ainize(); ``` CHAIN_ID - 0: AI Network test net - 1: AI Network main net -### App -You can manage the AI Network app required for operating AI Services. +### Login +You should login to ainize with AI Network account before deploy the container. ```typescript -ainize.app.create(, ); -ainize.app.setTriggerFunction(, ); -ainize.app.setBillingConfig(, ); -ainize.app.setRules(, ); -ainize.app.addAdmin(,
); -ainize.app.deleteAdmin(,
); +ainize.login(); ``` -- APP_NAME: The app name to be registered on AI Network. -- SERVICE_URL: The URL for sending API requests to your AI Service. +### Deploy +You can deploy your AI model to ainize. +```typescript +const model = await ainize.deploy(); +``` +CONFIGURATION +- modelName: The name you want to deploying model. +- billingConfig: Billing configuration required for model usage. + - depositAddress: The address for receiving AIN deposits. + - costPerToken: Cost per token for model usage. + - minCost: Minimum cost. + - maxCost: Maximum cost. (optional) -### Service -You can use AI Service. +You can stop or run your model container. Model deployer only can use this. ```typescript -ainize.service.deposit(, ); -ainize.service.writeRequest(, , ); +model.stop(); +model.run(); ``` -### Admin -You can get user requests. +### Using Model +You can use a model using `ainize.model()`. ```typescript -ainize.admin.deposit(); -ainize.admin.writeResponse(, , , ); +const model = await ainize.model(); ``` -## Test -```bash -yarn test -``` \ No newline at end of file +You should deposit AIN to credit before using model. +```typescript +await model.deposit(); +const balance = await model.getCreditBalance(); +``` + +If you have enough credit, you can use the model. +```typescript +const result = await model.use(); +``` From 4e92b0e3892524ae86c66a0d1690e8636c82ff24 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Mon, 25 Sep 2023 10:41:49 +0900 Subject: [PATCH 231/235] fix: unused value --- src/types/type.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/types/type.ts b/src/types/type.ts index 72ed108..a34ab71 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -22,7 +22,6 @@ export type appBillingConfig = { costPerToken: number; minCost: number; maxCost?: number; - responseTimeout?: number; }; export enum HISTORY_TYPE { From 6a6fc6b9b1b84a49d7627978fd9245fbcd0f79ae Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 25 Sep 2023 16:37:25 +0900 Subject: [PATCH 232/235] refactor: rename --- src/ainize.ts | 40 +++--- ...odelController.ts => serviceController.ts} | 68 +++++----- src/model.ts | 117 ------------------ src/service.ts | 117 ++++++++++++++++++ src/types/type.ts | 2 +- 5 files changed, 172 insertions(+), 172 deletions(-) rename src/controllers/{modelController.ts => serviceController.ts} (55%) delete mode 100644 src/model.ts create mode 100644 src/service.ts diff --git a/src/ainize.ts b/src/ainize.ts index 1570f84..120afc8 100644 --- a/src/ainize.ts +++ b/src/ainize.ts @@ -3,7 +3,7 @@ import Middleware from "./middlewares/middleware"; import { DEFAULT_BILLING_CONFIG, Path, getBlockChainEndpoint } from "./constants"; import Handler from "./handlers/handler"; import AppController from "./controllers/appController"; -import Model from "./model"; +import Service from "./service"; import { deployConfig } from "./types/type"; import AinModule from "./ain"; import Internal from "./internal"; @@ -61,12 +61,12 @@ export default class Ainize { // FIXME(yoojin): add config type and change param type. /** - * Deploy AI model container. - * @param {deployConfig} deployConfig Set configuration for setting container. modelName, billingConfig, etc. - * @returns {Model} Deployed model object. + * Deploy AI service container. + * @param {deployConfig} deployConfig Set configuration for setting container. serviceName, billingConfig, etc. + * @returns {Service} Deployed service object. */ // TODO(yoojin, woojae): Deploy container, advanced. - async deploy({modelName, billingConfig, serviceUrl}: deployConfig): Promise { + async deploy({serviceName, billingConfig, serviceUrl}: deployConfig): Promise { if(!this.ain.isDefaultAccountExist()) { throw new Error('you should login first'); } @@ -81,28 +81,28 @@ export default class Ainize { } // NOTE(yoojin): For test. We make fixed url on service. if (!serviceUrl) { - serviceUrl = `https://${modelName}.ainetwork.xyz`; + serviceUrl = `https://${serviceName}.ainetwork.xyz`; } - const modelPath = Path.app(modelName).status(); - await this.handler.subscribe(modelPath, resolve); - await this.appController.createApp({ appName: modelName, serviceUrl, billingConfig }); + const servicePath = Path.app(serviceName).status(); + await this.handler.subscribe(servicePath, resolve); + await this.appController.createApp({ appName: serviceName, serviceUrl, billingConfig }); }); - console.log(`${modelName} deploy success!`); - return this.model(modelName); + console.log(`${serviceName} deploy success!`); + return this.getService(serviceName); } /** - * Get deployed model. - * @param modelName - * @returns {Model} Deployed model object. + * Get deployed service. + * @param serviceName + * @returns {Service} Deployed service object. */ - async model(modelName: string): Promise { - const modelPath = Path.app(modelName).root(); - const modelData = await this.ain.getValue(modelPath); - if(!modelData) { - throw new Error("Model not found"); + async getService(serviceName: string): Promise { + const servicePath = Path.app(serviceName).root(); + const serviceData = await this.ain.getValue(servicePath); + if(!serviceData) { + throw new Error("Service not found"); } - return new Model(modelName); + return new Service(serviceName); } test() { diff --git a/src/controllers/modelController.ts b/src/controllers/serviceController.ts similarity index 55% rename from src/controllers/modelController.ts rename to src/controllers/serviceController.ts index 40eafed..64920f3 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/serviceController.ts @@ -6,31 +6,31 @@ import { buildSetOperation, buildTxBody } from "../utils/builder"; import Handler from "../handlers/handler"; import { ContainerStatus, creditHistories } from "../types/type"; -export default class ModelController { - private static instance: ModelController | undefined; +export default class ServiceController { + private static instance: ServiceController | undefined; private ain = AinModule.getInstance(); private handler = Handler.getInstance(); static getInstance() { - if(!ModelController.instance){ - ModelController.instance = new ModelController(); + if(!ServiceController.instance){ + ServiceController.instance = new ServiceController(); } - return ModelController.instance; + return ServiceController.instance; } - async isRunning(modelName: string): Promise { - const isRunning = await this.ain.getValue(Path.app(modelName).status()); + async isRunning(serviceName: string): Promise { + const isRunning = await this.ain.getValue(Path.app(serviceName).status()); if(isRunning !== ContainerStatus.RUNNING) { - throw new Error('Model is not running'); + throw new Error('Service is not running'); } } //TODO(woojae): implement this - async getInformation(modelName: string): Promise { - return await 'information of model'; + async getInformation(serviceName: string): Promise { + return await 'information of service'; } - async calculateCost(modelName: string, requestData: string): Promise { - const billingConfig = await this.ain.getValue(Path.app(modelName).billingConfig()); + async calculateCost(serviceName: string, requestData: string): Promise { + const billingConfig = await this.ain.getValue(Path.app(serviceName).billingConfig()); const token = requestData.split(' ').length; let cost = token * billingConfig.costPerToken; if (billingConfig.minCost && cost < billingConfig.minCost) { @@ -41,44 +41,44 @@ export default class ModelController { return cost; } - async chargeCredit(modelName: string, amount: number): Promise { - this.isRunning(modelName); + async chargeCredit(serviceName: string, amount: number): Promise { + this.isRunning(serviceName); const transferKey = Date.now(); const userAddress = this.ain.getAddress(); - const depositAddress = await this.getDepositAddress(modelName); + const depositAddress = await this.getDepositAddress(serviceName); const op_list: SetOperation[] = [ getTransferOp(userAddress, depositAddress, transferKey.toString(), amount), - getRequestDepositOp(modelName, userAddress, transferKey.toString(), amount) + getRequestDepositOp(serviceName, userAddress, transferKey.toString(), amount) ] const txBody = buildTxBody(op_list, transferKey); return this.ain.sendTransaction(txBody); } //TODO(woojae): implement this - async withdrawCredit(modelName: string, amount: number) { + async withdrawCredit(serviceName: string, amount: number) { return await true; } - async getCreditBalance(modelName: string): Promise { + async getCreditBalance(serviceName: string): Promise { const userAddress = this.ain.getAddress(); - const balancePath = Path.app(modelName).balanceOfUser(userAddress); + const balancePath = Path.app(serviceName).balanceOfUser(userAddress); return await this.ain.getValue(balancePath) as number | 0; } - async getCreditHistory(modelName: string): Promise { + async getCreditHistory(serviceName: string): Promise { const userAddress = this.ain.getAddress(); - const creditHistoryPath = Path.app(modelName).historyOfUser(userAddress); + const creditHistoryPath = Path.app(serviceName).historyOfUser(userAddress); return await this.ain.getValue(creditHistoryPath) as creditHistories; } - async use(modelName: string, requestData: string) : Promise { - this.isRunning(modelName); + async request(serviceName: string, requestData: string) : Promise { + this.isRunning(serviceName); const result = await new Promise(async (resolve, reject) => { const requestKey = Date.now(); const requesterAddress = this.ain.getAddress(); - const responsePath = Path.app(modelName).response(requesterAddress, requestKey.toString()); + const responsePath = Path.app(serviceName).response(requesterAddress, requestKey.toString()); await this.handler.subscribe(responsePath, resolve); - const requestPath = Path.app(modelName).request(requesterAddress, requestKey); + const requestPath = Path.app(serviceName).request(requesterAddress, requestKey); const requestOp = buildSetOperation("SET_VALUE", requestPath, {prompt: requestData}); const txBody = buildTxBody(requestOp); await this.ain.sendTransaction(txBody); @@ -87,27 +87,27 @@ export default class ModelController { return result as string; } - async run(modelName: string): Promise { - const statusPath = Path.app(modelName).status(); + async run(serviceName: string): Promise { + const statusPath = Path.app(serviceName).status(); const statusOp = buildSetOperation("SET_VALUE", statusPath, ContainerStatus.RUNNING); const txBody = buildTxBody(statusOp); await this.ain.sendTransaction(txBody); } - async stop(modelName: string): Promise { - const statusPath = Path.app(modelName).status(); + async stop(serviceName: string): Promise { + const statusPath = Path.app(serviceName).status(); const statusOp = buildSetOperation("SET_VALUE", statusPath, ContainerStatus.STOP); const txBody = buildTxBody(statusOp); await this.ain.sendTransaction(txBody); } //TODO:(woojae): implement this - async changeModelInfo(modelName: string, config: any): Promise { + async changeServiceInfo(serviceName: string, config: any): Promise { await true; } - private async getDepositAddress(modelName: string): Promise { - return (await this.ain.getValue(Path.app(modelName).billingConfig())).depositAddress; + private async getDepositAddress(serviceName: string): Promise { + return (await this.ain.getValue(Path.app(serviceName).billingConfig())).depositAddress; } isLoggedIn(): void { @@ -115,9 +115,9 @@ export default class ModelController { throw new Error('You should login First.'); } - async isAdmin(modelName: string): Promise { + async isAdmin(serviceName: string): Promise { this.isLoggedIn(); - const adminPath = `/manage_app/${modelName}/config/admin`; + const adminPath = `/manage_app/${serviceName}/config/admin`; const adminList = await this.ain.getValue(adminPath); if(!adminList[this.ain.getAddress()]) { throw new Error('You are not admin'); diff --git a/src/model.ts b/src/model.ts deleted file mode 100644 index e8c2cf7..0000000 --- a/src/model.ts +++ /dev/null @@ -1,117 +0,0 @@ -import ModelController from "./controllers/modelController"; -import { creditHistories } from "./types/type"; - -export default class Model { - modelName: string; - private modelController: ModelController; - - constructor(modelName: string) { - this.modelName = modelName; - this.modelController = ModelController.getInstance(); - } - - /** - * Check if model is running. It throws error when model is not running. - */ - async isRunning() { - return await this.modelController.isRunning(this.modelName); - } - - /** - * Get model information. not implemented yet. - * @returns {string} Model information. - */ - async getInformation() { - return await this.modelController.getInformation(this.modelName); - } - - /** - * Calculate estimated cost for given request data. - * @param {string} rerquestData string data for request to model. - * @returns {number} Estimated cost. - */ - async calculateCost (requestData: string) { - return await this.modelController.calculateCost(this.modelName, requestData); - } - - /** - * Charge credit to model. - * @param {number} amount Amount of credit to charge. - * @returns {string} Transaction hash. - */ - async chargeCredit(amount: number) { - this.isLoggedIn(); - return await this.modelController.chargeCredit(this.modelName, amount); - } - - /** - * Withdraw credit from model. - * @param {number} amount Amount of credit to withdraw. - * @returns {string} Transaction hash. - */ - async withdrawCredit(amount: number) { - this.isLoggedIn(); - return await this.modelController.withdrawCredit(this.modelName, amount); - } - - /** - * Get credit balance of model. - * @returns {number} Amount of credit balance. - */ - async getCreditBalance() { - this.isLoggedIn(); - return await this.modelController.getCreditBalance(this.modelName); - } - - /** - * Get credit history of model. - * @returns {creditHistories} Histories of credit deposit and usage. - */ - async getCreditHistory() { - this.isLoggedIn(); - return await this.modelController.getCreditHistory(this.modelName); - } - - /** - * Use model with given request data. - * @param {string} requestData String data for request to model. - * @returns {string} Response data from model. - */ - async use(requestData: string) { - this.isLoggedIn(); - return await this.modelController.use(this.modelName, requestData); - } - - /** - * Change status of AI model container to Running. Need to be admin. Not implemented yet. - */ - async run() { - await this.isAdmin(); - return await this.modelController.run(this.modelName); - } - - /** - * Change status of AI model container to Stopped. Need to be admin. Not implemented yet. - */ - async stop() { - await this.isAdmin(); - return await this.modelController.stop(this.modelName); - } - - /** - * Change model configuration. Need to be admin. Not implemented yet. - * @param {any} config Configuration to change. Not implemented yet. - */ - async changeModelInfo(config: any) { - await this.isAdmin(); - return await this.modelController.changeModelInfo(this.modelName, config); - } - - private async isAdmin() { - return this.modelController.isAdmin(this.modelName); - } - - private isLoggedIn() { - return this.modelController.isLoggedIn(); - } -} diff --git a/src/service.ts b/src/service.ts new file mode 100644 index 0000000..20f2b90 --- /dev/null +++ b/src/service.ts @@ -0,0 +1,117 @@ +import ServiceController from "./controllers/serviceController"; +import { creditHistories } from "./types/type"; + +export default class Service { + serviceName: string; + private serviceController: ServiceController; + + constructor(serviceName: string) { + this.serviceName = serviceName; + this.serviceController = ServiceController.getInstance(); + } + + /** + * Check if service is running. It throws error when service is not running. + */ + async isRunning() { + return await this.serviceController.isRunning(this.serviceName); + } + + /** + * Get service information. not implemented yet. + * @returns {string} Service information. + */ + async getInformation() { + return await this.serviceController.getInformation(this.serviceName); + } + + /** + * Calculate estimated cost for given request data. + * @param {string} rerquestData string data for request to service. + * @returns {number} Estimated cost. + */ + async calculateCost (requestData: string) { + return await this.serviceController.calculateCost(this.serviceName, requestData); + } + + /** + * Charge credit to service. + * @param {number} amount Amount of credit to charge. + * @returns {string} Transaction hash. + */ + async chargeCredit(amount: number) { + this.isLoggedIn(); + return await this.serviceController.chargeCredit(this.serviceName, amount); + } + + /** + * Withdraw credit from service. + * @param {number} amount Amount of credit to withdraw. + * @returns {string} Transaction hash. + */ + async withdrawCredit(amount: number) { + this.isLoggedIn(); + return await this.serviceController.withdrawCredit(this.serviceName, amount); + } + + /** + * Get credit balance of service. + * @returns {number} Amount of credit balance. + */ + async getCreditBalance() { + this.isLoggedIn(); + return await this.serviceController.getCreditBalance(this.serviceName); + } + + /** + * Get credit history of service. + * @returns {creditHistories} Histories of credit deposit and usage. + */ + async getCreditHistory() { + this.isLoggedIn(); + return await this.serviceController.getCreditHistory(this.serviceName); + } + + /** + * Use service with given request data. + * @param {string} requestData String data for request to service. + * @returns {string} Response data from service. + */ + async request(requestData: string) { + this.isLoggedIn(); + return await this.serviceController.use(this.serviceName, requestData); + } + + /** + * Change status of AI service container to Running. Need to be admin. Not implemented yet. + */ + async run() { + await this.isAdmin(); + return await this.serviceController.run(this.serviceName); + } + + /** + * Change status of AI service container to Stopped. Need to be admin. Not implemented yet. + */ + async stop() { + await this.isAdmin(); + return await this.serviceController.stop(this.serviceName); + } + + /** + * Change service configuration. Need to be admin. Not implemented yet. + * @param {any} config Configuration to change. Not implemented yet. + */ + async changeServiceInfo(config: any) { + await this.isAdmin(); + return await this.serviceController.changeServiceInfo(this.serviceName, config); + } + + private async isAdmin() { + return this.serviceController.isAdmin(this.serviceName); + } + + private isLoggedIn() { + return this.serviceController.isLoggedIn(); + } +} diff --git a/src/types/type.ts b/src/types/type.ts index 72ed108..2b9b6a9 100644 --- a/src/types/type.ts +++ b/src/types/type.ts @@ -82,7 +82,7 @@ export type deposit = { } export type deployConfig = { - modelName: string, + serviceName: string, billingConfig?: appBillingConfig, serviceUrl?: string, // NOTE(yoojin): for test. } From 4da9d98892951bbb041b685d840f2326b1af1060 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Mon, 25 Sep 2023 16:37:44 +0900 Subject: [PATCH 233/235] refactor: rename --- src/service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service.ts b/src/service.ts index 20f2b90..6766750 100644 --- a/src/service.ts +++ b/src/service.ts @@ -79,7 +79,7 @@ export default class Service { */ async request(requestData: string) { this.isLoggedIn(); - return await this.serviceController.use(this.serviceName, requestData); + return await this.serviceController.request(this.serviceName, requestData); } /** From b884ddc1125527f0ab5ac733c59b06620319bfc5 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 26 Sep 2023 15:20:07 +0900 Subject: [PATCH 234/235] fix: docs pipeline --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 707674a..b85caaf 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,7 +1,7 @@ name: Docs on: push: - branches: [main, develop] + branches: [main] jobs: build: runs-on: ubuntu-latest From 298417dd61f426c86eb2dd14dc20b4767c5cb4f0 Mon Sep 17 00:00:00 2001 From: Yoojin Ko Date: Tue, 26 Sep 2023 15:21:08 +0900 Subject: [PATCH 235/235] chore: update package ver --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 418f92c..6ae2f5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ainize-team/ainize-sdk", - "version": "0.0.1", + "version": "1.0.0", "main": "dist/ainize.js", "types": "dist/ainize.d.ts", "scripts": {